TwinCAT3 ST language - save file from PLC computer to PC using TwinCAT IDE

180 Views Asked by At

Is it possible to use function blocks like FB_WRITEFILE FB_READFILE to read/save data between CX8190 and casual PC with TwinCAT installed? I tried to get Local Computer address and set this as an argument in function block


fb_FileOpen(sNetId :='10.133.96.182.1.1', sPathName:=filePath, nMode := FOPEN_MODEREAD OR FOPEN_MODETEXT,bExecute := TRUE);

and I get Error ADS ERROR 1795 - ADSERR_DEVICE_INVALIDOFFSET - Invalid index offset.

Now I'm saving to CX8190 disc and then I copy data through FTP connection but it is very uncomfortable.

0

There are 0 best solutions below