User manual

IEC61131 User and Reference Manual
April 22, 2008
408
Variable Types
There are ranges of Enron registers to hold short integers, long integers and single precision
floats. The ranges are as follows.
Range
Data Type
1001 - 1999
Boolean
3001 - 3999
Short integer
5001 - 5999
Long integer
7000 - 9999
Float
In general, both Numeric and Boolean function codes can be used to read and write all types
of registers. Consult the Enron Modbus specification for details.
Boolean Registers
Enron Modbus Boolean registers are usually numbered 1001 to 1999.
Boolean registers are read using Modbus command 1. Boolean registers are written using
Modbus command 5 for single registers and 15 for multiple registers.
The address offset in the message is equal to the register number.
The number of Modbus registers is equal to the number of Enron registers.
The response format is identical to the Modbus response format.
Short Integer Registers
Enron Modbus Short Integer registers are usually numbered 3001 to 3999.
Short Integer registers are read using Modbus command 3. Short Integer registers are
written using Modbus command 6 for single registers and 16 for multiple registers.
The address offset in the message is equal to the register number.
The number of Modbus registers is equal to the number of Enron registers.
The response format is identical to the Modbus response format.
Long Integer Registers
Enron Modbus Long Integer registers are usually numbered 5001 to 5999.
Long Integer registers are read using Modbus command 3. Long Integer registers are written
using Modbus command 6 for single registers and 16 for multiple registers.
The address offset in the message is equal to the register number.
The number of Modbus registers requested is equal to the number of Enron registers.
The number of Modbus registers expected in the response is equal to two times the number
of Enron registers.
Floating Point Registers
Enron Modbus Floating-point registers are usually numbered 7001 to 7999.
Floating-point registers are read using Modbus command 3. Floating-point registers are
written using Modbus command 6 for single registers and 16 for multiple registers.
The address offset in the message is equal to the register number.
The number of Modbus registers requested is equal to the number of Enron registers.
The number of Modbus registers expected in the response is equal to two times the number
of Enron registers.