LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying an Enum value and Item name when the Values are not sequential

Solved!
Go to solution

Hi,

I've been using some Enum controls and indictators successfully with some shared variables and modbus.

For example:

 

Item name Value

Off:                0

Startup        1

On                2

 

Enum setup works great, i dont need to lookup a cheat sheet to convert from the Item name to its Value, i just see the Item name in my control/indictor.

My new variables I'm trying to handle look like this:

 

Item name     Value

Off Code         0x201

Start Code      0x202

On Code         0x001

 

Any Ideas how i can display the value and the Item name on a front panel. ( for a control and an indicator)

For enums, it looks like the item Values have to go 0,1,2,3,4,5

0 Kudos
Message 1 of 6
(4,679 Views)

Under the Visible menu there's something called Digital Display (or something like that.  I don't have LabVIEW on this computer).  Is that what you are looking for?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 6
(4,670 Views)

Hi Bill,

 

I already use the digital display.

The problem is that i cannot enter my own values in the enum properties, labview automatically selects 0,1,2,3,4,5

What if my values are 0x201 , 0x202 ?

 

James

0 Kudos
Message 3 of 6
(4,663 Views)

I can use a case structure ( see attached) but this is overkill. Surely there is a way to do this with an indicator/control without making labview for each variable name and value i want to display.

0 Kudos
Message 4 of 6
(4,658 Views)
Solution
Accepted by topic author jamesy777

I found the solution:

 

http://digital.ni.com/public.nsf/allkb/79BA4505AE8C755E86256FB2000140B0

 

use a text ring and unselect sequential tick box

Message 5 of 6
(4,635 Views)

Sorry I misunderstood you.  Good to see that you found your solution on your own.  🙂

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 6
(4,385 Views)