Siemens SIMATIC S7 System Manual page 484

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

Libraries
9.3 Modbus RTU library
Only one each of MBUS_MSG or MB_MSG2 instruction can be active at a time. If the
program enables more than one MBUS_MSG instruction or more than one MB_MSG2
instruction, then the CPU processes the first MBUS_MSG instruction or MB_MSG2
instruction and all subsequent MBUS_MSG or MB_MSG2 instructions will abort with an error
code 6.
Table 9- 6
Parameters for the MBUS_MSG / MB_MSG2 instruction
Parameter
Data type
First
BOOL
Slave
BYTE
RW
BYTE
Addr
DWORD
Count
INT
DataPtr
DWORD
Done
BOOL
Error
BYTE
Set parameter First ON for only one scan when there is a new request to send. Pulse the
First input through an edge detection element (for example, Positive Edge), which causes
the program to transmit the request one time. See the example program (Page 494) for
details.
Parameter Slave is the address of the Modbus slave device. The allowed range is 0 through
247. Address 0 is the broadcast address. Use address 0 only for write requests. There is no
response to a broadcast request to address 0. Not all slave devices support the broadcast
address. The S7-200 SMART Modbus slave library does not support the broadcast address.
Use parameter RW to indicate whether this message is to be a read or a write: 0 (Read) and
1 (Write).
Discrete outputs (coils) and holding registers support both read and write requests. Discrete
inputs (contacts) and input registers only support read requests.
Parameter Addr is the starting Modbus address. S7-200 SMART supports the following
ranges of addresses:
● 00001 to 09999 for discrete outputs (coils)
● 10001 to 19999 for discrete inputs (contacts)
● 30001 to 39999 for input registers
● 40001 to 49999 and 400001 to 465535 for holding registers
The addresses that the Modbus slave device supports determine the actual range of values
for Addr.
484
Operands
I, Q, M, S, SM, T, C, V, L (Power flow conditioned by a positive edge detection ele-
ment)
VB, IB, QB, MB, SB, SMB, LB, AC, Constant, *VD, *AC, *LD
VB, IB, QB, MB, SB, SMB, LB, AC, Constant, *VD, *AC, *LD
VD, ID, QD, MD, SD, SMD, LD, AC, Constant, *VD, *AC, *LD
VW, IW, QW, MW, SW, SMW, LW, AC, Constant, *VD, *AC, *LD
&VB
I, Q, M, S, SM, T, C, V, L
VB, IB, QB, MB, SB, SMB, LB, AC, *VD, *AC, *LD
System Manual, V2.3, 07/2017, A5E03822230-AF
S7-200 SMART

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart

Table of Contents