The Daily CLAD

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

Re: ENUM Addition

Member SercoSteveB
Member
‎02-09-2017 04:55 AM
‎02-09-2017 04:55 AM

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
Knight of NI Knight of NI
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

Member nik35324
Member

A

Member Matt-A.
Member

A

Member ersmt444
Member

A

Member MrStevenUND
Member

A

Member 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.
Member dushyanth009
Member

A

Member Gab008
Member

a

Active Participant Ardent
Active Participant

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

Member Matt-A.
Member

a

Member mohamedtanveej17
Member

A

Member cd11
Member

a