Precision Engine Controls Corporation claims proprietary rights to the information disclosed herein. This document is furnished in
confidence on the express understanding that neither it nor any reproduction thereof will be disclosed to others or used for the purpose
of manufacture or procurement.
PREFACE
The purpose of this manual is to enable users to:
Understand the basics of XVG/eXVG Modbus communications via standard
definitions, interfaces, and protocols.
Setup Modbus communication with a network of one or more XVG/eXVGs.
It is expected that the user have sufficient knowledge of serial communication and
Modbus protocol. This manual only mentions the relevant information regarding
XVG/eXVG and Modbus, but every attempt has been made to provide sufficient
information for establishing communication with an XVG/eXVG using Modbus protocol.
For detailed information about Modbus protocol, see www.modbus.org.
The following precautions must be considered when writing your own Modbus
application for XVG/eXVG operations:
- Adhere to the tables of registers provided and their allowable data ranges.
- Do not attempt to write to any register if you are not sure of the consequence.
- Do not write to registers that are for options your XVG/eXVG does not have.
Failure to do so can result in erratic control and/or damage to equipment. Care must also
be taken that the process cannot cause damage to property or injury to personnel if the
wrong commands are sent due to operator error or equipment malfunction.
If additional information is required, please contact:
Marketing Department
Precision Engine Controls
11661 Sorrento Valley Road
San Diego, California 92121
The primary interface used for XVG/eXVG is serial communication, which is the
exchange of data one-bit-at-a time, sequentially, on a single data line or channel.
XVG/eXVG can communicate either in PECC (a propriety standard protocol) or
Modbus protocol via the serial interface.
2 Baud Rate
Baud rate is the speed at which a data line changes its state or the number of times per
second the line changes state. If two serial devices are connected together via direct
cables, then baud rate and bit-per-second are the same. XVG/eXVG Modbus
communication supports baud rates of 9600, 19200, 38400, and 57600.
3 Parity bit
A parity bit is optionally transmitted along with data to help detect data corruption
that may occur during transmission. There are three parity modes available: Odd,
Even, or None. XVG/eXVG Modbus communication default parity setting is Even.
4 Start and Stop Bits
The start bit informs the receiving device that a character is coming; a stop bit
indicates that a character is completed. The start bit is always 0 and stop bit is always
1. Per Modbus protocol requirements, XVG/eXVG Modbus communication employs
1 stop bit in Even or Odd parity mode, and 2 stop bits in None parity mode.
5 Electrical Interface Standards
XVG/eXVG serial communication uses either RS232 for one-to-one connection or
RS485 for a multi-drop capable network.
- RS232 interface uses three wires: transmit, receive, and common (ground) line.
A -3 to -12V signal indicates a 1, a +3 to +12V signal indicates a 0.
Communication is one-to-one, and full-duplex capable. Distance is limited to
50 feet.
- RS485 interface uses two wires: T+/R+ and T-/R-. The RS485 receiver
compares the voltage difference between both lines instead of the absolute
voltage level on a signal line. Communication is half-duplex and up to 32
devices can be connected to a multi-drop network up. Distance is limited to
4000 feet.
4
Follow RS232 and RS485 standards for wiring and biasing of the communication
bus.
6 XVG/eXVG Modbus Communication Default Settings
The default settings for XVG/eXVG Modbus communication are as follows:
- Baud Rate: 19200
- Parity Mode: Even
- Number of Start Bits: 1
- Number of Stop Bits: 1
- Device Address: 1
7 Protocol
Modbus devices communicate using a master/slave technique, in which only one
device (the master) can initiate transactions. The other device (the slave) responds by
supplying the requested data to the master or by taking the action requested. The
master can address individual slaves or can initiate a broadcast message to all slaves.
Slaves will only return a message to requests that are specifically addressed to them.
However, all slaves will perform the action requested by a broadcast message, but
responses are not returned.
XVG/eXVG Modbus conforms to standard Modbus protocol and support Modbus
Remote Terminal Unit (RTU) mode (ASCII mode is not supported). With RS485, it
is possible to have multiple host masters and XVG/eXVG units on the same network.
However, the following protocol requirements must be observed:
- Only one host master can send a request message at a time.
- Each XVG/eXVG unit on the same network must have a unique address.
7.1 General Modbus Frame
Modbus protocol establishes the format for the master request message by placing
into it the device address, a function code defining the requested action, any data to
be sent, and an error–checking field. See Table 1 for a general Modbus frame which
is followed from left to right.
DEVICE ADDRESS FUNCTION CODE DATA ERROR-CHECK
Table 1: General Modbus Frame
5
7.2 Modbus Transactions
The slave’s response message is also constructed using Modbus protocol. It
contains fields confirming the action taken, any data to be returned, and an error–
checking field.
If an error occurred in receipt of the message, or if the slave is unable to perform
the requested action, the slave will construct an error message and send it as its
response.
Request
Response, no error
FUNCTION CODE + REQUEST DATA
FUNCTION CODE + RESPONSE DATA
Response, with error
EXCEPTION FUNCTION CODE + REQUEST DATA
where
EXCEPTION FUNCTION CODE = (FUNCTION CODE + 0x80)
Table 2: Modbus Transactions
7.3 Modbus Register Types
Each Modbus register in the XVG/eXVG is identified by its 4-digit number
address. With XVG/eXVG, the term “register” refers to both Modbus Holding
Registers (read-write) and Modbus Input registers (read-only). The types of
XVG/eXVG Modbus registers are listed in Table 3.
Register
Type
Size Data Type
U16 16 bit Integer
U32 16 bit Integer
Float 16 bit Floating-point
ASCII 16 bit 8-bit ASCII
Table 3: Modbus Transactions
Address
Range
3000-
3999
5000-
6999
7000-
7999
3000-
3999
Description
Unsigned 16-bit integers ranging
from 0 to 65535.
Use in pairs to store unsigned 32-bit
integers ranging from 0 to
4294967295.
Use in pairs to store 32-bit floatingpoints values in single-precision
IEEE 754 format.
One or more consecutive registers.
Each register stores two 8-bit ASCII
characters (16 bits total).
6
7.4 Modbus Functions
The following Modbus functions are supported by the XVG/eXVG:
- Read Registers (0x03)
- Write Single Register (0x06)
- Write Multiple Registers (0x10)
- Diagnostics (0x08) Query Data sub-function (0x00)
The master can address individual slaves, or can initiate a broadcast message (using
device address 0) to all slaves. Slaves perform the actions requested by the broadcast
messages but will not return a response. Per Modbus protocol, only Write Single
Register (0x06) and Write Multiple Registers (0x10) support broadcast message.
7.4.1 Read Registers (0x03)
Request message:
SLAVE ADDRESS + FUNCTION CODE + STARTING ADDRESS + QUANTITY
OF REGISTERS + CRC
Request Length Valid Value
Slave Address 1 Byte 0 to 247
Function code 1 Byte
Starting Address 2 Bytes
Quantity of Registers 2 Bytes
CRC 2 Bytes
Slave Address 01 Slave Address 01
Function 03 Function 03
Starting Address Hi 00 Byte Count 06
Starting Address Lo 6B Register Value Hi (108) 02
Number of Registers Hi 00 Register Value Lo (108) 2B
Number of Registers Lo 03 Register Value Hi (109) 00
CRC 7417 Register Value Lo (109) 00
Register Value Hi (110) 00
Register Value Lo (110) 64
CRC 057A
Table 6: Modbus Function 03 - Example
7.4.2 Write Single Register (0x06)
Request message:
SLAVE ADDRESS + FUNCTION CODE + REGISTER ADDRESS + REGISTER
VALUE + CRC
Request Length Valid Value
Slave Address 1 Byte 0 to 247
Function code 1 Byte
Register Address 2 Bytes
Register Value 2 Bytes
CRC 2 Bytes
Table 7: Modbus Function 06 - Request Message
0x06
0x0000 to 0xFFFF
0x0000 to 0xFFFF
0x0000 to 0xFFFF
Response message:
SLAVE ADDRESS + FUNCTION CODE + REGISTER ADDRESS + REGISTER
VALUE + CRC
Response Length Valid Value
Slave Address 1 Byte 0 to 247
Function code 1 Byte
Register Address 2 Bytes
Register Value 2 Bytes
CRC 2 Bytes
Table 8: Modbus Function 06 - Response Message
0x06
0x0000 to 0xFFFF
0x0000 to 0xFFFF
0x0000 to 0xFFFF
Function 06 Function 06
Register Address Hi 00 Register Address Hi 00
Register Address Lo 01 Register Address Lo 01
Register Value Hi 00 Register Value Hi 00
Register Value Lo 03 Register Value Lo 03
CRC 98 0B CRC 98 0B
Starting Address Hi 00 Starting Address Hi 00
Starting Address Lo 01 Starting Address Lo 01
Quantity of Registers Hi 00 Quantity of Registers Hi 00
Quantity of Registers Lo 02 Quantity of Registers Lo 02
Byte Count 04 CRC 1008
Registers Value Hi 00
Registers Value Lo 0A
Registers Value Hi 01
Registers Value Lo 02
CRC 9230
Table 12: Modbus Function 16 – Example
7.4.4 Diagnostics (0x08) (Loopback)
Request & Response message:
SLAVE ADDRESS + FUNCTION CODE + SUB-FUNCTION CODE + DATA +
CRC
Request
Slave Address 1 Byte 0 to 247
Function code 1 Byte
Sub-function 2 Bytes
Data Any
CRC
Table 13: Modbus Function 08 - Request & Response Message
Length Valid Value
0x08
0x00
value
0x0000 to 0xFFFF
An exact copy of the diagnostic query message is sent back as a response.
8 Connections
The XVG/eXVG can communicate via RS-232 or RS-485, one interface or the other.
To communicate with an XVG/eXVG that was built with RS-485 interface circuit, you
may need to use RS232-to-RS485 converter.
The connection from the PC or PLC’s serial port to the XVG/eXVG can be made as
follows:
10
8.1 RS-232 Connection (for XVG/eXVG with RS-232 interface)
PC COM Port
(DB9M Connector)
XVG/eXVG Terminal
Block
Wire Color
(If XVG/eXVG is
supplied with optional
harness)
Signal Pin # Signal Pin #
SERIAL RX 2 SERIAL TX 39 WHT/ORN/BLU
SERIAL TX 3 SERIAL RX 40 WHT/ORN/YEL
SERIAL RTN 5 SERIAL RTN41
Table 14: RS-232 Interface Connection
WHT/ORN/GRN
8.2 RS-485 Connection (for XVG/eXVG with RS-485 interface)
PC COM Port
Through RS232RS485 Converter
XVG/eXVG Terminal
Block
(If XVG/eXVG is supplied
Wire Color
with optional harness)
Pin # Signal Pin #
TD(B)+
TD(A)-
GND (Optional) SERIAL RTN 41
TXD-485A
(SERIAL TX)
RXD-485B
(SERIAL RX)
Table 15: RS-485 Interface Connection
39 WHT/ORN/BLU
40 WHT/ORN/YEL
WHT/ORN/GRN
9 XVG/eXVG Modbus Parameters
9.1 Setup Parameters
Set up parameters are write-able parameters used to setup and control all XVG/eXVG
operations. The following notes applied to all parameters:
- Register Number: This is the Modbus address of the register in the XVG/eXVG.
- All registers are readable.
- RO: Read-only. The register is read-only.
- W0: Open access for writing by any user.
- W1: A Customer or Factory level password must be entered before writing is
allowed.
- W2: A password must be entered and IDM_SETUPCONNECT (register no.
3005) set to 1 before writing is allowed.
- W3: A factory level password must be entered before writing is allowed.
- W4: A factory level password must be entered and IDM_SETUPCONNECT set
to 1 before writing is allowed.
11
Loading...
+ 25 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.