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!
Solved! Go to Solution.
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)
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