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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Redundant Ethernet cDAQs and Tasks for Multiple Stations

Solved!
Go to solution

Hi All,

 

I work in a manufacturing facility that utilizes a common LabVIEW exe to control the heating equipment at 4 different stations. Each station has their own PC and dedicated Ethernet cDAQ. 

 

Because each network device requires a unique name, I can't simply call it "cDAQ1" and copy the tasks like I could with a USB controller. So currently, I've built 4 separate sets of Tasks and configured MAX for each station individually, saving the task names in the exe's ini file.

 

This works perfectly... for now. But we are expanding to other facilities, and I suspect there is a better way to manage the tasks and cDAQs programmatically. Any ideas?

 

TIA for any guidance!

0 Kudos
Message 1 of 3
(1,785 Views)

Could you create a single template task, then use the "DAQmx Create Task" VI with the "Task to copy" input wired with the template?

You could set the task name to whatever you needed, perhaps something like "192_168_0_124_MyAwesomeDaqTask" etc, using the String to IP and IP to String nodes (workaround for getting local IP address)

Example_VI.png


GCentral
Message 2 of 3
(1,740 Views)
Solution
Accepted by topic author TBurgess15

Somewhat following that train of thought, I was able to accomplish exactly what I needed!

 

I listed the cDAQ's unique name in the INI file for each station such that tasks can be programmatically created within the EXE rather than needing to import a configuration file to MAX. Using the DAQ Assistant Express VI and then converting it to DAQmx code, I was able to bypass the need for a "task to copy" and set the physical channel.

 

Example: My task in the code snippet was on channel "cDAQ9185-1T515T9Mod2/ao0" called KilnmAOut_1

 

LV v2015LV v2015

0 Kudos
Message 3 of 3
(1,687 Views)