ps3000aSetSigGenArbitrary outputs voltage of first waveform point while waiting for software trigger

Post general discussions on using our drivers to write your own software here
Post Reply
JPX
Newbie
Posts: 0
Joined: Fri Aug 02, 2019 7:04 pm

ps3000aSetSigGenArbitrary outputs voltage of first waveform point while waiting for software trigger

Post by JPX »

Hello;

I’m using a PicoScope 3403D, firmware version 1.7.5.0 with driver version 2.1.17.1457.

I’m writing an application to test the performance of a 3rd-party device. Various measurement probes connect to the PicoScope’s inputs (a current probe, a pressure transducer, etc) and I set up block data collection with triggers on these. I use the PicoScope’s AWG to energize the device to be tested, using either a constant DC voltage of 0V or 1V for manual on/off or an arbitrary waveform I create to implement a square wave of 0V and 1V with an adjustable frequency and duty cycle.

I found other posts here in the support forum that show how to use PS3000A_SIGGEN_SOFT_TRIG as the trigger type to delay firing the AWG output while I set up the data collection, and a call to ps3000aSigGenSoftwareControl to fire it when I’ve got data collection running. As mentioned in those posts, calling ps3000aSetSigGenBuiltInV2 or ps3000aSetSigGenArbitrary when data collection is running simply returns a PICO_BUSY error.

My problem is this – if I use PS3000A_DC_VOLTAGE with ps3000aSetSigGenBuiltInV2, it simply starts outputting my voltage immediately. It appears to pay no attention to the request for PS3000A_SIGGEN_SOFT_TRIG. And if I use ps3000aSetSigGenArbitrary, it immediately begins outputting the voltage for the first point in my waveform, though the rest of the waveform isn’t outputted until I give it the software trigger.

For my square wave this issue can be coded around, I simply put the 0V portion of the waveform at the beginning and the 1V portion after that. But if I want to output a constant voltage, but only AFTER I have sent the software trigger, it outputs my 1V immediately and energizes my device before I have data collection running.

For the moment I’m working around this by using an arbitrary waveform with a large array and a moderately high frequency, with the first point in the waveform as 0V and the rest as 1V. Using 100Hz and 10000 array points, I calculate my device will get 1 microsecond of 0V every time the waveform runs and the 1V I want the rest of the time.

This seems to work, at least for the device I’m currently trying to test. But is there some better way to get the PicoScope AWG to output 0V while waiting for the software trigger and 1V only after I give it the trigger? I’ve searched for forums, but haven’t been able to find anything. I hope I'm missing something obvious!

Thanks for any help,
JP

Thimo
Newbie
Posts: 0
Joined: Fri Aug 16, 2019 1:58 pm

Re: ps3000aSetSigGenArbitrary outputs voltage of first waveform point while waiting for software trigger

Post by Thimo »

The missing Trigger capability of DC is described in §3.2 of the SigGen Trigger Doc provided here. According to the document, your workaround is the official recommendation. But as you noted, it creates artifacts.

At least for the 3000 series, the signal generator does hold the last sample it emits. Therefore, you only need a wave of two samples; the pre and post trigger voltages. Combine this with a phase_start to step to index 1, your desired trigger and a shot-limit of 1. You should get a straight DC signal without any 0V segments mixed in.

Post Reply