Hey,
I am using Picoscope 6402c and control it with matlab. I have a problem with triggering on AUX port.
I use below commands for triggering on channel D and it works. But I don't know how I should change it to trigger on AUX port. %% Set Simple Trigger
triggerGroupObj = get(ps6000DeviceObj, 'Trigger');
triggerGroupObj = triggerGroupObj(1);
set(triggerGroupObj, 'autoTriggerMs', 1000);
thresholdVoltage = 2000; % 2Volts
[status.setSimpleTrigger] = invoke(triggerGroupObj, 'setSimpleTrigger', 3, thresholdVoltage, 2);
To use the Aux input, you need to set the channel value to the correct enumeration value as you have done for channel D (3).
The ps6000Enuminfo struct which is created when the PS6000Config script is run can be used to query the available enumeration types available. For channels, you require the ps6000Enuminfo.enPS6000Channel range.
Thanks Hitesh for your respond. I tried ps6000Enuminfo.enPS6000Channel and I got the values but when I implement the number '5' in the code it gives me an error.
I use below lines for triggering : triggerGroupObj = get(ps6000DeviceObj, 'Trigger');
triggerGroupObj = triggerGroupObj(1);
set(triggerGroupObj, 'autoTriggerMs', 1000);
thresholdVoltage = 2000; % 2Volts
[status.setSimpleTrigger] = invoke(triggerGroupObj, 'setSimpleTrigger', 5, thresholdVoltage, 2);
and the error is: Error using icgroup/invoke (line 92)
setSimpleTrigger: Status code: 13. Please refer to the PicoStatus.m file.
I checked the PicoStatus.m file and there number 13 is : PICO_NO_SIGNAL_GENERATOR = hex2dec('00000013');
I don't use my Picoscope as a signal generator. I just want to use all 4 channels to record data.
The Instrument Driver returns the status codes as integer values which should then be converted to a hexadecimal value (you can use dec2hex() for this in MATLAB).
An integer value of 13 is 0xD which is PICO_INVALID_PARAMETER.
Looking at the settings for the simple trigger, the threshold value is 2000 mV. The input range of the AUX I/O connector is ±1 V as shown in the specifications.
Please ensure that the trigger threshold level is within the required range.