| Creating a State Machine | ||
| Links Mentioned Links Tip |
![]() I'm assuming you know how to set up a project and you are comfortable with Web Pack in general. If you need help with these topics, you should work the appropriate tutorial before you continue. Create a new source and select State Diagram. I named my source VCRFSM. You'll wind up with this display:
There are several ways you could get started, but the Wizard is probably the most appropriate in this case. From the File menu select Design Wizard. The wizard will ask if you want to use the existing diagram. Answer Yes. You'll see this informational dialog:
Of course, you want to pick Next. The next screen lets you select the number of states (4 in our example) and the basic layout of states. You can always change this later, but the Multi-Column selection eerier fits our planned state machine.
Your state machine needs a way to reset and the next screen lets you choose between an asynchronous reset and a synchronous one. I'll pick async:
Our transitions don't fit the wizard's simple ideas, but we can ask it to do some work for us on the next screen:
However, you'll have to add some custom transitions. This will simply give us states that move "forward" on some condition (yet to be specified since we need different ones for each state). If there is no condition, the machine stays in the same state (the @ELSE condition). In the next frame you'll see that the wizard wants to help us optimize our state machine.
© 2002 by AWC. All Rights Reserved. |