EasyManua.ls Logo

Siemens SIMATIC S7 - Page 484

Siemens SIMATIC S7
866 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...
Libraries
9.3 Modbus RTU library
S7-200 SMART
484 System Manual, V2.3, 07/2017, A5E03822230-AF
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
Operands
First BOOL I, Q, M, S, SM, T, C, V, L (Power flow conditioned by a positive edge detection ele-
ment)
Slave
BYTE
VB, IB, QB, MB, SB, SMB, LB, AC, Constant, *VD, *AC, *LD
RW
BYTE
VB, IB, QB, MB, SB, SMB, LB, AC, Constant, *VD, *AC, *LD
Addr DWORD VD, ID, QD, MD, SD, SMD, LD, AC, Constant, *VD, *AC, *LD
Count
INT
VW, IW, QW, MW, SW, SMW, LW, AC, Constant, *VD, *AC, *LD
DataPtr
DWORD
&VB
Done
BOOL
I, Q, M, S, SM, T, C, V, L
Error
BYTE
VB, IB, QB, MB, SB, SMB, LB, AC, *VD, *AC, *LD
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.

Table of Contents

Other manuals for Siemens SIMATIC S7

Related product manuals