Jump to content
  • 0

Analog Discovery 2 - wavegen and scope synchronization from LabVIEW


seba

Question

Hi all,

I use Analog Discovery 2 to generate a ramp up waveform and observe synchronously the response in the scope. The wavegen output W1 is wired to the scope input Ch.1. I want the scope to be triggered by the generated waveform, so that subsequent acquisitions yield signal that starts exactly in the same moment. I attach the VI that I have made to achieve this (testscope3.vi). I use Configure Digital Edge Trigger.vi to set up triggering. What I expect is that on each loop repetition the acquired signal would start in the same moment, but this is not the case. Each acquisition starts at an arbitrary moment and the signal moves visibly along the time axis.

I am perfectly able to achieve the above using the WaveForms 2015 application (I attach the corresponding WaveForms 2015 workspace file), so I know that the hardware is capable of doing this. However, the experiment I need this for is controlled from LabVIEW and I would like to get the same result using the LabVIEW Driver for Analog Discovery 2.

Thank you for any suggestions on how to achieve this from LabVIEW.

testscope3.png

testscope3.vi

sweep.dwf3work

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

Hi attila,

Setting "fgen/start" for ConfigureDigitalEdgeTrigger makes the VI hang (waiting forever for trigger, I guess). Even the the stop button won't stop the VI, I have to kill LabVIEW from the process manager. I can avoid this by setting Auto Trigger to True for MSO Run.vi, but then it auto triggers without synchronization, as expected.

Link to comment
Share on other sites

Hi @seba

The AWG trigger signal is generated when this starts.

In WaveForms you have selected "Auto sync" which sets Run time equal to signal period, and this restarts/generates trigger signal for each period.

In the VIs there is no such run/repeat option. Trigger signal is generated only once on start and the MSO is waiting forever.
To solve this, beside the existing VIs you could call the following C functions from dwf.dll:
FDwfAnalogOutRunSet(int32(instrument handle), int32(idxChannel=0), double(secRun=1.0/Frequency)
FDwfAnalogOutRepeatSet(int32(instrument handle), int32(idxChannel=0), int32(cRepeat=0)
FDwfAnalogOutRepeatTriggerSet(int32(instrument handle), int32(idxChannel=0), int32(fRepeatTrigger=0)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...