After my last message, I have tried something with changing the offset. Unfortunately I don't understand what it's happend. I show it in the picture below. I set the offest from 0 to 5V in DC mode at the beginning, then I set the generator, switch on and change (with a delay of 0.8s) the offset n 0V. This offest change causes the generator to switch off. This behaviour is not understandable to me. I have included the code below for ease of reference.
def Set_continuous():
oxy = c_double(5)
resolution = 200
hzAcq_A = 200
hzAcq_B = 5
dwf.FDwfAnalogOutNodeEnableSet(hdwf, oCH_A, AnalogOutNodeCarrier, c_bool(True))
dwf.FDwfAnalogOutNodeFunctionSet(hdwf, oCH_A, AnalogOutNodeCarrier, funcDC)
dwf.FDwfAnalogOutNodeOffsetSet(hdwf, oCH_A, AnalogOutNodeCarrier, c_double(0)) #change offest
time.sleep(0.05)
dwf.FDwfAnalogOutNodeOffsetSet(hdwf, oCH_A, AnalogOutNodeCarrier, c_double(1)) # from 0V
time.sleep(0.05)
dwf.FDwfAnalogOutNodeOffsetSet(hdwf, oCH_A, AnalogOutNodeCarrier, c_double(2))
time.sleep(0.05)
dwf.FDwfAnalogOutNodeOffsetSet(hdwf, oCH_A, AnalogOutNodeCarrier, c_double(3))
time.sleep(0.05)
dwf.FDwfAnalogOutNodeOffsetSet(hdwf, oCH_A, AnalogOutNodeCarrier, c_double(4))
time.sleep(0.05)
dwf.FDwfAnalogOutNodeOffsetSet(hdwf, oCH_A, AnalogOutNodeCarrier, c_double(5)) # to 5V
time.sleep(0.05)
dwf.FDwfAnalogOutIdleSet(hdwf, oCH_A, DwfAnalogOutIdleOffset)
dwf.FDwfAnalogOutNodeEnableSet(hdwf, oCH_A, AnalogOutNodeCarrier, c_bool(True))
dwf.FDwfAnalogOutNodeAmplitudeSet(hdwf, oCH_A, AnalogOutNodeCarrier, c_double(2.0))
dwf.FDwfAnalogOutIdleSet(hdwf, oCH_B, DwfAnalogOutIdleInitial) # DwfAnalogOutIdleOffset
dwf.FDwfAnalogOutIdleSet(hdwf, oCH_A, c_int(1)) # DwfAnalogOutIdleOffset
dwf.FDwfAnalogOutNodeEnableSet(hdwf, oCH_A, AnalogOutNodeCarrier, c_bool(True))
dwf.FDwfAnalogOutNodeFunctionSet(hdwf, oCH_A, AnalogOutNodeCarrier, funcSine)
dwf.FDwfAnalogOutNodeFrequencySet(hdwf, oCH_A, AnalogOutNodeCarrier, hzAcq_A) # 200 Hz
dwf.FDwfAnalogOutNodeAmplitudeSet(hdwf, oCH_A, AnalogOutNodeCarrier, c_double(5)) # 5V
dwf.FDwfAnalogOutNodePhaseSet(hdwf, oCH_A, AnalogOutNodeCarrier, c_double(90)) # 90 degree
dwf.FDwfAnalogOutNodeEnableSet(hdwf, oCH_B, AnalogOutNodeCarrier, c_bool(True))
dwf.FDwfAnalogOutNodeFunctionSet(hdwf, oCH_B, AnalogOutNodeCarrier, funcTriangle)
dwf.FDwfAnalogOutNodeFrequencySet(hdwf, oCH_B, AnalogOutNodeCarrier, hzAcq_B) # 5 Hz
dwf.FDwfAnalogOutNodeAmplitudeSet(hdwf,oCH_B, AnalogOutNodeCarrier, c_double(5)) # 5V
dwf.FDwfAnalogOutNodePhaseSet(hdwf, oCH_B, AnalogOutNodeCarrier, c_double(90)) # 90 degree
dwf.FDwfAnalogOutConfigure(hdwf, oCH_A, c_bool(True)) # start generator for out A c_int(0)
dwf.FDwfAnalogOutConfigure(hdwf, oCH_B, c_bool(True)) # start generator for out B c_int(1)
time.sleep(0.8) # wati 0.8 s
dwf.FDwfAnalogOutNodeOffsetSet(Dwf.hdwf, oCH_A, AnalogOutNodeCarrier, c_double(0)) # change offest to 0V
There is another interesting feature. If I add another function to the end of the code:
Dwf.dw.FDwfAnalogOutConfigure(Dwf.hdwf, oCH_A, c_bool(True))
The result will be as shown below. The generator is running again with a glich.
I don't know why, changing offest ( dwf.FDwfAnalogOutNodeOffsetSet(Dwf.hdwf, oCH_A, AnalogOutNodeCarrier, c_double(0)) ) is turnning off the internal generator