Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx reference trigger and hysteresis

I'm trying to get an analog input acquisition to reference trigger on a falling analog edge (trigger edge input to the DAQmx Reference Trigger is set to falling). It only triggers on just a falling edge if I set the hysteresis to 0.4 or greater. If the hysteresis is < 0.4, then the acquisition will trigger on a rising or falling edge, i.e., if the signal starts below the trigger level it will trigger when the input gets to the trigger level. It's supposed to have to go above the trigger level. To test this I'm generating the analog input with the boards' analog output, so it should be pretty clean (confirmed on a scope). Any ideas on how the hysteresis level affects the acquisition?

George
0 Kudos
Message 1 of 13
(5,032 Views)
Are you using an E Series board?
0 Kudos
Message 2 of 13
(5,016 Views)
Yes, a PCI-MIO-16E-1 board.
0 Kudos
Message 3 of 13
(5,010 Views)
A while ago I created two LabVIEW front panels whose purpose is to expose the timing and triggering properties of E Series boards in a more graphical way. Their aim is to provide a way to learn the capabilities of the boards and help configure your application. Perhaps you could give them a try. It would be great if they could help you solve your problem. I've attached an .llb containing the VIs. The top level VI is called Graphical Timing and Trigger Host. Set the four controls and then run it. The triggering VI, launched by the TRIGGERING button, persents a panel that lets you adjust the triggering parameters and try them out. You need LabVIEW 7.x and NI-DAQmx.
0 Kudos
Message 4 of 13
(5,006 Views)
That's a nice application, but unfortunately it doesn't help explain what's going on with my problem.
0 Kudos
Message 5 of 13
(5,004 Views)
Well, for falling edge analog triggering, the signal first must go above (trigger level + hystersesis) and then fall below the trigger level.

What is your trigger level?

Are you triggering off PFI 0 or off of an analog input channel? If the latter, what is the max and min for that channel?
0 Kudos
Message 6 of 13
(4,992 Views)
George,

The hysteresis is based off of the amount above and below a level a signal is. A couple things I would like to know though. First off, what is the level that you are attempting to at? Are you using Traditional-DAQ or DAQmx? What version of LabVIEW are you using to take your measurements? And what commands are you using to perform the hysteresis?

The level of the hysteresis should not affect whether or not it is triggering on the proper edge.

LabVIEW's Definition of Hysteresis:
Hysteresis specifies the amount above and below level through which signal in must pass before a trigger level crossing is detected. Trigger hysteresis is used to prevent noise from causing a false trigger. For a rising edge slope, the signal must pass below level – hysteresis before a trigger level crossing is detected. For a falling edge slope, the signal must pass above level + hysteresis before a trigger level crossing is detected.
0 Kudos
Message 7 of 13
(4,991 Views)
First of all thanks for the replies so far and for hanging in there. I'm using DAQmx version 7.4, LV 7.1 and Windows XP. PFI0 is my trigger input. Trigger is on the falling analog edge. I'm reading one A/D channel. Please see the attached VI to see what I'm doing.

I think I understand about how hysteresis is supposed to work which is why the behavior of this test doesn't make any sense. Here's an illustration of what happens:

Input is a sawtooth that goes from 0 to 2 and back to 0 volts.
Trigger level is 1.0 and hysteresis is 0.2 (or anything less than 0.2).
In this case the trigger occurs at 0.9 volts on the RISING edge of the sawtooth.

Now if I set the hysteresis to 0.3 (or up to 1.0) it will trigger at 1.0 volts on the falling edge of the sawtooth. This is the expected behavior.

Hopefully that's enough info to go on.

George
0 Kudos
Message 8 of 13
(4,988 Views)
Please ignore the VI I sent in my last post. I hadn't saved the most recent changes. Here's the right one.
0 Kudos
Message 9 of 13
(4,984 Views)
I able to reproduce your behavior. But, when I switched to using ai0 as the trigger source, I could not. Always triggered from the falling edge with hysteresis of 0.2.

Perhaps such a high value of hysteresis is needed for stable triggering when PFI 0 is used because the comparator in this circuit has only 8 bits of resolution. Plus, this circuit has a fixed range of 20V (+/- 10). This gives a resolution of only 75mV. When you use ai0 as your trigger source, you use the 12 bit ADC of the device as well as its gain stage. But, to use ai0 as a reference trigger source, it must be the only channel in your task.
0 Kudos
Message 10 of 13
(4,982 Views)