08-06-2025 08:52 AM
I have a USB-6361 connected with a BNC-2120 and I am trying to synchronize my ADC and my DAC without any additional equipment, what I basically would like to do is have both run for 10 Seconds and then save my ADC results together with the DAC trace. I have tryed the Synchronise Example for the X-Series but it isnt working at all. Now I have tryed to setup my own implementation but it still is not working at all, I have a random offset that I can neither measure nor controll and since the resulting ADC Signal is only very weakly influenced by the DAC I need to integrate over the right area.
Solved! Go to Solution.
08-06-2025 08:59 AM
Hi Schreier,
LabVIEW/DAQmx comes with a lot of example VIs in the example finder.
There should be examples on how to sync DAQmx tasks: you may try to sync the task by using the AO sample clock as trigger to start the AI task…
08-06-2025 09:06 AM - edited 08-06-2025 09:16 AM
Yes there is, this is the example. I have tryed it and it doesnt work.
08-06-2025 09:14 AM - edited 08-06-2025 09:15 AM
The Errormessage is, that they are already the same.
08-06-2025 05:45 PM - edited 08-06-2025 06:07 PM
Two quick suggestions:
Sorry, I can't verify the suggestions with hardware available to me.
08-06-2025 07:49 PM
Refer to Synchronized Analog Output Loopback to Analog Input Using LabVIEW with DAQmx
In this case, the analog output task is the master.
08-07-2025 12:15 AM
I adapted your code with synchronization code found in this Sound and Vibration Toolkit subVI:
examples\Sound and Vibration\Audio Measurements\subVIs\sv_Synchronize DSA AI and AO Tasks.vi
This code worked for wrapback for DSA Devices (4468_BNC_Slot4/ao0 --> 4468_BNC_Slot4/ai0 and 4468_BNC_Slot4/ao1 --> PXI1Slot3/ai1)
08-07-2025 12:20 AM
@ZYOng wrote:
Refer to Synchronized Analog Output Loopback to Analog Input Using LabVIEW with DAQmx
In this case, the analog output task is the master.
That reference demonstrates an analog start trigger, and that makes sense to keep the ai the slave task.
Good! the OP has choices.
08-07-2025 09:23 AM
dsb@NI wrote:
@ZYOng wrote:
Refer to Synchronized Analog Output Loopback to Analog Input Using LabVIEW with DAQmx
In this case, the analog output task is the master.
That reference demonstrates an analog start trigger, and that makes sense to keep the ai the slave task.
Good! the OP has choices.
Note to the OP: in the linked example above, the AI analog start trigger means that the 1st AI sample will likely be taken some time *after* the 1st AO sample, when the trigger conditions are met. If you simply remove the call to DAQmx Trigger.vi, the 1st AI sample will be taken at the same time as the 1st AO sample. This is due to the use of a shared sample clock with AO as the master, AI as the slave, and AI being started first.
FWIW, when AO and AI will have the same sample rate I tend to advocate the habit of using a shared sample clock *instead* of a shared trigger. I think it's a good habit because the method extends more cleanly to multi-device sync. A mere shared trigger leaves both tasks to generate their own sample clock. When both tasks are on the same device (such as your situation right now), that won't matter because timing is derived from a common source. But on distinct devices, those clocks have tolerances that can cause them to skew out of sync over time.
-Kevin P
08-08-2025 03:30 AM
I have tried it as described in the Link and my AI0 never triggers.