I have searched the forum and haven't seen this question asked so I must be doing something wrong?
I am trying to set an internal trigger but I can only trigger on a positive voltage.
I understand that the value needing to be passed is a 16 bit integer that is scaled by the selected range. It appears that the "threshold" value only references the positive half of the range.
example: range=10v | threshold=32768 => trigger=+5v
Passing a negative value int threshold produces the same value as passing a zero which equals zero volts.
Am I doing something wrong or is this the limitation of the picoscope box?
Ok, that answers the one question of what +/- integer values address what range.
There seems to be something wrong however because no matter what integer value I pass, I cannot get it to trigger on a (-) voltage.
I ran the picoscope6 software and it allows a neg. trigger so it's not the scope box.
I verified that the input to "threshold" is set to 16bit signed integer (pass value) and that the data type wired is 16bit signed.
I have uploaded a slightly modifed copy of the ps3000_runBlock.vi
This should show exactly how I am running the scope.
Hi after discussing with the software engineers the application seems fine. They did point out the following though:
"The trigger function auto_trigger_ms should be a signed 16 bit value, not a bool. You should set this to zero if you do not want the device to auto trigger.
The second point is that when the device is opened by default the channels are set to active therefore the minimum timebase that can be used on the 4 channel device is time base 2. To use timebase 1 two of the channels need to be switched off before calling run block, and three channels need to be switched off before calling run block with timebase 0. If they are not switched off then run block will fail."
I found the problem.
I had two versions of ps3000.dll (3.5.0.0 and 3.5.8.0) and was using the older version. I switched to the newer version and the trigger behaves as expected.