Beruflich Dokumente
Kultur Dokumente
MODULE
ELAM SPECS
June 1, 2000
ELAM
Extended Lufkin Automation Modbus
Date: 9/18/2003
Version: 1.02
Distribution:
Approvals
_____________________________________________ (Engineering)
2
ELAM SPECS
2.0 OVERVIEW
This document contains details on extended Modbus Protocol otherwise known as ELAM
(Extended Lufkin Automation Modbus ) ELAM is a Lufkin Automation proprietary protocol
which adds several features to further enhance the Standard Modbus Protocol. This protocol is
used for the purpose of communicating with Lufkin Automation controllers and other compatible
devices.
3.0 NOTATION
ELAM PROTOCOL is capable of addressing up to 2295 addresses and contains several features
that greatly enhance its operation.
Devices known as RTUs (Remote Terminal Units) refer to any Device such as PLCs, Lufkin
Automation controllers, or any device utilizing the Modbus Protocol to communicate.
A STANDARD MODBUS (RTU or Binary) PROTOCOL message frame looks like this:
The address field is one byte (8 bits) and limited to device addresses of 0 – 247. Address 0 is a
global address for all RTUs. Discrete RTU addresses are limited to 1 – 247. See the Gould
Modbus Specification for further details on “Modbus RTU”.
Many oilfields have existing RTUs on-site which are using the Modbus RTU Protocol for
communications. These devices could be third party RTUs or existing Lufkin Automation
controllers. The optimum solution should have the least impact on existing systems, and yet
expand the available address range in order to add more than 247 RTUs or controllers on the
same communications channel. To meet this requirement, Lufkin Automation has developed
ELAM in order to address up to 2,295 RTUs on the same communications channel. These
devices may be a combination of existing Modbus RTUs that are limited to addresses of 1-247
and ELAM compatible controllers that utilize the extended addressing and additional features.
3
ELAM SPECS
When examining the Standard Modbus address scheme, according to the specification the address
range of 248 – 255 are unused. Standard Modbus RTUs ignore these addresses. By using this
gap in the Standard 8 Bit Modbus addresses, ELAM compatible RTUs will be able to use the
addresses above 247. An ELAM RTU will look for a Modbus address between 248 and 255 in
the first address byte. If the ELAM RTU sees an address between 248 and 255, it will mask off
the high 5 bits of the Modbus address leaving the lower 3 bits. These 3 bits will be added as
MSB to the next address byte and combined will make an 11 bit address. Showing the detail of
this extended address scheme, an ELAM message block would look like:
MSB LSB
248 + Bit 11 Æ Bit 0
HIGH ADDR LOW ADDR FUNCTION DATA CRC
0x11111XXX 0xXXXXXXXX 0xXX …… …..
The ELAM RTU’s effective address would be 248 (represented by the 5 MSBs of the high
address byte) plus the 11 bit extended address. The effective address is calculated by:
In other words, ELAM is detected by decoding an address of 248 (every time) plus the
11 bit address.
Therefore, an ELAM RTU must be addressed within the range of 248 and 2295.
The Standard Modbus protocol specifies that an address of 0 (zero) indicates the message is
global and that all Modbus RTUs will listen for a command. ELAM supports global addressing
with write commands only (function codes 05, 06, 15, and 16).
For Master software to support the Extended Modbus Slave addressing, it must be able to send a
two byte address. The second address byte follows the first address byte just before the function
code. For addresses between 0 and 247 the Host (or Master) station would send a single byte
address and follow the Standard Modbus message scheme. No additional features of ELAM are
available in this address range. For addresses 248 – 2295, the Master Station would have to send
a 16 bit address. The high 5 bits of the 16 bit addresses would have to be set, with the lower 11
bits set to equal the address minus 248.
4
ELAM SPECS
Standard Modbus
ELAM
Number of bytes, data, and CRC follows the same format at Standard Modbus documented in the
Gould specification.
5
ELAM SPECS
ELAM will support all function Codes supported by STANDARD MOBUS such as:
6
ELAM SPECS
ELAM provides a feature that allows the Master Station to request back to back multiple read and
write message blocks. Each single request within the multiple instruction request will follow
ELAM format. Of course with mulitple message blocks, each may contain different function
codes and register address ranges. ELAM allows the Master Station to request up to 2,500
consecutive registers at once. This feature allows large blocks of data, such as dynagraph cards,
to be collected in one transmission. This feature also allows a maximum of 1,200 registers to be
written. This is due to the fact that writes still follow the Modbus standards of maximum writes of
60 registers. Reads and writes may be intermixed in the multiple instruction request, regardless
of their order.
7
ELAM SPECS
The RTU will accept Standard Modbus single block request messages in either Standard Modbus
or ELAM format. An ELAM addressed RTU will be able to process Multiple Instruction
Requests. For our purposes “Request Blocks” are defined simply as a single Modbus request
message. Each block is structured the same as an individual read request. It includes an address,
function code, register pointer, register quantity, and CRC. Multiple Blocks means that up to 20
request blocks or messages may be sent “back to back” to the controller. Message blocks must
stream into the controller back to back with no spaces between the characters. If a space of more
than 3.5 characters in time is detected the controller considers the block of requests complete and
process the message.
The RTU will evaluate each message block separately as if each block were a single request. If
the CRC doesn’t check correctly in a block then, an error message will be sent as the reply in that
block. If any error is found in a block, then only an error message will be sent for that block and
the rest of the message will be ignored. This is due to the fact that with a bad CRC, there is no
way to determine the exact structure of the rest of the request.
A Multiple Block Request message from Modbus Master with 20 request blocks.
Note: Maximum total registers requested by all blocks in one message is 2,500.
8
ELAM SPECS
13.0 Registers
With ELAM, the maximum number of registers requested by the Master Station is 2,500. Note
that the address of the controller must be between 248-2295 in order to enable ELAM. ELAM not
only extends the number of controllers beyond the conventional Modbus range of 1 – 247, but
allows you to request up to 2,500 registers in either single or multiple read block requests. Write
requests will be consistent with Standard Modbus defintions. The only difference between
Modbus write messages and ELAM write messages is that ELAM uses 16 bit addressing. You
may use a mix of any of the function codes supported by ELAM. It is important to know that when
using Multiple Instruction Requests, the maximum total registers requested from all blocks is
2,500. So, if you are using extended addressing and are requesting 2,400 registers in one block
and 100 registers in a second block, no additional registers may be requested. If the total
exceeds 2,500 registers an error message will be reported. If the 2,500 register maximum is
exceeded by the third instruction, replies for the first two instructions will be sent with an error
message for the third message.
If the address is between 1 – 127, then Standard Modbus rules apply. Only a single request
block with not more than 125 registers will be accepted.
Collecting 200 pairs of load and position data, it will take 2,000 registers to collect 5
cards. This will still allow another 500 registers in addition to card data to be requested
in one multiple request block.
• The controller will evaluate a request if the received data stream stops for a time period of 3.5
characters or more.
• An RTU will accept from 1 to 20 message request blocks. The message blocks must be
received in one continuous stream.
• A maximum total of 2,500 registers may be requested in a single or multiple request block
message. The total of all registers requested in one or more request blocks is 2,500.
• The format and value of the address must be consistent in each block of a multi-block
message. If there is any inconsistency, an error will be reported and the rest of the request
blocks will be discarded.
• If more than 2,500 registers are requested from the controller in one multi-block request, the
controller will respond with a single error code.
• If a function code other than 01, 02, 03, 04, 05, 06, 15, or 16 is received in any of the blocks
in a multiple block request, the controller will return an error code for that block and discard
the remaining blocks.
• If the CRC check fails in one of the blocks in a multiple block request message, the RTU will
send an error message for that block and discard the remaining blocks.
9
ELAM SPECS
Summary:
10