man31

NX1P2 FTP Data Sending Process

3 posts in this topic

Hello people!

I'm working on a project that part of it, is to send data that are collected in the PLC, via email to office. The PLC and HMI I use (NX1P2 and NB series),they do not support any email instruction, unfortunately. 

To overcome this obstacle, I decided to forward those data (saved in .csv file) by using the FTPPutFile instruction and to upload the csv file from PLC to a dedicated folder to the office computer. PLC will be the client (passive) and the computer will be the server.

And here is where I need your help.. The set up is offline by using a dummy ethernet switch. I set an IP address in the computer, as well as to the PLC side.

If I set the PLC as a server (FTP server ->use -> port 21,pass & username), I can connect from the office computer to the PLC and download the file, by using cmd.

When I try to use PLC as a client, Ftpputfile instruction always gives errorid 2407 and erroridex 00000226.

In the FTPPutFile instruction box I set the following:

ConnectSvr: IP address of PC, port 21, username & pass 

SvrDirName: the physical path I set when I configured the FTP site on PC (C:\...)

LocalDirName: '/'

FileName: '.. .csv' 

 

Further more, in the file explorer I type ftp:\\(IP address of PC), I log in but when I try to create a new folder 550 error is coming up (I suppose this is for permissions).

Am I missing something? Do you have any suggestions/guide for making this work? I am not an IT and I am not experienced in that field so any help would be great!

 

Thanks!

Man31

 

 

 

 

 

Edited by man31

Share this post


Link to post
Share on other sites

An email function block exists for NJ/NX controllers but it uses SMTP auth. Most servers don't accept this anymore but if you were running you own local server you can make it work.

That particular error you're getting means:

Execution of the requested file operation was not possible because using the file was not possible, e.g., accessing it was not possible because it was not found.

The suggested resolution is:

Make sure that a file with the specified name exists in the directory on the FTP server.

Check the access rights of the specified file.

 
Looking back through an old project it looks like I specified the the SvrDirName as 'FTP' (which is a folder in the root directory of my FTP server)
LDirName I had 'SDDir' specified (which was a folder on my SD card)
 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now