LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Finite Retriggerable Analog Input using a Counter as a trigger

I'm trying to repeatedly read in a finite number of samples from the analog input module (NI-9229) using a Counter Output Pulse frequency as a trigger source.     I found an example which was very similar to my application but I cannot get it to work - yields

Error -200278: Attempted to read a sample beyond the final sample acquired. The acquisition has stopped, therefore the sample specified by the combination of position and offset will never be available... 

The attached vi has been modified with several suggestions but still no luck.   The analog read runs once then no other samples are available.    I have tried placing the Task Start/Stop within the For-Loop which works but this slows things down too much.     Any suggestions?

 

System:  NI-9178 Chassis with NI9229 Analog input module and NI-9401 Digital I/O module running LabView 2016 on Windows 10.

 

Thanks!

 

0 Kudos
Message 1 of 3
(2,192 Views)

Hi Joshu.

 

I took a look at the uploaded VI and noticed that the solution could be the one proposed on This Knowledge Base article. I would like you to read this article and follow the proposed recomendations.

 

Have a great day! 🙂 

 

 

0 Kudos
Message 2 of 3
(2,144 Views)

Yes, that seems to be the only way to make this work.   Placing the Task Start and Stop within the While-Loop definitely limits cycling time.   By increasing the sampling frequency to 10k, I was able to cycle with a trigger frequency of up 12Hz before missed triggers occur, which is fine for my application.   Thanks for the help!

0 Kudos
Message 3 of 3
(2,134 Views)