Appel de substitutions SFB en langage littéral structuré
(Traduction du document original anglais)
Introduction
L'appel de substitutions SFB en langage littéral structuré (ST) est différent entre Premium et Modicon M340.
Appel de substitutions SFB PL7 en langage ST de Control Expert
Le tableau ci-après décrit la conversion des appels de substitutions SFB pour Premium et Modicon M340.
SFB
Spécifiques
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),
(liste de 16 objets de sortie DRUM) ;
DRi(U:=TRUE); DRi(U:=FALSE);
(* UP*);
WORD_TO_BIT(INT_TO_WORD(DRi.W),
(liste de 16 objets de sortie DRUM) ;
NOTE : le SFB DRUM est représenté par un DFB vide pour les cibles M340.