01-17-2006 12:53 PM
Are you trying to edit the control or the constant? I don't think you can edit the constant, since it's a typedef. You need to open the typedef, so that a front panel is showing with the enum on it. Then launch the properties dialog from that enum. Also, you'll probably want to find the typedef on disk (Ctrl-I on the typedef to see its path on disk) and make sure the file is not read-only. I'm not all that familiar with the State Diagram Toolkit, so I'm not sure if there are any other weird factors that may be at play here.
Again, if you're still having problems, you can attach the .ctl file to your next post and I can try it and see if there are any additional strange problems going on that I haven't thought of.
Good luck,
-D
01-17-2006 01:19 PM
Just to throw something else in -
I don't have the SDTK, but I remember a thread from a few months back about it using Xnodes, which also allowed it to lock the code so that you can only modify it using the SDTK.
01-17-2006 02:23 PM
01-18-2006 07:12 PM - edited 01-18-2006 07:12 PM
It is a lot easier to answer these questions after someone else has asked all of the questions.
I have, use, and love the SDE (State Digram Editor).
I have also attempted to hack it a bit and realized early on that playing with the enum used to drive the resulting SD (State Diagram) was a bad idea. I seem to remember that if you copied off the enum constant and attempted to use it in a comparison that would throw either an insane object error or crash LV, I forget which. ![]()
The bottom line is don't play with the enums and case structures from the SDE. There are better ways to create and edit enums and cases. ![]()
Just use the SDE for what it is intended (writing complex algorithms in a self documenting graphic over-view).
But...
It looks like you just found that out. ![]()
Ben
Message Edited by Ben on 01-18-2006 07:13 PM
08-17-2010 12:36 PM
I'm having a similar issue, and instead of starting a new thread, I thought I'd revive this old thread to save space.
In the V belowI, I am trying to add another case to my Case Structire but it's coming in red. I can't for the life if me figure out why. I am a beginner at Labview. I'm running Labview 2009 Version 9.0
08-17-2010 12:46 PM
Your state enum does not have a "test" value. Add the value to the enum and you should be OK.
If you create control and make it a type def, you will not need to edit every constant when you add a case and the case structure will also adapt.
Lynn
08-17-2010 12:49 PM
You have an enum wired to the case selector. You would have to add a 'Test' value to your enum before you can add a case of that value and you should really be using a type det for the enum. Now you have to edit each instance to add 'Test'.
p.s. You should also work to eliminate all of those stacked sequence structures and local variables.
08-17-2010 01:04 PM
Dennis & John,
Where in the functions pallet do I find the type def?
Thanks for your patience.
08-17-2010 01:08 PM
@BadAzzS10 wrote:
Dennis & John,
Where in the functions pallet do I find the type def?
Thanks for your patience.
Typed defs are defined by customizing the control.
I wrote this Nugget on that topic to help with this question.
I hope that helps,
Ben
08-17-2010 01:10 PM
It is not a function. You create a typedef by customizing a control.
Since you do not appear to have a control, create on by changing one of the constants to a control. From the front panel select the control and use Edit >> Customize Control... In the control editing window which pops up you can choose from the tool bar Control, Type Def, or Strict Type Def. Read the help for more details. Save the customized control.
Lynn