14. BuildMB Process

After the database is entered, the data conversion coefficients for all of the data points must be calculated. This is done by invoking the BuildMB family of programs.

The buildmb script should be run after the initial creation of a new database, as well as when one of the following has been changed in the DescRec table: SpanMin, SpanMax, DataType, Size, DRkey, MBconvKey, or MBsetIncKey. If MBconvKey is not set to 'Y', buildmb will ignore the record when calculating M and B. If MBsetIncKey is not set to 'Y', buildmb will ignore the record when calculating IncVal.

Invoke a buildmb function by typing the following (as user 'postgres'):

buildmb <arg>

Lin

Build coefficients for records with DataType = 'Lin'.

NLin

Build coefficients for records with DataType = 'NLin'.

Alog

Build coefficients for records with DataType = 'Alog'.

NAlog

Build coefficients for records with DataType = 'NAlog'.

CVG

Build coefficients for records with DataType = 'CVG'.

CVG_275

Build coefficients for records with DataType = 'CVG_275'.

CCVG

Build coefficients for records with DataType = 'CCVG'.

PVG

Build coefficients for records with DataType = 'PVG'.

TCG

Build coefficients for records with DataType = 'TCG'.

IGCgp

Build coefficients for records with DataType = 'IGCgp'.

LinSetInc

Set IncVals for records with DataType = 'Lin'. See rules below.

NLinSetInc

Set IncVals for records with DataType = 'NLin'. See rules below.

all

Invokes all of the arguments.

Here is a list that explains, by DataType, how buildmb treats a record.

Lin

Constructs coefficients for all cases. IncVal is set to the value of M for records where DataType = 'Lin' and Owner = 'CrtTsk'.

NLin

Constructs coefficients for all cases. IncVal is set to the value of M for records where DataType = 'NLin' and Owner = 'CrtTsk'.

Alog

Constructs coefficients for all cases. IncVal is not set.

NAlog

Constructs coefficients for all cases. IncVal is not set.

BCD

Not supported. When used, coefficients should be entered manually, usually with M = 1.0 and B = 0.0.

TCG *

Sets M and B to the correct values to provide a scaler between 0 and 10 for the conversion routine. IncVal is not set.

CVG *

Sets M and B to the correct values to provide a scaler between 0 and 10 for the conversion routine. IncVal is not set.

CVG_275 *

Sets M and B to the correct values to provide a scaler between 0 and 10 for the conversion routine. IncVal is not set.

CCVG *

Sets M and B to the correct values to provide a scaler between 0 and 10 for the conversion routine. IncVal is not set.

PVG *

Sets M and B to the correct values to provide a scaler between 0 and 10 for the conversion routine. IncVal is not set.

Ldisp

Not supported. When used, coefficients should be entered manually, usually with M = 1.0 and B = 0.0.

Raw

Not supported. When used, coefficients should be entered manually, usually with M = 1.0 and B = 0.0.

IGCgp *

Sets M and B to the correct values to provide a scaler between -10 and 0 for the conversion routine. IncVal is not set.

AlinLog

Constructs coefficients for all cases. IncVal is not set.

NAlinLog

Constructs coefficients for all cases. IncVal is not set.

DataTypes marked with an * are handled by the runtime system in the following way: When the data(X) is processed, M and B are applied to scale the value between the desired range (Y = MX + B). The scaled value is then sent to what is called a piece table. A piece table is a predefined set of steps/ranges. Each range contains an internal set of M and B values. The internal set of M and B are applied using the same equation to the scaled value to obtain the final physical value.