105BCommunication processor
12.5 Modbus communication
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05
607
Modbus master data block variables
The following table shows the public static variables stored in the instance DB for
MB_MASTER that can be used in your program.
Table 12- 70 Static variables in the instance DB
Variable
Data type Initial value
Description
Blocked_Proc_T
imeout
Real
3.0
Amount of time (in seconds) to wait for a blocked Modbus Master instance
before removing this instance as being ACTIVE. This can occur, for example,
when a Master request has been issued and then the program stops calling
the Master function before it has completely finished the request. The time
value must be greater than 0 and less than 55 seconds, or an error occurs.
The default value is .5 seconds.
Extended_Addr
essing
Bool
False
Configures single or double-byte slave addressing. The default value = 0.
(0=single byte address, 1=double-byte address)
Your program can write values to the Blocked_Proc_Timeout and Extended_Addressing
variables to control Modbus master operations. See the MB_SLAVE topic description of
HR_Start_Offset and Extended_Addressing for an example of how to use these variables in
the program editor and details about Modbus extended addressing (Page 608).
Condition codes
Table 12- 71 MB_MASTER execution condition codes (communication and configuration errors)
1
STATUS (W#16#)
Description
0000
No error
80C8
Slave timeout. Check baud rate, parity, and wiring of slave.
80D1
The receiver issued a flow control request to suspend an active transmission and never re-
enabled the transmission during the specified wait time.
This error is also generated during hardware flow control when the receiver does not assert
CTS within the specified wait time.
80D2
The transmit request was aborted because no DSR signal is received from the DCE.
80E0
The message was terminated because the receive buffer is full.
80E1
The message was terminated as a result of a parity error.
80E2
The message was terminated as a result of a framing error.
80E3
The message was terminated as a result of an overrun error.
80E4
The message was terminated as a result of the specified length exceeding the total buffer size.
8180
Invalid port ID value or error with MB_COMM_LOAD instruction
8186
Invalid Modbus station address
8188
Invalid Mode specified for broadcast request
8189
Invalid Data Address value
818A
Invalid Data Length value
818B
Invalid pointer to the local data source/destination: Size not correct
818C
Invalid pointer for DATA_PTR or invalid Blocked_Proc_Timeout: The data area must be a DB
(that allows both symbolic and direct access) or a M memory.
8200
Port is busy processing a transmit request.