From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

Showing results for 
Search instead for 
Did you mean: 

trigger aquisition on rising edge & falling edge

I found an example called AI Start-Stop that I thought would do what I want but it endlessly loops around the AIRead without exit.
I'm using a digital signal from a counter board (variable pulse widths) as kind of a one-shot to start the aquisition on the rising edge, then trigger a stop aquisition on the falling edge. In the vi I'm trying to use I configured each seperately (one rising edge, the other falling). Is it even possible to use one pulse to trigger aquisitions??
0 Kudos
Message 1 of 5
Hi Mike,

I have two ideas:
1. There is an example named "Acquire N Scans Digital". You can find it in LabVIEW 7.0 by going to Help>>Find Examples... and doing a search on triggering digital. In general this does what you want to do, but it looks like it expects two triggers of the same edge (rising or falling). You might be able to modify it by going into the AI and changing the parameters on the second call to AI Trigger If you make changes to AI, be sure to save it with a new name in your own project somewhere. I'm not sure if this will work, since I haven't tried it. You will also need to read the example description - it is very detailed about which trigger type to choose and how to wire your trigger (start
and stop are two different pins).

2. This is a bit more creative, but I have tried it, so I know it works. The idea is to use your trigger pulse (as a gate input) to control a counter pulse train output - the counter clocks out pulses at a known rate as long as its gate is high. You then use that counter pulse train output as an external clock for your data acquisition. You will need to merge parts of two different examples to achieve this. If you have an E-series board, "Finite Pulse Train (DAQ-STC).vi" will help you with the pulse train. This example uses two counters: one to create a single pulse (like your trigger pulse), and one to output the finite pulse train. You'll need to get rid of the single pulse counter part of the code and use your pulse as the gate to the other counter. The second example is "Cont Acq&Graph". You will pretty much use this code as is, but you'll wire your counter output in as the scan clock. The example description explains the

I hope this helps.

Best Regards,

Message 2 of 5

I have been playing with the example you mentioned, and it appears to be working OK. The only modification I made was to change the trigger or pause condition terminal to AI Trigger to "trigger on falling edge or slope". Are you connecting your trigger signal to PFI 0? Have you verified this signal?

Spencer S.
0 Kudos
Message 3 of 5
Hello Spencer S.:
Yes, the output from the counter board pulse width generator is connected to PFI1 and PFI0.
I have the vi working also but had to tie the source line to both trigger config vis together and make it pfi0, then I had to make trigger A negative slope and trigger B positive.
At least now it is not giving me errors but I'm having trouble getting the correct amount of data.
Thanks for your input.
0 Kudos
Message 4 of 5
Hello Doug:
Thank you for the feedback. I had contemplated your option 1 as well and decided not to play with fire.
Option 2 is interesting and as of yet I have not tried it. I'm still trying to use the start-stop vi I mentioned before but if that doesn't pan out I will give option 2 a shot. (I have the start-stop vi working now but I'm not seeing what I expected for data)
0 Kudos
Message 5 of 5