Hi Ben
I am trying to build a pressure sensor for 50Kg.
For this I test first with a 500G sensor because it is much easier to load 500G than 50Kg.
I'm testing different HX711 boards. Everything works fine.
But with the DSP Output CSV there are small problems with the clear data. I can save the data to an existing dsp.csv ffile but I cannot delete and rewrite an existing file. (clear data)
It would also be easier if the file name could be selected with a command.
regards
Stefan
DSP Output CSV1 clear data
-
- Valued Contributor
- Posts: 997
- http://meble-kuchenne.info.pl
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 190 times
- Been thanked: 217 times
-
- Matrix Staff
- Posts: 1926
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 501 times
- Been thanked: 686 times
Re: DSP Output CSV1 clear data
Hi Stefan,
I've looked into the file not being overwritten problem and it all looks to be ok, or at least it certainly should be happening. Can you tell me if the problem you're seeing is in the simulation or on hardware or both?
I've added in new macros to allow the file to be opened and closed, by default the file you have selected via the properties will be automatically opened when calling WriteValue but you can also close and open another file at any point if you wish.
Also added similar improvements to the DSP File Input component.
I've looked into the file not being overwritten problem and it all looks to be ok, or at least it certainly should be happening. Can you tell me if the problem you're seeing is in the simulation or on hardware or both?
I've added in new macros to allow the file to be opened and closed, by default the file you have selected via the properties will be automatically opened when calling WriteValue but you can also close and open another file at any point if you wish.
Also added similar improvements to the DSP File Input component.
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
-
- Valued Contributor
- Posts: 997
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 190 times
- Been thanked: 217 times
Re: DSP Output CSV1 clear data
Hi Ben
Very good. Thanks.
I have adjusted the program but I get a "failed".
to understand the error message it's not simpel...
I only use the hardware.
regards
Stefan
Very good. Thanks.
I have adjusted the program but I get a "failed".
to understand the error message it's not simpel...
I only use the hardware.
regards
Stefan
- Attachments
-
- Demo_ESP32_post_hx711_sd.fcfx
- (68.61 KiB) Downloaded 376 times
-
- Matrix Staff
- Posts: 1926
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 501 times
- Been thanked: 686 times
Re: DSP Output CSV1 clear data
Hi Stefan,
Thanks for letting me know, it should compile correctly for you now.
I'll investigate why deleting the file on the ESP isn't working.
Thanks for letting me know, it should compile correctly for you now.
I'll investigate why deleting the file on the ESP isn't working.
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
-
- Valued Contributor
- Posts: 997
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 190 times
- Been thanked: 217 times
Re: DSP Output CSV1 clear data
Hi Ben
It's working but
Test1 (append)
I use append and made 3 recording. The first record I pressed 1x, second record I pressed 2x and the last I pressed 3x
result:
The first record is not recorded, Maybe it just creat the file, but the another two recording was saved ok.
Test2 (clear)
Again I made 3 recording with a new filename. The first record I pressed 1x, second record i pressed 2x and the last I pressed 3x
result:
The CSV file exist but empty (clear?)
But one more question. These propertis are no longer usable, no influence?
regards
Stefan
It's working but
Test1 (append)
I use append and made 3 recording. The first record I pressed 1x, second record I pressed 2x and the last I pressed 3x
result:
The first record is not recorded, Maybe it just creat the file, but the another two recording was saved ok.
Test2 (clear)
Again I made 3 recording with a new filename. The first record I pressed 1x, second record i pressed 2x and the last I pressed 3x
result:
The CSV file exist but empty (clear?)
But one more question. These propertis are no longer usable, no influence?
regards
Stefan
- Attachments
-
- app_2022-09-28_15-58-04.jpg (31.75 KiB) Viewed 5139 times
-
- Matrix Staff
- Posts: 1926
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 501 times
- Been thanked: 686 times
Re: DSP Output CSV1 clear data
Hi Stefan,
Thanks I'll investigate for you and see what I find. Could be the ESP is going at a rate of knots and something is too fast or needs a delay to relibly perform the log. Sounds like directly after creating the file the log doesn't work. The clear operation basically deletes the file and then recreates each time you open the file. The OpenFile macro has a new return value so you could look at this to report the state of the operation. You could also try opening the file in clear mode to delete the file and then open the file again in append mode and hopefully it will then accept the data you put into it.
The two properties you highlighted (Filename and Existing Data) are the defaults, so prior to calling OpenFile in your program then these are the values that will be used and OpenFile will be called for you behind the scenes by the component. If you do call OpenFile then that will then override the defaults. Layout is always being used though we might want to try and make this a variable feature too.
Thanks I'll investigate for you and see what I find. Could be the ESP is going at a rate of knots and something is too fast or needs a delay to relibly perform the log. Sounds like directly after creating the file the log doesn't work. The clear operation basically deletes the file and then recreates each time you open the file. The OpenFile macro has a new return value so you could look at this to report the state of the operation. You could also try opening the file in clear mode to delete the file and then open the file again in append mode and hopefully it will then accept the data you put into it.
The two properties you highlighted (Filename and Existing Data) are the defaults, so prior to calling OpenFile in your program then these are the values that will be used and OpenFile will be called for you behind the scenes by the component. If you do call OpenFile then that will then override the defaults. Layout is always being used though we might want to try and make this a variable feature too.
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
-
- Valued Contributor
- Posts: 997
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 190 times
- Been thanked: 217 times
Re: DSP Output CSV1 clear data
Hi Ben
Now that I can set the filename, I don't need the clear function. I just make a new file. I can make the new file open/close and then open again, write data and close the file.
So I can use the DSPcsv very well for the calibration and simply have a Excel data file
But unfortunately later I have two HX711.
Is there a possibility for two or more rows with the DSPcsv in the future?
regards
Stefan
Now that I can set the filename, I don't need the clear function. I just make a new file. I can make the new file open/close and then open again, write data and close the file.
So I can use the DSPcsv very well for the calibration and simply have a Excel data file
But unfortunately later I have two HX711.
Is there a possibility for two or more rows with the DSPcsv in the future?
regards
Stefan
-
- Matrix Staff
- Posts: 1926
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 501 times
- Been thanked: 686 times
Re: DSP Output CSV1 clear data
Hi Stefan,
Yes that certainly would be nice, I have an idea on how to do it so I'll see what I can do.
Yes that certainly would be nice, I have an idea on how to do it so I'll see what I can do.
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
-
- Valued Contributor
- Posts: 997
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 190 times
- Been thanked: 217 times
Re: DSP Output CSV1 clear data
Hi Ben
That would be great!
Something like that maybe...
and later also a WAV file with a choice of channels
regards
Stefan
That would be great!
Something like that maybe...
and later also a WAV file with a choice of channels
regards
Stefan
-
- Matrix Staff
- Posts: 1926
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 501 times
- Been thanked: 686 times
Re: DSP Output CSV1 clear data
Hi Stefan,
Do you have access to the v10 beta, I might make the changes there as I'm doing some DSP work for v10 anyway.
This is what I have so far but it's not quite ready yet.
The input would read a row from the CSV and put the first column into the top buffer, the second into the second etc. On the next pass we would skip through the file until we get to the start of the next row and then start again.
The output would do a similar job, each write would write a row into the CSV by taking a value from each buffer in turn to write each column entry.
Do you have access to the v10 beta, I might make the changes there as I'm doing some DSP work for v10 anyway.
This is what I have so far but it's not quite ready yet.
The input would read a row from the CSV and put the first column into the top buffer, the second into the second etc. On the next pass we would skip through the file until we get to the start of the next row and then start again.
The output would do a similar job, each write would write a row into the CSV by taking a value from each buffer in turn to write each column entry.
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