LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

using both triggers for start acquisition

Solved!
Go to solution
Hello veterans,
 
I want to ask if somebody can give me an example (because I didn't found anything). I want to realize post trigger data acquisition. If I want to acquire data after one trigger is detected, there is no problem. But, I'm interested to run acquisition after TRIG1 or TRIG2 are detected.
 
I studied examples and manual, but without success. And if you add routing signal example for configure more PFI pins, I'll be wery glad.
 
LabView 7.1
Windows XP Professional
PCI-MIO-16E-1

Certified-LabVIEW-Developer_rgb.jpg

Message 1 of 7
(3,816 Views)
Solution
Accepted by Stefo

Hello Stefo,

If I understand your question correctly, you wish to trigger your analog acquisition if you get a pulse on your TRIG1 or TRIG2 line.  Unfortunately, this is not possible with an E Series device alone.  You would require some external hardware to 'OR' you two triggers.  If you were using an M Series board (with DAQmx), you could use the pattern matching start trigger.  Digital events have very limited support on E Series boards, and the PCI-MIO-16E-1 does not have digital events.  You can view more information on E Series digital events here.

The only other option I see available to you is to create a digital input task where you read two lines as fast as you can.  As soon as you see the expected values on these lines you can start your analog task.  This would work like a software trigger, and would not start as fast as a hardware trigger.

Regards,

Jesse O.
Applications Engineering
National Instruments

Message Edited by Jesse O on 04-14-2006 03:01 PM

Jesse O. | National Instruments R&D
Message 2 of 7
(3,799 Views)

Hi Jesse,

Does the MIO16 have two counters, and (if so) do you think they might be exploited to implement a NOR gate as follows:

A constant high is wired to CTR 0 SRC, and 0 OUT is enabled when 0 GATE is LOW.

CTR 0 OUT is wired to CTR 1 SRC, and  CTR 1 OUT is enabled when CTR 1 GATE is LOW..

So, CTR 1 OUT should stay high unless/until either CTR 0 GATE (Stefo's Trig1)  or CTR 1 GATE (Trig2) goes high.

It's been a long time since exploring counters, sorry if this is silly for some reason.  If not, then Stefo may have the OR he needs...

(?)

 

 

When they give imbeciles handicap-parking, I won't have so far to walk!
0 Kudos
Message 3 of 7
(3,780 Views)
Hi Dynamik,

Your suggested implementation of a NOR gate using counters would not work as you described.  First of all, the counter outputs change state in either pulsed or toggled mode only when the internal count register rolls over.  With a constant value tied to the source pin of a counter, the count register will never increment or decrement and the output will never change.  If you can come up with a way to do what you suggested, please post your code as I would be interested to see it!

Best regards,
0 Kudos
Message 4 of 7
(3,746 Views)

Hi Jarrod,

      Thanks for trying to understand what I'm suggesting! Smiley Happy

Cheers.

When they give imbeciles handicap-parking, I won't have so far to walk!
0 Kudos
Message 5 of 7
(3,741 Views)

Hi Stefo,

      You're probably way past this by now, but if you still want to trigger your PCI-MIO-16 on either of two inputs, I think it's simple...

 - if you're configured for differential input...

If so, wire both of your triggers to the same AI - one to the plus side, and one to the minus side.  When one trigger fires, it will pull that AI up or down.  Use that AI channel as the trigger source and configure a trigger "window" around the untriggered level.  It's called "window triggering" in the "E Series help" and if there's a good example I didn't see it.  However, open "AI Trigger Config.vi" (Advanced AI palett) and look at the "Trigger or Pause" options - "Trigger upon leaving window".  From what you've said it seems unlikely that both triggers will occur so close together as to negate each other - though it's theoretically possible.

As an added bonus, you only need to acquire one channel to monitor both triggers! Smiley Wink

Cheers.

When they give imbeciles handicap-parking, I won't have so far to walk!
Message 6 of 7
(3,725 Views)
Hey Stefo,
      Here's a VI to help setup "window triggering".  Make a copy of the example "Acquire N - Multi-Analog Hardware Trig.vi" and replace AI Start.vi with the attached VI.  It should work as is, if not maybe Jesse or Jarrod can help tweak it - I don't have the hardware or recent hands-on experience!
 
Luck/Cheers.
When they give imbeciles handicap-parking, I won't have so far to walk!
0 Kudos
Message 7 of 7
(3,713 Views)