Ingersoll Rand System Automation VSD B Box or VSD mA Box MODBUS RTU User Manual

Before installing or starting this unit for the first time, this manual should be studied carefully to obtain a working knowledge of the unit and/or the duties to be performed while operating and maintaining the unit. RETAIN THIS MANUAL WITH UNIT. This Technical manual contains IMPORTANT SAFETY DATA and should be kept with the unit at all times.
More Than Air Answers.
Online answers: http://www.air.irco.com
Ingersoll Rand
System Automation
VSD B Box or VSD mA Box
MODBUS RTU User’s Manual
C.C.N. : 80445000 REV. B DATE: JUNE 2009
2
SECTION 1 – TABLE OF CONTENTS
SECTION 1 – TABLE OF CONTENTS .................................................................................................................... 3
SECTION 2 - INTRODUCTION ................................................................................................................................ 4
SECTION 3 - SAFETY PRECAUTIONS .................................................................................................................. 4
SECTION 4 - MODBUS RTU ................................................................................................................................... 6
MODBUS TABLE(S) ............................................................................................................................................. 6
MODBUS RTU ...................................................................................................................................................... 6 U
COMMUNICATION LINK ...................................................................................................................................... 6
RS485 SERIAL DATA FORMAT ........................................................................................................................... 6
MESSAGE DATA FORMAT ................................................................................................................................. 6
SLAVE RESPONSE TIMEOUT ............................................................................................................................ 8
MESSAGE ANSWER FROM SLAVE TO MASTER .............................................................................................. 8
EXCEPTION RESPONSE .................................................................................................................................... 9
TROUBLESHOOTING ......................................................................................................................................... 9
SECTION 5 - MODBUS TABLE DESCRIPTION ................................................................................................... 10
TABLE ITEM FORMAT ....................................................................................................................................... 10
NAME AND FUNCTION ..................................................................................................................................... 10
CODING ............................................................................................................................................................. 10
MENU REFERENCE .......................................................................................................................................... 11
‘ADV’ ADVISE FUNCTION ................................................................................................................................. 11
‘ADV’ ADVISE FUNCTION SINGLE ITEM FORMAT OPTION ........................................................................ 11
‘CMD’ COMMAND FUNCTION ........................................................................................................................... 13
‘GET’ FUNCTION ............................................................................................................................................... 14
‘SET’ FUNCTION ................................................................................................................................................ 14
DATA CODING DEFINITIONS: .......................................................................................................................... 15
DATA TYPES ...................................................................................................................................................... 15
DATA UNITS ....................................................................................................................................................... 16
SECTION 6 - X-SERIES AIR SYSTEM .................................................................................................................. 18
SMG BOX ........................................................................................................................................................... 19
GENERAL X-SERIES SYSTEM COMPONENTS .............................................................................................. 19
X-SERIES NETWORK ADDRESSES................................................................................................................. 20
COMMUNICATION LINK .................................................................................................................................... 20
MODBUS TIMING............................................................................................................................................... 20
RS485 MODBUS SERIAL DATA FORMAT ........................................................................................................ 20
SECTION 7 – VSD B BOX OR VSD MA BOX MODBUS RTU DEFINITIONS ..................................................... 21
3
SECTION 2 - INTRODUCTION
System MODBUS Gateway (SMG Box) communication is RS485, RTU, Master-Slave configuration. The SMG Box acts as a transparent interface to enable a remote ‘master’ device to be able to communicate with the X-Series Units and th e Intellisys Controllers via the ir485 network ‘slave’ device(s). The MODBUS RTU data construction and formatting for a ‘master’ device is the subject of this document. This information is intended for a systems integrator to facilitate set-up of a ‘master’ device in order to communicate successfully with the X-Series Units and the Intellisys Controllers through a SMG Box.
SECTION 3 - SAFETY PRECAUTIONS
WARNING :
!
WARNING :
WARNING :
!
WARNING :
Before installing or operating the SYSTEM MODBUS GATEWAY (SMG) BOX, take time to carefully read all the instructions contained in this manual, all compressor manuals, and all manuals of any other peripheral devices that may be installed or connected to the unit.
Electricity and compressed air have the potential to cause severe personal injury or property damage.
The operator should use common sense and good working practices while operating and maintaining this system. All applicable codes should be strictly adhered to.
Maintenance must be performed by adequately qualified personnel that are equipped with the proper tools.
INSTALLATION
Installation work must only be carried out by a competent person under qualified supervision.
A fused isolation switch must be fitted between the main power supply and the SYSTEM MODBUS GATEWAY (SMG) BOX.
The SYSTEM MODBUS GATEWAY (SMG) BOX should be mounted in such a location as to allow operational and maintenance access without obstruction or hazard and to allow clear visibility of indicators at all times.
If raised platforms are required to provide access to the SYSTEM MODBUS GATEWAY (SMG) BOX, they must not interfere with normal operation or obstruct access. Platforms and stairs should be of grid or plate construction with safety rails on all open sides.
Risk of Danger
Risk of Electric Shock
Risk of High Pressure
Consult Manual
OPERATION
The SYSTEM MODBUS GATEWAY (SMG) BOX must only be operated by competent personnel under qualified supervision.
Never remove or tamper with safety devices, guards or insulation materials fitted to the SYSTEM MODBUS GATEWAY (SMG) BOX.
The SYSTEM MODBUS GATEWAY (SMG) BOX must only be operated at the supply voltage and frequency for which it is designed.
When main power is switched on, lethal voltages are present in the electrical circuits and extreme caution must be exercised whenever it is necessary to carry out any work on the unit.
Do not open access panels or touch electrical components while voltage is applied unless it is necessary for measurements, tests or adjustments. Such work should be carried out only by a qualified electrician equipped with the correct tools and wearing appropriate protection against electrical hazards.
All air compressors and/or other equipment connected to the unit should have a warning sign attached stating “THIS UNIT MAY START WITHOUT WARNING” next to the display panel.
If an air compressor and/or other equipment connected to the unit is to be started remotely, attach two warning signs to the equipment stating “THIS UNIT CAN BE STARTED REMOTELY”. Attach one sign in a prominent location on the outside of the equipment, and the other sign inside the equipment control compartment.
4
MAINTENANCE AND REPAIR
Maintenance, repairs or modifications must only be carried out by competent personnel under qualified supervision.
If replacement parts are required, use only genuine parts from the original equipment manufacturer, or an alternative approved source.
Carry out the following operations before opening or removing any access panels or carrying out any work on the SYSTEM MODBUS GATEWAY (SMG) BOX:
i. Isolate the SYSTEM MODBUS
GATEWAY (SMG) BOX from the main electrical power supply. Lock the isolator in the “OFF” position and remove the fuses.
ii. Attach labels to the isolator
switch and to the unit stating “WORK IN PROGRESS - DO NOT APPLY VOLTAGE”. Do not switch on electrical power or attempt to start the SYSTEM MODBUS GATEWAY (SMG) BOX if such a warning label is attached.
Make sure that all instructions concerning operation and maintenance are strictly followed and that the complete unit, with all accessories and safety devices, is kept in good working order.
The accuracy of sensor devices must be checked on a regular basis. They must be calibrated when acceptable tolerances are exceeded. Always ensure any pressure within the compressed air system is safely vented to atmosphere before attempting to remove or install a sensor device.
The SYSTEM MODBUS GATEWAY (SMG) BOX must only be cleaned with a damp cloth, using mild detergents if necessary. Avoid the use of any substances containing corrosive acids or alkalis.
Do not paint the control faceplate or obscure any indicators, controls, instructions or warnings
5
SECTION 4 - MODBUS RTU
MODBUS TABLE(S)
This document discusses generic MODBUS communications and how to implement the software specific ‘MODBUS Table’ information. MODBUS communication formatting may differ from controller to controller and you may require more than one ‘MODBUS Table’.
Always check the software variant identification and version number for a controller or unit with the variant and version of the ‘MODBUS Table’ supplied. In some instances the information contained in a ‘MODBUS Table’ may not be ap plicable to a controller or unit installed with the same software variant but a different version number.
MODBUS RTU
MODBUS RTU (Remote Terminal Unit) is a master-slave type protocol. An X-Series Automation System Controller or Intellisys Controller functions as the slave device. Information requests or commands are communicated from master to slave only through a System Modbus Gateway Box (SMG). The SMG Box will always respond to communications from a remote master device in accordance with the MODBUS RTU protocol standard.
The MODBUS protocol is used to communicate with personal computers (PC), Programmable Logic Controllers (PLC’s), or Distributed Control Systems (DCS) over the Network port. The SMG Box only responds to three MODBUS commands, Read Holding Register 03 (03 Hex), Preset Single Register 06 (06 Hex), and Preset Multip le Registers command 16 (10 Hex) (See Modicon MODBUS Protocol Reference Guide, PI-MBUS-300 Rev. J, for more details on MODBUS).
COMMUNICATION LINK
MODBUS is implemented using a two-wire RS485 industry standard communications link operating in master-slave mode.
Polarity of the two RS485 wires (L1+ and L2-) is important; reversal will disrupt communications.
RS485 SERIAL DATA FORMAT
The RS485 MODBUS port is a 2-wire operating with an asynchronous serial data format: 8 data bits / no parity / 1 stop - (8,N, 1) - transmitted at 9600 baud.
MESSAGE DATA FORMAT
The bytes of the MODBUS RTU message must be sent in one message package. The RTU protocol allows for a maximum pause of 1.5 byte-times between 2 consecutive bytes of a message.
A pause longer than 1.5 byte-times will render the message invalid and it will be ignored.
Message data format is dependant on function and will consist of a combination of the following elements:
1) Destination address (slave network address)
2) Function Code
3) Data start address (slave register start address)
4) Number of registers, number of bytes of data
5) Message data
6) CRC checksum
Message Destination Address
Slave
Address
Function
Code
Start
Address
Number of
Registers
CRC Check
Sum
01 03 40 06 00 02 30 CA
The ‘destination address’ must be correct for the ‘slave’ controller device for which the message is inten ded. An address can be from 01Hex to EFHex. The SMG Box is transparent and addresses must be for the destination ‘slave’ controller or unit. Each controller or unit must be set with a unique address.
6
Message Function Codes
Slave
Address
Function
Code
Start
Address
Number of
Registers
CRC Check
Sum
01 03 40 06 00 02 30 CA
The message function code defines the required data processing operation of the slave controller. Although several types of message function codes are defined by the MODBUS standard, only the message function code types working directl y with registers are implemented on controller units:
03H Read Holding Register(s) – Get (Get Data) or Adv (Advise Data) (X-Series) and Read (Intellisys) 06H Preset Single Register - Write (Intellisys Only) 10H Preset Multiple Registers – Set (Set Data) or Cmd (Command Instruction) (X-Series only)
Any other message function code type will result in an EXCEPTION response.
Message Data Start Address
Slave
Address
Function
Code
Start
Address
Number of
Registers
CRC Check
Sum
01 03 40 06 00 02 30 CA
The message data start address (16bit word) designates the initial register address location in the contr oller from which the data is processed. Start address information is contained in the ‘MODBUS Table’.
Note: high-byte transmitted first followed by low-byte.
Message Data
The message data content depends on the message function code type.
03H Read Holding Register(s) – Get (Get Data), Adv (Advise Data) (X-Series) or Read (Intellisys)
Slave
Address
Function
Code
Start
Address
Number of
Registers
CRC Check
Sum
01 03 40 06 00 02 30 CA
Slave address + function code ’03 Hex’ + start address of registers in slave memory + 16bit integer value that determines the size (in 16bit ‘word’ registers) of the message data being requested (00 02 = 2 registers of data). This is the number of 16bit registers to read. A maximum of 32 registers can be read at one time. This information is contained in the ‘MODBUS Table’.
06H Preset Single Register - Write (Intellisys Only)
Slave
Address
Function
Code
Start
Address
DATA
byte 0 byte 1
CRC Check
Sum
01 06 00 6F 00 5F FE BC
Slave address + function code ’06 Hex’ + start address of register(s) in slave memory to be set then the ‘data’ itself. This information is contained in the ‘MODBUS Table’.
10H Preset Multiple Registers – Set (Set Data) or Cmd (Command Instruction) (X-Series only)
Slave
Address
Function
Code
Start
Address
Number of
Registers To
Be Set
Number of
Bytes of
Data
DATA
1st Register
byte 0 byte 1
DATA 2nd Register byte 2 byte 3
CRC Check
Sum
01 10 40 18 00 02 04 00 00 1B 5F 88 0E
Slave address + function code ’10 Hex’ + start address of register(s) in slave memory to be set + 16bit (integer valve of the number of registers to be set) + 8bit ‘byte’ (integer value for the number of following data bytes) then the ‘data’ itself. This information is contained in the ‘MODBUS Table’.
Note: A function ’10 Hex’ Set message also requires an additional byte defining the number of ‘data’ bytes in the data message. This will always be the number of ‘registers’ multiplied by 2 as each ‘data’ register consists of 2 bytes (if number of ‘data’ registers = 2 then number of ‘data’ bytes = 4).
7
Message CRC Checksum
Slave
Address
Function
Code
Start
Address
Number of
Registers
CRC Check
Sum
01 03 40 06 00 02 30 CA
The CRC (Cyclical Redundancy Check) is a check-sum generated by means of ‘A001H polynomial’. The CRC is two bytes containing a 16-bit binary value (word). The CRC value is calculated by the transmitting device that
appends the CRC to the end of the message. The receiving device recalculates the CRC value prior to processing of a received message and compares the result to the actual CRC value appended to the message. If the two values do n ot match the message is regarded as invalid. The CRC is initiated by first preloading a 16bit register to all 1's (FFFF Hex). Then a process begins of applying each consecutive 8bit byte of the message to the register contents us ing an exclusive ‘OR’ calculation. The result is shifted one bit in the direction of the least significant bit (LSB), with the most significant bit (MSB) set at ‘0’. The LSB is then examined; if ‘1’ the register content is applied to the polynomial value ‘A001’ Hex (101 0 0000 0000 0001) using an exclusive ‘OR’ calculation - if ‘0’ no exclusive OR takes place. This process is repeated until eight ‘bit’ shifts have been performed. After the eighth bit shift, the next 8bit message byte is applied to the register contents using an exclusive ‘OR’ calculation. The bit shift and re-calculation process is then repeated again. When all message bytes have been processed the final content of the 16bit register is the message CRC value.
Only the 8bits of ‘data’ in each message character is used for generating the CRC; start, stop and parity bits are ignored. Note: When the 16bit CRC value is appended to a message, the low order byte must be transmitted first followed by the high order byte. An incorrect or byte reversed check sum will render the message invalid and it will be ignored.
SLAVE RESPONSE TIMEOUT
A slave controller may not answer immediately. Ensure the ‘slave timeout’ setting of the ‘master’ device is set to a value no less than 500ms. If the ‘slave’ device fails to receive a valid message due to a communication disruption, parity error, CRC error or other reasons, no response is given and the master must process a timeout condition in this instance. If the ‘slave’ receives a valid message that cannot be processed an exception response will be returned.
MESSAGE ANSWER FROM SLAVE TO MASTER
The format of the ‘slave’ controller answer is similar to the original master request format; the message data content depends on the message function code type.
The ‘address’ and ‘code’ of the slave answer is identical to the original request message; the address is the ‘slave’ device address and the ‘code’ is a repeat of received function code type from the master. The remainder of the message is dependant on the requested function code type. The CRC checksum is re-calculated for the answer message character s using the specified CRC process.
03Hex – Get: read from register (or ‘Adv’ Advise)
Slave
Address
Function
Code
Start
Address
Number of
Bytes of
Data
DATA
1st Register
byte 0 byte 1
DATA 2nd Register byte 2 byte 3
CRC Check
Sum
01 03 40 18 04 00 00 1B 5F BE 61
1) slave address 1byte
2) function code 1byte
3) bytes of data 1byte (number of bytes in ‘data’ answer)
4) data (high byte of each register transmitted first)
5) CRC checksum 2bytes (low byte first followed by high byte)
06Hex - Preset Single Register: write to single register
Slave Address Function Code Start Address
DATA
byte 0 byte 1
CRC Check Sum
01 06 00 6F 00 5F FE BC
1) slave address 1byte
2) function code 1byte
3) bytes of data 1byte (number of bytes in ‘data’ answer)
4) data (high byte of each register transmitted first)
5) CRC checksum 2bytes (low byte first followed by high byte)
8
10H Preset Multiple Registers – Set (Set Data) or Cmd (Command Instruction) (X-Series only)
Slave
Address
Function
Code
Start
Address
Number of
Registers
CRC Check
Sum
01 10 40 18 00 02 D4 0F
1) slave address 1byte
2) function code 1byte
3) number of registers set 2 bytes
4) CRC checksum 2 Bytes (low byte first followed by high byte)
EXCEPTION RESPONSE
If the ‘slave’ device receives a request that cannot be processed an ‘exception response’ is given. An exception response message consists of the following elements:
1) Slave Network Address (1 byte): Slave address identification
2) Function Code (1 byte): In a normal response, the slave repeats the function code of the original master request. All function codes have an MSB (most significant bit) of 0 (values are all below 80 hexadecimal). In an exception response, the slave sets the MSB of the function ‘code’ to 1. This makes the ‘code’ value 80 Hex greater than the received ‘code’ value from the master.
3) Data (1 byte): The ‘data’ response will contain a ‘1 byte’ value exception code.
4) CRC Checksum (2 byte).
CRC Check SumSlave Address Function Code Error Code
01 90 04 4D C3
Exception Codes:
01H Illegal Function Code
The requested ‘code’ function is not supported.
02H Illegal Data Address
The requested ‘data start address’ is not supported.
03H Illegal Data Value
The requested ‘data’ value is not supported.
04H Function Error
The slave cannot execute the request or the request type is inhibited.
TROUBLESHOOTING
Problem: No ‘slave’ response or corrupt MODBUS message Solution: Check that the ‘slave’ controller is set for the anticipated slave address
Check that all ‘slave’ controllers are set with a unique system address Check that the controller is set for MODBUS RTU mode (if applicable) Check that the ‘master’ is operating in MODBUS RTU mode Check that the ‘master’ baud rate, parity bit and number of s t op bits are correct Check that the ‘master ‘response timeout is set for a minimum of 500ms Check that the ‘master’ is implementing the specified CRC check sum process
Check RS485 wiring polarity and security of connections
Problem: Last character of MODBUS message is corrupted Solution: Add a delay of 2ms after last character received before releasing RTS signal
Problem: The MODBUS master message is reflected in the slave answer Solution: Inhibit RX/TX echo on ‘master’ device communications port
9
SECTION 5 - MODBUS TABLE DESCRIPTION
A ‘MODBUS table’ describes the “items” used to access information in the memory registers of different types of controller, or similar controllers using different application software variants or versions. The MODBUS Table will contain the valid message items (“Name”) together with the Function Code (Function), Register Start Address (“Register Address”), Register Size (“Register Length”) and a definition for coding and decoding the item data (“Coding”). A ‘MODBUS Table’ order form, detailing the required order information, can be found on the last page of this document.
TABLE ITEM FORMAT
Each ‘item’ of a ‘MODBUS Table’ will define the massage format to read or set the information contained in the slave controller register(s):-
Name
Descriptive ‘name’ or ‘item tag’ for the data item. The ‘Name’ is not used in code or message formatting and serves only as a reference for the defined item.
Function
The Hex code required that instructs the slave (Intellisys controller) to perform a GET, ADV (Advise), CMD (command) or SET function.
Register Address Register Length Coding Menu
The slave controller register start address for the defined processing function. The number of registers to be processed. How to construct or interpret the data elements of a message. Controller menu item reference.
Note: see “MODBUS RTU” for a detailed description of ‘Function’, ‘Register Address’ and ‘Register Length’ formats.
NAME AND FUNCTION
The ‘name’ for each table item will always start with 3 characters that describe the function type:
Adv Advise Function (03Hex) – same format as a Get function, see ‘Advise Function’. Get Read from register (03Hex) Set Write to registe r (10Hex) Cmd Command (10Hex) – same format as a Set function; will instruct the slave to perform a defined action or
process
CODING
Item coding definitions specify the ‘number of data bytes’ and the ‘data conversion type’. In some instances a data message may contain multiple sets of data items; an ‘Advise’ message for example. In this instance the ‘start location of data’ within the message is also specified to enable extraction of the required data item from the entire message data.
Number of data bytes:
This specifies the length of the item data in bytes (6 = 6 bytes (3 registers) of data)
Start location of data bytes:
Number of Data Bytes to Follow
DATA
1st Register byte
0 byte 1
DATA 2nd Register byte 2 byte 3
DATA
3rd Register byte
4 byte 5
CRC Check SumSlave Address Function Code
01 03 06 09 00 00 65 00 A8 30 4D
If a data message consists of more than one set of data items (multiple item data message) the ‘start location’ specifies where the first byte of the data associated with in item begins. If, for example, a 6 byte (3 register) answer is returned that consists of three different ‘2 byte’ item data values, a ‘start location of data bytes’ = ‘2’ indicates that the item data starts with the 3rd byte (byte 2) of the data message. The 1st byte of a data message is regarded as byte 0(zero). In this instance the ‘number of data bytes’ will be ‘2’ indicating that the data associated with the item is 2 bytes of data in length. A ‘start location’ of byte ‘2’ and register length of ‘1’ (register = 2 bytes) means the data is contained in the 3rd and 4th bytes of the data message. If no ‘start location’ is specified then data associated with the item will start with the first byte (byte 0) of the message data.
Data Conversion Type:
This specifies how to interpret the data; refer to the ‘Data Conversion Type’ list in the Modbus Table. For example: If the ‘Data Conversion Type’ = CODED, STATUS then the decimal integer value of the data has a defined meaning; refer to the ‘STATUS’ Coded data list in the ‘MODBUS Table’ for definitions. If the ‘Data Conversion Type’ = PSI then the decimal integer value of the data is ‘pressure’ in ‘psi’ units.
10
MENU REFERENCE
The menu structure of a controller has menu pages that contain a number of menu page ‘items’.
example menu and items For example: menu pages P00, P01, P02 > P’n’. Menu page P00 is the normal running list of display items that can be accessed and viewed on the controller displ ay without
access code. These items are ‘read only’ and consist of status, hours run and other general control or monitoring value (s). Menu pages other than P00 are setup and configuration items that require an ‘access code’ when accessing the items on
the controller display. Each menu page has a list of items that are referenced ‘1, 2, 3 > ‘n’.
a b c
P01
For example, a menu reference of P01.02 “AB” refers to menu item ‘2’ of menu page P01. Each menu page item reference also has a two or three alphanumeric character item identification that is displayed by the
controller. With a menu reference the controller manual can be examined to determine the exact function, definition, scope and limits for the specified item value.
Items that do not have a ‘Menu’ reference are general controller status or menu page P00 items.
‘ADV’ ADVISE FUNCTION
The ‘Advise’ function is a special type of ‘Get’ function. Each ‘Advise’ function item has an equivale nt ‘Get’ function; both functions will provide a similar result.
Controllers on a Multi485 network will routinely broadcast key value and status specific data to all other controllers on the network. This information is used, for example, by a system management unit for systems monitoring and control functions. A SMG Box will automatically capture, store and continuously update these information items for each controller on the network. Adv are Routine network broadcasts that occur every 2 seconds. Th transmission of this data consumes no network bandwidth. (The maximum recommended request rate is 1 request every 2 seconds.)
This facility provides a method of retrieving ‘Adv’ data items directly from the SMG Box resulting in a faster response time for information requests from a master. The method also has the advantage of reducing the amount of data traffic on the Multi485 network enabling system management controllers to perform there functions without potential communication delays. For this reason MODBUS ‘Adv’ functions are preferable to ‘Get’ functions when implemented on a Multi485 network that consists of a system management controller with multiple machine controllers.
‘ADV’ ADVISE FUNCTION – SINGLE ITEM FORMAT OPTION
Controllers or units on a Multi485 network routinely broadcast general status and key per formance information. The SMG Box will capture and store each ‘Broadcast’ detected. The Gateway ‘Broadcast’ registers will always contain the latest ‘broadcast’ information for each controller or unit on the Multi485 network. When a Modbus ‘Adv’ request is made the SMG Box will respond immediately with information from it’s own ‘Broadcast’ registers for the unit addr ess specified. This function reduces network activity and enables a faster Modbus response to commonly requested data.
A standard ‘Advise’ function defined in the ‘MODBUS Table’ will show the entire ‘broadcast’ being returned as a response. The table will define for each ‘name’ item where in the returned data message the actual requ ested data can be found. The ‘master’ must then extract the required data from the returned data message. This method is very efficient as the master can extract all ‘broadcast’ data from the single returned data message without the need to perform multiple requests for each individual data item contained in a single slave controller ‘broadcast’ message.
01.02 AB
11
Some ‘master’ devices may not be equipped with the necessary data message memory to handle a large message of many bytes or have the ability to extract multiple data items from a single data message item. In this instance an alternativ e ‘Advise’ function request method can be implemented.If the ‘Advise’ items of a ‘MODBUS Table’ are examined it will be seen that the ‘Register Address’ for each individual ‘Advise’ item contained in a single slave controller ‘broadcast’ message will have the same start address (Register Address). If the entire ‘broadcast’ data message is 7 registers (14 bytes) in length and only the 2nd register (2 bytes) of item data is required, it is possible to specify a ‘Register Address’ that is 2 bytes higher (skip the first 2 bytes of the broadcast data message) with a ‘Register Length’ that is consistent with the required item data length. This will instruct the MODBUS Gateway to extract the 2 bytes of required item data from the entire broadcast data message and only return the required 2 bytes of data as a response. Using this method an ‘Advise’ fu nction can be handled by a ‘master’ in exactly the same way as a ‘Get’ function.
For Example: (AdvDeliveryPressure): The ‘broadcast’ of an example slave controller may be 6 bytes of data (3 registers) in length starting at register address
location ‘F000’ Hex. The 1st byte (byte 0) is 8bits coded status, the 2nd byte (byte 1) is 8bits status flags which together form a single 16bit status register (1st register). The 3rd and 4th bytes (byte 2 and byte 3) are a single16bit register (2nd register) containing a ‘delivery pressure’ value. The 5th and 6th b ytes (byte 4 and byte 5) are a single 16bit register (3rd register) containing a ‘delivery temperature’ value. From an example ‘MODBUS Table’ it may be seen that the ‘Register Address’ for all four of these separate ‘Adv’ items is ‘F000 Hex’ (the start address of the entire ‘Broadcast’ message that contains the data specified).
An entire ‘Broadcast’ message may, for example, contain 3 registers (6 bytes) of data. For a particular item the ‘Modbus Table’ may show the ‘start address’ for the entire broadcast to be ‘F000’ with a length of 3 registers (6 bytes). The Modbus Table will indicate that the required data is 2 bytes long (number of data bytes) starting at the 2nd byte of data in the entire broadcast (start location of data bytes).
Name AdvDeliveryPressure Modbus Function 03 Modbus Register Address F000 (start address of entire Broadcast message) Modbus Register Length 0003 (length of entire Broadcast message) Coding Number of data bytes = 2 (length of AdvDeliveryPressure data)
Start location of data bytes = 2 (the 2 data bytes of the AdvDeliveryPressure data item start at byte 2 in the Broadcast message = bytes 2 and 3 of the message) Data Conversion Type = PSI
Master Request Message “01 03 F000 00 03 36CB” (36CB = CRC check sum) Slave Answer Message “01 03 06 09 00 00 65 00 A8 304D” (304D = CRC) Coding = PSI ‘00 65’Hex = 101 decimal = 101 psi
Register addresses shown are examples only
Status Register
Delivery
Pressure
Delivery
Temperature
Slave Address Function Code
Number of Data Bytes to Follow
DATA
1st Register byte
0 byte 1
DATA 2nd Register byte 2 byte 3
DATA
3rd Register byte
4 byte 5
CRC Check Sum
01 03 06 09 00 00 65 00 A8 30 4D
F000 F001 F002
Message Data
12
Loading...
+ 28 hidden pages