Items get into the Utilities category if they demonstrate usefulness within process control. I will try to
explain what each of the following demonstrates as part of it's bullet listing.
- Cals - Compute the Linear Calibration Constants (M and b in the
Equation of a Straight Line: "Y = M * X + b"). Cals computes the Slope and Y Intercept (M and b) constants
to solve the "Y = M * X = b" equation of a straight line. Virtually all Analog to Digital Converters
perform a linear conversion of inputs to their raw converter values. The value that the computer reads
is a unitless number that then must be converted into engineering units. The value of Y, in engineering
units, is directly proportional to the raw reading of X.
For example, a Rabbit BL2100 Smartcat,
input values of 0 to 4095 correspond to voltages of -10.0 volts to +10.0 volts. A
reading of 123 is returned when the input voltage is -9,39927 volts if everything is
calibrated correctly. The reading, 123 times 0.00488401 (the Slope) plus 10.0 (the Y-Intercept)
returns a value of -9,39927 volts.
The equation for a straight line turns out to be the "roofing square" of computing. It is a simple, yet
versatile way of converting from one engineering unit (i.e. Deg F) to another (i.e. Deg C) or for scaling
any kind of graphic display. It is important enough that a machine command (Multiply and Accumulate as in
Y = M * X + b) has been implemented especially for it. Try it - you'll like it!
- ReCal - Re-compute the Linear Calibration Constants based on observed values.
When comissioning a system, it is often easiest to preload the calibration values to the factory defaults. The values
for the Smartcat, reported above will give you a "good" starting point. The values reported back are usually
fairly close, but certainly not to "NIST Tracable" standards. Use a voltage source to feed a voltage to the
system and note it's reading. Then measure the voltage with your DVM to find out what it really is. Do this
at about 10% of full scale and about 90% of full scale. Use ReCal to recompute the Slope and the Y-Intercept and
load these new calibration constants. Now the system readings should match those of the DVM.
Once you are reading the voltages correctly, reload the calibration constants with the published transducer
values - i.e. "0 to 10V represents 0 to 250 PSIA". This will convert your readings from voltages into
fairly close engineering units. Repeat the calibration procedures described above to calibrate to accurate
- XCOMP - Compare directory sub-trees (XCOPY companion). When you use XCOPY
to copy a directory subtree, how do you know that the copy was successful? That is why XCOMP was written - to give you
the assurance that your files were all successfully backed up. XCOMP does a byte for byte comparison of the source
file to the destination file to assure that everything worked. You are going to be suprised how often what you think
are successful copies are not - files that were miscopied, files and expecially files that weren't copied that you thought were.
XCOMP was NOT written to commercial standards. It was written to satisfy my own needs and I am sharing it with you,
so don't gripe about it. If you don't like how something works, correct it (and send me a copy of your corrected code
please so that I can benefit from your efforts also).
Last updated: Monday, February 7, 2011