Autor Thema: DLOG_STORE_FILE_CSV  (Gelesen 5203 mal)

0 Mitglieder und 1 Gast betrachten dieses Thema.

Offline james

  • Newbie
  • *
  • Beiträge: 1
    • Profil anzeigen
DLOG_STORE_FILE_CSV
« am: 06. September 2016, 15:20:30 »
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

Offline peewit

  • Moderator
  • *****
  • Beiträge: 2 378
    • Profil anzeigen
Re: DLOG_STORE_FILE_CSV
« Antwort #1 am: 29. September 2016, 12:35:45 »
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
>>