03-11-2014 11:43 AM
I am creating numeric controls/indicators on the fly. Most of them need to be displayed in hex. However, I can't access the format properties that allow me to set this when I create the control/indicator using the New VI Object VI. I think this is happening because the numeric type is not Digital (Strict) but rather just num.
I say this because I realized that if I simply place a numeric control on a front panel, right click to create a reference, then access the properties of said reference, I indeed have access to the format properties I'm talking about. A compare/contrast pic below to show what I'm talking about...
So my thinking then was, perhaps I should change the style of the object I'm creating to be of type Digital Numeric, but this style doesn't exist. There are Digital Data styles, but that's something completely different.
So my question is, what style/class combo do I need to have a numeric control that will allow me to specify the Format property?
thanks
Solved! Go to Solution.
03-11-2014 12:03 PM - edited 03-11-2014 12:05 PM
03-11-2014 12:05 PM
what I'm saying is that that Format option is not available when you create a VI object the way I showed. All those other options are, but nothing to do with the format.
03-11-2014 12:10 PM - edited 03-11-2014 12:11 PM
Hi bmishoe,
when you create a numeric control by scripting you should receive a reference to that control. Then you're able to set format options as you like to!
Btw. do you know the LabVIEW Idea Exchange? A great to place to make suggestions for improving the LabVIEW IDE…
03-11-2014 12:11 PM
That's exactly what I'm showing in the top portion of my picture. The reference to the control comes out of the New VI Object node, then to a property node. That property node does not allow me to set any Format options. Lots of other options are there, but no Format related ones.
03-11-2014 12:17 PM
You need to make it a Digital Numeric.
03-11-2014 12:18 PM
perfect! Thank you
03-11-2014 12:18 PM
In your example you are creating an object of the Numeric class, which is too generic to have a "FormatString" property. Dials, knobs, and sliders inherit from Numeric, so it wouldn't make much sense for them to expose "FormatString". You need to create an object of the Digital class, which inherits from Numeric, then you will be able to set format options.
Chris M
03-11-2014 12:26 PM
Change your class to a Digital numeric. The Numeric is a general number that could be almost anything that doesn't actually have a display format (knob, enum, ring). The digital numeric is more precisely the numeric control you are putting down. The specific class has a display format while the general does not.