Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Help Needed with LabVIEW Code for NI DAQ Data Recording: Sampling Rate and Skipped Data Issues

Hello everyone,

I'm new to the NI DAQ world and in need of assistance with fixing some LabVIEW code we're using for data recording. The code was developed by someone else, and I've attached a screenshot of it along with some data recorded at a 5K sampling frequency.

  1. Firstly, I'd like to clarify the difference between the sampling rate and frequency that we input in the VI. I've experimented with different values, but the resulting data doesn't seem to make sense. When I keep both values the same and record data for 4 seconds, I get 25K data points. However, when I input different values, with a higher frequency and lower sample count, the time and sample rate product doesn't match as it does when the samples and frequency are equal.

  2. An important issue I'm facing is that when attempting to record data with this code at a 5K sampling rate (or any other rate), it skips data every 5000 data points (sampling rate)  (please refer to the attached data; rows 5001 and 5002 exhibit a jump). I've tried adding delays and timeouts, but none of these seem to resolve the issue. I'm unsure if it's related to the while loop and N samples, rather than acquiring data continuously. My knowledge of LabVIEW is quite basic, and I'm not confident in modifying the existing code. Any help would be greatly appreciated.

Thanks.

 

Download All
0 Kudos
Message 1 of 2
(330 Views)

Hello,

 

May I know which device are you using? Further, which sampling mode are you planning to use? Is it Hardware timed or software timed?  Is it continuous or finite? This could affect the performance of your code, further you are adding multiple Express VIs in the same loop that could make a poor performance, and there are other timing functions that could make the "timing" of your loop such Wait (ms) and Wait Until Next ms Multiple instead of the Express that consumes more memory:
 

Romell_1-1709683385817.png

 


Personally, I suggest you to go to LabVIEW Help>Find Examples (Filter them according to your device) and check the Hardware Input and Output Folder for examples you can explore for and starting point.

Romell_0-1709682945807.png

Here some useful links: 


Romell Meléndez
Technical Support Engineer NI

0 Kudos
Message 2 of 2
(271 Views)