PicoScope 7 Software
Available on Windows, Mac and Linux
Code: Select all
delta = ((1.0 * frequency * waveformSize) / AWGFileSize) * (4294967296.0 * UCVal);
status = ps4000SetSigGenArbitrary( unit.handle,
0, // offset voltage
pkpk, // PkToPk in microvolts. Max = 4uV +2v to -2V
(unsigned long)delta, // start delta
(unsigned long)delta, // stop delta
0, // delta phase increment
0, // dwellCount for phase increment
arbitraryWaveform,
waveformSize,
(SWEEP_TYPE)0,
0,
SINGLE, //index mode - single sweep through arb waveform buffer
1, // shots
0, //sweeps
SIGGEN_GATE_HIGH,
SIGGEN_SOFT_TRIG,
0);
printf(status?"\nps4000SetSigGenArbitrary: Status Error 0x%x \n":"", (unsigned int)status); // If status != 0, show the error
status = ps4000SigGenSoftwareControl(unit.handle, 1);
printf(status?"\nps4000SigGenSoftwareControl: Status Error 0x%x \n":"", (unsigned int)status); // If status != 0, show the error
(I did try SIGGEN_RISING before posting)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.
Code: Select all
if (waveformSize > 0)
{
double delta = ((frequency * waveformSize) / 8192.0) * 4294967296.0 * 5e-8; // delta >= 10
status = ps4000SetSigGenArbitrary(unit.handle,
0,
4000000,
(unsigned long)delta,
(unsigned long)delta,
0,
0,
arbitraryWaveform,
waveformSize,
0,
0,
SINGLE,
5,
0,
SIGGEN_RISING,
SIGGEN_SOFT_TRIG,
0);
printf("Status of Arbitrary Gen: %x \n", (unsigned int)status);
Sleep(5000);
status = ps4000SigGenSoftwareControl(unit.handle, 1);
}