From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

how to do DAQmx synchronization with multiple devices

Solved!
Go to solution

Hi,

 

Here I attached the new code in .llb named 
"des_v2_Multi_Function_Dev_Synch_AI_AO.vi". The old code I used to run one of the device is named "des_v2_Multi_Function_Synch_AI_AO.vi", which is also included in the .llb. In the new code, I included a 
master card's output and input, as well as two slaves cards inputs. But it 
couldn't run, could you help me to check it please?

Thanks a  lot.
Sincerely,
Jie

0 Kudos
Message 11 of 19
(2,542 Views)

Hi,

 

What error messages are you getting? I would recommend running Highlight Execution on your code to see exactly where theses errors pop up. I can see from looking at your code that you start the AI and AO Voltage Task twice on the Master Device: Once to read the samples, and again to write to a file. This will cause errors as a task cannot be started when it is already in the "running" state. I also noticed that you are running a For Loop around your entire code to dictate the number of times the code iterates. A better way to implement this functionality would be to put a read/write VI and the Write to Measurement File in the Loop, so that the tasks do not have to be reconfigured and restarted on every iteration. The current configuration will cause performance issues.

National Instruments
0 Kudos
Message 12 of 19
(2,526 Views)
Hi,
 
I really appreciate your advice, but I am not sure how to modify those errors you mentioned.
 
There are several broken run errors. But when I try to link the wires to the place I thought it was right. The wire disappear automatically. I don't know what's wrong with that. The broken errors are in the first box. 
 
I used an example as a reference in multi-device synchronization called "Multi-Device Synch-Anolog Input-Finite Acq-Ext Dig Start. vi". Since it is the first time I program in Labview, so I just tried to mix the example program and the previous program I was using together.
 
I attached the example program I was using. Could you tell me more specific which part of the example I should use and which part I need to change?
 
Thanks a lot.
Sincerely,
Jie
0 Kudos
Message 13 of 19
(2,504 Views)

Can you send me a screenshot of the location in your code where you are running into the Broken Run Arrows? It is not clear from the Library you sent where you are running into this problem.

 

Thanks!

National Instruments
0 Kudos
Message 14 of 19
(2,496 Views)

Hi,

 

Here is the screenshot and I circled the broken wires. I also attached the .vi that I wrote. It is called "des_v2_Multi_Function_Dev_Synch AI-AO.vi" in the library.

 

Thanks a lot.

Sincerely,

Jie

Download All
0 Kudos
Message 15 of 19
(2,479 Views)

Hi,

 

I changed the modified code a little bit. The newer version is called "des1_v2_Multi_Function_Dev_Synch AI-AO.vi" in the .llb file. There are still some broken wires that I dont know how to fix them. Could you help me please?


Thanks a lot.

Sincerely,

Jie

0 Kudos
Message 16 of 19
(2,465 Views)

There are open terminals on the bottom portion of the case structure because the reference and data wires are not connected in every case of the case structure. It also appears that you had multiple terminals on the Error output of the case structure. I would suggest deleting these terminals and rewiring. I was also able to reconcile the broken run arrow by deleting and rewiring the synchronization type wire to the case selector terminal of the case structure.

 

I hope this helps!

National Instruments
0 Kudos
Message 17 of 19
(2,444 Views)

Thanks a lot guys! Problem solved. I use a RTSI cable to connect three cards. I also followed the example in Figure 10 in the following website to modify my code:

http://www.ni.com/white-paper/4322/en/#toc9

 

Thanks again.

Sincerely,

Jie

0 Kudos
Message 18 of 19
(2,361 Views)

Could you explain DAQ mx synchronization with multiple devices not in Labview but in C# codes.

0 Kudos
Message 19 of 19
(1,217 Views)