01-17-2006 10:57 AM
01-17-2006 11:00 AM
01-17-2006 11:01 AM
Hello,
Off the top of my head, I can't think of a reason why you're seeing this behavior. Can you perhaps attach a simple VI demonstrating the problem?
-D
01-17-2006 11:16 AM - edited 01-17-2006 11:16 AM
Message Edited by erdccc on 01-17-2006 11:20 AM
01-17-2006 11:26 AM
You should probably also attach the typedef file for the enum controlling the states of the Case Structure. Also, you should tell us what exactly you're doing to cause the error condition. Are you ctrl-dragging the case structure to make a copy of it, then attempting to wire the same enum into its selector?
-D
01-17-2006 11:31 AM
"You should probably also attach the typedef file for the enum controlling the states of the Case Structure. "
That is a new one for me. I know of only having the main VI, and no other files attached to it.
I just right click on the name of the case, then selected "duplicate case". I did not have to rewire anything, since in created it perfectly with all connectors wired properly.
01-17-2006 11:57 AM
A typedef is a custom control file (the file on disk has a .ctl extension) that defines a control type that your VI uses. If you right-click the enum constant that defines the states of your state machine, you'll see a menu option that says "Open Type Def.". If you use that option, a custom control will open, and you can view the VI Properties (Ctrl-I) to see where the custom control resides on disk.
Anyway, it was unclear to me from your previous post that you are using Duplicate Case. Now that I know that, it's easier to diagnose the problem you're having. Your case structure already has a case defined for every value in your state enum (_Quit_, Init, Fill Hot Liquor Tank, and Strik Water temp). If you duplicate a case, you will have 5 cases in your case structure. But since you only have 4 possible states, there's no way each case can have a unique value (which is a requirement for a case structure...it makes no sense to have two cases that run on the same value). So you will need to edit your state enum to include a new, 5th state, for the 5th case you have added to your case structure.
Of course, since you used the State Diagram Toolkit to generate this state machine, you'd probably be better off using that interface to add new cases to your state machine. I also recommend you read the LabVIEW Help to learn more about Case Structure, Enums, and Type Definitions.
Good luck,
-D
01-17-2006 12:14 PM
Thanks Darren!
Unfortunatly, once you drop the link to the State Diagram Toolkit there is no going back.
To close this thread out, please tell me just how I can edit my state enum to include a new, 5th state. That way anyone else who is using this toolkit and has the same problem as me, thay too can get the solution to this problem.
01-17-2006 12:38 PM
Go to the enum constant on your diagram that is wired into the case selector. Right-click it and choose "Open Type Def.". When the typedef is open, right-click the enum control and choose "Edit Items". In the property pages dialog, you can add a new item to the list of items in the enum. Once you've done this, save and close the custom control. Now your enum will have a new value, and if you choose "Duplicate Case" on the case structure, the new case *should* be the new 5th state you added to your state enum.
Good luck,
-D
01-17-2006 12:42 PM - edited 01-17-2006 12:42 PM
Message Edited by erdccc on 01-17-2006 12:42 PM