Test and Measurement Forum

Picoscope 3000 triggering

Post your LabVIEW discussions here

Picoscope 3000 triggering

Postby BDS » Fri Oct 26, 2007 5:08 pm

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?
BDS
User
User
 
Posts: 4
Joined: Fri Oct 26, 2007 4:13 pm

Postby ziko » Mon Oct 29, 2007 4:12 pm

Hi and thank you for your post.

To do the calculation you would need the following formula:

input signal (positive or negative)/input range * 32,767

e.g. -3 V signal in a +/-5 Volt range would be:

-3000/5000 * 32,767 = -19660.2 therefore the count is -19660

Hope this helps.

Kind regards
Ziko

Technical Specialist
ziko
Zen Master
Zen Master
 
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots

Postby BDS » Tue Oct 30, 2007 10:55 pm

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.

BDS
Attachments
ps3000_runBlock.vi
VI showing code where negitive trigger does not work.
Labview version 8.0
(43.31 KiB) Downloaded 295 times
BDS
User
User
 
Posts: 4
Joined: Fri Oct 26, 2007 4:13 pm

Postby ziko » Thu Nov 01, 2007 10:36 am

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."

Hope this helps.

Kind regards
Ziko

Technical Specialist
ziko
Zen Master
Zen Master
 
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots

Postby BDS » Thu Nov 01, 2007 6:16 pm

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.
BDS
User
User
 
Posts: 4
Joined: Fri Oct 26, 2007 4:13 pm

Postby ziko » Mon Nov 05, 2007 10:48 am

Well I am glad it works now.

Kind regards
Ziko

Technical Specialist
ziko
Zen Master
Zen Master
 
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots


Return to LabVIEW

Who is online

Users browsing this forum: No registered users and 0 guests