The Daily CLAD

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 

Re: ENUM Addition

SercoSteveB
Active Participant

Consider the Enumerated Type configuration shown below:

 

Enum Addition Configure.png

 

If both StevesEnum In and SteveEnum Out are configured as shown above and the value of StevesEnum In is Item3, what is StevesEnum Out following execution of the VI?

 

Enum Addition.png

 

a) Item 1

b) Item2

c) Item3

d) 3

Comments
crossrulz
Knight of NI

If you wanted to do this properly, you would have a Type Def for the enum...Anyways, the value will roll over, so A


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
nik35324
Member

A

Matt-A.
Member

A

ersmt444
Member

A

MrStevenUND
Member

A

Tsjabrantes
Member

A.

Enumerated Type Controls

Use enumerated type controls to give users a list of items from which to select. An enumerated type control, or enum, is similar to a text or menu ring control in that both contain lists of strings through which you can cycle. However, enumerated type controls differ from ring controls in the following ways:

  • The data type of an enumerated type control includes information about the numeric values in the control and their corresponding strings. The data type of a ring control is numeric only.
  • The numeric representation of the enumerated type control is an 8-, 16-, or 32-bit unsigned integer, while ring controls can have additional representations. Right-click either type of control and select Representation from the shortcut menu to change the representation of the control.
  • You cannot allow the user to enter undefined values in enumerated type controls, and you cannot assign specific numeric values to items in enumerated type controls. If you need this functionality, use a ring control.
  • You can edit the items of an enumerated type control only at edit time, while you can edit ring control items at run time using a Property Node.
  • When you wire an enumerated type control to the selector terminal of a Case structure, LabVIEW matches the cases to the string values of items in the control, not the numeric values. When you use a ring control with a Case structure, LabVIEW matches cases to the numeric values of items.
  • When you wire an enumerated type control to the selector terminal of a Case structure, you can right-click the structure and select Add Case for Every Value to create a case for the string value of each item in the control. However, when you wire a ring control to the selector terminal of a Case structure, you must manually enter each case.
Tarciso Junior
+55 (11) 996-282-103
Skype: Tarciso.junior2
Email: Tsjabrantes@gmail.com
http://br.linkedin.com/pub/tarciso-junior/23/a83/463
dushyanth009
Member

A

Gab008
Member

a

Kuddo welcomed
CLAD-CTD
Ardent
Active Participant

Except for LabVIEW FPGA, where it just keeps adding and d) is the correct answer...

Best regards,
Jano
Matt-A.
Member

a

mohamedtanveej17
Member

A

Certified LabVIEW Developer,
Project Engineer, HTIC IITM.
cd11
Member

a

SercoSteveB
Active Participant

Answer: A.  Nice one all. 

 

crossrulz is correct, in my opinion enums (Enumerated Types) and Type Defs (Type Definitions) should always be used in conjunction with each other. 

eleshrudra
Member
Answer is A= item3
R.Elesh
Chandrani06
Member

Using Enum result is as below:

image.pngimage.png

Using Ring Result is as below:

 

 

image.pngimage.png