PLC280 Creating csv on USB
Posted: 16/01/2025, 16:22
Hello,
I want so log my inputs and save the in csv file.
I choose the datalogger_INT from the library.
my sample code is:
When compiling I receive Error: DATALOGGER_INT.WRITEFILE - error A4109: WriteFile => Invalid base object type
The variable raw_T_NT_out is defined in Global vars as INT.
I want so log my inputs and save the in csv file.
I choose the datalogger_INT from the library.
Code: Select all
VAR
myDataLogger : DATALOGGER_INT; // Instanz des Datenloggers
End_Var
Code: Select all
myDataLogger.Enable :=TRUE;
myDataLogger.Path_To_Save := 'USB:/'; //write on USB
myDataLogger.File_Name := 'DataLog.csv'; //write to Datalog.csv
myDataLogger.Sample_Time := 10000; //write every 10 seconds
myDataLogger.Record1 := raw_T_NT_out; //write variable Local_raw_T_NT_in
myDataLogger.Name_Record1 := 'T_NT_in'; //Row Name
The variable raw_T_NT_out is defined in Global vars as INT.