Data recorded from a 4-20mA analogue input can be calibrated in the Outpost Central site using a linear or piecewise calibration by entering the relevant calibration data for the input.

**Calibrating input**

- From the
**Sites**page, click**Sensor Config**() for the site you wish to calibrate. - A new
**Sensor Config**window opens. - Click the sensor calibration link ().
- A new
**Input Settings**window opens. - In the
**Calibration**tab, select calculation type and enter calibration details.

There are two calculation types:

- Linear
- Piecewise

**Linear Calculation**

This calculation method follows the simple linear relation between calibrated measurement value and input measurement value. See Wikipedia Linear Equation.

Data required:

- A 0mA or 4mA low point and it's corresponding value
- A 20mA high point and it's corresponding value
- Stabilisation time - time required by sensor attached to input to power up before it can provide an accurate measurement
- Unit label - select from drop-down list or enter your own

The linear calculation is stored according to the generic linear function:

*f(x) = mx + c*

where ** m** and

*are constants.*

**c**The input is therefore calculated where:

f(x) = calibrated measurement value

x = input measurement value

m = reciprocal of difference between raw values

c = difference of calibrated values

**Piecewise Calculation**

This calculation method is defined by multiple sub functions where each sub function is applied to certain define intervals of the main function's domain. See Wikipedia Piecewise Function.

The piecewise calculation is stored according to piecewise functions. For example:

where specified calibrated values has to be defined within the sub functions.

Piecewise calculations are entered as per below syntax:

*<raw value 1>,<calibrated value 1>;<raw value 2>,<calibrated value 2>,...*

For piecewise functions the x values must be set as the value being logged (not V or mA) and in order to yield a final value in V or mA a scaling factor must be applied :

for 4-20mA (PIC ADC), divide by 0.000625

for 0-5V (PIC ADC 0-5V, PIC ADC0-5V V2) divide by 0.000154677384

See here for more information on the 4-20mA Analogue channel