CSV writer, does not append am I doing something wrong

For general Flowcode discussion that does not belong in the other sections.
Post Reply
RGV250
Posts: 283
http://meble-kuchenne.info.pl
Joined: Sat Mar 19, 2022 4:53 pm
Has thanked: 25 times
Been thanked: 32 times

CSV writer, does not append am I doing something wrong

Post 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 871 times
RPI_EcoEyeMonitor_V3_0.fcfx
(43.28 KiB) Downloaded 44 times
Bob

BenR
Matrix Staff
Posts: 1926
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 503 times
Been thanked: 686 times

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

Post 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.

RGV250
Posts: 283
Joined: Sat Mar 19, 2022 4:53 pm
Has thanked: 25 times
Been thanked: 32 times

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

Post 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

Post Reply