01-30-2023 07:32 AM
Hello,
I need some help. I want to create a program in LabVIEW to measure an analog input signal. My PC is connected to the device via USB. I can't read and log the data fast enough. I want to read the analog input and log the data with 10 kHz, but in my program, the fastest frequency is 500 Hz. With a "wait until next ms multiple" I set the interval to 1 ms. I also tried some examples for logging, but they also didn't work. I hope someone can help me with my problem.
01-30-2023 07:37 AM - edited 01-30-2023 07:40 AM
Hi brendan,
welcome to the LabVIEW forum!
two recommendations:
Suggestions:
01-31-2023 04:31 AM
Hello GerdW,
Thank you for your fast reply. Now I use the DAQ Assistant and it is working. Also, I have a much simpler program. Importing was to save the data as lvm file, because it's much simpler than xlsx to save.
But I'm not sure if this program is losing some data. My measurement frequency is 100kHz. I configured the program to save the data in a lvm file and create a new lvm file after a minute. To minimize the size of one lvm file. Theoretically, 600k values should be stored in one lvm file. Sometimes, in one lvm file there are less than 600k values. In the following file, the values are continued directly in time. For example:
The first file start with 60,000000s and ends with 119,899990s
The following file starts with 119,900000s and ends with 179,899990s.
Did I lose some data here?
Or.
I don't lose data. The first file just logged 59,900000 seconds and the next file logged directly after that without missing data.
But I don't know what happens here.
I uploaded a picture of my new program, the data logging configuration and 2 lvm files as an example. In the lvm file I deleted the data except the first and last 3 measurements, because the data was to big to upload.
Best regards,
brendan_137
01-31-2023 06:26 AM
Hi Brendan,
@brendan_137 wrote:
Now I use the DAQ Assistant and it is working. Also, I have a much simpler program.
Wel,, the block diagram looks smaller. IMHO the VI is more complicated because all the important parameters are hidden in those light-blue ExpressVI blocks…
(In the long run you will write better VIs without ExpressVIs.)
@brendan_137 wrote:
But I don't know what happens here.
We neither, because we cannot edit/debug/run images in LabVIEW…
01-31-2023 06:58 AM - edited 01-31-2023 07:02 AM
Hello Gerd,
I'm sorry. I'm new to this forum. I should have upload the vi file. Here is my vi file. I used the "MyDAQ" Device.
@GerdW wrote:Wel,, the block diagram looks smaller. IMHO the VI is more complicated because all the important parameters are hidden in those light-blue ExpressVI blocks…
(In the long run you will write better VIs without ExpressVIs.)
You're right. For now I want to use them for my application, but I also will try without the ExpressVi blocks.
My thought:
There is no losing data. The DAQ Assistant transfers data: 2 analog inputs and the time. The "Write To Measurement File Express VI" (Messwerte in Datei schreiben) block just write this data into a lvm file. When there are not 600k values in one file, the data is stored "incorrectly", but the measurements are in the next lvm file.
I hope I am behaving correctly in this forum.
Best regards,
Brendan