I am running an application and using the CSVWriter as a data logger. It will work well for 29 kb but then stops recording.
The CSVWriter parameter logDemoExiration turns true when this 29 kb limit is hit. I have the license for the SL IoT library which contains the CSV utility installed on my workstation so I am thinking it may be some other reason. At this time my add values to file function throws the "End_of_buffer" error.
I essentially copied the code I am using to write the CSV from the Codesys sample project on the matter.
Anyone know why this 29 kb limit is being reached? Or a better way of logging data (my application will only be used for a batch experiment so server level data management doesn't really apply) ?
Figured it out I believe. Its been able to save 16, 8 kb files so far and is still trugging along.
The save program from the codesys example project does not CSVWriter.InitSave the new file that is created when the max file size has been reached. The following code changes the the initiated file name to the new file. 'First' is written to be TRUE by a StartDone program.
IF First THEN
FileName:=standard.CONCAT(sFileName,'.csv');
ELSE
FileName:=standard.CONCAT(sFileName,standard.CONCAT('(',standard.CONCAT(INT_TO_STRING(count), standard.CONCAT( ')', '.csv'))));
END_IF
IF NOT xInit THEN
eError := Globals.gCSVWriter.InitSave( sDirectoryPath:=sDirectoryPath, sFileName:=FileName);
IF eError <> CSV.CSV_ERROR.NO_ERROR THEN
iSave := 32767;
END_IF
xInit := TRUE;
END_IF
Nope. It appears the it was not limited by the amount of data but instead there is a 30 minute timer on the CSV utility before it is not possible to write data.
But there is no license for the CSV utility since its part of the IIOT library now. Codesys, what is the solution here?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey there,
I am running an application and using the CSVWriter as a data logger. It will work well for 29 kb but then stops recording.
The CSVWriter parameter logDemoExiration turns true when this 29 kb limit is hit. I have the license for the SL IoT library which contains the CSV utility installed on my workstation so I am thinking it may be some other reason. At this time my add values to file function throws the "End_of_buffer" error.
I essentially copied the code I am using to write the CSV from the Codesys sample project on the matter.
Anyone know why this 29 kb limit is being reached? Or a better way of logging data (my application will only be used for a batch experiment so server level data management doesn't really apply) ?
Figured it out I believe. Its been able to save 16, 8 kb files so far and is still trugging along.
The save program from the codesys example project does not CSVWriter.InitSave the new file that is created when the max file size has been reached. The following code changes the the initiated file name to the new file. 'First' is written to be TRUE by a StartDone program.
IF First THEN
FileName:=standard.CONCAT(sFileName,'.csv');
ELSE
FileName:=standard.CONCAT(sFileName,standard.CONCAT('(',standard.CONCAT(INT_TO_STRING(count), standard.CONCAT( ')', '.csv'))));
END_IF
IF NOT xInit THEN
eError := Globals.gCSVWriter.InitSave( sDirectoryPath:=sDirectoryPath, sFileName:=FileName);
IF eError <> CSV.CSV_ERROR.NO_ERROR THEN
iSave := 32767;
END_IF
xInit := TRUE;
END_IF
CASE iSave OF
END_CASE
Nope. It appears the it was not limited by the amount of data but instead there is a 30 minute timer on the CSV utility before it is not possible to write data.
But there is no license for the CSV utility since its part of the IIOT library now. Codesys, what is the solution here?
You need to install an IIoT Libraries SL license on your PLC, to use any libraries from IIoT Libraries SL.