07-01-2014 10:20 AM
Hi friends,
there is a BDL indicator. The enum control which include the DBL values is created. I want that the DBL value is automatically find in the enum control. What can I do?
have a nica work
07-01-2014 10:30 AM - edited 07-01-2014 10:36 AM
What is a BDL indicator? What is the relationship between the enum and the indicator? An enum is always integer and the item is a string.
I think you should attach a small example to illustrate what you are talking about. It is not clear at all.
Are the enum items formatted floating point numbers? Just get the array of strings using a property node and use the enum to index into the array, then convert to DBL.
07-01-2014 10:31 AM
An enum can only be an integer datatype. What is the meaning of a fractional item in an unum?
Please explain what you are trying to do and show us what you have tried.
Lynn
07-01-2014 10:34 AM - edited 07-01-2014 10:58 AM
Here's what I had in mind:
(It is not entirely clear if that's what you actually want).
To "find" the enum value corresponding to the floating point value, format it with the same number of digits, then use "search array" on the strings array.
07-01-2014 10:37 AM
@1085 wrote:
Hi friends,
there is a BDL indicator. The enum control which include the DBL values is created. I want that the DBL value is automatically find in the enum control. What can I do?
have a nica work
Are you talking about the Label of the Enum control as "1.234"?
07-04-2014 10:58 AM
As the last two responders noted, I'm assuming that you have created an Enum, gone into the Edit Items option, and assigned numeric values (such as 1.2, 2.4, 3.6) to the Enum. You now want to read the Enum and get the "edited value" from it. The easiest way to do that is to wire the Enum into a "Format into String" funnction (which will return the string representing the edited value, for example, the string "1.2") and then wire this string into the "Scan from String" function, wiring a Dbl into the Default terminal, which will convert the string "1.2" into the Dbl value 1.2.
BS