LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically set scales for global channels

Hello,
 
  I am trying to find out how to Programmatically set the active scale for a global channel.  I have a program where I only want to use one channel, but be able to apply a number of different scales from DAQmx.  I know I could just create multiple global channels each with its own scale, but I want different scales for one channel.
 
 
0 Kudos
Message 1 of 8
(3,391 Views)

Hello CCI_Bryan,

You can programmatically set the DAQmx Scale that you are using with the DAQmx Scale Property Node, using the property ActiveScale.

 

Let us know if you have additional questions.

Laura

0 Kudos
Message 2 of 8
(3,375 Views)

Hi Laura, 

  How do I connect the ActiveScale property node to a specific channel?

0 Kudos
Message 3 of 8
(3,373 Views)

Hi CCI_Bryan,

If you are trying to specify a different scale for each global channel in the task, you would need to use the DAQmx Channel property node.  The first property you need to set is ActiveChannel to the global channel that you want to specify the scale for, and then the Custom Scale Name property.  You can repeat this process for each global channel that you want to choose a scale for.  You can specify multiple channel/scale combinations in a single property node as long as you follow the ActiveChannel, Custom Scale Name order for each channel.

This is the method you should use.  I actually posted incorrectly above.  You would need to use the DAQmx Scale property node if you wanted to programmatically edit a scale you had saved.  I apologize about that. 

Hope this helps,

Laura

Message Edited by Laura F. on 02-08-2006 02:45 PM

0 Kudos
Message 4 of 8
(3,370 Views)

Hello Laura,

  That worked out a lot better.  Part of my problem was that I had a filter selected for the property node that was hiding the important options.  Darn filters.

  The only problem I had was with a case structure.  When I wrote the values inside a case structure the scales were all messed up.  I had to put another property node outside the case structure (inside a while loop) and read the variables to indicators, once I did that everything worked fine.  I am not sure why, but it worked.
 
Thanks again for the help.
 
Bryan
 
0 Kudos
Message 5 of 8
(3,357 Views)

Hi Bryan,

I am not sure what might be going wrong with the method you described.  If you would like to investigate it further, please post code that demonstrates the problem.  I would be happy to take a look at it.

Thanks,

Laura

0 Kudos
Message 6 of 8
(3,347 Views)

I just put together a set of VIs that will let you programmatically call the DAQmx Assistants to edit channels.  You could pretty easily use these to allow the user to pick the scale from the same interface that MAX uses.

 

Programmatically Call NI DAQmx Assistants

 

There are also vi's there that will let you create new scales if you need to.

0 Kudos
Message 7 of 8
(2,889 Views)

Hi DMC Danny,

 

Your (source protected) demo/trial/commercial software isn't helpful.

 

I'm currently looking into 

http://zone.ni.com/devzone/cda/epd/p/id/1668

0 Kudos
Message 8 of 8
(2,764 Views)