LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Extracting specific samples from DAQmx Read VI

Hi Everyone,

 

I am using a LabView program in which I trigger an analogue signal based on digital pulse (Z index signal from a motor enocoder). I acquire 16000 samples using DAQmx Read VI (Analog 1D Wfm NChan NSamp). However, I only want the first 1000 data points from the DAQmx Read vi plotted and saved as TDMS file and bin rest of the 15000 data points. Plotting is not an issue and I can extract the required data in post processing, but saving the entire signal would increase the size of my TDMS file with no use.

 

NOTE: I can not reduce the number of samples as it is set to sync a motor encoder index with a shaft that is driven through belt and pulley drive. Details of that problem in the following link:

https://forums.ni.com/t5/Multifunction-DAQ/AI-timing-signals-USB-61620/td-p/4362324

 

I'm by no means proficient in data acquistion and LabView so any suggestions or guidance would be appreciated.

 

Thanks,

Ammad.

 

 

0 Kudos
Message 1 of 2
(132 Views)

The 'Array Subset' function will do that.

 

You may as well do your DAQmx Read function as a 2D array since the timing info found in the waveforms will be "make believe".

 

I always test rather than count on remembering whether channels are columns and sample #'s are rows or vice versa.  Whichever it is, all you need to do after reading your 16000 samples is to take a subset of the samples, starting at index 0 with a length of 1000.  The only question is whether you do the subset on the rows or the columns.   A quick test will answer that for you.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 2 of 2
(110 Views)