The ivserver.xml File

Modbus/TCP and SNMP Data Configuration

IntraVUE provides connection and SNMP information through an embedded Modbus/TCP server on the default Modbus port, 502.

Additionally, all configured SNMP data is visible in the IntraVUE browser by selecting the SNMP Data... item from the Device Menu.

The information to be provided is configured in the file "ivserver.xml", which is located in the ...\intravue\autoip folder (file system details ) .

IntraVUE makes information available to HMI and SCADA devices in the same way they would access information in a PLC. ivServer can also be configured to provide any SNMP variables through the Modbus/TCP interface.

The file starts and ends with a dataserver line.

    <dataserver mysql="127.0.0.1">
.....
    </dataserver>

There are three other types of lines in the ivServer.xml file, located between the above two lines..

Ping or Connection status

Lines that start with "ping" create Modbus/TCP registers for the current connection status of a device.

Note: Register 0 in the ivserver.xml file is the first 40000 or 4X register in Modbus which has an offset of 1 and which is actually register 4:0001.

    <ping reg="0" ip="192.168.100.2" />
    <ping reg="10" ip="10.1.1.45" />

In the above example, the ping status of the device 192.168.100.2 will be stored in the 0th or first Modbus 4X register. This is generally referred to as 4:00001 or 400001. The ping status of 10.1.1.45 will be stored in Modbus register 4:00011.

SNMP Data

Lines that start with "snmp" create values in the MySQL database which are also displayed as additional items in the SNMP Data... selection of the Device Menu.

The scanner makes single, snmpget requests for each item in this file once per scan cycle (a scan cycle is about 5-10 seconds).

    <snmp reg="2:ts" ip="192.168.100.254" oid="1.3.6.1.2.1.1.3.0" c="public" disptext="uptime"/>
    <snmp reg="10:s10" ip="10.1.1.100" oid="1.3.6.1.2.1.1.1.0" c="public" disptext="description"/>
    <snmp	      ip="192.168.100.254" oid=" 1.3.6.1.2.1.2.2.1.5.1" c="public" disptext="Port 1 Speed"/>

If reg="" or reg is missing from the line, no register will be assigned in the Modbus/TCP server and the information will only display in SNMP Data.

The c= attribute is for the SNMP community of the device.

The disptext= attribute establishes the text you would like to appear for this item in the SNMP Data.dialog.

The OID= value may be a well publicized MIB II item or it can be a very specific OID assigned by the manufacturer of a device such as an over temperature alarm from a water pump.

The colon after the register number indicates the start of a definition of the data type for the information being retrieved. Modbus registers are each 2 bytes long.

    reg = "10:i"  means register 10 is a 16 bit integer
    reg = "11:d"  means register 11 is a 32 bit integer and occupies 2 registers
    reg = "13:s10"  means register 13 is a string taking 10 register positions or 20 bytes.

In the second example above the value stored in the Modbus registers will take register 11 and 12 because it is a 32 bit number.

In the 3rd example above the string will take registers 13 through 22 - a total of 20 bytes.

Important Notes

1. When configuring registers be aware of the size of the data to be written to the registers and be careful not to overlap data. In the case of string data if the data retrieved is longer than the size configured, the data will be truncated to the size configured. Complete syntax for data types is in the comments of the ivServer.xml file.

2. Any time a query to a SNMP device fails, has an error, or times out the single character "0" will be stored for String data and the number 0 will be stored for Numeric data. Modbus clients such as HMI or SCADA stations should be programmed to handle or ignore these states.

Networkstatus data

Lines that start with 'networkstatus' provide a bit mask Word in one register. The status will remain in the register for 'durationmsec' milliseconds and then go to 0.

    <networkstatus reg="60" durationmsec="15000"/>

'networkstatus' defines a register which will have 4 bits, each of which will generate a 'pulse' whenever an associated event is detected in the IntraVUE database. The pulse goes from 0 to 1, stays at 1 for the configured duration, then returns to 0. Each bit is manipulated and timed independently. If a new event of the same type occurs while the bit is set, a new time period will start.

The events detected and reported in this register are

    bit 0: new device joined network
    bit 1: device disconnected
    bit 2: device reconnected
    bit 3: threshold exceeded

Important Hint

Any time you edit the ivserver.xml file it is wise to open the file in Internet Explorer upon completion. If there is an XML error, Internet Explorer will tell you the line number of the error. If there is an error in the file, IntraVUE will ignore the file and continue to operate with the last good settings.

Disabling Modbus TCP

Due to other software, it may sometimes by necessary to disable IntraVUE from acting as a modbus/tcp server. In these cases edit the ivserver.properties file and change the below value to be 'false'.

        modbus.service=true