Siemens SIMATIC S7-200 System Manual page 368

Programmable controller
Hide thumbs Also See for SIMATIC S7-200:
Table of Contents

Advertisement

S7-200 Programmable Controller System Manual
The parameter MaxAI sets the number of word input (AI) registers available to Modbus address
3xxxx at values of 0 to 32. A value of 0 disables reads of the analog inputs. The suggested value
for MaxAI to allow access to all of the S7-200 analog inputs, is as follows:
0 for CPU 221
-
16 for CPU 222
-
32 for CPU 224, CPU 224XP, and CPU 226
-
The parameter MaxHold sets the number of word holding registers in V memory available to
Modbus address 4xxxx. For example, to allow the master to access 2000 bytes of V memory, set
MaxHold to a value of 1000 words (holding registers).
The parameter HoldStart is the address of the start of the holding registers in V memory. This
value is generally set to VB0, so the parameter HoldStart is set to &VB0 (address of VB0). Other V
memory addresses can be specified as the starting address for the holding registers to allow VB0
to be used elsewhere in the project. The Modbus master has access to MaxHold number of words
of V memory starting at HoldStart.
When the MBUS_INIT instruction completes, the Done output is turned on. The Error output byte
contains the result of executing the instruction. Table 12-6 defines the error conditions that could
result from executing the instruction.
MBUS_SLAVE Instruction
The MBUS_SLAVE instruction is used to service a request
from the Modbus master and must be executed every scan
to allow it to check for and respond to Modbus requests.
The instruction is executed on each scan when the EN
input is on.
The MBUS_SLAVE instruction has no input parameters.
The Done output is on when the MBUS_SLAVE instruction
responds to a Modbus request. The Done output is turned
off if there was no request serviced.
The Error output contains the result of executing the
instruction. This output is only valid if Done is on. If Done is
off, the error parameter is not changed. Table 12-6 defines
the error conditions that could result from executing the
instruction.
Table 12-5
Parameters for the MBUS_SLAVE Instruction
Parameter
Done
Error
Table 12-6
Modbus Slave Protocol Execution Error Codes
Error Codes
0
1
2
3
4
5
6
7
8
9
10
354
Data Type
Operands
BOOL
I, Q, M, S, SM, T, C, V, L
BYTE
VB, IB, QB, MB, SB, SMB, LB, AC, *VD, *AC, *LD
Description
No Error
Memory range error
Illegal baud rate or parity
Illegal slave address
Illegal value for Modbus parameter
Holding registers overlap Modbus Slave symbols
Receive parity error
Receive CRC error
Illegal function request/function not supported
Illegal memory address in request
Slave function not enabled

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents