I'm recently working on the Waveforms SDK with the Analog Discovery 2. I manage to trigger my AnalogIn with the AnalogOut sinus that I generate. My aim is to acquire my sinus in order to calculate the phase shift.
Is there a way to get the delay between the start of the AnalogOut generation and the trigger pulse attached to it ?
Thank you.
Here is the code that I'm using :
FDwfAnalogOutNodeEnableSet(hdwf,0,AnalogOutNodeCarrier,true);FDwfAnalogOutNodeFunctionSet(hdwf,0,AnalogOutNodeCarrier, funcSine);FDwfAnalogOutNodeFrequencySet(hdwf,0,AnalogOutNodeCarrier,1000.0);FDwfAnalogOutNodeAmplitudeSet(hdwf,0,AnalogOutNodeCarrier,1);FDwfAnalogOutNodeOffsetSet(hdwf,0,AnalogOutNodeCarrier,1);FDwfAnalogOutRunSet(hdwf,0,2.0/1000.0);FDwfAnalogOutRepeatSet(hdwf,0,0);FDwfAnalogOutConfigure(hdwf,0,true);FDwfAnalogInTriggerAutoTimeoutSet(hdwf,0);FDwfAnalogInChannelRangeSet(hdwf,0,5);FDwfAnalogInBufferSizeSet(hdwf,40);FDwfAnalogInFrequencySet(hdwf,10000.0);FDwfAnalogInAcquisitionModeSet(hdwf,0);FDwfAnalogInTriggerSourceSet(hdwf, trigsrcAnalogOut1);FDwfAnalogInTriggerTypeSet(hdwf, trigtypeTransition);FDwfAnalogInConfigure(hdwf,0,true);while(true){FDwfAnalogInStatus(hdwf,true,&sts);if(sts ==DwfStateDone){break;}}FDwfAnalogInStatusData(hdwf,0, rgdSamples,40);// This acquisition ins not starting at the offeset point but at the falling edge
Question
Mahito
Hi,
I'm recently working on the Waveforms SDK with the Analog Discovery 2. I manage to trigger my AnalogIn with the AnalogOut sinus that I generate. My aim is to acquire my sinus in order to calculate the phase shift.
Is there a way to get the delay between the start of the AnalogOut generation and the trigger pulse attached to it ?
Thank you.
Here is the code that I'm using :
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.