Mb_Master (Communicate Via The Ptp Port As Modbus Master) Instruction - Siemens S7-1200 System Manual

Hide thumbs Also See for S7-1200:
Table of Contents

Advertisement

MB_COMM_LOAD data block variables
The following table shows the public static variables stored in the instance DB for the
MB_COMM_LOAD that can be used in your program.
Table 12- 65 Static variables in the instance DB
Variable
Data type
ICHAR_GAP
UInt
RETRIES
UInt
STOP_BITS
USInt
Table 12- 66 MB_COMM_LOAD execution condition codes
STATUS (W#16#)
0000
8180
8181
8182
8183
8184
8185
In addition to the MB_COMM_LOAD errors listed above, errors can be returned from the underlying PtP communication
1
instructions.
12.5.3.2

MB_MASTER (Communicate via the PtP port as Modbus master) instruction

Table 12- 67 MB_MASTER instruction
LAD / FBD
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
Description
Delay for Inter-character gap between characters. This parameter is specified
in milliseconds and is used to increase the expected amount of time between
received characters. The corresponding number of bit times for this parameter
is added to the Modbus default of 35 bit times (3.5 character times).
Number of retries that the master will attempt before returning the no response
error code 0x80C8.
Number of stop bits used in framing each character. Valid values are 1 and 2.
Description
No error
Invalid port ID value (wrong port/hardware identifier for communication module)
Invalid baud rate value
Invalid parity value
Invalid flow control value
Invalid response timeout value (response timeout less than the 5 ms minimum)
MB_DB parameter is not an instance data block of a MB_MASTER or MB_SLAVE
instruction.
SCL
"MB_MASTER_DB"(
REQ:=_bool_in_,
MB_ADDR:=_uint_in_,
MODE:=_usint_in_,
DATA_ADDR:=_udint_in_,
DATA_LEN:=_uint_in_,
DONE=>_bool_out_,
BUSY=>_bool_out_,
ERROR=>_bool_out_,
STATUS=>_word_out_,
DATA_PTR:=_variant_inout_);
Communication processor and Modbus TCP
1
Description
The MB_MASTER instruction communicates as a
Modbus master using a port that was configured by
a previous execution of the MB_COMM_LOAD
instruction. An instance data block is assigned
automatically when you place the MB_MASTER
instruction in your program. This MB_MASTER
instance data block is used when you specify the
MB_DB parameter for the MB_COMM_LOAD
instruction.
12.5 Modbus communication
749

Advertisement

Table of Contents
loading

Table of Contents