EasyManua.ls Logo

Siemens S7-1200 - MB_MASTER (Communicate Via the Ptp Port as Modbus Master) Instruction

Siemens S7-1200
1028 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Communication processor and Modbus TCP
12.5 Modbus communication
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
749
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
Description
ICHAR_GAP UInt 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).
RETRIES UInt Number of retries that the master wi
ll attempt before returning the no response
error code 0x80C8.
STOP_BITS
USInt
Number of stop bits used in framing each character. Valid values are 1 and 2.
Table 12- 66 MB_COMM_LOAD execution condition codes
1
STATUS (W#16#)
Description
0000
No error
8180
Invalid port ID value (wrong port/hardware identifier for communication module)
8181
Invalid baud rate value
8182
Invalid parity value
8183
Invalid flow control value
8184
Invalid response timeout value (response timeout less than the 5 ms minimum)
8185 MB_DB parameter is not an instance data block of a MB_MASTER or MB_SLAVE
instruction.
1
In addition to the MB_COMM_LOAD errors listed above, errors can be returned from the underlying PtP communication
instructions.
12.5.3.2
MB_MASTER (Communicate via the PtP port as Modbus master) instruction
Table 12- 67 MB_MASTER instruction
LAD / FBD
SCL
Description
"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_);
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.

Table of Contents

Other manuals for Siemens S7-1200

Related product manuals