Code 02 - Read Input Status; Read Input Status Example - Request; Read Input Status Example - Response - Siemens SIMATIC TI500 User Manual

Tiway 1
Hide thumbs Also See for SIMATIC TI500:
Table of Contents

Advertisement

Modbus Function Descriptions (continued)
Code 02 — Read
Input Status
C-8
Modbus Commands
Code 02 allows the application to read a series of discrete inputs. The
command includes the start address and the number of points to be read.
Addressing is sequential up to the maximum memory size for a particular
PLC. The maximum number of inputs that can be addressed with one
command is 2000. If more are requested, the whole command will be
rejected with an Exception code 03.
Example:
Request:
07 02 000A 0005 XXXX
Figure C-6 Read Input Status Example — Request
This request is for the data from 5 discrete inputs (On/Off) starting at the
10th input.
[This command is equivalent to sending a TIWAY I Primitive 20 request
using TT-type 6 (Packed Discrete Inputs)].
Response:
07 02 01 1A XXXX
Figure C-7 Read Input Status Example — Response
Checksum (XXXX)
Number of points (0005)
Start point (000A)
Function code (02)
Slave address (07)
Checksum (XXXX)
Data (1A)
Number of bytes (01)
Function code (02)
Slave address (07)
TIWAY I Gateway User Manual
I000000
I000000

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents