LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

not getting all required samples

Hi, I'm new to Labview and don't understand why I'm not getting all the samples I ask for. 

 

I have a USB-6212-BNC module collecting data from 2 analog voltage inputs. I'm using ai0 for the analog trigger, using basically the same VI found as an example here: https://decibel.ni.com/content/docs/DOC-11764

 

The problem is that I am not getting all the samples needed. As you can see in the example below I only got ~1000 samples when asking for 2000. 

 

 

 

Download All
0 Kudos
Message 1 of 4
(2,501 Views)

Hi bigdoug,

 

the output of the graph is what you get from the (missing) subVI calculation.

The DAQmxRead is configured to read 2000 samples and it surely does so as you would get a DAQmx error message instead...

 

Please check your subVI or attach it here with some meaningful default data!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,490 Views)

Yes, it looks like you are right. DAQmxRead is passing all 2000 samples to the sub VI which then discards everything from before the trigger condition is met. 

 

Since I won't know when the trigger condition happens, the total number of samples I get out of the sub VI is not defined. 

 

Is there a better way to acquire samples with an analog trigger? I would like to be able to define how many samples to get after the trigger. As far as I can tell the USB-6212 does not support hardware analog triggering. 

0 Kudos
Message 3 of 4
(2,480 Views)

Hi doug,

 

you just need to read more samples after the trigger signal has been detected...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(2,474 Views)