9/13/2005
Programming the SMLC
60
CoDeSys - Editing the ErrorCheck Action
•
The finished rung should
look like this:
•
The MC_ReadErrorFlag function block checks a global error bit within the SMLC
Motion library. If any of the drives fault or a motion function block generates an
error the global error bit is set.
•
If the error bit gets set we will change the MachineState to STATE_ESTOP
•
Typically we will also monitor an I/O point that indicates that no Estop condition is
present. If the input goes away we put the machine into STATE_ESTOP
•
gbEstopOK should be declared
as a VAR_GLOBAL. By our
convention the lowercase g
indicates that the variable is
global. In CoDeSys, HMI
variables and physical I/O are
always global.