Triggering a PicoScope Signal Generator using the API

Post general discussions on using our drivers to write your own software here
Post Reply
Hitesh
Advanced User
Advanced User
Posts: 2856
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Triggering a PicoScope Signal Generator using the API

Post by Hitesh » Tue Apr 07, 2015 2:50 pm

Hi,

We have produced a document that provides an outline of how to set parameters in order to the trigger the signal generator output on a PicoScope where available:

https://www.picotech.com/download/manua ... ctions.pdf

Please post any questions in this thread.

Thanks,
Hitesh

Software Dev. Engineer

mblack
Newbie
Posts: 0
Joined: Fri Apr 06, 2018 7:05 pm

Re: Triggering a PicoScope Signal Generator using the API

Post by mblack » Fri Apr 06, 2018 7:16 pm

Hello,

I am using the ps2000a SDK with a model 2408B. I have the output of the AWG feeding into the input of channel D, and have set up a trigger with a threshold of +1V on channel D. Using an independent function generator and oscilloscope, I have verified that the 2408B is both producing the waveform I expect (without an AWG trigger), and receiving a known waveform.

My question is, where does the call to SigGenSoftwareControl need to be? Right now I have my code set up to call RunBlock, IsReady, SigGenSoftwareControl, SetDataBuffer, GetValues, SetDataBuffer (clear) in that order, but my waveform (a repeating pulse) is not being transmitted. I am calling SigGenSoftwareControl(handle,1), with the SetSigGenArbitrary taking in a trigger type of Rising (0), and a trigger source of Software Trigger (4). I was hoping to understand where my error is.

The behavior I am looking for is the following: 2408B initializes on system startup, then the AWG is triggered ONCE off a software flag, and channel D is triggered upon the AWG transmitted waveform crossing a threshold of +1V.

Thanks!

Hitesh
Advanced User
Advanced User
Posts: 2856
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: Triggering a PicoScope Signal Generator using the API

Post by Hitesh » Tue Apr 10, 2018 9:39 am

Hi mblack,

The SigGenSoftwareControl() function should be called after RunBlock() is called and before you begin to check if the device has data available (i.e. if it is ready).

Are you using C# or another programming language?

Regards,
Hitesh

Software Dev. Engineer

mblack
Newbie
Posts: 0
Joined: Fri Apr 06, 2018 7:05 pm

Re: Triggering a PicoScope Signal Generator using the API

Post by mblack » Tue Apr 10, 2018 6:51 pm

I am using Python. Thank you, that fixed the issue.

Hitesh
Advanced User
Advanced User
Posts: 2856
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: Triggering a PicoScope Signal Generator using the API

Post by Hitesh » Wed Apr 11, 2018 8:53 am

Glad to hear that fixed the issue :)

Regards,
Hitesh

Software Dev. Engineer

pantel
Newbie
Posts: 0
Joined: Wed Dec 04, 2019 3:40 pm

Re: Triggering a PicoScope Signal Generator using the API

Post by pantel » Wed Dec 04, 2019 4:16 pm

Hello,
I use python API to drive picoscope 4824.
In picosdk folder on github a simple data acquisition model using a trigger is implemented in ps4824BlockExample.py
On top of that, i would like to add ps4000aSetSigGenArbitrary function, in order to trigger the sig gen and, say, picoscope's channel A at the same time, i.e using the picoscope simultaneously as sig gen and as data acquisition unit.
I just added the ps4000aSetSigGenArbitrary function between ps4000aSetSimpleTrigger and ps4000aRunBlock, using channel A as a trigger source for ps4000aSetSimpleTrigger and ps4000aSetSigGenArbitrary.
Is that really the proper usage of its sig gen and its data acquisition channels?

Post Reply