beautypg.com

Chapter 6, Planning your application program, Adam-5000/tcp user’s manual – B&B Electronics ADAM-5000_TCP - Manual User Manual

Page 104

background image

Planning Your Application Program

Response message format for function code 08:

Chapter 6


Command Body

StationAddress

FunctionCode

Data bytes received

Example: 01 08 00 02 00 04

Function Code 15 (0F hex) Forces each coil in a

sequence of coils to either ON or OFF. Request message

format for function code 15:


Command Body

Requested Requested

Station Function

Start

Start

Numberof Numberof

Byte

Force

Force

Address

Code

Address Address

DataHigh DataLow

High Byte Low Byte Coil High

Byte

Coil Low

Byte

Count

Byte

Byte

Example: Request to force a series of 10 coils starting at address 00020

(14 hex) in ADAM-5000/TCP.

01 0F 00 14 00 0A 02 CD 01

The query data contents are two bytes: CD 01 hex, equal to
1100 1101 0000 0001 binary. The binary bits are mapped to the
addresses in the following way.

Bit:1 1 0 0 1 1 0 1 0 0 0 0 0 0 0 1

Address (000XX): 27 26 25 24 23 2221 20 -------------------2928

Response message format for function code 15:

The normal responses return the station address, function code, start
address, and requested number of coil forced.

Command Body

Station

Address

Function

Code

Start

Address
High Byte

Start

Address
Low Byte

Requested

Numberof Coil

High Byte

Requested

Numberof Coil

Low Byte

Example: 01 0F 00 14 00 0A





ADAM-5000/TCP User’s Manual






6-37