Pico 5243D - Sync scope acquisition with AWG signal output

Post your LabVIEW discussions here
Post Reply
MarBrunero
Newbie
Posts: 0
Joined: Tue Jan 29, 2019 3:26 pm

Pico 5243D - Sync scope acquisition with AWG signal output

Post by MarBrunero »

Hi,
I would like to start a single acquisition of a finite number of samples at the same time of the generation of a single short pulse, using the arbitrary AWG, and repeat these two steps (pulse and acquisition) at the end of the previous acquisition, with the shortest delay possibile.

Ideally I would rather not split the AWG signal (the maximum output amplitude is already at the limit, being "only" 2 Vpp, for our application) and trigger both the pulse and the scope with LabVIEW. Will be possible to obtain a precise and stable synchronization using only a software solution?

Thank you,
Marco.

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

Re: Pico 5243D - Sync scope acquisition with AWG signal output

Post by AndrewA »

This is possible by configuring the AWG to be trigger by software and can be run continuous in a loop. But the main issue is rearm time of the scope can be anywhere from 10-60ms, with a same capture settings, as I found out in testing this.
This caused by the scope having to transfer the data over the USB bus which timing varies.
If you wish to have the captures at a repetitive rate with a short rearm time I suggest you use raid block capture. But you will still have to stop the scope once the buffer memory is full and download the data.
In block mode the rearm time of the trigger around 1-2ms but in rapid block mode this is reduced to 1-2us.
Also the other thing you you could use is the Overlapped functions that will save calls to the driver, and reduce over all capture time. These can used for all block mode captures (block, rapidblock, rapidblockbulk).
See pages 56 and 57 of the PG- https://www.picotech.com/download/manua ... -guide.pdf
The overlapped functions is what picoscope 6 application uses. We currently don't have any LabVIEW examples that use overlapped functions.

To answer your other question- Basically starting the block capture and starting the AWG output at the same time with no trigger on the scope.
You can do this if you set the AWG Trigger source, to Scope trigger. And disable the scopes trigger, just call runblock to start.
The AWG output is always close to the end of the pre-trigger samples point. (With my setup it was about 27us delayed) But you would need to take a few captures with AWG connected to channel to use as reference, if you not going to have connected.
With this setup you can call the scope trigger functions before or after the signal generator function calls.
And won't have modified our LabVIEW llb files.
Let me know if you have any more questions.
Regards Andrew
Technical Specialist

MarBrunero
Newbie
Posts: 0
Joined: Tue Jan 29, 2019 3:26 pm

Re: Pico 5243D - Sync scope acquisition with AWG signal output

Post by MarBrunero »

Thank you for your reply Andrew. Finally I had time to try to implement your solution for the software trigger, unfortunately without success.

Here I attach my LabView diagram and front panel. The AWG output of the picoscope is directly connected to the CHA input. I can acquire a waveform but consecutive acquisitions are not synchronous, as if the time between the start of the acquisition and the AWG output is not constant.

Any further suggestions?
Thank you,
Marco.
Attachments
Front Panel
Front Panel
Diagram
Diagram
AutoTriggingd.png (4.97 KiB) Viewed 15988 times

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

Re: Pico 5243D - Sync scope acquisition with AWG signal output

Post by AndrewA »

Here is the working setup and code relating to this post. As this is a question we offer get asked.

Hardware setup- Connect the require channels. The AWG output can be optionally connected to a input channel.

Software- optionally set the scope trigger settings as per normal, or just leave the trigger set to none.

If the AWG output not going to be connect you will need to take a few captures with AWG connected to channel to use as reference.(In this example I connected the AWG to Channel A)
AWG output will trigger close to the end of the pre-trigger samples point.

I have attached a modified top level Block mode example for the 5000a API- (the png can be imported into LabVIEW also)

You can apply the same function calls to other Picoscopes models, API's, and capture modes where supported.

Note you can move Settings and AWG vi's outside the while loop, if required.
Attachments
PicoScope5000aExampleBlockMSO.vi
(57.13 KiB) Downloaded 511 times
Block mode sync with AWG Front Panel.PNG
Block mode sync with AWG code.png
Regards Andrew
Technical Specialist

MarBrunero
Newbie
Posts: 0
Joined: Tue Jan 29, 2019 3:26 pm

Re: Pico 5243D - Sync scope acquisition with AWG signal output

Post by MarBrunero »

Thank you Andrew. The provided code works and I was able to use the same settings in my application. Unfortunately, I have to acquire up to 200k different acquisitions (2ch, up to 10kS per channel) and, if Rapid Block Bulk cannot be used, the required time is too long.

My understanding is that Rapid Block Bulk cannot be implemented because the AWG output will be triggered only at the begging of the entire Block and will perform one single shot of the arbitrary waveform.

But if I'M wrong and there is way to increase the acquisition speed, please let me know.

Best regards,
Marco.

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

Re: Pico 5243D - Sync scope acquisition with AWG signal output

Post by AndrewA »

Yes you can do this in the same way with the Rapid Block Bulk example.
As before there is no trigger set on the scope. This gives the fastest Rapid Block capture for the scope.
I would first adjust scope timebase and number of samples (pre and post) in the
'Rapid Block Acquisition Settings'.
Then adjust AWG frequency ('Start frequency') to give the correct pulse width, with the wave type set to 'Square'. Note the other wave types return to zero.
Example files below-
Attachments
PicoScope5000aExampleRapidBlockBulkandAWG.vi
(23.06 KiB) Downloaded 490 times
PicoScope5000aExampleRapidBlockBulkandAWG front panel.png
PicoScope5000aExampleRapidBlockBulkandAWG code.png
Regards Andrew
Technical Specialist

Post Reply