AWG ignores the soft trigger and shots param

Forum for discussing PicoScope version 6 (non-automotive version)
Post Reply
Posts: 0
Joined: Sat May 25, 2019 7:00 am

AWG ignores the soft trigger and shots param

Post by sungras »


I ran into the problem of launching an arbitrary generator on a software trigger in a one-time mode.
I use C# and VisualStudio 2017. My oscilloscope 3203D (use ps3000a.dll). Library updated today, installed the version of the SDK PicoSDK_64_10.6.13.97.

Here is the information about my oscilloscope:

Code: Select all

Serial(s)         : GQ860/0022
Connected. Handle : 16384
Driver Version    :
USB Version       : 2.0
Hardware Version  : 1
Variant Info      : 3203D
Serial            : GQ860/0022
Cal Date          : 17Oct18
Kernel Ver.       : 1.0
Digital Hardware  : 1
Analogue Hardware : 1
Firmware 1        :
Firmware 2        :
If I understand the documentation correctly, the following code example allows you to run a single signal generation on a software trigger.

Code: Select all

        Imports.IndexMode indexMode = Imports.IndexMode.PS3000A_SINGLE;
        Imports.SweepType sweepType = Imports.SweepType.PS3000A_UP;
        Imports.ExtraOperations operations = Imports.ExtraOperations.PS3000A_ES_OFF;
        Imports.SigGenTrigType triggerType = Imports.SigGenTrigType.PS3000A_SIGGEN_RISING;
        Imports.SigGenTrigSource triggerSource = Imports.SigGenTrigSource.PS3000A_SIGGEN_SOFT_TRIG;
        uint startDeltaPhase = 0;
        uint stopDeltaPhase = 0;
        uint deltaPhaseIncrement = 0;
        uint dwellCount = 0;
        uint shots = 1;
        uint sweeps = 0;
        //test signal
        uint cnt = 2048;
        short[] buf = new short[cnt];
        Array.Clear( buf, 0, (int)cnt );
        for ( int i = 0; i < cnt; i++ ) buf[i] = 32000;
        //configure AWG
        status = Imports.SetSigGenArbitrary( _dev_handle, 0, 4000000, 
                                         startDeltaPhase, stopDeltaPhase, deltaPhaseIncrement, dwellCount, 
                                         buf, cnt, sweepType, operations, indexMode, 
                                         shots, sweeps, triggerType, triggerSource, 0 );
        //make 5 sec delay;
        Thread.Sleep( 5000 );
        //start generate signal
        Imports.SigGenSoftwareControl( _dev_handle, 1 );
Before executing the code I connect to the device.
The code presented should do the following:
1. initialize the necessary variables and test signal.
2. Set up an arbitrary generator to generate a test signal once using a software trigger.
3. Make a large enough delay so that I can understand that the signal is triggered by a trigger and not immediately after calling the function SetSigGenArbitrary.
4. Run generation by changing the state of the trigger.

But the generation starts immediately after calling SetSigGenArbitrary, and happens continuously, ignoring the "shots" parameter.

What am I doing wrong?

P.S.: I tried other triggers, in any case, the generation starts immediately...

Post Reply