07-30-2025 12:22 PM
Hello, I have 2 cards 4461, in PXIe1073. I try to synch. between 2 AI of Card#1 and the 2 AI of Card#2. I mean, that if I Use 200Khz, after few minutes I am suppose
to get the same Samples numbers from both cards and the same.
Now, if I am inject to them the same wave (from Signal Generator - 40Hz Saw Wave), and I take from them the same Samples Numbers, I suppose to see them together, the same Signal. But No, after few minute's a 1%-2% delay start to occur. And if I`ll wait more, the different get bigger.
How can I synch the 2 Cards to use the same Analog Input Clock (of samples or of Analog Inputs Device internal Clock?) ?
07-30-2025 02:14 PM
Here, I think the best approach is also the simplest. Use channel expansion which allows you to add all the 4461 ai channels to the same analog input task. DAQmx will start- and clock- synchronize all the input channels.
The DSA Soft Front Panels use channel expansion to synchronize DSA channels. Use the DSA Soft Front Panel to verify that the synchronization works for you. Then, you can implement the changes (simplification) in your code knowing they will produce synchronized input channels.
07-31-2025 06:54 AM - edited 07-31-2025 07:45 AM
Hello, I have 2 cards 4461, in PXIe1073.I will explain it again.
If I synch. them to start together, and they work in 200khz samples rate, so I except that after 2 minutes I will get from both of them exactly the same amount of Samples.
I connect the 4 CHs to the same signal (for example triangle wave), if every 1 sec, I take 200,000 samples from each card, in continuous mode, after 2 minutes I suppose to see the same wave from both cards. What I saw, that 1 of the card start to late with the Shape of the triangle wave relative to the other card. Like 200,000 samples in 200kHz take 1.000001 Sec and not exactly 1.000000 Sec.
07-31-2025 06:56 AM
Doug, I can`t connect 4 CHs from 2 different Cards, the init DAQmx VIs refuse to "OK" it.
07-31-2025 08:31 AM
Show your code, I do what Doug described all the time.
Are the cards in the same chassis? If not, then Doug's suggestion will not work. I believe that Channel Expansion takes care of any routing through the PXIe chassis for triggers, sample clocks, etc, across any PCI bridge, but maybe Doug can confirm. (I use it in cDAQ) If it doesn't take care of routing, then you will need to do it in MAX or in your code.
07-31-2025 09:59 AM - edited 07-31-2025 10:00 AM
Hello mcduff,
I don`t tell all the details, to simplify the problem, and this cause the different...
My original VI is with writing 2 CHs and reading 4 CHs. When I take all the 4 RD CHs (Analog Inputs-> "RD") and get them together into the "DAQmx Flatten Channel String.vi" (through "Build Array" VI) it gives the error -200106 "Property must have the same value for all channels on this device".
If I use only RD_4CHs.vi than indeed you can get all the 4 CHs together. But this not my case (the vi I need is the "Read 4 CHs and WR 2CHs.vi")
07-31-2025 02:14 PM
In between meetings and don't have any time to make modifications, but:
08-01-2025 01:05 AM - edited 08-01-2025 01:10 AM
Tamirsh, here is your VI modified to use a single ai task, and all channels added in the single physical channel control for each task.
Also, if you have access to the Sound and Vibration Toolkit, you can reuse the synchronization subVIs used in the Stimulus Response examples.
08-01-2025 06:50 AM
oh, in the modified VI, I did switch to finite just so that the VI would write and read all the samples, so I could verify functionality through wrapped-back data on a couple of the channels.
08-04-2025 10:23 AM
@tamirsh wrote:
Hello, I have 2 cards 4461, in PXIe1073.I will explain it again.
If I synch. them to start together, and they work in 200khz samples rate, so I except that after 2 minutes I will get from both of them exactly the same amount of Samples.
I connect the 4 CHs to the same signal (for example triangle wave), if every 1 sec, I take 200,000 samples from each card, in continuous mode, after 2 minutes I suppose to see the same wave from both cards. What I saw, that 1 of the card start to late with the Shape of the triangle wave relative to the other card. Like 200,000 samples in 200kHz take 1.000001 Sec and not exactly 1.000000 Sec.
Depending on the internal clock it might not hit 200kHz exactly, so that small difference from 1 sec is probably not a biggie.