Test and Measurement Forum

Trigger function of PicoScope 3204b

Post your LabVIEW discussions here

Trigger function of PicoScope 3204b

Postby BenQ_5 » Thu Mar 07, 2013 7:22 pm

Hello, I'm developing an application in LabVIEW using the PicoScope 3204 b as an interface for data acquisition, i successfully, using the block mode, i have my first oscilloscope working without complex trigger conditions actives, however i need to do something in order to say at the PicoScope "capture data and send me back until this trigger condition occur ", i do not if you know what i means... in the software of the manufacturer this trigger condition is "single", and is equal to an unique mode for capture.

Please... if someone have an idea... help me.

Note. sorry about my INGLÉS, pues soy de habla hispana y no tengo un basto conocimiento del idioma.
BenQ_5
Newbie
 
Posts: 0
Joined: Mon Feb 13, 2012 2:39 am

Re: Trigger function of PicoScope 3204b

Postby Martyn » Fri Mar 08, 2013 1:19 pm

There are two possible options for what you are saying depending upon exactly what you mean.

Streaming mode, once started, will continue to send data to the scope. This can be configured to stop at or shortly after a trigger event has occured.

Block mode, with a trigger set, will arm the scope and allow you to go off and do other things in your program before the scope prompts you that the data has been collected and is ready for download. This is what we would consider as "single" trigger.
Martyn
Technical Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2349
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Trigger function of PicoScope 3204b

Postby BenQ_5 » Fri Mar 08, 2013 4:15 pm

Ok... in my application the program say to thePicoScope "capture data in block mode " and as the programming guide say, i am using the steps to configure the channels, after that the trigger condition and direction, so... i was thinking that using this mode for capture, just adjusting the trigger condition... i can use the "single" trigger.

I know that perhaps is difficult to understand me... just to be more clearly... look the software of the PicoScope using the training mode and down to the screen you will see the trigger modes... set the number 4 (i guees) in the popup menu, which make reference a "single", and this way you will be able to understand what i exactly need.

Thank you very much.
BenQ_5
Newbie
 
Posts: 0
Joined: Mon Feb 13, 2012 2:39 am

Re: Trigger function of PicoScope 3204b

Postby Martyn » Fri Mar 08, 2013 5:13 pm

For PicoScope Single mode it will call RunBlock once, and then download the data and stop. If you select Repeat trigger in Picoscope it will call Run block again once the data is downloaded and repeat the process continually.

So all you need to do is one call to RunBlock, download the data once capture is complete and then stop.
Martyn
Technical Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2349
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Trigger function of PicoScope 3204b

Postby BenQ_5 » Wed Mar 13, 2013 6:01 am

Yes you are right, but... for example, in the scale of 20 V i want to see a full package of data only if the signal cross the 16 V.

In this case, for me this value of voltage (16 V) means an over voltage, and i want to see what is happen before and after this value.

I already prepare a video to show you how i do it using the software of picoscope, but it is no possible for me upload it.

I need to do the same whit LabVIEW, first: because i need this interval of the signal, and second: i need to synchronize this data acquisition using PicoScope whit other device for control of some relays that belong to a high voltage source. in order words i need to synchronize control and data acquisition task using the same interface.

The problem for me, in this moments is... trigger.

well, thanks for your time...
BenQ_5
Newbie
 
Posts: 0
Joined: Mon Feb 13, 2012 2:39 am

Re: Trigger function of PicoScope 3204b

Postby Martyn » Wed Mar 13, 2013 7:22 am

To collect a single block of data in response to a trigger you will need to use the SetSimpleTrigger function
Code: Select all
PICO_STATUS ps3000aSetSimpleTrigger
(
short handle,
short enable,
PS3000A_CHANNEL source,
short threshold,
PS3000A_THRESHOLD_DIRECTION direction,
unsigned long delay,
short autoTrigger_ms
)

with the following settings

Enable - True
Channel - The one that has the signal
Threshold - 26000    (32512*16/20)
Direction - Rising
Delay - False
autoTrigger - 0

Your call to RunBlock will need to have PreTriggerSamples as well as PostTriggerSamples which will ensure you can see some data before the trigger in the buffer you collect.

With this set RunBlock will only report ready when it has a full buffer of data after a trigger event.
Martyn
Technical Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2349
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Trigger function of PicoScope 3204b

Postby BenQ_5 » Thu Mar 14, 2013 5:03 am

ok thank you, i will try and after that i will tell you
BenQ_5
Newbie
 
Posts: 0
Joined: Mon Feb 13, 2012 2:39 am

Re: Trigger function of PicoScope 3204b

Postby BenQ_5 » Sat Mar 16, 2013 5:14 am

Ok my friend, using this example... i your signal is in channel A, and you set trigger by this channel... you obtain always the same error.
Attachments
PicoScope3000aExampleBlock.vi
(17.81 KiB) Downloaded 144 times
BenQ_5
Newbie
 
Posts: 0
Joined: Mon Feb 13, 2012 2:39 am

Re: Trigger function of PicoScope 3204b

Postby BenQ_5 » Mon Mar 18, 2013 2:09 am

Ok... not using setsimple trigger, instead using the calls of the respective s function for complex trigger... my problem is solve... my mistake was in my wrong interpretation about the threshold... now i know that the threshold is scaled to 16 bit.

I will write if i found another problem...
BenQ_5
Newbie
 
Posts: 0
Joined: Mon Feb 13, 2012 2:39 am


Return to LabVIEW

Who is online

Users browsing this forum: No registered users and 2 guests