How do I monitor switches, temperature or humidity sensors, and other environmental parameters?

Several Control Solutions products interface to physical I/O devices such as temperature sensors or switch contacts. You simply connect the sensor or switch contact to be monitored to an input, configure that input via the web page(s), and its data becomes available in the MIB. You can set up threshold rules to generate traps based on the contact opening or closing.

Once connected and configured, the data becomes available as a variable in the built-in MIB.

How do I monitor power equipment that uses Modbus?

There is a wide variety of power monitoring equipment on the market. Much of this equipment was designed for the industrial market, and as such, typically has Modbus communication capability, but not necessarily SNMP capability. You can add SNMP capability to anything that has Modbus capability by using a Control Solutions gateway or server with gateway capability included.

Many of Control Solutions' products include a Modbus RTU master, including some i.CanDoIt server models, and Babel Buster gateways. Configuring the device for Modbus means telling it what register(s) to read in the slave device(s). These "maps" are simply a table you enter through one of the web pages in the Babel Buster or server. An example is illustrated below.

We are going to tell Babel Buster to read a slave device whose device address or unit ID (4) is set to 12. The equipment manufacturer's Modbus interface documentation tells us we should read holding register (1) number 284 (3) and it will be an integer (2). This register is scaled X10, meaning a register value of 100 really means 10.0 degrees. Therefore we enter a scale factor (5) of 0.10. We are going to store our native copy of this data in our local register (6) number 1015, and we will give it a label (7) of "Oil Temperature" for our reference. (We are monitoring a generator in this example.)

The only thing that was up to us here was picking local register 1015 to store our copy of the data. The rest of the information about which register to read comes from the equipment manufacturer. You will need to obtain documentation from the equipment manufacturer that provides their Modbus register mapping. The document itself may come under a variety of titles, but what you want to ask for is simply the "Modbus register map".

Once we have done this, and Babel Buster is online and the equipment is online, we should be able to look at the MIB View of system data, and see something like the example below. If you leave the scale factor at 1.0 above, and store the result in an integer register, which maps to an OID in the integer data table, you can read raw integer data with an SNMP Get. If you scale the data and save it as floating point, the SNMP Get will return an ASCII string (DisplayString) with the ASCII representation of the number.

How do I set up an SNMP trap?

I/O point data is placed in "registers" by easily configured I/O drivers. Each register is accessible by standard SNMP Get and Set requests. Threshold "rules" determine when traps are sent. The image below is an actual screen shot of a threshold rule that will result in a trap when the sensor on input #7 exceeds a level of 1000. Data values are scaled to any units you decide. You find the threshold rules in the System->Action Rules->Thresholds page.

Additional configuration pages allow setting the IP address or Host Name of one or more SNMP managers that v2c traps are to be sent to. Traps may be repeated periodically for as long as the rule tests true. Trap data includes the register name and number, data value that caused the trap, the event name, test type, and test threshold.

Once you have the Threshold Rule set up, you need to go to the IP Network->SNMP Setup->Trap Enable page and check off whether to trap on true, false, or both, and also which group(s) to send the trap to. The following is what you would see for the above rule:

The other tabs under IP Network->SNMP allow you to set up the SNMP manager IP addresses or host names for each of up to 3 groups.

How do I prevent spurious traps when the test value is hovering around the threshold?

Hysteresis will prevent spurious traps near the threshold. In the following example, the trap will occur when register 7 reaches a level of 1000. If register 7 drops below 1000 by a margin less than 50, then returns to above 1000, the trap will not repeat. The value of register 7 must drop below 950 and return to over 1000 before the trap will repeat.

How do I generate a trap only after the condition has existed for a minimum time?

The on/off time qualifications are used to add time to the criteria. The following example shows a minimum on time of 30 seconds. This means the data in register 7, most likely placed there by sensor hardware, must exceed a level of 1000 for at least 30 seconds before a trap will be generated. If the minimum off time was also set, the rule must test false for that amount of time before it can repeat the "true" trap.

How do I change trap thresholds based on time of day?

Start by using a register for the test threshold rather than fixed value as shown below:

Then alter the contents of this threshold register based on schedule in the Advanced->Scheduler->Weekly Schedule page as shown below.

Using the example setup shown above, the trap will be generated any time register 7 exceeds a level of 1000 between 8AM and 5PM, Monday through Friday. The rest of the time, register 7 needs to exceed a level of 1500 before a trap will be generated. (Note: This capability is only available on products with a hardware real time clock and scheduler features.)