Elam SAM

April 29, 2018 | Author: Luis Alvarado Mujica | Category: Data, Computer Hardware, Electrical Engineering, Data Transmission, Digital Technology


Comments



Description

COMM.MODULE ELAM SPECS June 1, 2000 ELAM Extended Lufkin Automation Modbus Date: 9/18/2003 Version: 1.02 Author: David Pinnell References: DXREM - Bobby Bramlett Distribution: Approvals _____________________________________________ (Engineering) _____________________________________________ (Tech Service) ELAM SPECS 1.0 REVISION HISTORY Rev Date Author Description 0.01 5/24/00 D. Pinnell Edited DXREM documents to create ELAM. 0.02 5/25/00 D. Dorado Minor corrections made 1.00 5/26/00 D. Pinnell Document Released 1.01 6/01/00 E. Oestreich Changes made that separate L2K from MPC (Multiple Writes) 1.02 9/18/03 E. Oestreich Corrected the ELAM Message Error Codes 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 STANDARD MODBUS or STANDARD MODBUS PROTOCOL is defined in the Gould Modbus Specification. STANDARD MODBUS utilizes conventional Modbus addressing, i.e., maximum of 247 addresses and a maximum of 125 registers per request. 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. 4.0 MODBUS OVERVIEW A STANDARD MODBUS (RTU or Binary) PROTOCOL message frame looks like this: ADDRESS FUNCTION DATA CRC 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”. 5.0 COMPATIBILITY WITH EXISTING MODBUS DEVICES 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 6.0 EXTENDING THE MODBUS ADDRESS 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: ( 248 + 211 ) = ( 248 +2047 ) = 2295 (max) 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. 7.0 GLOBAL MESSAGE SUPPORT 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). 8.0 MASTER STATION SUPPORT 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 For example an address of 128 would be sent: Standard Modbus ADDRESS FUNCTION CODE DATA CRC 0x10000000 0xXX …. …. Standard Modbus Reply: ADDRESS FUNCTION # OF BYTES DATA CRC CODE HIGH 0x10000000 …. …. …. …. An address of 278 would be sent as: ELAM ADDRESS HIGH ADDRESS LOW FUNCTION DATA CRC CODE 0x11111000 0x00011110 …. …. …. ELAM Block Reply: ADDRESS ADDRESS FUNCTION # OF BYTES # OF BYTES DATA CRC HIGH LOW CODE HIGH LOW 0x11111000 0x00011110 …. …. …. …. …. Number of bytes, data, and CRC follows the same format at Standard Modbus documented in the Gould specification. 5 ELAM SPECS 9.0 ELAM SUPPORTED FUNCTION CODE ELAM will support all function Codes supported by STANDARD MOBUS such as: FUNCTION CODE MEANING ACTION 01 Read Coil Status Obtains current status (ON/OFF) of a group of logic coils. 02 Read Input Status Obtain current status (ON/OFF) of a group of discrete inputs. 03 Read Holding Register Obtain current binary value in one or more holding registers. 04 Read Input Register Obtain current binary value in one or more input registers. 05 Force Single Coil Force logic coil to a state of ON or OFF 06 Preset Single Register Place specific binary value into holding registers. 15 Force Multiple Coils Force a series of consecutive logic coils to defined ON or OFF states 16 Preset Multiple Registers Places specific binary values into a series of consecutive holding registers 6 ELAM SPECS 10.0 ELAM ERROR MESSAGE CODE ERROR CODE NAME MEANING 01 Illegal Function The message function received is not an allowable action for addressed slave. If a poll command was issued, indicates no program function preceded it. 02 Illegal Data Address The address referenced in the data field is not an allowable address for the addressed slave location. 03 Illegal Data Value The value referenced in the data field is not allowable in the addressed slave location. 12 Illegal Number of Multiple More than the allowed 20 read blocks Read Blocks Requested was requested. 13 Multiple Read Block CRC A bad CRC was detected in one of the Error multiple read blocks. 14 Inconsistent Address In One of the multiple read blocks Multiple Read Block contains an address inconsistent with the other blocks. 16 Illegal ELAM Byte Count ELAM illegal message use by BLOCK READ REGISTERS FEATURE. This means that the requested number of bytes exceeds the maximum allowable limit. 2,500 registers per request. Also is total registers requested in multi- read request blocks. 11.0 ELAM MULTIPLE INSTRUCTION REQUESTS 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. Function Code Function codes 1, 2, 3, 4, 5, 6, 15, and 16 only Supported: Max Number of 2,500 registers Registers: Limitation: • Available only with RTU addresses between 248 and 2295. • Up to 20 request blocks/messages may be sent back to back. 7 ELAM SPECS 12.0 MULTIPLE INSTRUCTION REQUEST: 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. MAXIMUM 20 REQUEST BLOCKS / MAXIMUM 2,500 TOTAL REGISTERS ELAM Request ELAM Request ………… ELAM Request Block 1 Bock 2 Block 20 ELAM Address FUCTION DATA CRC Note: Maximum total registers requested by all blocks in one message is 2,500. A Multiple Block Reply with 20 Blocks: ELAM REPLY ELAM REPLY ………… ELAM REPLY Block 1 Bock 2 Block 20 ELAM ADDRESS FUNCTION # of Bytes DATA CRC 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. 14.0 REGISTERS AND PUMP-OFF CONTRLLERS 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. 15.0 ELAM Rules: • 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: SUPPORT STANDARD MODBUS ELAM Max Addressable RTU 247 248 – 2295 Global Message Supported Supported Function Code Supported Function Code: 1,2,3,4,5,6,15 Function Code: and 16 1,2,3,4,5,6,15 and 16 Error Messages Error Code: Error Code: (ELAM adds special codes) 01,02 and 03 01, 02, 03, 12, 13, 14, and 16 Extended Registers Range Not supported Supported under function code 1, 2, 3, and 4 only. Max Number of Register for Not Supported 2,500 Extended Register Requests Multi-Instruction Blocks Not Supported Up to 20 Firmware Version Standard to all Firmware To be announced. Automatic Protocol Detection Supported Supported 10
Copyright © 2024 DOKUMEN.SITE Inc.