Detailed description
2.7 Structure and functions of the basic program
Basic logic functions: PLC basic program solution line (P3 sl)
62 Function Manual, 11/2006, 6FC5397-0BP10-2BA0
Example
Three groups of M commands are to be decoded in the following example:
• · M2 = 1 to M2 = 5
• · M3 = 12 to M3 = 23
• · M40 = 55
Structure of the decoding list in DB 75:
Example parameters
Group Decoding list (DB 75) Signal list
Extended
M address
First
M address
in group
Last
M address
in group
DB 76
1 2 1 5 DBX0.0 to DBX0.4
2 3 12 23 DBX2.0 to DBX3.3
3 40 55 55 DBX4.0
DATA_BLOCK DB 75
TITLE =
VERSION : 0.0
STRUCT
MSigGrp : ARRAY [1 .. 16 ] OF STRUCT
MExtAdr : INT ;
MFirstAdr : DINT;
MLastAdr : DINT;
END_STRUCT;
END_STRUCT;
BEGIN
MSigGrp[1].MExtAdr := 2;
MSigGrp[1].MFirstAdr
:=
L#1;
MSigGrp[1].MLastAdr
:=
L#5;
MSigGrp[2].MExtAdr := 3;
MSigGrp[2].MFirstAdr
:=
L#12;
MSigGrp[2].MLastAdr
:=
L#23;
MSigGrp[3].MExtAdr := 40;
MSigGrp[3].MFirstAdr
:=
L#55;
MSigGrp[3].MLastAdr
:=
L#55;
END_DATA_BLOCK