News:

  • April 01, 2026, 06:18:02 PM

Login with username, password and session length

Author Topic: looking for FTPPUT configuration  (Read 13284 times)

jay.mason@victaulic.com

  • Jr. Member
  • **
  • Posts: 10
looking for FTPPUT configuration
« on: October 07, 2024, 11:41:27 AM »
Good day.
I am currently attempting to set up a brx plc to send a log file to a remote ftp server on a windows 10 pc.
I am recording the information and storing it to the PLC SD card .
I have configured the windows 10 as a FTP server. verified its functionality by sending from my programming pc to the server.
the FTPPUT is in the ladder program being activated by a contact closure on the HMI.
I get this error [ Unknown error in FTPPUT @000000C9 (FTPPUT at $Main@107)]
is there a source for the configuration information so that i can get this to function.
thank you

Bolt

  • Hero Member
  • *****
  • Posts: 594
Re: looking for FTPPUT configuration
« Reply #1 on: October 07, 2024, 11:55:36 AM »
I like to do simple sanity checks on the setup to make sure the network is routing the connection properly. If the PLC is behind a device such as a (VPN) router, I like to plug in a laptop as well to to make sure you can use simple command prompt FTP commands to ensure it's able to connect to the windows PC with FTP server. Ensures all the external settings are sufficient for the BRX to be able to do the same.

Also, I'm not 100% sure, but you may need to close the SD card's file (with FILECLOSE instruction) before being able to FTPPUT it?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3801
    • Host Engineering
Re: looking for FTPPUT configuration
« Reply #2 on: October 07, 2024, 12:02:24 PM »
Also, I'm not 100% sure, but you may need to close the SD card's file (with FILECLOSE instruction) before being able to FTPPUT it?
FILELOG does the Open/Append/Close internally as part of a single log entry.
But if you do FILEOPEN manually, with FILEWRITEs manually, it will remain open until you do a FILECLOSE, so not even FTP can read it/send it until you do a FILECLOSE.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6152
  • Yes Pinky, Do-more will control the world!
Re: looking for FTPPUT configuration
« Reply #3 on: October 07, 2024, 12:07:23 PM »
I'd love to know what the actual error is. The last 4 errors and the associated program addresses are stored at DST30-DST37.

Not sure why it would be showing unknown, but on occasion we've forgotten to update the message table, so the PLC or DmD might not know how to translate the code to the message.

"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Bolt

  • Hero Member
  • *****
  • Posts: 594
Re: looking for FTPPUT configuration
« Reply #4 on: October 07, 2024, 09:43:56 PM »
FILELOG does the Open/Append/Close internally as part of a single log entry.
But if you do FILEOPEN manually, with FILEWRITEs manually, it will remain open until you do a FILECLOSE, so not even FTP can read it/send it until you do a FILECLOSE.
That's what I've suspected, but didn't know for sure. That may apply to the OP's issue. I've always done FILEOPEN, FILEWRITE, FILECLOSE, FTPPUT and it works as long as the controls network allows the BRX (LAN) to speak to FTP server on the corporate network (WAN).

jay.mason@victaulic.com

  • Jr. Member
  • **
  • Posts: 10
Re: looking for FTPPUT configuration
« Reply #5 on: October 08, 2024, 08:35:20 AM »
Good morning in response the replays from my message yesterday in included the error messages.
Thank you all again.
$Last error 1 =2
$LastErrorAddr1=232
$LastError2=2
$LastErrorAddr2=232
$LastError3=2
$LastErrorAddr3=209
$LastProtoError=0
$IhhibitError=0
FTPPUT  configuration
FTD Device @PLC_FTP_Server
Local file system @RamFS
File Name ?MyFile.txt
Remote directory not checked  grayed out ?\RemoteDir?
Local file system not checked grayed out ?\MyDir?
The use unique name in remote directory and delete local files after successful transfer are not checked
On success set bit c4
On error set bit c5

The Odd thing is that I can use the FTPGET and retrieve a file from the server to the PLC with no issues.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6152
  • Yes Pinky, Do-more will control the world!
Re: looking for FTPPUT configuration
« Reply #6 on: October 08, 2024, 09:06:43 AM »
Good morning in response the replays from my message yesterday in included the error messages.
Thank you all again.
$Last error 1 =2
$LastErrorAddr1=232
$LastError2=2
$LastErrorAddr2=232
$LastError3=2
$LastErrorAddr3=209
$LastProtoError=0
$IhhibitError=0
FTPPUT  configuration
FTD Device @PLC_FTP_Server
Local file system @RamFS
File Name ?MyFile.txt
Remote directory not checked  grayed out ?\RemoteDir?
Local file system not checked grayed out ?\MyDir?
The use unique name in remote directory and delete local files after successful transfer are not checked
On success set bit c4
On error set bit c5

The Odd thing is that I can use the FTPGET and retrieve a file from the server to the PLC with no issues.

We're missing the LastError4, but 1-3 are error 2, which is SYSERR_FILE_NOT_FOUND. I find it hard to believe that either the PLC or DmD wouldn't show that as an unknown error, we we're not seeing the error you are describing.

I need the values of LastError1-4 at the moment you are seeing "unknown error".
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

jay.mason@victaulic.com

  • Jr. Member
  • **
  • Posts: 10
Re: looking for FTPPUT configuration
« Reply #7 on: October 08, 2024, 12:51:01 PM »
$last Error4=2
$lastErrorAddr4=209
.
thanks for looking into this

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6152
  • Yes Pinky, Do-more will control the world!
Re: looking for FTPPUT configuration
« Reply #8 on: October 09, 2024, 11:17:42 AM »
$last Error4=2
$lastErrorAddr4=209
.
thanks for looking into this

None of those errors are the one you mentioned in your initial post. All four are SYSERR_FILE_NOT_FOUND. I can't give you any guidance without the (unknown) error code from your first post.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3801
    • Host Engineering
Re: looking for FTPPUT configuration
« Reply #9 on: October 09, 2024, 12:50:00 PM »
Try doing it on the Simulator on your laptop on the same network as your PLC with a MINIMAL project with an FTPPUT instruction that is tied to X0 and FILELOG dumping to your file system.  You shouldn't need anything else in the Simulator project to see if FTPPUT can work from a "PLC" (i.e. the Simulator).  See if you can get THAT working.

The Simulator has an "SD Card", it's actually just a folder on your PC (ha!).  You would just utilize the ROOT of the "SD Card" for both the FILELOG and the FTPPUT - the Simulator handles the "abstraction".

jay.mason@victaulic.com

  • Jr. Member
  • **
  • Posts: 10
Re: looking for FTPPUT configuration
« Reply #10 on: October 14, 2024, 08:07:22 AM »
I was able to get it working ,reconfigured the server and changed the ss memory location used and this corrected the issue. Thank you for the advice ,