Siemens Simatic S7 Series System Manual page 439

Hide thumbs Also See for Simatic S7 Series:
Table of Contents

Advertisement

Only one MBUS_MSG instruction can be active at a time. If there is more than one
MBUS_MSG instruction enabled, the first MBUS_MSG instruction executed will be
processed and all subsequent MBUS_MSG instructions will abort with an error code 6.
Table 9- 25
Parameters for the MBUS_MSG instruction
Parameter
Data type
First
BOOL
Slave
BYTE
RW
BYTE
Addr
DWORD
Count
INT
DataPtr
DWORD
Done
BOOL
Error
BYTE
Parameter First should be ON for only one scan when there is a new request to send. The
First input should be pulsed on through an edge detection element (for example, Positive
Edge) which will cause the request to be transmitted one time. See the example program 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 and can only be used for write requests. There is
no response to a broadcast request to address 0. Not all slave devices will support the
broadcast address. The S7-200 SMART Modbus slave library does not support the
broadcast address.
Parameter RW assigns if this message is to be a read or a write. The following two values
are allowed for RW: 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. The following ranges of values are allowed:
● 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 actual range of values for Addr are based on the addresses that the Modbus slave
device supports.
Parameter Count assigns the number of data elements to read or write in this request. The
Count will be the number of bits for the bit data types, and the number of words for the word
data types.
● Address 0xxxx Count is the number of bits to read or write
● Address 1xxxx Count is the number of bits to read
● Address 3xxxx Count is the number of input register words to read
● Address 4xxxx or 4yyyyy Count is the number of holding register words to read or write
S7-200 SMART
System Manual, 09/2015, A5E03822230-AC
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
Libraries
9.3 Modbus library instructions
439

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart series

Table of Contents