Imports.TriggerChannelProperties[] triggerChannelProperties = new Imports.TriggerChannelProperties[]
{
new Imports.TriggerChannelProperties(triggerVoltage,
hysteresisVoltage,
triggerVoltage,
hysteresisLowerVoltage,
Imports.Channel.ChannelA,
Imports.ThresholdMode.Level)
};
Imports.TriggerConditions[] triggerConditions = new Imports.TriggerConditions[]
{
new Imports.TriggerConditions(Imports.TriggerState.True, // Channel A
Imports.TriggerState.DontCare, // Channel B
Imports.TriggerState.DontCare, // Channel C
Imports.TriggerState.DontCare, // Channel D
Imports.TriggerState.DontCare, // external
Imports.TriggerState.DontCare, // aux
Imports.TriggerState.DontCare, // pwq
Imports.TriggerState.DontCare)
};
Imports.ThresholdDirection[] directions = new Imports.ThresholdDirection[]
{ Imports.ThresholdDirection.RisingOrFalling, // Channel A
Imports.ThresholdDirection.None, // Channel B
Imports.ThresholdDirection.None, // Channel C
Imports.ThresholdDirection.None, // Channel D
Imports.ThresholdDirection.None, // ext
Imports.ThresholdDirection.None };
Imports.PwqConditions[] pwqConditions = new Imports.PwqConditions[1];
int timeDisposed;
_callbackDelegate = BlockCallback;
Imports.RunBlock(_handle, 0, 0, _timebase, _oversample, out timeDisposed, 0, _callbackDelegate, IntPtr.Zero);
I have used extreme values for the purpose of testing how this works. Now having set samplerate to 2000000000(1sample = 1,6seconds), and pulse width to 2000000000, the trigger shouldn't trigger before 3200000000 seconds or 101 years have passed(is this correct?) However, when I run the program, the trigger triggers immedietly.
I have tried to set up trigger in the PicoScope6 app, with the result im expecting.
Obviously there is something I don't understand here, but I expect that the condition of the signal has to stay below the threshold for 2000000000(Set in SetPulseWidthQualifier) samples before it can trigger.
For those of you who also might have problems with Pulse Width Trigger. I found that the TriggerState of pwq in TriggerConditions has to be set to True.