Modbus Rtu Slave; Using The Modbus Slave Instructions - Siemens Simatic S7 Series System Manual

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

Advertisement

MBUS_MSG
error codes
8
11
12
101
102
103
104
105
106
107
108
9.3.3

Modbus RTU slave

9.3.3.1

Using the Modbus slave instructions

Procedure
To use the Modbus slave instructions in your S7-200 SMART program, follow these steps:
1. Insert the MBUS_INIT instruction in your program and execute the MBUS_INIT instruction
for one scan only. You can use the MBUS_INIT instruction either to initiate or to change
the communications parameters. When you insert the MBUS_INIT instruction, several
hidden subroutines and interrupt routines are automatically added to your program.
2. Click the Memory button
assign a starting address for the V memory that the Modbus library requires. Alternatively,
you can right-click the Program Block node in the project tree and select "Library
Memory" from the context menu. In addition to this V memory block, you define another V
memory block with the HoldStart and MaxHold parameters of MBUS_INIT. Be careful that
your program assignments in V memory do not overlap. If there is any overlap of the
memory areas, the MBUS_INIT instruction returns an error.
S7-200 SMART
System Manual, 09/2015, A5E03822230-AC
Description
CRC error in response: The transmission was disturbed and possibly incorrect data
was received. This error is usually caused by an electrical problem such as incorrect
wiring or electrical noise affecting the communication.
Invalid port number
Signal board port 1 missing or not configured
Slave does not support the requested function at this address: See the required
Modbus slave function support table in the "Using the Modbus master Instructions"
help topic.
Slave does not support the data address: The requested address range of Addr plus
Count is outside the allowed address range of the slave.
Slave does not support the data type: The Addr type is not supported by the slave
device.
Slave device failure
Slave accepted the message but the response is delayed: This is an error for
MBUS_MSG and the user program should resend the request at a later time.
Slave is busy and rejected the message: You can try the same request again to get a
response.
Slave rejected the message for an unknown reason.
Slave memory parity error: There is an error in the slave device.
from the Libraries area of the File menu ribbon strip to
Libraries
9.3 Modbus library instructions
443

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart series

Table of Contents