03-05-2021 06:36 AM
Hi,
I try to capture a voltage measurement from DMM, I would like to have 1 ms resolution, which means 1000 data per second. I tried to use a loop whose wait time is 1 ms as below:
But somehow the data from the written .xlsx does not generate the high resolution data (attached) as I expected. Do I do it correctly? I mean using the loop to obtain the resolution data that I want? Another question is: How to open and process this .lvf data? I have not tried it, but if it can achieve the requirement that I want, maybe it worth a try, maybe it is better than .xlsx format.
03-05-2021 07:13 AM
Writing to an .xlsx file is SLOW. I would recommend using a simple text file instead. Open/create the file before the loop and close it after the loop. You can then use Write Text File inside the loop to write your data. You will just have to do some simple formatting into a string.
Otherwise, you are getting into the realm where you really should use a Producer/Consumer to write your data. The idea here being that you have a loop that acquires the data and then another loop to write it to disk. This way you keep the acquisition loop running as fast as possible and the logging loop can lag behind.
Finally, you might just have problems getting down to the 1ms resolution using software timing. You might want to consider using a DAQ. You might have some success using the Oscilloscope on the VirtualBench, but I have not tried using it.
03-09-2021 03:32 AM
I have tried using .txt format and also applying the Producer/Consumer method, but still there is no luck to obtain the data at such high resolution 1ms. So is the only way by using a DAQ? I do not have DAQ yet. Any other advice might be valuable for me.