Quantcast
Channel: Measurement Studio for .NET Languages topics
Viewing all articles
Browse latest Browse all 1999

Unexpected behaviour of analogue reference trigger

$
0
0

Hi all.

I have the task that acquires data with analogue reference trigger. The task looks something like this:

task = new Task("");

task.AIChannels.CreateVoltageChannel(
                        SensorPin,
                        SensorName,
                        AITerminalConfiguration.Differential,
                        -10,
                        10,
                        AIVoltageUnits.Volts);
task.Timing.ConfigureSampleClock("", 100000, SampleClockActiveEdge.Rising, SampleQuantityMode.FiniteSamples, 50000);
task.Triggers.ReferenceTrigger.ConfigureAnalogEdgeTrigger( SensorName, AnalogEdgeReferenceTriggerSlope.Rising, 0.2, 10000);

Input signal have the following form:

signal.png

where

red line - trigger level (0.2),

green line - 10000 samples as presented in trigger configuration.

 

The problem is that this task works perfect when the preTriggeredSamples is about 10000 or less. But when I increase preTriggeredSamples value, the first signal's peak is missed and the second peak is triggered.

Notice that the task starts ealier and there are enough time to fill the pretriggered buffer.

 I have tried to change the buffer size - result is the same.

 

But after that I recreated this task with NI MAX:nimax_1.pngnimax_2.png

 

The task works prefectly with any value of pretriggered samples.

 

I have no idea what I am doing wrong.

Could you help me?

Thank you.


Viewing all articles
Browse latest Browse all 1999

Trending Articles