Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you find the current individual sample value when collecting a finite number of samples

Solved!
Go to solution

My programme works with an external clock with non constant pulse intervals and acquires a voltage value on the rising edge of these pulses.  Is there anyway to get the voltage value at each pulse without having to wait till all the samples are collected.  I wish to programmatically trigger an event when the voltage reaches a particular level during the scan so hence why i need to constantly monitor the voltage.

 

Any help would be great

0 Kudos
Message 1 of 2
(2,938 Views)
Solution
Accepted by topic author JED1986

Hi JED1986

 

I have two solutions for you for your problem.

 

The first idea I would recommend is creating the code below:

 

 

dddd.PNG

Remembeer to set the sources correctly, especially the clock source to read as your external clock. The above code will continously read only 1 sample with a rising edge, write it to disk, clear then will keep reading the next sample.

 

Another way to do this is to use an express VI and set the acquistion mode as 'on demand' with 1 sample being read. This is shown below and highlighted in red:

 

 

123.PNG

 

 

I hope this helps. Please let me know how you get on.

Many thanks for using the NI forums and I look forward to your reply.

Kind regards

David

Applications Engineer
National Instruments UK
0 Kudos
Message 2 of 2
(2,918 Views)