CSV Read/Write or Output CSV

For general Flowcode discussion that does not belong in the other sections.
BenR
Matrix Staff
Posts: 1926
http://meble-kuchenne.info.pl
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 503 times
Been thanked: 686 times

Re: CSV Read/Write or Output CSV

Post by BenR »

Hi Bob,

No it should still work in simulation, can you send me your project and I'll see if I can replicate.

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

Re: CSV Read/Write or Output CSV

Post by RGV250 »

Hi Ben,
It is just the example from the web site as in the third post. It did work but doesn't appear to now, I deleted the file and it does not create it.
There is an error in the example, I had to put a 0 in the open file command, I also tried 1.

Bob

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

Re: CSV Read/Write or Output CSV

Post by BenR »

Hello,

I've now updated the example here.
https://www.flowcode.co.uk/wiki/index.p ... ime_Tools)

It basically now needs linking to a file component to do the file system IO.

This could be the File SD, File RPI or File AppDeveloper components.

Any of these should provide the simulation and runtime capabilities.

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

Re: CSV Read/Write or Output CSV

Post by RGV250 »

Hi Ben,
I see that the example has FileSD1 included so I assume it should work as is. I have just tried and no file was created, I added a file test.csv and no data was written.

Bob

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

Re: CSV Read/Write or Output CSV

Post by BenR »

Hi Bob,

Please can you confirm the CSV Writer component has the File Component property.
CSV_Prop.jpg
CSV_Prop.jpg (18.26 KiB) Viewed 3939 times

If it doesn't then you may just need to update your components via the Help -> Library updates menu

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

Re: CSV Read/Write or Output CSV

Post by RGV250 »

Hi Ben,
I am up to date and it looks the same as above.

Bob

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

Re: CSV Read/Write or Output CSV

Post by BenR »

Hi Bob,

The file should be written to the same location as the Flowcode project file. Can you confirm this is in a writable directory.

Just tried loading the file here just to check it's not a loading issue but it's still working and generating the file correctly for me.

I'll try and get access to another PC to make sure it's not something to do with my local files.

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

Re: CSV Read/Write or Output CSV

Post by RGV250 »

Hi Ben,
I have tried it is in the same directory I tried the first example (before modifications) which worked. I have also tried a different directory.
Later this evening I will try my laptop or tablet as I don't think that has been updated so I can try both.

Bob

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

Re: CSV Read/Write or Output CSV

Post by RGV250 »

Hi Ben,
I have just tried the original file (which needed the 0 added) and that worked on my tablet (Surface), it created the file and wrote data to it. This version of Flowcode has not been updated, I think the laptop has been updated but I will try it later.

Bob

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

Re: CSV Read/Write or Output CSV

Post by BenR »

Hello Bob,

I've just tried simulating the example from the v9 wiki on my laptop with all of the latest updates and the file has been created so appears to be working well for me.

One thing I've noticed is the first time I run it the file is created but empty and then the second time the file is populated with data so I'll look into why the data is not written the first time.

Post Reply