Programming in IL
1. Example in IL
Consider the following logical equation:
%M0 = %I0.%I1+%I2. /%I3
LD %I0
AND %I1
OR( %I2
ANDN %I3
)
ST %M0
2. Example of Grafcet programming in IL
Consider the elementary Grafcet:

a. Programming Transition/Transition
* INIT LD %S2 S %M0 R %M1 * TRANSITIONS LD %M0 AND %I0 S %M1 R %M0 * LD %M1 AND %I1 S %M0 R %M1 * ACTIONS LD %M1 ST %Q0
b. Programming Transition/Transition with Crossing Bits
* INIT
LD %S2
S %M0
R %M1
* TRANSITIONS
LD %M0
AND %I0
ST %M10
*
LD %M1
AND %I1
ST %M11
* CROSSING
LD %M10
S %M1
R %M0
*
LD %M11
S %M0
R %M1
* ACTIONS
LD %M1
ST %Q0
c. Programming Step/Step
* START
LD %M1
AND %I1
OR( %M0
ANDN %I0
)
OR %S2
S %M0
R %M1
*
LD %M0
AND %I0
OR( %M1
ANDN %I1
)
S %M1
R %M0
* ACTIONS
LD %M1
ST %Q0
d. Programming Step/Step with Crossing Bits
* START
LD %M1
AND %I1
OR( %M0
ANDN %I0
)
OR %S2
ST %M10
*
LD %M0
AND %I0
OR( %M1
ANDN %I1
)
ST %M11
* CROSSING
LD %M10
S %M0
R %M1
*
LD %M11
S %M1
R %M0
* ACTIONS
LD %M1
ST %Q0