User Manual MODBUS Communication For XVG/eXVG Gas Fuel Metering Valves SD-6021 Rev 1 September 2008 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.
Table of Contents PREFACE........................................................................................................................ 2 Table of Contents................................................................................................................ 3 1 Serial Communication ................................................................................................ 4 2 Baud Rate...................................................................................................
1 Serial Communication 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.
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: - 7 Baud Rate: 19200 Parity Mode: Even Number of Start Bits: 1 Number of Stop Bits: 1 Device Address: 1 Protocol Modbus devices communicate using a master/slave technique, in which only one device (the master) can initiate transactions.
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.
.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.
Example: Request to read holding registers 108 - 110 Request 01 03 00 6B 00 03 74 17 Slave Address 01 Function 03 Starting Address Hi 00 Starting Address Lo 6B Number of Registers Hi 00 Number of Registers Lo 03 CRC 7417 Response 01 03 06 02 2B 00 00 00 64 05 7A Slave Address 01 Function 03 Byte Count 06 Register Value Hi (108) 02 Register Value Lo (108) 2B Register Value Hi (109) 00 Register Value Lo (109) 00 Register Value Hi (110) 00 Register Value Lo (110) 64 CRC 057A Table 6: Modbus Function 03 - Exam
Example: Request to write 0x03 to register 2. Request Response 01 06 00 01 00 03 98 0B 01 06 00 01 00 03 98 0B 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 Table 9: Modbus Function 06 – Example 7.4.
Starting Address Hi 00 Starting Address Lo 01 Quantity of Registers Hi 00 Quantity of Registers Lo 02 Byte Count 04 Registers Value Hi 00 Registers Value Lo 0A Registers Value Hi 01 Registers Value Lo 02 CRC 9230 Starting Address Hi 00 Starting Address Lo 01 Quantity of Registers Hi 00 Quantity of Registers Lo 02 CRC 1008 Table 12: Modbus Function 16 – Example 7.4.
8.1 RS-232 Connection (for XVG/eXVG with RS-232 interface) PC COM Port (DB9M Connector) Signal SERIAL RX SERIAL TX SERIAL RTN Pin # 2 3 5 XVG/eXVG Terminal Block Signal SERIAL TX SERIAL RX SERIAL RTN Wire Color (If XVG/eXVG is supplied with optional harness) Pin # 39 40 41 WHT/ORN/BLU WHT/ORN/YEL WHT/ORN/GRN Table 14: RS-232 Interface Connection 8.
9.1.
Register Number XVG/eXVG Parameter Name Write Access 3521 IDM_FLOWCTRLEN W4 3522 IDM_FLTTMCURRENT W4 3523 IDM_FLTTMTMPSHUT W4 3524 IDM_SOLIMAX W4 3525 IDM_AO0CFG W2 3526 3527 IDM_AO1CFG IDM_AO2CFG W2 W2 3528 IDM_SELFCALENABLE W4 3529 IDM_DPENABLE W4 3530 IDM_FLTTMPOS15V W4 3531 IDM_FLTTMNEG15V W4 3532 IDM_FLTTMTEMPAMB W4 3533 3534 IDM_FLOWCALCURVE IDM_ELECTINTRFC W4 W4 3535 IDM_FLANGEACC W4 3536 IDM_LVDTEXSCALE W4 3537 IDM_OCT W4 3538 IDM_CLTHRESH W4 3539
Register Number 3541 XVG/eXVG Parameter Name IDM_PARITY Write Access W2 3542 IDM_RXMSGTMOUT W2 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 5500 5501 IDM_MODELNO[0] IDM_MODELNO[1] IDM_MODELNO[2] IDM_MODELNO[3] IDM_MODELNO[4] IDM_MODELNO[5] IDM_MODELNO[6] IDM_MODELNO[7] IDM_MODELNO[8] IDM_MODELNO[9] IDM_MODELNO[10] IDM_MODELNO[11] IDM_MODELNO[12] IDM_MODELNO[13] IDM_MODELNO[14] IDM_MODELN
Register Number 5508 5509 XVG/eXVG Parameter Name IDM_SETUPCHECK Write Access W4 Description Type U32 U32 0 U32 0 U32 0 U32 0 Float Float Float Float Float Float Float Float Float 1 0 1 0 1 1 0 1.016 0 Float 53.34 Float 1.4 Float 32.2 Float 1 Float Float 0 0 Float 0 Float 0.03 Float 0 Float 1600 W2 Setup parameter checksum Faults to Shutdown on, same as IDM_FAULTFLAGS Fault output configuration bit-field, to configure which fault codes will show on digital output channel 0.
Register Number XVG/eXVG Parameter Name Write Access Description 7578 7579 IDM_INPRESOFF W4 7580 7581 IDM_OUTPRESGAIN W4 7582 7583 IDM_OUTPRESOFF W4 7584 7585 7586 7587 IDM_TEMPSENSEGAIN IDM_TEMPSENSEOFF W4 W4 7588 7589 IDM_VOLTS3GAIN3 W4 7590 7591 IDM_VOLTS3OFF3 W4 7592 7593 7594 7595 7596 7597 IDM_CURSENSEGAIN IDM_CURSENSEOFF IDM_OUTPUTOFF W4 W4 W4 Input Pressure Sensor Offset: range -10 – 10 PSIA Output Pressure Sensor Gain: range 1 – 2 Output Pressure Sensor Offset: range -10 –
Register Number 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 XVG/eXVG Parameter Name IDM_AO0CUROFF IDM_AO0VOLTGAIN IDM_AO0VOLTOFF IDM_AO1CURGAIN IDM_AO1CUROFF IDM_AO1VOLTGAIN IDM_AO1VOLTOFF IDM_AO2CURGAIN IDM_AO2CUROFF IDM_AO2VOLTGAIN IDM_AO2VOLTOFF IDM_AI0VOLTGAIN IDM_AI0VOLTOFF IDM_AI1VOLTGAIN IDM_AI1VOLTOFF IDM_
The position interpolation feature is enabled / disabled via the IDM_POSINTTBLEN setup parameter. The valve will ignore this data in this table and assume a linear stroke profile when IDM_POSINTTBLEN is disabled. Valid Parameter Interpolation Table values are in the range of 683.0-3413.0, values are in fixed point IQ8 format (count value multiplied by 28).
Register Number 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 XVG/eXVG Parameter Name IDM_POSTBL35 IDM_POSTBL36 IDM_POSTBL37 IDM_POSTBL38 IDM_POSTBL39 IDM_POSTBL40 IDM_POSTBL41 IDM_POSTBL42 Write Access W2 W2 W2 W2 W2 W2 W2 W2 Corresponding Demand Counts: 2218.6250, 13.0mA Demand Counts: 2389.2500, 14.0mA Demand Counts: 2559.8750, 15.0mA Demand Counts: 2730.5000, 16.0mA Demand Counts: 2901.1250, 17.0mA Demand Counts: 3071.7500, 18.0mA Demand Counts: 3242.3750, 19.
Register Number 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 XVG/eXVG Parameter Name IDM_PRTBL0 IDM_PRTBL1 IDM_PRTBL2 IDM_PRTBL3 IDM_PRTBL4 IDM_PRTBL5 IDM_PRTBL6 IDM_PRTBL7 IDM_PRTBL8 IDM_PRTBL9 Write Access W4 W4 W4 W4 W4 W4 W4 W4 W4 W4 Corresponding Pressure Ratio 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.
Register Number 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 XVG/eXVG Parameter Name I
Register Number 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 XVG/eXVG Parameter Name I
Register Number 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6267 6278 6269 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 XVG/eXVG Parameter Name IDM_CDATBLPR7S14 IDM_CDATBLPR8S0 IDM_CDATBLPR8S1 IDM_CDATBLPR8S2 IDM_CDATBLPR8S3 IDM_CDATBLPR8S4 IDM_CDATBLPR8S5 IDM_CDATBLPR8S6 IDM_CDATBLPR8S7 IDM_CDATBLPR8S8
Register Number 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 XVG/eXVG Parameter Name IDM_BACKPRES0 IDM_BACKPRES1 IDM_BACKPRES2 IDM_BACKPRES3 IDM_BACKPRES4 IDM_MINFLOWLIM0 IDM_MINFLOWLIM1 IDM_MINFLOWLIM2 IDM_MINFLOWLIM3 IDM_MINFLOWLIM4 IDM_MAXFLOWLIM0 IDM_MAXFLOWLIM1 IDM_MAXFLOWLIM2 IDM_MAXFLOWLIM3 IDM_MAXFLOWLIM4 Write Access W2 W2 W2 W2 W2 W2 W2 W2 W2 W2 W2 W2 W2 W2 W2 Description Backpressure 0 Back
Register Number 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 XVG/eXVG Parameters Name IDM_ADCINPRES IDM_ADCAI0 IDM_ADCOUTPRES IDM_ADCAI1 IDM_ADCDELTAPRES IDM_ADCAI2 IDM_ADCGASTEMP IDM_ADCAI3 IDM_ADCSOLTEMP IDM_ADCAI4 IDM_ADCMOTORCUR IDM_ADCAI5 IDM_FFAULTFLGS IDM_FVERSION IDM_FRUNTMMINS IDM_FRUNTMSECS IDM_SETUPERROR IDM_TESTFLAGS IDM_FMODE Write Access RO RO RO RO RO RO RO RO RO RO RO RO RO RO RO RO RO W3 RO 3033 IDM_CALFLAGS W1 3034 3035 3036 3037 IDM
Register Number XVG/eXVG Parameters Name Write Access 3042 IDM_DOUT1 W3 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 IDM_FRECORDNO IDM_FFAULTCODE IDM_FRECORDS IDM_ADCA0 IDM_ADCA1 IDM_ADCA2 IDM_ADCA3 IDM_ADCA4 IDM_ADCA5 IDM_ADCA6 IDM_ADCA7 IDM_ADCB0 IDM_ADCB1 IDM_ADCB2 IDM_ADCB3 IDM_ADCB4 IDM_ADCB5 IDM_ADCB6 IDM_ADCB7 W0 RO RO RO RO RO RO RO RO RO RO RO RO RO RO RO RO RO RO 3062 IDM_ADCA0GAINOFF RO 3063 IDM_ADCA1GAINOFF RO 3064 IDM_ADCA2GAINOF
Register Number XVG/eXVG Parameters Name Write Access 3073 IDM_ADCB3GAINOFF RO 3074 IDM_ADCB4GAINOFF RO 3075 IDM_ADCB5GAINOFF RO 3076 IDM_ADCB6GAINOFF RO 3077 IDM_ADCB7GAINOFF RO 3078 3079 3080 3081 3082 IDM_ADCB5A IDM_ADCB5B IDM_ADCB5C IDM_ADCCALLOW IDM_ADCCALHI RO RO RO RO RO 3083 IDM_SOLDUTY RO 3084 IDM_LOOPCNT RO 3085 IDM_BUFINDEX1 W0 3086 IDM_BUFINDEX2 W0 3087 IDM_ADCBUFVAL RO 3088 IDM_DEMANDSTATUS RO 3089 3090 3091 3092 3093 IDM_AOUT0PWMCTS IDM_AOUT1PWMCTS IDM_A
Register Number 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 5000 5001 5002 5003 5004 5055 5006 5007 5008 5009 5010 5011 5012 5013 XVG/eXVG Parameters Name IDM_TESTSTR[0] IDM_TESTSTR[1] IDM_TESTSTR[2] IDM_TESTSTR[3] IDM_TESTSTR[4] IDM_TESTSTR[5] IDM_TESTSTR[6] IDM_TESTSTR[7] IDM_TESTSTR[8] IDM_TESTSTR[9] IDM_TESTSTR[10] IDM_TESTSTR[11] IDM_TESTSTR[12] IDM_TESTSTR[13] IDM_TESTSTR[14] IDM_TESTSTR[15] IDM_AO0CHCFG IDM_AO1CHCFG IDM_AI0CHCFG IDM_POSMANST
Register Number 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 XVG/eXVG Parameters Name IDM_LVDTSCALEFCT IDM_RUNTMHRS IDM_FLOCTLPOSOUT IDM_TOTALHRS IDM_TOTHRSIG IDM_FLOWLIMPOS IDM_FTOTALHRS IDM_FRUNTMHRS Write Access RO RO RO RO RO RO RO RO 5030 5031 IDM_ADCSTATFLGS RO 5032 5033 IDM_FAULTLATCHL W3 5034 5035 IDM_FAULTFLAGSL RO 5036 5037 IDM_TRS RO 5038 5039 IDM_OCC RO 5040 5041 IDM_MMG RO 5042 5043 IDM_MMI RO 5044 5045 IDM_MMB RO 5046 5047 IDM_TA
Register Number XVG/eXVG Parameters Name Write Access 5056 5057 IDM_OPS RO 5058 5059 IDM_FS RO 5060 5061 IDM_MCS RO 5062 5063 IDM_DJS RO 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071
Register Number 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 XVG/eXVG Parameters Name IDM_FVOLTSNEG15 IDM_TEMPAMB IDM_AUTOADCAGAIN IDM_AUTOADCBGAIN IDM_AUTOADCAOFF IDM_AUTOADCBOFF IDM_VOLTSPOS15 IDM_VOLTSNEG15 IDM_XMEAS IDM_XCMD IDM_XERR Write Access RO W3 RO RO RO RO RO RO RO RO RO 7094 7095 IDM_INTXERR RO 7096 7097 7098 7099 7100 7101 IDM_VCMD IDM_ICMD IDM_VMEAS RO RO RO 7102 7103 IDM_GASTEMPC RO 7104 7105 7106 7107 7108 7109 711
- Only one host master can send request message at a time. Each XVG/eXVG unit on the same network must have a unique address. Adhere to the tables of registers provided and their allowable data range. 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.
All XVG/eXVG parameters can be uploaded using Modbus Read Registers function then convert the results into appropriate number representation for display and monitoring. Model number and part number need to be converted into ASCII character string. All registers are readable, choose whichever parameters are of interest and read them. 10.2 Accessing Fault Records Procedure The following parameters will be used to retrieve the XVG/eXVG fault records. There are a maximum of 16 records available in the valve.
Perform the following steps to retrieve the fault records: 1. Read register 3045, IDM_RECORDS, to get the current number of fault records available in the XVG/eXVG. The records are named 0, 1, 2, .. , n-1. Maximum n = 16. 2. To retrieve first record, record 0, write 0 to register 3043, IDM_FRECORDNO. 3. Write 4 to register 3094, IDM_TESTCTRL. 4. Read registers 3028, 3029, 3044, 5026, 5028, 7050-7072 to complete record 0. 5. Repeat steps 2, 3, 4, and 5, to retrieve record 1, 2, .., n-1. 10.
- Write 2 to register 3005. Valve will close and reset. 6. To restore the previous R and K values, write the value of R to register 7518 and the value of K to 7520. In case the old values are forgotten and the new values have not been saved to the valve, reset the valve by turning power off then on to restore R and K. The following steps will also reset the valve; care must be taken, valve will close and reset. RESET valve routine: - Write a password to register 3099. - Write 1 to register 3005.
6. Write 32 to register 3033. Wait 100 milliseconds. 7. Write 1 to register 3005. Wait 100 milliseconds. 8. Write 2 to register 3005. Valve will close, reset and assume new address.