03-06-2024 12:46 AM
- serial communication speed : 100Hz (save every 10ms) with STM32 virsual COM port
- it is processed as a graph and saved as a csv file when the buffer data is received from the Virtual COM port.
Q1. There is no slowdown in data processing on high-end PCs(example CPU i7), but the problem occurs on low-end PCs(example CPU i5).
Q2. There is no problem if turn off the CSV save function(sub VIs) and only display the graph.
03-06-2024 12:58 AM
Hi schkorea,
@schkorea_haechitech wrote:
Q1. There is no slowdown in data processing on high-end PCs(example CPU i7), but the problem occurs on low-end PCs(example CPU i5).
Q2. There is no problem if turn off the CSV save function(sub VIs) and only display the graph.
Is there a question?
You already discovered one important fact: file handling can be slow!
So to improve file handling you can follow several ways:
Btw. plotting data in graphs tends to be slow, too. Especially when there are large plots!
(And usually it doesn't make sense to update a graph at 100Hz…)
03-06-2024 01:00 AM
It depends on how you using "CSV Save" function. In case of large data blocks may slow down, then probably better to use producer/consumer design pattern, where acquisition and storage splitted into two loops and the data transferred via queues.
Show your code for more details.
03-06-2024 01:26 AM
I have shared the simpe vi code about my questioni.
03-06-2024 01:35 AM
Hi schkorea,
@schkorea_haechitech wrote:
I have shared the simpe vi code about my questioni.
Some problems:
03-06-2024 01:41 AM
thank you about your fast feedback.
I will try the BytesAtPort code skill from the your shared video.
03-06-2024 10:17 AM - edited 03-06-2024 10:45 AM
If you are actually receiving a constant data stream at 115200 baud you may want to consider a Producer/Consumer architecture.
Also the Write To Delimited Spreadsheet vi is slow because it opens the file, writes the data, and closes the file on every write operation.
Try this instead