LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

while loop

 

Hello, I set the Wait (ms) function to 1 and configured both the sampling rate and the number of samples to read to 1000, but the loop is still running once every 0.6 seconds, which is causing difficulties. I am unable to figure out how to resolve this issue. Please help.

0 Kudos
Message 1 of 6
(496 Views)

Sorry, cannot look t your VI (consider save for previous, 2020 or below before attaching).

 

So the sampling rate is 1000Hz and you are reading 1000 samples. What do you expect as the loop time and what "difficulties" are you encountering?

0 Kudos
Message 2 of 6
(478 Views)

I want to collect 1 data point every 0.001 seconds, resulting in a total of 1,000 data points per second. I would like to use the DAQ Assistant for this, but it seems it might not be possible. Therefore, I also tried using the DAQmx API, but I wasn't successful with that either. When saving the data to an Excel file, I want to have 1 data point recorded every 0.001 seconds for each of the X, Y, and Z axes. help me please

 

I realized I missed adding one VI, so I have now included it.

0 Kudos
Message 3 of 6
(473 Views)
 

Hello?

 

I want to collect 1 data point every 0.001 seconds, resulting in a total of 1,000 data points per second. I would like to use the DAQ Assistant for this, but it seems it might not be possible. Therefore, I also tried using the DAQmx API, but I wasn't successful with that either. When saving the data to an Excel file, I want to have 1 data point recorded every 0.001 seconds for each of the X, Y, and Z axes. help me please

 

If you have a specific version in mind, I will provide a Vi accordingly

0 Kudos
Message 4 of 6
(430 Views)

Duplicated with while loop

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 5 of 6
(397 Views)

Set the number of samples per channel for DAQmx Read VI to 10. 

See Specifying Number of Samples When Continuously Acquiring with NI-DAQmx for LabVIEW for detailed explanations.

 

Calling DAQmx Read VI every 1ms is not realistic, especially if you are using a USB or Ethernet DAQ which has a higher communication latency. In practice, we usually call DAQmx Read VI to read 1/10 of the sample rate (or every 100ms).

-------------------------------------------------------
Control Lead | Intelline Inc
Message 6 of 6
(390 Views)