SNMP I/O Addressing
As part of the Address Select tool, you can tell VTScada where to find the MIB Management Information Base. A hierarchy of the information available to an SNMP device, organized by numbered Object Identifiers (OIDs). file, supplied by the manufacturer for your device. If you know the OID there is no need for a MIB.
It is possible to create a VTScada SNMP Agent service, to serve tag values over SNMP. But note that table addressing and reading tables is complex. As one example, the OID for a table entry contains the content of the entry and is not fixed. Therefore, for VTScada I/O the user must obtain the table entry using a third party SNMP software program, obtain the full OID, and then use it in VTScada IO address. While GetBulk and GetNext are useful in walking a table, VTScada I/Os do not use these functions (although they are implemented in the driver). The user must write a script to call these functions and pass their values to I/O tags.
SNMP data types influence your selection of I/O tag data type:
SNMP supports 12 data types. These are passed directly to the I/O tag, where further processing may be required.
- SNMP data types: Integer32, Unsigned32, Gauge32, Counter32, Counter64 and TimeTicks can be used with numeric tag types.
- SNMP data types: Integer(Enumerated), Octet String, Object Identifier, IpAddress, Opaque and Bits should be read in with a string data type, with additional processing done using a Calculation tag as required.
SNMP Agent Configuration is described in the VTScada Programmer's Guide
SNMP Address Configuration
There are two parts to address configuration. The first is to obtain the required .MIB file(s) and import them into your application. The second is to build the address using the built-in SNMP Address Select dialog (shown later in this topic).
Importing a .MIB
- Obtain a .MIB file from your equipment manufacturer.
- Save this file to a folder on your VTScada server computer.
All .MIB files that will be used by an application will be stored a folder named "MIB" within your application directory. You can create this folder yourself and copy the files to it. If using the Import MIB button, VTScada will create the folder and copy the selected files to it. This is generally the easiest and most reliable method.
- Import the file into the application's version control system.
There are two ways to do this:
- Copy the file to your application and then click on the application's Import File Changes button in the VAM.
Or:
- Create and configure an SNMP driver tag in your application.
- Select that driver in an I/O tag.
The address field of the I/O tag will now have a ... button which you can use to open an Address Select tool. - In the Address Select tool, you will find an Import MIB button.
- Click the Import MIB button.
- Select the file.
If the .MIB file depends on other .MIB or .MY files, you will get an error message in the Address Select tool. Hovering over the error will open a tool-tip window that displays the name of the missing file. Locate and copy this file to the MIB folder, then use the Import File Changes button in the VAM.
Building an address.
The following instructions assume that you are configuring an I/O tag that uses an SNMP driver and have reached the stage of building the address.
An Address Select button can be found beside the address field when an SNMP driver has been selected as the I/O Device.
The Disable Polling option will turn off regular polls for this OID. Use this when you want to receive data from traps only. Adding the :NS (no scan) suffix after the SNMP OID will cause the same result.
The result will be similar to that shown here: