Dynamic Signal Acquisition

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronization between DAC and ADC on NI 4451

I need for my DAC and ADC software buffers to line up with each other in analog time.
I'm using the following code to start the DAC and ADC conversions:

status = WFM_Group_Control (deviceNumber, group, START);
if (status==0)
status = SCAN_Start (deviceNumber, (short *)ADCbinArray, total_samples*SENSOR_CHANNELS, sampTimebase, sampInterval, scanTimebase, scanInterval);

But I end up with a 70-75 millisecond delay between the DAC start and the ADC start. I need synchronization to at least a few hundred microseconds between the DAC and ADC buffers.
0 Kudos
Message 1 of 4
(7,696 Views)
One clarification point is needed her. Yes, it is true that both the Analog Input and Analog Output of the 4451 use the same clock source. However, the way you currently have the start of these operations is to start each one separately through a software call. This is why you are not about to get better than millisecond resolution.

You can achieve hardware-timed synchronization of your input and output operations using RTSI to share a hardware start trigger for both the input and output. The idea is that you will route the start trigger of one operation to a RTSI line. Then tell the other operation to use the same RTSI line as its start trigger.

Even thought the RTSI bus is used to pass this signal from the AI circuitry to the AO trigger, there
is no need to connect a RTSI cable. In DSA devices, the analog input and output are automatically phase locked. There will be no phase drift between the input and output sample clocks, and minimal phase difference if they are running at the same rate.
0 Kudos
Message 2 of 4
(7,696 Views)
So I should put in something like:

Select_Signal(deviceNumber,ND_OUT_START_TRIGGER,ND_IN_START_TRIGGER,ND_LOW_TO_HIGH);

Before starting either conversion? That sounds good if it works. I'll try it.
Message 3 of 4
(7,696 Views)
Yep, it looks like that worked! Thanks!
0 Kudos
Message 4 of 4
(7,696 Views)