07-31-2012 01:11 PM
We are setting the reference trigger with hysteresis
for falling slope, trigger level = 0.15, hysteresis = 0.2
and expecting that signal shoud be above 0.35V before going down lower than 0.15V
We have the following code (C#):
runTask.Triggers.ReferenceTrigger.ConfigureAnalogEdgeTrigger(actualName,
AnalogEdgeReferenceTriggerSlope.Falling,
0.15, 12);
runTask.Triggers.ReferenceTrigger.AnalogEdge.Hysteresis = 0.2;
The acquired data looks like simple reference trigger with hysteresis set to 0!
The result data is shown on the picture:
The data is below
| 0.079041 |
| 0.063019 |
| 0.095673 |
| 0.106049 |
| 0.093536 |
| 0.142059 |
| 0.075836 |
| 0.082397 |
| 0.129242 |
| 0.089264 |
| 0.086517 |
| 0.159302 |
| 0.116577 |
| 0.138245 |
| 0.137024 |
| 0.115051 |
| 0.149384 |
| 0.163727 |
| 0.153351 |
| 0.122375 |
| 0.150909 |
| 0.159607 |
07-31-2012 03:10 PM
Some extra information the trigger failed as it was described when quantity of pretrigger samples set to 17000. Total record size is 17010
08-02-2012 11:44 AM
Hey gremlm,
You mentioned that the trigger failed when your pretrigger samples were set to 17000. Were you able to see successful triggering at any point - ie, for a smaller set of pretrigger samples, or has it always failed?
08-02-2012 02:36 PM
Triggering always happned but it is a false triggering.
Our settings for hysteresis are 0.2 and trigger level is set 0.15, so sygnal should come above 0.35 V before triggering happened on the falling slope at 0.15 V.
The provided data is result of triggered data acquisition. As you can see, there are no any data point above 0.35 there.
Why triggerering happened?
08-02-2012 02:49 PM
Triggering always happned but it is a false triggering.
Our settings for hysteresis are 0.2 and trigger level is set 0.15, so sygnal should come above 0.35 V before triggering happened on the falling slope at 0.15 V.
The provided data is result of triggered data acquisition. As you can see, there are no any data point above 0.35 there.
Why triggerering happened?
It looks exactly like standart edge trigger were hysteresis set to 0.
Why hysteresis settings are ignored?
By the way, our sygnal itself vdery noisy. There are coud be very short spikes with very high amplitude, but in this case such spikes should be seen in the data, right?
How hysteresis trigger settings are applied on the board (NI 6132)?
Example: we have sampling period 1ms (sampling rate is 1KHz).
In some moment t for 0.01 ms it there is a spike 1V and for then 0.99ms votage is 0, the average result voltage for corresponding sample will be 0.01V.
But this 1V spike for 0.01 ms will be counted for hystereis or not?
Is hystereis settings applied for result of sampling or before?
08-03-2012 05:44 PM
Hi gremlm,
While it is possible that at 1KHz, it is triggering because of the 1V voltage spike, it is unlikely because you would be acquiring every 1ms. You can definitely try upping the sampling rate and see if that helps.
Also, what are you writing this in? Visual Studio?
If you have access to CVI, There is an example that allos you to read in a finite amount of data and it allows you to trigger with a hysteresis. It is called "Acq-IntClk-AnlgStart.prg." If you have access to CVI, perhaps try running your data through there to see if it triggers correctly there. If it does, then that indicates that it might be a problem with your code. If it does not, then that indicates that it might be a problem with the spike or another variable.
Sincerely,
Bogdan Buricea
08-03-2012 09:30 PM
We know that spikes are present for much shorter time than sampling period.
If spikes are counting for hysteresis event, should they be digitized as that and seen in the data?
08-06-2012 09:27 AM - edited 08-06-2012 09:28 AM
Hi gremlm,
Yes, that makes sense and is a good point: if the spikes are counted for hysteresis, they should be digitized as that and seen in the data.
Are you able to run the CVI example to troubleshoot and see if it's your code of the signal?
Sincerely,