LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Electrical voltage as our reference trigger method

Hi all,

 

I am fairly new to LabVIEW, and can't seem to find the problem with my code. 

 

We are running a NI cDAQ-9184 with a NI 9223 and NI 9234 attached. The NI 9223 reads the voltage. We have it reading a voltage and when the voltage goes below a certain designated value of our choosing, we want this to trigger the NI 9234. What we exactly want from the NI 9234 is to record data from one second before the trigger, to 10 seconds after the trigger. We are doing this by using the Refernce Analog Edge application, but it seems to be giving us trouble. 

 

Attached is our code, any help will be greatly appreciated.

 

Thanks

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

Hi ryan1212,

 

 for what I am observing, maybe you would like to see the producer/consumer architecture, so you can be reading the information in the producer loop and controling the time that you would like to be writing the information on the consumer loop. In this one, you can use the "Get Date/Time in seconds" function to compare the diference in time, just to be certain that the data have been saving information during 10  seconds. 

 

The timeout of 10ms that you are putting on the read vi is just to wait that amount of time until the samples to read are achieved. Also, I think that the trigger vi in its configuration stops the data acquisition when the level is passed and it is not a trigger to do something else. 

 

Hope this can be usefull for you, if not, please be a little more specific about the "trouble" that you have been having, so I can try to be more specific on that part.

 

Regards.

0 Kudos
Message 2 of 2
(2,067 Views)