View Single Post
  #5   Spotlight this post!  
Unread 06-02-2009, 00:19
airnate airnate is offline
Registered User
FRC #0236 (Techno Ticks)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2009
Location: southeastern CT
Posts: 93
airnate is a jewel in the roughairnate is a jewel in the roughairnate is a jewel in the rough
Re: boolean selector for relay control

If you create the enumerated type on the block diagram, it becomes a blue constant. Once you right click on the constant and select Edit Items, you can add any text you want and create your "Off", "Forward", and "Reverse".

The enumerated type can be found in the Numeric sub palette in the Programming palette as shown in the attached picture. My cursor didn't show up in the picture, but look for the highlighted square surrounding the enum on the palette.

For a more detailed explanation,

1. Go look at the LabVIEW help. From the LabVIEW Help menu, select Search the LabVIEW Help...
2. Select the Search tab.
3. Type enum constant and press enter.
4. In the list that shows up, select Enum Constant and the help will appear in the right pane.

One other word of caution, if you make multiple constants (which I presume you're doing), you should really make a typedef out of one and use the typedef wherever you have an instance of it. Search for Custom Controls in the LabVIEW help for the topic, Creating Custom Controls, Indicators, and Type Definitions. Then scroll down that article to find the section entitled Type Definitions and Strict Type Definitions

:-)
Attached Thumbnails
Click image for larger version

Name:	enum.png
Views:	52
Size:	41.2 KB
ID:	7334  

Last edited by airnate : 06-02-2009 at 00:33.
Reply With Quote