Detailed description
2.7 Structure and functions of the basic program
Basic logic functions: PLC Basic program powerline (P3 pl)
66 Function Manual, 11/2006, 6FC5397-0BP10-2BA0
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
Example
The project in the example requires 4 integer values, 2 hexadecimal fields with bit
information and 1 real value.
Machine data:
MD14510 USER_DATA_INT[0] 123
MD14510 USER_DATA_INT[1] 456
MD14510 USER_DATA_INT[2] 789
MD14510 USER_DATA_INT[3] 1011
...
MD14512 USER_DATA_HEX[0] 12
MD14512 USER_DATA_HEX[1] AC
...
MD14514 USER_DATA_FLOAT[0] 123.456
GP Parameter (OB 100):
CALL FB 1, DB 7 (
MCPNum := 1,
MCP1In := P#E0.0,
MCP1Out := P#A0.0,
MCP1StatSend := P#A8.0,
MCP1StatRec := P#A12.0,
MCP1BusAdr := 6,
MCP1Timeout := S5T#700MS,
MCP1Cycl := S5T#200MS,
NCCyclTimeout := S5T#200MS,