10-30-2020 08:49 PM
I save analog signals in real time but I only manage to save them every second, but I need to save the data in milliseconds. How can I save them in
10-31-2020 07:20 AM
What are you using to measure the signals? What format are you saving he data in? Could you share some of your code?
Based on your very generic problem statement, I would be using an NI DAQ and logging the data to a TDMS file using DAQmx's ability to stream to a TDMS file.
10-31-2020 07:19 PM
To measure the signals I use Arduino, and I save the data in an excel file
10-31-2020
08:43 PM
- last edited on
08-12-2024
11:08 AM
by
Content Cleaner
First of all, you are going to need a better setup than what Linx will do, based on my limited knowledge of it. Make a sketch to read your 3 channels, package the values in a comma delimited string, send the string using the Serial.PrintLn command. On the LabVIEW side, you use VISA to read from the serial port. Make sure the termination character is on and you just read more byte than you ever expect in a message. With a baud rate of 115200, you should be able to send 11 bytes in your 1ms limit. That is not enough to get your data throughput. I do not know if your Arduino can handle a faster baud rate.
So that is your serial port limit. Now for your file IO...Saving to an Excel file is SLOW. Instead, open a simple text file before your loop as a csv, write the received string as I previously mentioned, and close the file after your loop. Excel will recognize a csv file and open it just fine. But this might still be too slow, so you may need to go with a Producer/Consumer setup.
But if it were me, I would just get a USB-6001 (~$220) and use DAQmx as I mentioned in my previous post.