Hi,
I'm using using Digilent Analog Discovery 2. I'm trying to generate a sine wave signal for a period of time and then shut it off using the Arbitrary Wave Generator (AWG). I am able to do it in the waveforms software using Independent or Synchronized signal states as explained in the help section below
However, I'm unable to replicate the same signal using my python code. I'm relying on the sdk provided on the github repository: https://github.com/Digilent/WaveForms-SDK-Getting-Started-PY/tree/master/WF_SDK
One approach I tried was to turn on the wavegen for a period of time then close it and record the signal as shown below
device_data=device.open()
scope.open(device_data, sampling_frequency= 60e6, amplitude_range = 1)
wavegen.generate(device_data, channel=1, function=wavegen.function.sine, offset=0, frequency=50e3, amplitude=1)
scope.trigger(device_data, enable=True, source=scope.trigger_source.analog, channel=1, level=0.5)
sleep(0.0006)
wavegen.close(device_data)
wave1, time1, s = scope.record(device_data, channel=1)
This approach didn't work though. The scope gets stuck in the while loop in the record function indicating that triggering didn't happen correctly.
Is there another way to generate burst signals using code? I looked in the SDK Reference Manual but couldn't find anything.
Thank you,
Mona