-53-
Appendix 2B
BASF
EXACTUS
®
MODBUS Communication
Introduction
The following appendix describes the Modbus RTU communication protocol interface for the BASF optical
pyrometer. The protocol provides the means for a host computer or PLC to read the pyrometer
temperature and photodiode current values. The pyrometer’s configuration and calibration settings are
also made accessible through the Modbus protocol.
The Modbus protocol is the default communications protocol implemented by the BASF pyrometer. In
Modbus mode, the electrical interface of the pyrometer is full-duplex RS-422. The baud rate and address
used by the pyrometer for Modbus communications are set using TemperaSure
®
. Default parameters are
baud=115200, address=0x01. To change the parameters, run the pyrometer under TemperaSure
®
and
open the Probe Parameters window by clicking on the pyrometer name. Select the Modbus tab and set
the baud rate and address. Be sure to save the parameters before exiting (See User’s Manual for
differences between ‘Apply’ and ‘Save’).
When the probe is connected to a computer running TemperaSure
®
, it will be taken out of Modbus mode
and put into a special mode for communication with TemperaSure
®
. To return the probe to Modbus
mode, disconnect the probe from the computer and cycle the power to the probe.
Getting Started
If possible, run the process while measuring temperature with the probe connected to the TemperaSure
®
software. This software allows for graphical plotting of temperature over time and easy adjustment of
probe settings to optimize the measurement. One of the important pyrometer configuration settings is the
measurement Update Rate, located at Modbus register address 0x1011. This setting is called the Graph
Rate in the TemperaSure
®
software. If the Update Rate is slower than the rate at which data is polled
from the probe by the host computer or PLC, repeat readings will result. Too high of an update rate will
lead to noisy measurements at the bottom end of the measurement range. If high polling rates are
required, and noise at the lower end becomes a problem, the probe can be programmed to average out
the noise at low temperatures (see Averaging Table and Low Temperature Signal Averaging in the User’s
Manual).
Programming
The pyrometer implements a subset of the functions defined in the Modbus RTU protocol. A detailed
description of the Modbus RTU protocol standard can be found at
www.modbus.org
.
The following Modbus function codes are supported by the pyrometer:
Function 01h: Read Coil Status
Function 03h: Read Holding Registers
Function 05h: Force Single Coil
Function 06h: Preset Single Register
Function 0Fh: Force Multiple Coils
Function 10h: Preset Multiple 4XXXX Registers
Function 17h: Read/Write 4XXXX Registers
Accessing Pyrometer Readings
For most applications, only Modbus Function 03h (Read Holding Registers) will be required. This function can be
used to obtain 1 or more floating point values from the pyrometer. Pyrometer temperature and current data values
are read in the address block 0000h-0FFFh and are represented as 32-bit floating point values.
Floating Point Value Format
The floating-point values accessible through Modbus registers are represented in the 32-bit IEEE-754
reverse format. Each value occupies two register locations and is always located beginning with the
upper 16 bits of the value at an even register address followed by the lower 16 bits at an odd address.
The following example shows how the temperature reading is stored in the register memory: