08-01-2012 09:03 AM
I am new to Labview programming and am working on some NI exercises this one is in state machines. For the Enum to switch states all you have to do is pull down the arrow to switch but what if it doesn't allow you to switch how do you go from the First to Second?
Solved! Go to Solution.
08-01-2012 09:04 AM
I don't understand your question. What is not allowing you to switch the enum?
Post a VI that shows your problem.
08-01-2012 09:05 AM
I don't really understand your issue.
My guess is that you haven't created entries into the enum yet, so the dropdown is empty.
To edit the items in the enum, right click on it and take a look into the context menu 😉
Norbert
08-01-2012 09:12 AM
Yes I've already set my first and second state in the edit items but when I go to the block diagram it wont allow me to pull down the arrow and switch states. Do i have to intialize the states somehow? The VI is on this website under State Machine exercises. Thanks for your help everyone.
08-01-2012 09:14 AM
Attach your VI. I'm not going to go searching on the website for an exercise example.
08-01-2012 09:17 AM
This is what I have but can't switch from First state so I deleted the other stuff and started back from here where my problem lies.
08-01-2012 09:20 AM
I see two enum constants in your diagram. They both have a "first state" and "second state". I am able to change either one just by clicking on it.
So I don't understand where you are having a problem.
08-01-2012 09:23 AM
Also, make sure that you make a typedef for your ENUM and only use constants created from the typedef. This will make sure that all of your constants are updated when you make changes to the ENUM definition.
08-01-2012 09:24 AM
Please bear with me I'm sure this is simple for you but when I go into the block diagram it doesn't allow me to switch from first to second I can switch it no problem in the edit items part but how do I set it so I can pull down the arrow and change it in the block diagram?
08-01-2012 09:30 AM
Still don't know where you are having a problem.
When you click on the enum constant, (does your cursor become a hand with a pointing finger?), it pops up a list of the different values that make up the enum. Then you pick the one you want.