Detailed description
2.7 Structure and functions of the basic program
Basic logic functions: PLC Basic program powerline (P3 pl)
Function Manual, 11/2006, 6FC5397-0BP10-2BA0
67
NCRunupTimeout
:=
S5T#50S;
BP parameters (to scan runtime):
l gp_par.UDInt;
//=4,
l gp_par.UDHex;
//=2,
l gp_par.UDReal;
//=1 )
During PLC power-up, DB20 was generated with a length of 28 bytes:
DB 20
address
data
0.0
123
2.0
456
4.0
789
6.0
1011
8.0
b#16#12
9.0
b#16#AC
10.0
1.02
The structure of the machine data used is specified in a UDT:
TYPE UDT 20
STRUCT
UDInt :
ARRAY [0 .. 3 ] OF INT ;
UDHex0 :
ARRAY [0 .. 15 ] OF BOOL ;
UDReal :
ARRAY [0 .. 0 ] OF REAL
;
//Description as field, for
// later expansions
END_STRUCT;
END_TYPE
Note
ARRAY OF BOOL are always sent to even-numbered addresses. For this reason, an array
range of 0 to 15 must generally be selected in the UDT definition or all Boolean variables
specified individually.
Although only a REAL value is used initially in the example, a field (with one element) has
been created for the variable. This ensures that extensions can be made easily in the future
without the symbolic address being modified.
Summary of Contents for SINUMERIK 840D sl
Page 282: ...Index Basic logic functions Acceleration B2 64 Function Manual 11 2006 6FC5397 0BP10 2BA0 ...
Page 388: ...Basic logic functions Travel to fixed stop F1 Function Manual 11 2006 6FC5397 0BP10 2BA0 52 ...
Page 962: ...Index Basic logic functions Emergency Stop N2 20 Function Manual 11 2006 6FC5397 0BP10 2BA0 ...
Page 1704: ...Constraints Basic logic functions Spindles S1 94 Function Manual 11 2006 6FC5397 0BP10 2BA0 ...
Page 1716: ...Index Basic logic functions Spindles S1 106 Function Manual 11 2006 6FC5397 0BP10 2BA0 ...
Page 1996: ...Index Basic logic functions Tool Offset W1 208 Function Manual 11 2006 6FC5397 0BP10 2BA0 ...
Page 2150: ...Table of contents Basic logic functions Appendix 4 Function Manual 11 2006 6FC5397 0BP10 2BA0 ...
Page 2184: ...Glossary Basic logic functions Appendix 38 Function Manual 11 2006 6FC5397 0BP10 2BA0 ...