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
891
Figure 13-15 DB 20
Example
The project in the example requires 4 integer values, 2 hexadecimal fields with bit information and 1 real value.
Machine data:
Note
If the number of PLC machine data used is increased later, then DB20 must be deleted
beforehand. To prevent such extensions in use having any effect on the existing user
program, the data in DB20 should be accessed in symbolic form wherever possible, e.g. by
means of a structure definition in the UDT.
Interrupts
400120
Delete DB 20 in PLC and restart
Explanation
DB length is not the same as the required DB length
Response
Interrupt display and PLC Stop
To correct or
avoid errors
Delete DB 20 followed by RESET
Continuation
After cold restart
MD14510 $MN_USER_DATA_INT[0]
123
MD14510 $MN_USER_DATA_INT[1]
456
MD14510 $MN_USER_DATA_INT[2]
789
MD14510 $MN_USER_DATA_INT[3]
1011
...
MD14512 $MN_USER_DATA_HEX[0]
12
MD14512 $MN_USER_DATA_HEX[1]
AC
...
'%
8VHUPDFKLQH
GDWDW\SH,17
1RRI8',QW
1RRI8'+H[
1RRI8'5HDO
8VHUPDFKLQH
GDWDW\SH%<7(
8VHUPDFKLQH
GDWDW\SH5($/