Hello,
I am using multiple Analog Discovery 2s (AD2) for data acquisition in an experiment. For repeatability, I am using an external triggering source, positive edge, to generate both AWG signals and to acquire data from the AD2 oscilloscopes. I am able to create the exact specification I need in the WaveForms GUI for the AWG and the Oscilloscope data acquisition, but am at a loss for trying to replicate this in a control program written in python, even after reviewing the .py exames in the WaveForms SDK like Device_Synchronization.py and AnalogOutIn_Synchornization.py. Is there an example for external triggering in the reference folder I am missing or am I going about using the wrong functions to trigger successfully?
Below is a sample of the commands I am using to try and set the external trigger for the Analog Out channel 0 and come either from example .py scripts or the SDK reference manual. The commented out code is some of the other command I have also tried to use to enable either DC output or a sine wave output to be triggered externally from a positive/rising edge.
# set channel parameters
dwf.FDwfAnalogOutConfigure(hdwf, c_int(0), c_bool(True))
# dwf.FDwfDeviceTriggerSet(hdwf, c_int(0),EXT)
dwf.FDwfAnalogOutTriggerSourceSet(hdwf, c_int(0), channel, c_int(11)) # exteral trigger souce
# dwf.FDwfAnalogOutTriggerSlopeSet(hdwf, c_int(0), DwfTriggerSlopeRise) # positive slope external trigger
# dwf.FDwfAnalogOutNodeEnableSet(hdwf, c_int(0), AnalogOutNodeCarrier, c_bool(True))
# dwf.FDwfAnalogOutNodeFunctionSet(hdwf, c_int(0), AnalogOutNodeCarrier, funcDC)
# dwf.FDwfAnalogOutNodeOffsetSet(hdwf, c_int(0), AnalogOutNodeCarrier, c_double(volt))
dwf.FDwfAnalogOutNodeFunctionSet(hdwf, c_int(0), c_int(0), c_byte(1)) # funcSine
dwf.FDwfAnalogOutNodeFrequencySet(hdwf, c_int(0), c_int(0), c_double(1.0e6))
dwf.FDwfAnalogOutNodeAmplitudeSet(hdwf, c_int(0), c_int(0), c_double(volt))
dwf.FDwfAnalogOutNodeOffsetSet(hdwf, c_int(0), c_int(0), c_double(0))
Thanks in advance for your help!