I am working on a custom python package for the analog discovery (1 and 2). When I run the software on a computer with DWF version 2.7.5 and an original Analog Discovery it runs without issue. However, when I run this on a different computer with DWF version 3.0+ and either Analog Discovery (1 or 2), the analog output stays high after a waveform has been run. The code is written to repeatedly output a specific waveform (sample) a number of times (numCycles) then return to zero output. Has something specifically changed in the DWF file which would result in this behavior? Below is a code snippet:
#enable analog output
self.dwf.FDwfAnalogOutEnableSet(self.AD1, channel, c_bool(True))
#set function to Arbitrary
self.dwf.FDwfAnalogOutFunctionSet(self.AD1, channel, funcPlay)
#define output function
self.dwf.FDwfAnalogOutDataSet(self.AD1, channel, sample, c_int(len(sample)))
#define output frequency (Each data point represents 1 us, so f=1e6)
self.dwf.FDwfAnalogOutFrequencySet(self.AD1, channel, c_double(frequency))
#set amplitude to 5V peak
self.dwf.FDwfAnalogOutAmplitudeSet(self.AD1, channel, c_double(5))
#tell system how long each cycle is
self.dwf.FDwfAnalogOutRunSet(self.AD1, channel, c_double(runTime))
#tell the system how many cycles to send
self.dwf.FDwfAnalogOutRepeatSet(self.AD1, channel, c_int(numCycles))
Question
Engineer
I am working on a custom python package for the analog discovery (1 and 2). When I run the software on a computer with DWF version 2.7.5 and an original Analog Discovery it runs without issue. However, when I run this on a different computer with DWF version 3.0+ and either Analog Discovery (1 or 2), the analog output stays high after a waveform has been run. The code is written to repeatedly output a specific waveform (sample) a number of times (numCycles) then return to zero output. Has something specifically changed in the DWF file which would result in this behavior? Below is a code snippet:
#enable analog output
self.dwf.FDwfAnalogOutEnableSet(self.AD1, channel, c_bool(True))
#set function to Arbitrary
self.dwf.FDwfAnalogOutFunctionSet(self.AD1, channel, funcPlay)
#define output function
self.dwf.FDwfAnalogOutDataSet(self.AD1, channel, sample, c_int(len(sample)))
#define output frequency (Each data point represents 1 us, so f=1e6)
self.dwf.FDwfAnalogOutFrequencySet(self.AD1, channel, c_double(frequency))
#set amplitude to 5V peak
self.dwf.FDwfAnalogOutAmplitudeSet(self.AD1, channel, c_double(5))
#tell system how long each cycle is
self.dwf.FDwfAnalogOutRunSet(self.AD1, channel, c_double(runTime))
#tell the system how many cycles to send
self.dwf.FDwfAnalogOutRepeatSet(self.AD1, channel, c_int(numCycles))
self.dwf.FDwfAnalogOutRepeatTriggerSet(self.AD1, channel, c_int(1))
#tell the AD to output data
self.dwf.FDwfAnalogOutConfigure(self.AD1, channel, c_bool(True))
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.