ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to programmatically set IO variable scaling?

The scaling individual I/O channels on cRIO cards can be set at edit time through the shared variable properties dialog box.  Is it possible to access this programmatically at run time?  I have found the "Programmatic Module Configuration - Scan Mode" in the example finder.  NI-Programmatic Module Configuration.PNG

 

It shows simply connecting an IO reference to a property node, however the scaling is not one of the properties - only Range and Terminal Mode are available properties.  Also, the method shown does not seem very scalable.  I would like to be able to programmatically set scaling for all the analog channels on all my cRIO cards... 96 total. The use of a loop, shift registers and a compare seems a little less than elegant.  Could this be done with some sort of event?

 

Thanks in advance!

0 Kudos
Message 1 of 5
(4,060 Views)

You can use the SharedVariableIO property from the DSC module to programmatically configure the shared variable instance of the scan mode IO varibles:

http://zone.ni.com/reference/en-XX/help/371618J-01/lvdschelp/set_sv_prop_prog/

 

I haven't messed with it too much, but you can try to use the generic variable properties to access them programmatically as well:

http://zone.ni.com/reference/en-XX/help/371361K-01/lvprop/variable_p/

 

You would have to feed a reference from the specific project item to the variable property node to gain programmatic access. You can use this KB for a helpful as well.

 

I am playing around with a test project right now and if I get something going I will go ahead and post it.

dK
0 Kudos
Message 2 of 5
(4,013 Views)

Thanks for the reply Daniel.  I have Labview Dev Suite but not the DSC module.  We are a small startup and don't see getting approval for DSC any time soon.  Any other approaches?

0 Kudos
Message 3 of 5
(3,996 Views)

Although I don't have the DSC Module, I do have the Runtime Module.  Should this give me access to the SharedVariableIO properties you suggested?

Thanks!

0 Kudos
Message 4 of 5
(3,969 Views)

SharedVariableIO properties are only available with the DSC module unfortunately.

dK
0 Kudos
Message 5 of 5
(3,932 Views)