Applies To:
  • CitectSCADA 5.xx
  • CitectHMI 5.xx

Summary:
How can I configure the SNMPII driver for optimal blocking behaviour? 

Solution:
For the SNMPII protocol you can only block longs and reals (N and R datatypes). For every SNMPII I/O device a snmpvar.dbf file is created. In that file an index is defined for each SNMP tag. This index is used by Citect for blocking purposes. That index in the snmpvar.dbf is also used in the tag address in the variable.dbf, with a prefix for the different datatypes (N for long, R for real, DA for string).

By using the mib2cit utility or by manually manipulating the index numbers in that snmpvar.dbf file you can set up blocking for the SNMPII driver.

Via Mib2Cit utility:

In the mib2cit utility you can use the "Group" and "Ungroup" buttons for this blocking purpose. By default, separate SNMP requests are made for each tag. Multiple tag names can be selected (hold down CTRL while clicking on the desired items) to allow you to group tags into one SNMP request and thereby increase read efficiency. The Group function will re-number the Address field based on the first item selected, and increment by one (eg 100, 200, 300, 400... becomes 100, 101, 102, 103).

The address number that you see in mib2cit utility is actually the index number that you see in the snmpvar.dbf file. By default these indexes increment by a value of 100 when you use the mib2cit utility. This number 100 defined by the [Tags]Modaddress parameter in the mib2cit.ini file. This file is located in the directory where you have installed the mib2cit utility.

Via index numbers in snmpvar.dbf file:

By manually manipulating the index numbers in the snmpvar.dbf file, you can improve the blocking behavior of the driver. If you create consecutive numbers in a data type, then Citect will be able to block these together in one request. This index number must be unique for each tag (per iodevice). e.g.

N100,N101,N102,N103 will be a block of 4 LONGs and R200,R201,R203 will be a block of 3 REALs.

The SNMPII driver by default only blocks 20 items (for longs and reals this equals 640 bits). This value is set via the [SNMP]PDUGroupOK parameter and the BIT_BLOCK value in the protdir.dbf for the SNMPII protocol. The target device MUST be able to support large PDU packets if PDUGroupOK is high. Some devices may crash if this value is too large. The [SNMPII]Block parameter is set to 256 by default.

In the Kernel you can observe the blocking behavior by using the 'Probe' command. There you will all request from the client to the I/Oserver and the size of these requests. Again the address numbers that you see there are derived from the index numbers in the snmpvar.dbf files.


Keywords:
 

Attachments