LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

change cRIO io variable scale at runtime

Solved!
Go to solution

Can I change the scale of an IO Variable on my crio at runtime.  The exact scale of my ai and ao change over time, I would like to use the inate scales in the io variables mapped to the channels on my modules but can not figure out how to change this at runtime only through the project.  I know I can write my own scaling code but this extra work and uses the limited space on the crio.  Is there an API to change the scales?

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 1 of 5
(3,054 Views)

Paul,

   After some searching I was unable to find a way to programmatically change a scale of a shared variable at runtime. If you find an alternative solution or if I somehow skipped the way of doing it I would be very interested in learning about it.

Ben J.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 5
(3,026 Views)
Solution
Accepted by topic author falkpl

Low and behold it took me a few more minutes and I found it:

 

SS-2010.12.03-10.00.56.png

Regards from Austin,

Ben J.
National Instruments
Applications Engineer
Message 3 of 5
(3,019 Views)

I am able to do this with a call to the shared variable engine api.  I access the io shared variable using a constant, then set the properties using scales ptopertied of the sharedVariableIO type.  I will play with this and make sure it is working correctly, there is no help files linked to this.

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 4 of 5
(3,010 Views)

Thanks looks like we found the same API, I used the class browser, this in one of the best hiddent gems in labview for finding what you are looking for.

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 5 of 5
(3,008 Views)