PicoScope 7 Software
Available on Windows, Mac and Linux
Code: Select all
status = Imports.SetTriggerChannelProperties(handle, ref properties, (short) 1, (short) 0, 0);
Code: Select all
status = Imports.SetChannel(handle, Imports.Channel.CHANNEL_A, 1, (short)Imports.coupling.DC, Imports.Range.Range_10V, 0);
//return status = 0
Code: Select all
Imports.TriggerChannelProperties[] properties = new Imports.TriggerChannelProperties[1];
properties[0].Channel = Imports.Channel.CHANNEL_A;
properties[0].ThresholdMinor = 655; // mv_to_adc(200, Imports.Range.Range_10V);
properties[0].ThresholdMajor = 1966; // mv_to_adc(600, Imports.Range.Range_10V);
properties[0].ThresholdMode = Imports.ThresholdMode.Window;
properties[0].HysteresisMajor = 256;
properties[0].HysteresisMinor = 256;
status = Imports.SetTriggerChannelProperties(handle, ref properties, (short)1, (short)0, 0);
Code: Select all
Imports.TriggerConditions[] conditions = new Imports.TriggerConditions[1];
conditions[0].Source = Imports.Channel.CHANNEL_A;
conditions[0].Condition = Imports.TriggerState.DontCare;
status = Imports.SetTriggerChannelConditions(handle, conditions, 1, Imports.INFO.Add);
Imports.TriggerDirections[] directions = new Imports.TriggerDirections[1];
directions[0].Direction = Imports.ThresholdDirection.Exit;
directions[0].Source = Imports.Channel.CHANNEL_A;
status = Imports.SetTriggerChannelDirections((short)handle, directions, (short)(1));
Imports.TriggerChannelProperties[] properties = new Imports.TriggerChannelProperties[1];
properties[0].Channel = Imports.Channel.CHANNEL_A;
properties[0].ThresholdMinor = mv_to_adc(200, Imports.Range.Range_10V);
properties[0].ThresholdMajor = mv_to_adc(600, Imports.Range.Range_10V);
properties[0].ThresholdMode = Imports.ThresholdMode.Window;
properties[0].HysteresisMajor = 256;
properties[0].HysteresisMinor = 256;
status = Imports.SetTriggerChannelProperties(handle, properties, 1, 0, 0);
Code: Select all
public enum CONDITIONS_INFO : int
{
Clear = 1,
Add = 2
}
Code: Select all
info = (PS4000A_CONDITIONS_INFO)(PS4000A_CLEAR | PS4000A_ADD);
Code: Select all
info = (PS4000A_CONDITIONS_INFO)(PS4000A_CLEAR | PS4000A_ADD);
Hope this helps.info, determines whether the function clears previous conditions:
PS4000A_CLEAR, clears previous conditions
PS4000A_ADD, adds the specified conditions (ORing them with previously set conditions, if any)
You can combine both actions by passing
(PS4000A_CONDITIONS_INFO)(PS4000A_CLEAR | PS4000A_ADD)