Page 1 of 1

CSV writer, does not append am I doing something wrong

Posted: Fri Nov 18, 2022 1:21 pm
by RGV250
Hi,
Apologies for another post, hopefully it is my fault but I cannot see what I it could be.
I have now managed to get the CSV writer to work (sort of) on the Raspberry pi, the problem is that it does not append but creates a new file for each write.
This is what I am getting, the first file has the header texts and then each at 4 seconds apart has one row without the header.
Logging files.jpg
Logging files.jpg (37.35 KiB) Viewed 961 times
RPI_EcoEyeMonitor_V3_0.fcfx
(43.28 KiB) Downloaded 53 times
Bob

Re: CSV writer, does not append am I doing something wrong

Posted: Mon Nov 21, 2022 1:17 pm
by BenR
Hi Bob,

I think it doesn't like the Root Folder being $(srcdir) as this is a Flowcode simulation thing. In the File_RPI1 change the Root Folder to a blank string and hopefully that should fix the problem for you and place the files with the runtime script into the home directory.

Keep the Sim root folder property as $(scrdir) to allow the simulation to put the files in the right place.

Re: CSV writer, does not append am I doing something wrong

Posted: Mon Nov 21, 2022 2:02 pm
by RGV250
Hi Ben,
Thanks that worked. I thought when i tried it like that originally it did not create a file at all?

I do have one question with the data, for the CSVwriter component, would it be possible to add a "AddInteger" option as the "AddNumber" is only for float type. Or could I just add ,0 after the variable. It is not a big issue but it just means half the entries in the CSV file have 6 zeroes where the original data is an integer.

Bob