"Programmer's Guide" describes "software triggered generator operation"
in a way that leads one to believe that the generator can be triggered
by calling SigGenSoftwareControl after SetSigGenBuiltIn.
Here's what the guide says about SetSigGenBuiltIn and SigGenSoftwareControl.
ps3000aSetSigGenBuiltIn:
PS3000A_SIGGEN_SOFT_TRIG : wait for software trigger provided by ps3000aSigGenSoftwareControl
ps3000aSigGenSoftwareControl:
This function causes a trigger event, or starts and stops gating.
It is used when the signal generator is set to SIGGEN_SOFT_TRIG.
state:
sets the trigger gate high or low when the trigger type is set
to either SIGGEN_GATE_HIGH or SIGGEN_GATE_LOW.
Ignored for other trigger types.
However, when I call SetSigGenBuiltIn (right after OpenUnit)
with triggerSource=SIGGEN_SOFT_TRIG and triggerType=SIGGEN_RISING
or SIGGEN_FALLING, the generator starts immediately,
and calling SigGenSoftwareControl subsequently has no effect
Which one is wrong: my reading of the Guide, or the behavour that I see?
Hitesh wrote:The trigger can be used for the signal generator when a number of shots or sweeps of the waveform are required."
Does that mean that trigger has no use for ordinary operation (no sweeps, no shots)?
Both SIGGEN_GATE_HIGH and SIGGEN_GATE_LOW work as expected, but I was
confused by the absence of any observable effect of SIGGEN_RISING and SIGGEN_FALLING.
Unless the number of shots or sweeps (not both) has been set to non-zero, the signal generator can not be triggered. However, if you set the number of shots or sweeps to PS3000A_SHOT_SWEEP_TRIGGER_CONTINUOUS_RUN then you should be able to output a signal continuously.
Gate High starts the Scope capturing and Gate Low Stops the signal generator, once gate HIGH has been sent the signal generator will continue until the gate low is called.
If you use SIGGEN_RISING or SIGGEN_FALLING, then you should be able to call the ps3000aSigGenSoftwareControl function with state set to a value to trigger the signal generator.
In the Programmer's manual, the description relating to White Noise is as follows:
PS2000A_WHITENOISE, the signal generator produces white noise and ignores all settings except pkToPk and offsetVoltage.
This would mean that any trigger settings are ignored as well. This is an operation enumeration rather than a wavetype. The alternative is create your own white noise file (e.g. feed the signal back in using PicoScope 6) and use the ps2000aSetSigGenArbitrary function instead to output the noise.
That's pretty much what I have for my parameters with the exception of casting the sweep type.
The error code 46 (Hex 2E) indicates that a signal generator parameter might be out of range.
What version of the ps2000a.dll are you using and if you turn off the PRBS do you get a continuous sine wave until you set the state in ps2000aSigGenSoftwareControl to 0?
Sorry to bump an old thread but my issue is close to the first one here.
I am trying to trigger signals on a 3205B but contrary to what the programmer's guide says, the signal starts immediately when using PS3000A_SIGGEN_GATE_HIGH and PS3000A_SIGGEN_SOFT_TRIG as the trigger condition and trigger source.
When I use PS3000A_SIGGEN_RISING as trigger condition, the generator waits for ps3000aSigGenSoftwareControl to set PS3000A_SIGGEN_GATE_HIGH to start the signal but then, setting the gate to PS3000A_SIGGEN_GATE_HIGH does not stop it and I need to set a 0V DC signal.
Is this behaviour correct or a bug in my version of the dlls ?
The version for ps3000a.dll is 1.0.0.386.
On a side note, when starting the picoscope, the signal generator emits a DC signal at -2.5V.
Is this an expected behaviour ?
There is a more recent version of the ps3000a.dll file in the latest SDK.
Are you looking to output a continuous run of waveforms or just a finite number of shots. I can see that you are using the
PS3000A_SHOT_SWEEP_TRIGGER_CONTINUOUS_RUN parameter.
When I use PS3000A_SIGGEN_RISING as trigger condition, the generator waits for ps3000aSigGenSoftwareControl to set PS3000A_SIGGEN_GATE_HIGH to start the signal but then, setting the gate to PS3000A_SIGGEN_GATE_HIGH does not stop it and I need to set a 0V DC signal.
Do you mean PS3000A_SIGGEN_GATE_LOW in order to turn off the signal?
Have you tried using the external trigger instead of the software trigger?
My goal is to generate a continuous run of waveforms and to stop them by software.
I only tried with the software trigger because the external trigger will not be a use case in my application but I will try to see if the behaviour changes with a different trigger.
And yes, I meant PS3000A_SIGGEN_GATE_LOW when trying to stop the signal, thank you for noticing the typo.