HI,
I am using automation studio version4.3.
I want to save datalogging(csv files) from PLC (x20) to USB with help of*FileIO.
*
I used AsUSB library first and*I used *(example, LibAsUSB1_ST) program to get path of USB and*I get the system the path / bd0.
(* Program
*CREATE_FILE_DEVICE:* (*Library FileIO - Functionblock DevLink() - create file out of data just from 1. USB*)
******
**strcpy(ADR(device_name), ADR('DEVICE_USB'));* (*fixed Device-Name get copied to device_name-Variable*)***************
**strcpy(ADR(device_param), ADR('/DEVICE='));* (*first part of parameter get copied to device_param-Variable*)**
**strcat(ADR(device_param), ADR(usb_data_buffer[0].ifName));* (*second part get added to device_param-Variable*) ****************************
*
**DevLink_0.enable := 1;
**DevLink_0.pDevice := ADR(device_name);* (*Devicename is assigned*)
**DevLink_0.pParam := ADR(device_param);* (*the path of the Device is assigned*)
**DevLink_0;
*)
then*I used the*whole program ( example, LibFileIO1_ST) but*I don't know how i can save my data logging file into USB.*I tried to use FileCopy for that but I don't know what should I write in destination name, source name and new file, file name?
In configutation view my datalogging file will be save in c:\
setting for data logging
configutation view->File devices->File device1->name
atanspeicher and path:c:\
program of FileCopy
*50: (* copy a file program**)
*(**
***Handling.Functionblock.FileCopy_0.enable := 1;
***Handling.Functionblock.FileCopy_0.option := fiOVERWRITE;* (* overwrite existing file *)
***Handling.Functionblock.FileCopy_0.pSrcDev := ADR(?);* (* name of a linked device *)
***Handling.Functionblock.FileCopy_0.pSrc := ADR(?);* (* name of the source file *)
***Handling.Functionblock.FileCopy_0.pDestDev := ADR(?);* (* name of a linked device *)
***Handling.Functionblock.FileCopy_0.pDest := ADR(?);* (* name of the new file*)
***Handling.Functionblock.FileCopy_0;* (* call the function*)
**)
so what should I write into the pSrcDev, pSrc, pDestDest, pDest?
or if i am wrong then what is the right way.