RobotStudio event

problem of s4filecopy? [WebWare SDK]

Options

hello,

 I want to copy one file from flashdisk to pc, so I use the instruction:

I_status = Helper1.S4FileCopy(Helper1.DevList(1) & "", Helper1.FileList(5), App.Path & "", Helper1.FileList(5), 3, l_ResultID)

devlist(1) is /hd0a/

filelist(5)  is abb.prg

when I run this, it will always retrun -417 error( FTP Host File Error), the robot is s4c+,webware is 4.5 version.

connected bewteen robot and pc is ok, I can see the files in flashdisk by robotfilemanager.

someone can give me a advice? where I need to notice? thank you very much

 

alan

Comments

  • Hello,

    can you test this?

    I_status = Helper1.S4FileCopy("home:", Helper1.FileList(5), App.Path , Helper1.FileList(5), 3, l_ResultID)

    or

    I_status = Helper1.S4FileCopy("home:","abb.prg", App.Path , "abb.prg",3, l_ResultID)

     

    Bye.

    Labwindows CVI user
  • alan
    Options

    sir,

    thank you ,I had tested use

    I_status = Helper1.S4FileCopy("ram1disk:/../", Helper1.FileList(0), App.Path & "", Helper1.FileList(0), 3, l_result)

    if I use the vitual controller, the status is 0 and copy will  successful, but if I use the actual robot, status will return 3100 error

    I don't know why image,give me more advice,thx

    alan

  • John Wiberg
    Options

    Helper.S4FileCopy has a small inconsistency between the Virtual Controller and the real Controller.
    On the real controller you are not allowed to have a "/" in the "ToDev" parameter if it is a PC, instead if you want to browse down you need to have that in the "ToFile" parameter.
    So if you want to write to the C disk you will have to have "c:" and not "c:/".

    Example you want to copy this "/hd0a/temp/ABB.prg" to here "c:/MyFolder/ABB.prg", then the command would look like this:
            Dim intResult As Integer
            Dim lngID As Long
            intResult = Helper1.S4FileCopy("/hd0a/", "temp/ABB.prg", "c:", "MyFolder/ABB.prg", 3, lngID)

  • alan
    Options
    thx