I am working on using Matlab to collect data using Picoscope 6424E. I have downloaded the SDK and drivers. I try to modify the Matlab example by changing the trigger input.
In the original example, the trigger is at Channel A, the code is shown below:
Code: Select all
enable = 1;
source = trigger_aux;
threshold = 1000; %mV
direction = ps6000aEnumInfo.enPicoThresholdDirection.PICO_RISING;
delay = 0;
autoTriggerMicroSeconds = 1000000; %us
[status.setSimpleTrigger] = invoke(ps6000aDeviceObj, 'ps6000aSetSimpleTrigger', enable, 0, threshold, direction,...
delay, autoTriggerMicroSeconds);
I try to use another method to set the trigger channel as following:
Code: Select all
actionC = ps6000aEnumInfo.enPicoAction.PICO_CLEAR_ALL;
ps6000aStructs.tPicoCondition.members.source=ps6000aEnumInfo.enPicoChannel.PICO_TRIGGER_AUX;
ps6000aStructs.tPicoCondition.members.condition=1;
[status.setTriggerChannel] = invoke(ps6000aDeviceObj, 'ps6000aSetTriggerChannelConditions', ps6000aStructs.tPicoCondition.members,1,actionC);
ps6000aStructs.tPicoDirection.members.channel=ps6000aEnumInfo.enPicoChannel.PICO_TRIGGER_AUX;
ps6000aStructs.tPicoDirection.members.direction=2;
ps6000aStructs.tPicoDirection.members.thresholdMode=0;
[status.setTriggerDirection] = invoke(ps6000aDeviceObj, 'ps6000aSetTriggerChannelDirections', ps6000aStructs.tPicoDirection.members,1);
ps6000aStructs.tPicoTriggerChannelProperties.members.thresholdUpper=2500;
ps6000aStructs.tPicoTriggerChannelProperties.members.thresholdUpperHysteresis=0;
ps6000aStructs.tPicoTriggerChannelProperties.members.thresholdLower=2500;
ps6000aStructs.tPicoTriggerChannelProperties.members.thresholdLowerHysteresis=0;
ps6000aStructs.tPicoTriggerChannelProperties.members.channel=ps6000aEnumInfo.enPicoChannel.PICO_TRIGGER_AUX;
[status.setTriggerChannelProperty] = invoke(ps6000aDeviceObj, 'ps6000aSetTriggerChannelProperties',ps6000aStructs.tPicoTriggerChannelProperties.members,1,0,1000000);
Could I ask how to use the AUX as trigger input?
Thank you very much!
BTW, I have my code running on Picoscope 6404D very well. How to change that code to Picoscope 6424E directly?