Page 1 of 3
CSV Read/Write or Output CSV
Posted: Sun Nov 06, 2022 7:35 pm
by RGV250
Hi,
I found an example that uses CSV write, I was a bit surprised it compiled as I thought I did not have a licence. I then found out that CSV Read/Write is free whereas Input CSV / Output CSV is in the DSP group and needs a licence. Just what are the differences.
All I need to do is log readings from my power meter so I can hopefully make a graph on a web page later.
Regards,
Bob
Re: CSV Read/Write or Output CSV
Posted: Mon Nov 07, 2022 1:13 pm
by BenR
Hi Bob,
The CSV Read/Write component under the Runtime menu is for simulation or AppDeveloper only, for embedded it won't produce any code. If this is for an embedded app then you might be better off using the File component under storage or we can look at allowing the CSV component to be embedded compatible via the File component.
Re: CSV Read/Write or Output CSV
Posted: Mon Nov 07, 2022 2:13 pm
by RGV250
Hi Ben,
This is what i was looking at.
https://www.matrixtsl.com/wiki/index.ph ... ime_Tools)
I am trying to make a better (for me) front end to an eco eye power monitor.
https://www.eco-eye.com/domestic-products
I am now able to read the data from the transmitter reliably and show it on a web page. The next step is to store the data, I did look at a database but then saw that link and thought the CSV write would be better to put into a LibreOffice spreadsheet on the Raspberry pi.
The other thing is the file component would need a licence and it is all adding up on this project.
Bob
Re: CSV Read/Write or Output CSV
Posted: Mon Nov 07, 2022 2:40 pm
by BenR
Hi Bob,
Yes that component is currently only for use with the sim though I can see it being handy elsewhere so I'll have a go at making it embedded compatible. We are also currently investigating allowing access to the file system on the RPI so this work would also benefit you.
I've sent you a PM regarding the licensing which I hope you find useful.
Re: CSV Read/Write or Output CSV
Posted: Mon Nov 07, 2022 6:23 pm
by RGV250
Hi Ben,
I think it would be handy for the CSV component to be available for an embedded device as I do not need anything more than that.
Bob
Re: CSV Read/Write or Output CSV
Posted: Mon Nov 07, 2022 6:29 pm
by RGV250
Hi Ben,
Thinking about this a bit further, in a different post you were going to have a look at being able to have variables for non embedded web pages on the Pi. I am not sure how you were considering doing that but this might be a bit of a work around. If this is available for embedded devices it would be possible to read and write to a temporary file so the web pages could read and write to that file as well.
As said, I do not have a lot of experience with web pages yet so it might not be a good idea at all.
Regards,
Bob
Re: CSV Read/Write or Output CSV
Posted: Thu Nov 10, 2022 11:32 pm
by RGV250
Hi Ben,
I have some work to do playing with the external web pages so I hope I don't come across as ungrateful but I just wondered if this would likely be available in a week or so.
Regards,
Bob
Re: CSV Read/Write or Output CSV
Posted: Fri Nov 11, 2022 9:46 am
by BenR
Hi Bob,
Yes I haven't forgotten this one, I'll see what I can do

Re: CSV Read/Write or Output CSV
Posted: Fri Nov 11, 2022 11:08 am
by BenR
Ok I've made this change now too and pushed to the update system.
If you need to use the webserver and the CSV writer at the same time then simply point both components to the same File component. Then use the SetFileIndex macro to jump between active files. Something like this.
Loop
{
File::SetFileIndex(0)
WebserverMacros
File::SetFileIndex(1)
CSVMacros
}
Let me know how you get on.
Re: CSV Read/Write or Output CSV
Posted: Sun Nov 13, 2022 7:32 pm
by RGV250
Hi Ben,
Does this only work when installed on the Pi now, I tried it in debug and it does not create a test file now.
Bob