<< Click to Display Table of Contents >> Navigation: Multi-Protocol MasterOPC Server > Plugin SNMP > Tag Import > Tag Import |
To simplify the procedure of adding tags to the configuration, the import function is implemented in the OPC server. Import is performed from special files describing the tree of device variables - MIB-files. The import utility analyzes the selected mib files, forms a tree, and then, if there is a connection with the device, can scan it to determine the list of available variables. From the generated tree it will be necessary to select the tags to be imported into the server configuration.
Mib is a simple text file, with extension mib, txt or without extension. It describes the structure of the device variables. There are standard MIBs and MIBs that are supplied by device manufacturers. Usually MIB files for devices are provided by the manufacturer. There are also sites with a collection of MIB files from different manufacturers. However, you should keep in mind that not necessarily the MIB downloaded from such MIB resources will correspond to the device. It is best to check with the manufacturer.
In doing so, the MIB usually pulls in dependencies - other MIB files that describe data types or variables. In a file it looks like this:
IMPORTS
MODULE-IDENTITY, OBJECT-TYPE, enterprises, Unsigned32, Integer32, Opaque, IpAddress FROM SNMPv2-SMI
TEXTUAL-CONVENTION FROM SNMPv2-TC
In this case, the MIB takes dependencies from two other MIB files, SNMPv2-SMI and SNMPv2-TC. There can be many dependencies, and dependency files can have their own dependencies. To correctly process all files and form a tree, you must have a complete list of dependencies. Also keep in mind that the file name may be different from the actual MIB name - the actual MIB name is inside the file itself in the first line. For example:
NETWORK-SERVICES-MIB DEFINITIONS ::= BEGIN
IMPORTS
OBJECT-TYPE, Counter32, Gauge32, MODULE-IDENTITY, mib-2
FROM SNMPv2-SMI
TimeStamp, TEXTUAL-CONVENTION
FROM SNMPv2-TC
MODULE-COMPLIANCE, OBJECT-GROUP
FROM SNMPv2-CONF
SnmpAdminString
FROM SNMP-FRAMEWORK-MIB;
NETWORK-SERVICES-MIB is the real name of the file. Therefore, after downloading the file, it is recommended to verify that the file is correct by opening it with a text editor.
The most common MIB files are included in the delivery and are located in the folder:
c:\ProgramData\InSAT\Multi-Protocol MasterOPC Server\SERVERIMPORT\SNMP\mibs\standard\
The user can also plug in their own dependency files by putting them in this folder.
In addition to the standart folder, you can put mib files in a folder a level higher (mibs) - the contents of this folder are also analyzed, this folder is considered a folder of user files - private. The difference is that standart are dependency files, their variables are displayed in the tree only if they are referenced by variables of private files, while private files are always added to the tree. We recommend putting your own files in the private folder if you often work with the same set of devices - instead of selecting these files in the import utility window each time, you can put them in the mibs folder and click the Update button in the utility - they will be automatically loaded.
Note. NET 6 Runtime is required for the utility to work. If the utility generates an error at startup, download the current version from the Microsoft website.