9/13/2005
Programming the SMLC
40
CoDeSys - SFC - MC_Open function block - adding a coil
•
Insert a coil (output)
on the IsOnline
output of the function
block. The Declare
Variable box pops up.
Make this a variable
of type BOOL.
•
We will use the
bKnifeIsOnline coil as
a condition to exit the
Init step in our SFC.
•
Note how we are prefacing our variable with a lower case letter to indicate its
type. IEC 61131-3 is a strongly typed language and this convention will help
us debug compilation errors in our program. This is not required, you can
name your variables anything you would like, it is simply a recommendation
based on experience that will aid in writing and debugging large programs.