Simultaneously trigger acquisition and generator

Post discussions on applications you are writing
Post Reply
victorm
Newbie
Posts: 0
Joined: Tue May 05, 2020 12:02 pm

Simultaneously trigger acquisition and generator

Post by victorm »

Dear community,

I have to implement an application (using the API) with an oscilloscope of the 5000 series that:
1 - Triggers a signal on the built-in generator.
2 - Starts the acquisition of one oscilloscope channel exactly when the generator is triggered.
3- This simultaneous trigger must be initiated by a software command.

I found in this post the proposal of setting the AWG trigger to fire with the scope trigger and disabling the scope trigger, so with the runblock command both the acquisition and generator start. However, the author talks about a delay between generator and oscilloscope that seems to be no deterministic (27us in his case).

Do you know if there is another way to achieve the intended functionality? The problem has been previously raised (see this topic), although no information is provided.

Thank you,
Víctor

AndrewA
PICO STAFF
PICO STAFF
Posts: 400
Joined: Tue Oct 21, 2014 3:07 pm

Re: Simultaneously trigger acquisition and generator

Post by AndrewA »

Hi,
There two possible solutions;
1. Call ps...SigGenSoftwareControl() to trigger the AWG directly.
-You would need to use a channel to also capture AWG output to trigger the scope on
+output of the AWG will align with the scope trigger
-slower if you need to do this in loop

2. Set a block or rapidblock with or without a trigger. Then set the scope capture to trigger the AWG output.
As per- https://www.picotech.com/support/viewtopic.php?t=39599#p142115
Output of the AWG triggers between pre and post trigger samples, plus small delay. The delay is always the same for the same settings.
+you can change the generator to use any waveshape as you not triggering on it.
-The small delay on the AWG changes if you need to chance the scope capture settings.
+faster if you need to do this in loop.
-You don't need to use a channel to know when the AWG triggered, as long as you have measured the delay from AWG with settings you going to use.
+You can use an external trigger signal to fire the capture and AWG (but not suited in your case)

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:
https://www.picotech.com/download/manuals/TriggeringAPicoScopeSignalGeneratorUsingThePicoScopeAPIFunctions.pdf
Regards Andrew
Technical Specialist

victorm
Newbie
Posts: 0
Joined: Tue May 05, 2020 12:02 pm

Re: Simultaneously trigger acquisition and generator

Post by victorm »

Dear Andrew,

Thank you very much for your response. With regard to your suggestions:

1. Instead of a scope channel, I think that I could connect the generator to the external trigger input, so I would not employ an extra scope channel. In any case I would be interested in triggering the acquisition in a more precise way, since noise can slightly affect the trigger shot.

2. About the introduced delay of the second solution: is it always exactly the same (for example a fixed number of sampling periods)? I have to measure very small delays (below 25ns) and any trigger uncertainty may be a problem.

Thank you again for your support,
Victor

victorm
Newbie
Posts: 0
Joined: Tue May 05, 2020 12:02 pm

Re: Simultaneously trigger acquisition and generator

Post by victorm »

Hello again,

In addition to the 2 points of the previous message, I would like to ask about the possibility of using a digital output (for example with a NI USB 6501) to drive the external trigger of the oscilloscope. If the generator and the input channels are configured to work with the external trigger, would be they triggered at exactly the same clock period?

Thank you,
Victor

AndrewA
PICO STAFF
PICO STAFF
Posts: 400
Joined: Tue Oct 21, 2014 3:07 pm

Re: Simultaneously trigger acquisition and generator

Post by AndrewA »

Hi Victor,

A1. Connecting the generator to the external trigger input and setting the scope to trigger off the external trigger.
This would always align the generator output to the scopes trigger.
You may add some sample jitter, over the other method.

A2. About the introduced delay of the second solution: is it always exactly the same (for example a fixed number of sampling periods)? I have to measure very small delays (below 25ns) and any trigger uncertainty may be a problem.
Yes I tested it out again yesterday with an older 5244A scope, which a lot larger delay of around 700ns.
But the delay was always constant for the same settings.
I can't see the delay being an issue as you can just capture more post trigger samples to the capture.

If you are constantly changing the capture settings (sample rate and no. of samples) then option 1 would be better.
Using an external generator with external trigger- Yes this would be same as method 1 above, without using the Picoscopes generator.

You can quiet easily test out both methods using our Picoscope 6 software and two bnc cables and bnc t-connector.
Using Picoscope 6 with method 2 I did see sample jitter as the waveform is not being triggering on the signal.
But Picoscope 6 does remove the jitter around trigger points, as it plots the samples, that have been time adjusted using the value from psXXXXGetTriggerTimeOffset function in the API.
I would say using method 1 is a safer option.
Regards Andrew
Technical Specialist

victorm
Newbie
Posts: 0
Joined: Tue May 05, 2020 12:02 pm

Re: Simultaneously trigger acquisition and generator

Post by victorm »

Hi Andrew,

OK, the options are clear. Thank you very much for your support.

Victor

Post Reply