Modbus Function Descriptions; Introduction; Code 01 - Read Coil Status; Read Coil Status Example - Request - Siemens SIMATIC TI500 User Manual

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

Advertisement

C.2

Modbus Function Descriptions

Introduction

Code 01 — Read
Coil Status
!
WARNING
C-6
Modbus Commands
In the descriptions that follow, each function starts on a separate page and
includes the TIWAY primitive sent to the secondary in square brackets. For
each function, an example of request and response is given.
Code 01 enables the user to read the On/Off values of logic coils. The data
passed with this command is the start address and the number of coils to be
read. Addressing is sequential up to the maximum memory size for a
particular PLC. The maximum number of coils that can be addressed with
one command is 2000. If more are requested, the whole command will be
rejected with an Exception code 03.
SIMATIC TI PLCs number memory locations starting at address 1.
Modbus PLCs number areas of memory starting from address 0.
Failure to alter host computer application programs may result in
the wrong bits being read.
Example:
Request:
07 01 000A 0005 XXXX
Figure C-3 Read Coil Status Example — Request
This request is asking the Gateway to return the data from 5 coils (On/Off)
starting at the 10th coil.
[This is equivalent to sending a TIWAY Primitive 20 request using TT-type 7
(Packed Discrete Outputs) or TT-type 8 (C Packed), depending on the
position of Switch 10 of the network dipswitch bank in the Gateway.]
Checksum (XXXX)
Number of points (0005)
Start point (000A)
Function code (01)
Slave address (07)
TIWAY I Gateway User Manual
I000000

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents