Test and Measurement Forum

Using GEN to indicate scope armed status

Post general discussions on using our drivers to write your own software here

Using GEN to indicate scope armed status

Postby va3ttn » Mon Dec 10, 2012 7:36 am

I had a perfect plan for 3204A:
1. Set GEN to -2 V DC (ps3000aSetSigGenBuiltIn).
2. Call RunBlock.
3. Scope trigger is armed now.
4. Set GEN to +2 V DC (ps3000aSetSigGenBuiltIn again).
5. Use the GEN rising edge to trigger external equipment and produce scope trigger and input signals.
6. Wait for the acquisition to complete.
7. Get samples and save them to file.

But this failed with two separate problems:

1. "Acquisition completed" was indicated (either by polling or callback)
without external trigger actually occuring.

2. The captured waveform had no relation to the actual input signal;
basically a 7.8125 MHz square wave was obtained (1/16th of the 125 MHz sampling frequency).
The captured waveform amplitude did not depend on the input range used (either 500 mVpp or 5 Vpp).

Looks as if calling ps3000aSetSigGenBuiltIn right after ps3000aRunBlock
completely disturbed the acquisition process by:
a) falsely indicating that the acquisition was completed, and
b) causing a false waveform to be delivered.

Is there a working way of using the GEN output to indicate the scope armed status?

Sinisa
va3ttn
Newbie
 
Posts: 0
Joined: Tue Nov 20, 2012 4:44 pm

Re: Using GEN to indicate scope armed status

Postby Hitesh » Tue Dec 11, 2012 11:02 am

Hi Sinisa,

Are you able to post some code snippets of the code sequence?

You can trigger the signal generator from the scope inputs, but it is unlikely to work while the device is actually collecting data. Are you using the External Trigger input on the scope as well?

There is also a ps3000aSigGenSoftwareControl function which you can use to trigger the signal generator from your application.

If autoTrigger_ms is set to anything other than zero in your trigger setup then it wait for that period of time before capturing data.

Hope this helps.
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 2009
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: Using GEN to indicate scope armed status

Postby va3ttn » Tue Dec 11, 2012 11:40 am

Hitesh wrote:You can trigger the signal generator from the scope inputs

I don't want to trigger the signal generator, because "triggering" does not apply to DC voltage mode.
I just need two DC levels:
-2 V before calling RunBlock
+2V just after calling RunBlock

The transition from -2 V to +2 V on GEN output will trigger the external hardware,
which will, in turn, generate scope EXT trigger and the signal to be captured on A channel.

So, the change from -2 V D to +2 V DC has to occur after calling RunBlock,
and the actual scope triggering will take place only after the transition is generated.

I tried to do it in a straightforward way, as sketched above, but it fails
with two very strange things happening:

1. the scope seems to get triggered by a mere attempt to switch to +2 V by ps3000aSetSigGenBuiltIn,
without waiting for the EXT trigger (which would arrive only some time after the transition to +2 V).

2. the captured signal bears no relation to the input signal, I get a 7.8125 MHz square wave (see above).

So, how can I generate a transition from -2 V to +2 V DC on GEN output after calling RunBlock?
Is this possible at all?

Sinisa
va3ttn
Newbie
 
Posts: 0
Joined: Tue Nov 20, 2012 4:44 pm

Re: Using GEN to indicate scope armed status

Postby Hitesh » Wed Dec 12, 2012 10:37 am

Hi Sinisa,

While the scope is wating for data on a trigger it will block the signal generator. Changing from a scope trigger to a manual trigger would have to be done before the call to the ps3000aRunBlock function is made.

At the moment, it is not possible to output -2V DC, the trigger to +2V DC. The best way to do this would be to use a pulse or square wave and reset the signal generator after each edge.

With the square wave, does it also appear in that manner when viewed on PicoScope 6? You may need a 50Ohm input terminator on the channel.

I hope this helps.
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 2009
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire


Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 0 guests