Showing results 1 to 2 of 2

Thread: FTP Block Error: 503 Bad Sequence of commands.

  1. #1

    Default FTP Block Error: 503 Bad Sequence of commands.

    Hello everyone,
    I am trying to send a local file to a FTP server using FTP block in Stratonng, Zenon EE 8.10.
    All i could find on Help Manual is Inputs & Outputs of the block. Output Inst_FTP.STAT always shows 503. Acording to wikipedia page List_of_FTP_server_return_codes 503 means "Bad Sequence of Commands. 

    How i used is:
    Inst_FTP('192.168.1.250','192.168.1.35','ftpkoztek ','******,'','','','','C:\Data_Rec\Arc\','First_Fi le.zip', '/Koztek/File_io_deneme/','','',3,enabled);

    Manual says:
    Inst_FTP2( IPSERVER(*STRING*), IPCLIENT(*STRING*), USER(*STRING*), PASSWORD(*STRING*), LIST_DIRECTORY(*STRING*), GET_REMOTEFILEPATH(*STRING*), GET_LOCALDIRECTORY(*STRING*), GET_REMOTEFILENAME(*STRING*), PUT_LOCALFILEPATH(*STRING*), PUT_LOCALFILENAME(*STRING*), PUT_REMOTEDIRECTORY(*STRING*), DEL_REMOTEFILEPATH(*STRING*), DEL_REMOTEFILENAME(*STRING*), OPERATION(*UINT*), ENABLED(*BOOL*) )
     
    with the remark "Keep inputs which are not necessary empty."

    I double checked IP addresses, username, password, path and file names. Even if I change them to some other form same return code shows up. 

    What am i doing wrong? Is there any working example of this code?

    Thanks in Advance!

  2. #2

    Default Re: FTP Block Error: 503 Bad Sequence of commands.

    Hello,
    Found the problem. Even though manual says "Keep inputs which are not necessary empty." and all i use was operation 3 (put), the problem was that you can not leave "LIST_DIRECTORY" empty. Putting a '\' solves the problem.

    "LIST_DIRECTORY" -> '\'

    Hope this helps someone like me.

    Best Regards.
    Emir Tuğcan Genšer

Similar Threads

  1. canOpen coWriteParam function block
    By mos89 in forum straton / zenon Logic
    Replies: 0
    Last Post: 7th June 2018, 11:39
  2. Developping C function block
    By kwangyol in forum straton / zenon Logic
    Replies: 1
    Last Post: 29th March 2017, 10:26
  3. VSTA block array
    By nirren1992 in forum VSTA
    Replies: 0
    Last Post: 24th March 2017, 07:43
  4. VSTA block array
    By nirren1992 in forum zenon Supervisor
    Replies: 0
    Last Post: 24th March 2017, 07:43

Tags for this Thread

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •