LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does anyone know how to programmatically edit virtual channels?

I have seen the posts and NI's examples about switching MAX configuration files. However, I would like to be able to change scaling information and channel names on my own front panel- making a simpler environment. I think MAX is great, but I know it will confuse some people using my program who aren't necessarily computer experts.

I have LABVIEW 6.1.

Thanks,
Lauren
0 Kudos
Message 1 of 5
(3,663 Views)
uscmagz wrote:

> I have seen the posts and NI's examples about switching MAX
> configuration files. However, I would like to be able to change
> scaling information and channel names on my own front panel- making a
> simpler environment. I think MAX is great, but I know it will confuse
> some people using my program who aren't necessarily computer experts.
>
> I have LABVIEW 6.1.

Use LabVIEW 7 and NI-DAQ 7.x. It has more programmatic control over the
MAX configuration expecially in conjunction with DAQmx.
LabVIEW 6.1 has no official interface and what is there inofficially is
hidden quite well, very limited and completely undocumented.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 2 of 5
(3,663 Views)
Hi Lauren,

You can programmatically make changes to channels and tasks in LabVIEW using the DAQmx channel and task property nodes. Not that these changes apply to the channels and tasks while they are in use by the VI, but do not permanently change the original channel or task saved in the MAX configuration file. The same functionality applies to NI-DAQmx scales. Additionally, you can export these global channels from MAX by going to the File»Export.

You also can create global channels and tasks to be saved in MAX by using the DAQmx Global Channel control or DAQmx Task Name control in LabVIEW. Refer to the Taking an NI-DAQmx Measurement in LabVIEW help tutorial for a step-by-step guide to using the DAQmx Task Name control to create a task and gener
ating code from the task. You can open the tutorial from the LabVIEW Help menu by going to Help»Taking an NI-DAQmx Measurement.

Hope this helps!

Kileen C.
Applications Engineer
National Instruments
0 Kudos
Message 3 of 5
(3,663 Views)
KileenC wrote:

> You can programmatically make changes to channels and tasks in LabVIEW
> using the DAQmx channel and task property nodes. Not that these
> changes apply to the channels and tasks while they are in use by the
> VI, but do not permanently change the original channel or task saved
> in the MAX configuration file. The same functionality applies to
> NI-DAQmx scales. Additionally, you can export these global channels
> from MAX by going to the File»Export.

He is using LabVIEW 6.1 until now. There is no DAQmx support for LabVIEW
6.1 or I'm missing something here. Of course upgrading to LabVIEW 7 is
certianly the most easy solution and probably cost effective too.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 4 of 5
(3,663 Views)
Hi Rolfk,

You are absolutely right! I missed that last bit in the original posting. Only versions of LabVIEW 7.0 and later will have support for the DAQmx driver.

In Traditional DAQ, you can read the virtual channel properties, but you cannot programmatically change them. The best workaround to this would then be to switch between different MAX config files, as was mentioned in the beginning.

Sorry about the confusion there. Upgrading to LabVIEW 7 is definitely the recommended step since the DAQmx driver provides several nice enhancements including a multithreaded driver and the integration of a DAQ Assistant Express VI in LabVIEW.

Read more about the Advantages of NI-DAQmx.

Thanks again!

Kileen C.
Applications Engineer
National Instruments
0 Kudos
Message 5 of 5
(3,663 Views)