MB_MODE
Modbus
function
81
08
3 to 10,
12 to 79,
82 to 255
Note
MB_DATA_PTR assigns a buffer to store data read/written to/from a Modbus TCP server
The data buffer can be in a non-optimized global DB or M memory address.
For a buffer in M memory, use the standard Any Pointer format. This is in the format P#"Bit
Address" "Data Type" "Length", an example would be P#M1000.0 WORD 500.
MB_DATA_PTR assigns a communication buffer
● MB_CLIENT communication functions:
– Read and write 1-bit data from Modbus server addresses (00001 to 09999)
– Read 1-bit data from Modbus server addresses (10001 to 19999)
– Read 16-bit word data from Modbus server addresses (30001 to 39999) and (40001 to
– Write 16-bit word data to Modbus server addresses (40001 to 49999)
● Word or bit sized data is transferred to/from the DB or M memory buffer assigned by
MB_DATA_PTR.
● If a DB is assigned as the buffer by MB_DATA_PTR, then you must assign data types to
all DB data elements.
– The 1-bit Bool data type represents one Modbus bit address
– 16-bit single word data types like WORD, UInt, and Int represent one Modbus word
– 32-bit double word data types like DWORD, DInt, and Real represent two Modbus
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
Data length
Operation and data
1
Reset server event counter using data diag-
nostic code 0x000A
1 word per request
Reserved
49999)
address
word addresses
Communication processor and Modbus TCP
13.8 Legacy Modbus TCP communication
MB_DATA_ADDR
1253