P3: Basic PLC Program for SINUMERIK 840D sl
13.8 Structure and functions of the basic program
Basic Functions
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
889
Structure of the decoding list in DB 75:
Structure of FB 1 in the OB 100
(enter the number of M groups to be decoded in order to activate the function):
The appending of the entry in OB 100 and transfer of DB 75 (decoding list) to the AG must be followed by a
restart. During the restart, the basic program sets up DB76 (signal list).
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 ... DBX0.4
2 3 12 23 DBX2.0 ... DBX3.3
3405555DBX 4.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
Call FB 1, DB 7(
...
ListMDecGrp := 3, //M decoding of three groups
...
);