
An instance of this function block type models the behavior of a
solenoid mechanism with mechanical stops at each end of its motion.
The mechanism advances at a speed of
VF
percent full scale per
CLK
event when the
FWD
input is
TRUE
and retracts at a speed of
VR
percent full scale per
CLK
event when it is
FALSE
. Motion is inhibited when the
FAULT
input is
TRUE
. Sensor outputs indicate whether the mechanism is at the
HOME
(retracted) or
END
(advanced) position.
An instance of this function block type is typically used as a
component of the
SOL_MDLL
type.
The operation of an instance of this type is modeled by the Execution control Chart (ECC) and algorithms shown below.

ALGORITHM HOME_OFF IN ST : HOME := FALSE; END_ALGORITHM ALGORITHM ADVANCE IN ST : POS := POS + VF; IF POS >= 100 THEN POS := 100; END := TRUE; END_IF END_ALGORITHM ALGORITHM END_OFF IN ST : END := FALSE; END_ALGORITHM ALGORITHM RETRACT IN ST : POS := POS - VR; IF POS <= 0 THEN POS := 0; HOME := TRUE; END_IF END_ALGORITHM