Preset single register (function code 06), Diagnostics (function code 08) – ProSoft Technology MVI69L-MBTCP User Manual

Page 115

Advertising
background image

MVI69L-MBTCP ♦ CompactLogix Platform

Reference

Communication Module

User Manual

ProSoft Technology, Inc.

Page 115 of 152

January 6, 2014

7.2.7 Preset Single Register (Function Code 06)

Query
This Function Code allows the user to modify the contents of a Modbus 4x range
in the server. This will write to a single register only. Any holding register that
exists within the controller can have its contents changed by this message.
However, because the controller is actively scanning, it also can alter the content
of any holding register at any time. The values are provided in binary up to the
maximum capacity of the controller unused high order bits must be set to zero.
When used with Server address zero (Broadcast mode) all Server controllers will
load the specified register with the contents specified.

Note Functions 5, 6, 15, and 16 are the only messages that will be recognized as valid for

broadcast.

Th

e example below is a request to write the value ‘3’ to register 40002 in server

11.

Node
Address

Function
Code

Data Start
Point High

Data Start
Point Low

Preset Data
Register

High

Preset Data
Register

Low

Error Check
Field (2 bytes)

0B

06

00

01

00

03

CRC


Response
The response to a preset single register request is to re-transmit the query
message after the register has been altered.

Node

Address

Function

Code

Data Register

High

Data Register

Low

Preset Data

Register High

Preset Data

Register Low

Error Check

Field (2 bytes)

0B

06

00

01

00

03

CRC

7.2.8 Diagnostics (Function Code 08)

This Function Code provides a series of tests for checking the communication
system between a Client device and a server, or for checking various internal
error conditions within a server.

The function uses a two-byte sub-function code field in the query to define the
type of test to be performed. The server echoes both the function code and sub-
function code in a normal response. Some of the diagnostics commands cause
data to be returned from the remote device in the data field of a normal response.

Advertising