Jump to content
  • 0

Question about phase between digital output and analog waveform


liu

Question

Hi Attilia,

I am trying to synchronize an 80Hz clock (from Digital output) and an 80 Hz customized analog waveform (see below). However, I am having an issue introducing a phase between them. While I can shift the phase of the analog signal, its range is much smaller than I expected. Below is the clock signal (yellow) and the analog waveform with different phases (0, 90, 180, 270 degrees), where I was expecting them to spread over one period instead of just ~1/4 period.   

image.thumb.png.11a148af4f79e553b12cd242870b4ded.png

My code for setting the analog waveform is as below. I tried to introduce the phase difference with FDwfAnalogOutPhaseSet & FDwfAnalogOutNodePhaseSet and had similar results, where "triggerPhase" was set to 0, 90, 180, 270. I wonder if I used the wrong function or if anything wrong with my setting?

        nRet = dwf.FDwfAnalogOutMasterSet(hdwf, c_int(LG_Chan), c_int(1));
        nRet = dwf.FDwfAnalogOutNodeFunctionSet(hdwf, c_int(LG_Chan), c_int(0), funcCustom);
        nRet = dwf.FDwfAnalogOutNodeFrequencySet(hdwf, c_int(LG_Chan), AnalogOutNodeCarrier, c_double(DACFreq));
        # dwf. FDwfAnalogOutTriggerSourceSet(hdwf, c_int(LG_Chan), trigsrcNone)
        dwf. FDwfAnalogOutTriggerSourceSet(hdwf, c_int(LG_Chan), trigsrcDigitalOut)
        dwf.FDwfAnalogOutTriggerSlopeSet(hdwf, c_int(LG_Chan), DwfTriggerSlopeRise)
        
        nRet = dwf.FDwfAnalogOutNodeDataSet(hdwf, -1, AnalogOutNodeCarrier, DAC, c_int(len(DAC)));
        nRet = dwf.FDwfAnalogOutNodeAmplitudeSet(hdwf, c_int(LG_Chan), c_int(0), c_double(absmax));
        nRet = dwf.FDwfAnalogOutNodeOffsetSet(hdwf, c_int(LG_Chan), c_int(0), c_int(0));
        # nRet = dwf.FDwfAnalogOutNodePhaseSet(hdwf, c_int(LG_Chan), c_int(0), c_double(triggerPhase));
        nRet = dwf.FDwfAnalogOutPhaseSet(hdwf, c_int(LG_Chan), c_double(triggerPhase));
        
        dwf.FDwfAnalogOutConfigure(hdwf, c_int(LG_Chan), c_int(1))
        time.sleep(0.1)
        dwf.FDwfDigitalOutConfigure(hdwf, c_int(1))

Thanks again for the help.

Yisi

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

Hi Attila,

The 3.22.14 (2024-03-25) solves the problem. Can also upload an arm64.deb version for working on Jetson? Thanks. 

Yisi

Link to comment
Share on other sites

  • 0

I'd also be interested in an arm version of this. 

Relatedly, I tried installing version digilent.waveforms_beta_3.21.34_arm64.deb as part of an upgrade from 3.16.3
and when starting waveforms I get the following error message:

waveforms: symbol lookup error: waveforms: undefined symbol: DstmIO32

I downgraded to version 3.21.21 and am getting the same results. 

I'm wondering whether there is a dependency mismatch or if for example I need to also upgrade adept? Any clarity would be greatly appreciated.

Thank you,

-M

 

 

 

Link to comment
Share on other sites

  • 0

Hi @attila,

 

Sorry, but don't see a _arm64.deb link under 3.22.18. The latest release that has an _arm64.deb is digilent.waveforms_beta_3.22.15_arm64.deb. 

Linked page only lists:

3.22.18 (2024-04-12)
digilent.waveforms_beta_v3.22.18_64bit.exe
digilent.waveforms_beta_v3.22.18.dmg         
digilent.waveforms_beta_3.22.18_amd64.deb  
digilent.waveforms_beta_3.22.18.x86_64.rpm 

Am I looking in the wrong place?

Thank you,

-M

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...