Frank's email includes a good example of a calculation. To do calculations in InterMapper, the simplest way is to define a new variable, of the type "CALCULATION". Instead of an OID, it takes an expression.
If you are looking to divide by ten, then you will want to use the chartable macro in the display area to force significant digits. Again, Frank's example is good.
Please let us know if you have any questions about setting this up, or run into any trouble. You can also find more information on Calculation variables and the chartable macro in the manual.
Thanks,
Ian Struckhoff
Tech Support
Dartware, LLC
On Feb 17, 2005, at 11:25 PM, Frank Knapp wrote:
Hello all. Is there a way to perform a calculation on a value polled by a custom probe? I am working on a custom UPS probe and my UPS reports output voltage and battery voltage as 4-digit numbers and I need to divide them by 10 to get an accurate figure. Any help is greatly appreciated!
Jesse-
Here is a note I had about calculations, dividing and displaying-
CHARTABLE (allows keeping a calculation chartable)
<!-- Calculations -->
cFBatt, ($VOLT_1 / 10), CALCULATION, "BattVolts"
cHBatt, ($VOLT_1 / 10) - ($VOLT_2 * 2 / 10), CALCULATION, "HalfBattVolts"
</snmp-device-variables>
<snmp-device-display>
?B0?48 VOLT SYSTEM?p?\0\: \2\ -${chartable: ##.##: $cFBatt} Volts \0\| \2\${chartable: ##.##: $cHBatt} Volts\p\
First calculation is used to establish the variable then // ${chartable: ##.##: $cFBatt} Volts // to format the display. The lower ‘display line’ is wrapped in the email.
hth
frank
