Hide thumbs Also See for S7-1200:
Table of Contents
Communication processor and Modbus TCP
12.5 Modbus communication
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
Blocked_Proc_T
Real
imeout
Extended_Addr
Bool
essing
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 755).
Condition codes
Table 12- 71 MB_MASTER execution condition codes (communication and configuration errors)
STATUS (W#16#)
0000
80C8
80D1
80D2
80E0
80E1
80E2
80E3
80E4
8180
8186
8188
8189
818A
818B
818C
8200
754
Description
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.
False
Configures single or double-byte slave addressing. The default value = 0.
(0=single byte address, 1=double-byte address)
Description
No error
Slave timeout. Check baud rate, parity, and wiring of slave.
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.
The transmit request was aborted because no DSR signal is received from the DCE.
The message was terminated because the receive buffer is full.
The message was terminated as a result of a parity error.
The message was terminated as a result of a framing error.
The message was terminated as a result of an overrun error.
The message was terminated as a result of the specified length exceeding the total buffer size.
Invalid port ID value or error with MB_COMM_LOAD instruction
Invalid Modbus station address
Invalid Mode specified for broadcast request
Invalid Data Address value
Invalid Data Length value
Invalid pointer to the local data source/destination: Size not correct
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 M memory.
Port is busy processing a transmit request.
1
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
Table of Contents
loading

Table of Contents