Trigger function of PicoScope 3204b

Post your LabVIEW discussions here
Post Reply
BenQ_5
Newbie
Posts: 0
Joined: Mon Feb 13, 2012 2:39 am

Trigger function of PicoScope 3204b

Post by BenQ_5 »

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.

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Trigger function of PicoScope 3204b

Post by Martyn »

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 Support Manager

BenQ_5
Newbie
Posts: 0
Joined: Mon Feb 13, 2012 2:39 am

Re: Trigger function of PicoScope 3204b

Post by BenQ_5 »

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.

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Trigger function of PicoScope 3204b

Post by Martyn »

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 Support Manager

BenQ_5
Newbie
Posts: 0
Joined: Mon Feb 13, 2012 2:39 am

Re: Trigger function of PicoScope 3204b

Post by BenQ_5 »

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

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Trigger function of PicoScope 3204b

Post by Martyn »

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 Support Manager

BenQ_5
Newbie
Posts: 0
Joined: Mon Feb 13, 2012 2:39 am

Re: Trigger function of PicoScope 3204b

Post by BenQ_5 »

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

Post by BenQ_5 »

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 639 times

BenQ_5
Newbie
Posts: 0
Joined: Mon Feb 13, 2012 2:39 am

Re: Trigger function of PicoScope 3204b

Post by BenQ_5 »

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

Post Reply