beautypg.com

Writing data, Reading data, Writing data reading data – Watlow CLS200, MLS300 and CAS200 User Manual

Page 36

background image

30 Communications Specification

Chapter 2: Modbus-RTU Protocol

Writing Data

Watlow Anafaze controller memory is divided into approximately 100
parameters with unique control functions, such as temperature, set
point, etc. Each parameter can have several Modbus-RTU addresses
associated with it. When a Modbus-RTU host writes data to a controller
parameter, the data sent may “command” controller firmware to perform
specific functions. While host writes to multiple registers are permitted
within a parameter, controller function hierarchies necessitate that only
one parameter may be written at a time. Any data written past a
parameter boundary is simply rejected.

Reading Data

The same parameter-based model is used for reading data from the
controller’s Modbus-RTU interface. Modbus-RTU allows multiple
register block reads for all types of registers. While Watlow Anafaze
Modbus-RTU allows this type of read function, unexpected results may
occur when reading registers that span across the boundaries of more
than one parameter. A query from a Modbus-RTU host starts specific
firmware processes that allow data to be formatted properly for the
Modbus-RTU host. The sequence proceeds as follows:

(1) A query for data comes in from a Modbus-RTU host.

(2) The controller determines what parameter among the hundred or so

is being queried.

(3) The data format from internal memory is converted for a Modbus-

RTU interface.

(a) Data for registers 40001 to 49999 and registers 30001 to

39999 are always two bytes in length. If the internal con-
troller memory is in bit or byte size, the data is padded
appropriately.

(b) The byte order from internal memory is LSB to MSB (least

significant byte to most significant byte. For example, the
LSB first value for 550.0° would be x7C 15. The MSB first
value would be x15 7C.) while the Modbus-RTU is MSB to
LSB. Bytes are swapped as needed.

(4) Parameter data is sent to the Modbus-RTU interface.

When data from adjacent parameters is read and the parameters share
the same data type (bit, byte or integer), the information is formatted
correctly. However, if they do not share the same data type, host
software could be written to pad and/or swap bytes as necessary.