I am using the picoscope 4226 with channel A ,B and EXT inputs. When combined with the picoscope 6 software, I notice that the trigger threshold is limited to the voltage range of whichever channel is selected for the trigger. However, when the EXT channel is selected as the trigger, the limit used is the maximum voltage range (20V).
My question concerns the programming aspect of this behaviour. In the ps4000SetSimpleTrigger function, the threshold is taken in ADC counts. The ADC counts can be determined by the function mv_to_ADC (just the reverse of the ADC_to_mv function provided in the examples). Now, this function which is as follows:
ADC_count = (mVVal * PS4000_MAX_VALUE) / inputRanges(range)
requires the range to be known. In the case of ChA and ChB, these are known. For EXT however, you cannot set the voltage range using ps4000SetChannel.
Thus, my question is how do I convert my user specified voltage to ADC counts when the user selects the EXT channel?
Thanks once again.