Writing Variables; Example: Read The Acc Parameter - Danaher Motion s200 User Manual

Position node
Table of Contents

Advertisement

9.5.2 Writing Variables

To write variables use the Modbus Function 'Write Multiple Registers'. As found in the Modbus
documents the serial communications model for a variable write is presented as follows:
UA
FC = 16 Address(16bit) Register count (16bit) Length Data CRC
Where:
UA is the unit address of the drive as set by rotary switches S11 and S12.
FC is the Write Multiple Registers function code (16 decimal = 0x10)
Register Count - Data length will be 2 (Data count)
Data will be the 32 bit value of the variable read. Variable type may be Long or Float
As defined by Modbus, the S200 Position Node product will respond with the value set in those
registers:
UA FC = 16 Address(16bit) Number of Registers(16bit) CRC
Where:
UA is the unit address echoed back.
FC is the function code echoed back (16d / 0x10).
Address is the address of the registers written echoed back.
Number of registers (written) echoed back - will be 2 (Data count)

9.6.3 Example: Read the ACC parameter

The following example on how to read the value of the ACC registers is presented. The
guidelines in the example are as follows:
Unit address is 2 (S11 = 2, S12 = 0)
The actual value of ACC in the drive is 10,000 decimal / 0x2710
From the table, the address of ACC is 2 and the data type is long.
As defined in above text, all variables are 32 bit constructed with 2 contiguous 16 bit registers.
Transmit the request to read the value of ACC:
0x02 0x03 0x00 0x02 0x00 0x02 CRC low CRC hi
Response from the S200 Position Node:
0x02 0x03 0x04 0x00 0x00 0x27
An actual communications monitor report for this communication transaction looks like the
following:
57
0x10 CRC low CRC hi

Advertisement

Table of Contents
loading

Table of Contents