9/13/2005
Programming the SMLC
52
CoDeSys - Creating the machine state enumeration constants
•
Select the new data type in
the left pane.
•
Edit the right pane to
appear as it does at the
right:
•
An enumeration is a numbered list.
•
We are creating a number list of constants that define the valid states for our
machine.
•
Now when we create a new variable of type eMACHINE_STATES it can only
contain the values listed here.
•
In our application the actual value of each constant isn’t important but we can
assign the values if we wish.