Call of SFB Substitutions in Structured Text
(Original Document)
Introduction
The call of SFB substitutions in structured text (ST) is different between Premium and Modicon M340.
Call of PL7 SFB substitutions in Control Expert ST
The following table describes the conversion of SFB substitution calls for Premium and Modicon M340.
SFB
Specific
PL7
Control Expert - Premium
Control Expert - Modicon M340
%T
START %Ti
START_PL7_3_TIMER(Ti);
Ti(E:= TRUE),C:= TRUE);
(*START*);
STOP %Ti
STOP_PL7_3_TIMER(Ti);
Ti(E:= TRUE),C:= FALSE);
(* STOP*);
PRESET %Ti
PRESET_PL7_3_TIMER(Ti);
Ti(E:= FALSE),C:= FALSE);
(* PRESET*);
%TM
TON
START %TMi
START_PL7_TON(TMi);
TMi(S:=TRUE);
(* START*);
DOWN %TMi
DOWN_PL7_TON(TMi);
TMi(S:=FALSE);
(* DOWN*);
TOF
START %TMi
START_PL7_TOF(TMi);
TMi(S:=TRUE);
(* START*);
DOWN %TMi
DOWN_PL7_TOF(TMi);
TMi(S:=FALSE);
(* DOWN*);
TP
START %TMi
START_PL7_TP(TMi);
TMi(S:=TRUE);
(* START*);
DOWN %TMi
DOWN_PL7_TP(TMi);
TMi(S:=FALSE);
(* DOWN*);
%C
RESET %Ci
RESET_PL7_COUNTER(Ci);
Ci(R:=TRUE);Ci(R:=FALSE);
(* RESET*);
PRESET %Ci
PRESET_PL7_COUNTER(Ci);
Ci(P:=TRUE);Ci(P:=FALSE);
(* PRESET*);
UP %Ci
UP_PL7_COUNTER(Ci);
Ci(CU:= TRUE);Ci(CU:= FALSE);
(* UP*);
DOWN %Ci
DOWN_PL7_COUNTER(Ci);
Ci(CD:= TRUE);Ci(CD:= FALSE);
(*DOWN*);
%MN
START %MNi
START_PL7_MONOSTABLE(MNi);
MNi(S:=TRUE);
(* START*);
%R
%Ri.LEN≤32
RESET %Ri
RESET_PL7_REGISTER_32(Ri);
Ri(R:=TRUE);Ri(R:=FALSE);
(* RESET*);
PUT %Ri
PUT_PL7_REGISTER_32(Ri);
Ri(I:=TRUE);Ri(I:=FALSE);
(* PUT*);
GET %Ri
GET_PL7_REGISTER_32(Ri);
Ri(O:=TRUE);Ri(O:=FALSE);
(* GET*);
32 < %Ri.LEN≤255
RESET %Ri
RESET_PL7_REGISTER_255(Ri);
Ri(R:=TRUE);Ri(R:=FALSE);
(* RESET*);
PUT %Ri
PUT_PL7_REGISTER_255(Ri);
Ri(I:=TRUE);Ri(I:=FALSE);
(* PUT*);
GET %Ri
GET_PL7_REGISTER_255(Ri);
Ri(O:=TRUE);Ri(O:=FALSE);
(* GET*);
%DR
RESET %DRi
RESET_PL7_DRUM(DRi);
DRi(R:=TRUE); DRi(R:=FALSE);
(*RESET*);
UP %DRi
UP_PL7_DRUM(DRi)
WORD_TO_BIT (INT_TO_WORD (DRi.W),
list of 16 DRUM output objects);
DRi(U:=TRUE); DRi(U:=FALSE);
(* UP*);
WORD_TO_BIT(INT_TO_WORD(DRi.W),
List of 16 DRUM output objects);
NOTE: The DRUM SFB is represented by an empty DFB for M340 targets.