01-21-2010 09:54 AM
Hej, I have made a task with the DAQ Assistant Express VI. I can change the channel manually by double-clicking. But I want to use the software on several computers with different hardware, so I need to change the channel programatically. Is that possible ?
When launching the Express VI, it is only possible to select physical channels, not virtual channels. Could this be because the LabVIEW version (8.2) is too old ?
01-22-2010 03:33 AM
Hi Jan,
The easiest way to archive what you want is to convert your existing DAQ assistant to DAQmx code -- "Right Click DAQ assistant --> Convert to DAQmx Code".
Then you need to modify the SubVI in the gernerated code where the task/channel is initialized.
You can choose your Virtual Channels from "DAQmx Create Task.vi".
For programmatically changing the channel On-the-fly you need to stop the task first, change channel and then start the task again.
I hope this helps.
Thanks!
01-29-2010 02:41 AM
Hej Dennis and thanks for the inputs,
I actually tried this before posting. However the problem is, that I want to use the same VI for two different sets of hardware - and on a cDAQ-9178 with an NI-9472 output module, the converted code worked fine, but on an older PCI-6601 card, simply no signals came through.
With the Express VI, all worked fine on both systems - but of course only if I changed the properties of the Express VI manually. This is why I hoped it was possible to change the properties of the Express VI. However, since this doesn't seem to be possible, I will try to look on the converted code again.
BR, Jan
11-19-2010 07:10 PM
I've put together a set of VIs that will let you have a little bit more control over the DAQmx Assistants. The VI's let you create or edit any global channel at runtime with the Assistant interface.
Programmatically Call NI DAQmx Assistants
There are vi's to create and edit channels, tasks, and scales and they have all of the flexibility of the Assistant VI's and all of the controllability of normal LabVIEW VI's.