05-24-2009 05:19 PM
I want to create an enum typedef? I should be able to right click on the enum and select "Advanced" from the drop-down menu. However, when I do that, "Advanced" is greyed-out. What should I do?
Thanks in advance.
05-24-2009 06:33 PM
05-25-2009 07:42 AM
jcarmody wrote:
1) Select the control then click "Customize Control..." in the Edit menu.
Prequil to Jim's reply...
-1 ) Right-click on the enum constant and select "Change to Control"
0) Switch to the front panel
Continue with Jim's instruction.
Explanation: The "customize" option is not available for non-type def'd enum constants on the diagram.
Ben
PS: Jim, I like your poem.
05-26-2009 08:08 AM
The instructions given worked for me. Thanks so much!
However, this brings up another related question. When I open the Standard State Machine template, there's a Beginning State typedef and a Next State typedef. When I double click on either, nothing shows up on the front panel. Can you explain what's different?
05-26-2009 09:04 AM
They are constants on your block diagram. They have no representation on the front panel.
You can right-click them as well and select 'Open Type Def' or 'Advanced -> Customize'.
Felix
05-26-2009 10:03 AM
05-26-2009 10:51 PM
Joe,
It is simple theory.
You can have 'N' no. of constant instances for a Typedef Enum variable; but not 'N' no. of variable instances for a Enum constant. Thats why, the menu items are normally greyed out for an Enum constant.
05-27-2009 06:33 AM
05-27-2009 06:37 AM
Joe,
See Ben's reply. It has already got the answer you want...
06-01-2012 06:26 PM - edited 06-01-2012 06:29 PM
I realize this thread is old, but for anyone else like myself who comes acorss this in the future, I believe Ben missed a step at the end to create a type def like the ones used for a state machine.
Once the custom control front panel is opened after selecting customize controls, select whether you want a type def or a strict type def from the drop down menu at the top.
When you then go to your block diagram and switch the control to a constant, you can right-click on it and see the option to open type def.
Refer to this link for clarification: http://zone.ni.com/reference/en-XX/help/371361E-01/lvhowto/creating_type_defs/
Chris