Call of an SFB in instruction list language
(Original Document)
Introduction
The conversion automatically replaces SFBs with equivalent EFBs for Premium and DFBs for Modicon M340, insofar as these exist.
Call of an SFB in IL
The following table describes the correspondence and possible differences between SFBs and EFBs (Premium) or DFBs (Modicon M340).
PL7
Control Expert
State
SFB
%T
Not used in instruction list language
-
-
SFB
%TM
TON
IN %TMi
CAL TMi(S:=TEMPBOOL)
Converted
TOF
IN %TMi
CAL TMi(S:=TEMPBOOL)
TP
IN %TMi
CAL TMi(S:=TEMPBOOL)
SFB
%C
R %Ci
S %Ci
CU %Ci
CD %Ci
CAL Ci(CU:=0,CD:=0,R:=TRUE,P:=FALSE)
CAL Ci(CU:=0,CD:=0,R:=0,P:=TRUE)
CAL Ci(CU:=TRUE,CD:=FALSE,R:=FALSE,P:=FALSE)
CAL Ci(CU:=FALSE,CD:=TRUE,R:=FALSE,P:=FALSE)
Converted
SFB
%MN
S %MNi
CAL MNi(S:=FALSE)
Converted
SFB
%R
%Ri.LEN ≤ 32
R %Ri
I %Ri
O %Ri
CAL Ri(R:=TRUE)
CAL Ri(R:=0,I:=TRUE,O:=0)
CAL Ri(R:=0,I:=0,O:=TRUE)
Converted
32 < %Ri.LEN ≤  255
R %Ri
I %Ri
O %Ri
CAL Ri(R:=TRUE)
CAL Ri(R:=0,I:=TRUE,O:=0)
CAL Ri(R:=0,I:=0,O:=TRUE)
SFB
%DR
R %DRi
U %DRi
CAL DRi(R:=TRUE,U:=0)
(1)
CAL DRi(R:=0,U:=TRUE)
(1)
Converted (Premium only)
Note: For Modicon M340, the converter replaces a DRUM SFB with an empty DFB.
Key:
(1)