DLOG_STORE_FILE_CSV

Begonnen von james, 06. September 2016, 15:20:30

Vorheriges Thema - Nächstes Thema

0 Mitglieder und 1 Gast betrachten dieses Thema.

james

I have been trying to use the DLOG_STORE_FILE_CSV FB but can not get it to write to disk, no error is retuned from the FB.
>>

VAR
   StoreCSV:    OSCAT_NETWORK.DLOG_STORE_FILE_CSV;
   Data:      OSCAT_NETWORK.DLOG_DATA;
   Enable:    BOOL;
   GoManual:    BOOL;
   DataString: OSCAT_NETWORK.DLOG_STRING;

END_VAR

DataString(X:= Data , STR:= 'I am a literal test string' , COLUMN:= 'Column' );


StoreCSV(
   X:= Data,
   ENABLE:= Enable,
   TRIG_M:= GoManual,   //should write on high edge
   TRIG_T:= ,
   FILENAME:='C:\Users\DeviceAdministrator\Documents\testdata.csv' , //valid path
   DTI:= ,
   SEP:= 59,          //ASCII delimiter;
   ERROR_C=> ,                  //no error returned
   ERROR_T=> );                //and no file write
>>
Thanks
James

peewit

you have to use the DTI Parameter

StoreCSV(
   X:= Data,
   ENABLE:= Enable,
   TRIG_M:= GoManual,   //should write on high edge
   TRIG_T:= ,
   FILENAME:='C:\Users\DeviceAdministrator\Documents\testdata.csv' , //valid path
  DTI:= ,
  SEP:= 59,          //ASCII delimiter;
   ERROR_C=> ,                  //no error returned
   ERROR_T=> );                //and no file write
>>