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.
Bob
CSV writer, does not append am I doing something wrong
-
- Posts: 283
- http://meble-kuchenne.info.pl
- Joined: Sat Mar 19, 2022 4:53 pm
- Has thanked: 25 times
- Been thanked: 32 times
-
- 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
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Re: CSV writer, does not append am I doing something wrong
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
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