Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx 9.4, reference trigger with hysteresis does not work for the NI 6132 board?

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:

refHysreresis.JPG

 

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
0 Kudos
Message 1 of 8
(5,260 Views)

Some extra information  the trigger failed as it was described when quantity of pretrigger samples set to 17000. Total record size is 17010

0 Kudos
Message 2 of 8
(5,256 Views)

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?

0 Kudos
Message 3 of 8
(5,247 Views)

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?

 

0 Kudos
Message 4 of 8
(5,244 Views)

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?

0 Kudos
Message 5 of 8
(5,242 Views)

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

Bogdan Buricea
Applications Engineer
National Instruments
0 Kudos
Message 6 of 8
(5,232 Views)

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?

0 Kudos
Message 7 of 8
(5,227 Views)

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,

Bogdan Buricea
Applications Engineer
National Instruments
0 Kudos
Message 8 of 8
(5,223 Views)