16
Codesys 2 / Re: DLOG_STORE_FILE_CSV append
« am: 04. Juni 2021, 16:14:41 »
Therefore a kind of shift register is needed, with a configurable absolute size/input limit. If e.g. 1000 lines are filled in the file, the oldest line must be deleted and the new entry is appended.
this is not easily feasible and is a completely different concept
you can't just delete a few lines from a file
for this you have to load the complete file into a bytearray in the sps
then pick out the lines and move the rest of the data and save it again.
it would be easier if you use the "LOG_CONTROL" block right away
it has a ringbuffer - there happens what you want automatically
this is not easily feasible and is a completely different concept
you can't just delete a few lines from a file
for this you have to load the complete file into a bytearray in the sps
then pick out the lines and move the rest of the data and save it again.
it would be easier if you use the "LOG_CONTROL" block right away
it has a ringbuffer - there happens what you want automatically