Skip to content

OSCAT BASIC Sensors

Matthias Mersch edited this page Apr 11, 2018 · 1 revision

20. Sensors.

20.1. MULTI_IN

Type Function: REAL
Input IN_1: REAL (input 1)
IN_2: REAL (input 2)
IN_3: REAL (input 3)
DEFAULT: REAL (default value)
IN_MIN: REAL (lower limit for inputs)
IN_MAX: REAL (upper limit for inputs)
MODE: Byte (selection of the operating mode)
Output REAL (output)
MULTI_IN is a sensor interface that accepts up to 3 sensors to check for er-
rors, and depending on the input mode, an output value is calculated.
Mode Function
0 MULTI_in = average of the inputs in_1 3
1 MULTI_in = input in_1
2 MULTI_in = input in_2
3 MULTI_in = input in_3
4 MULTI_in = Default Input
5 MULTI_in = smallest value of the inputs in_1 3
6 MULTI_in = largest value of the inputs in_1  3
7 MULTI_in = mean value of the inputs in_13
>7 MULTI_in = 0
Regardless of the mode input values that are greater than IN_MAX or less
than IN_MIN be ignored. If no calculation is possible as defned by mode,
the input Default is used as a output value. Multi_in is used when diferent
sensors measures the same value and high security and reliability is requi-
red. A possible application is to measure the outside temperature at va-
rious points and the surveillance on cable or sensor failure.

20.2. RES_NI

Type Function: REAL
Input T: REAL (temperature in °C)
R0: REAL (resistance at 0° C)
Output REAL (resistance)
RES_NI calculated the resistance of a NI-resistance sensor from the input
values T (temperature in°C) and R0 (resistance at 0°C).
The calculation is done using the formula:
RES_NI = R0 + A*T + B*T²+C*T 4
A = 0.5485
B = 0.665E-3
C = 2.805E-9
The calculation is suitable for temperatures from -60 +180 °C.

20.3. RES_NTC

Type Function: REAL
Input T: REAL (temperature in °C)
RN: REAL (resistance at 25°C)
B: REAL (characteristic value of the sensor)
Output REAL (resistance)
RES_NTC calculated the resistance of an NTC resistance sensor from the
input values T (temperature in °C) and RN (resistance at 25°C). The input
value B is a constant value which must be read in the data sheets of that
sensor. Typical values are at NTC sensors 2000 - 4000 Kelvin.
The calculation is done using the formula:
The formula provides a sufcient accuracy for small temperature ranges,
eg 0-100°C. For wide temperature ranges the formula according to Stein-
hart is more suitable.

20.4. RES_PT

Type Function: REAL
Input T: REAL (temperature in °C)
R0: REAL (resistance at 0° C)
Output REAL (resistance)
RES_PT calculates the resistance of a PT resistance sensor from the input
values T (temperature in °C) and R0 (resistance at 0°C).
The calculation is done using the formula:
for temperatures > 0 °C
RES_PT = R0 * (1 + A*T + B*T²)
and for temperatures below 0 ° C
RES_PT = R0 * (1 + A*T + B*T² + C*(T-100)*T³
A = 3.90802E-3
B = -5.80195E-7
C = -427350E-12
The calculation is suitable for temperatures from -200 +850°C.

20.5. RES_SI

Type Function: REAL
Input T: REAL (temperature in °C)
RS: REAL (Resistance at TS °C)
TS: REAL (temperature at RS)
Output REAL (resistance)
RES_SI calculates the resistance of a SI-resistance sensor from the input
values T (temperature in °C) and RS, resistance at TS in °C. In contrast to
the modules RES_NI and RES_PT which R0 is given at 0°C, the resistance
specifed for RS for SI sensors at diferent temperatures (eg 25°C for
KTY10). Therefore, the module has an input for RS and another for TS.
The calculation is done using the formula:
RES_SI = RS + A*(T-TS) + B*(T-TS)²
A = 7.64E-3
B = 1.66E-5
The calculation is suitable for a temperature range of -50  +150°C.

20.6. SENSOR_INT

Type Function: REAL
Input VOLTAGE : REAL (measured in volts)
CURRENT : REAL (Current measured in amperes)
RP: REAL (parallel parasitic resistance in ohms)
RS: REAL (serial parasitic resistance in ohms)
Output REAL (resistance of the sensor)
SENSOR_INT calculate the sensor resistance, taking into account the para-
sitic resistances, which usually afect the measurement. The A / D conver-
ter measures either current at a fxed voltage or voltage at a fxed current.
The resulting resistance is not only the resistance of the sensor, but is
composed of the resistance of the sensor and two parasitic resistances RS
and RP. Since the parasitic resistances remain constant, they can be com-
pensated and the real resistance of the sensor can be calculated.
Between the terminals A and B measured resistance (measured by current
and voltage) is a total resistance of the sensor resistance in parallel to the
parasitic resistance RP and the line resistance RS. RS and RP, are compen-
sated the real resistance RX is calculated. The modules can TEMP_ then be
calculated as the exact temperature.

20.7. TEMP_NI

Type Function: REAL
Input RES: REAL (resistance in ohms)
R0: REAL (resistance at 0° C)
Output REAL (measured temperature)
RES_NI calculates the temperature of a NI-resistance from the RES sensor
input values (measured resistance value) and R0 (resistance at 0°C).
The calculation is suitable for a temperature range of -60 +180 ° C and
made by the following formal:
RES_NI = R0 + A*T + B*T²+C*T 4
A = 0.5485; B = 0.665E-3; C = 2.805E-9

RP

RS

RX

A B

20.8. TEMP_NTC

Type TEMP_NTC
Input RES: REAL (measured resistance in ohms)
RN: REAL (resistance of the sensor at 25°C)
B: REAL (specifcation of the sensor)
Output REAL (measured temperature)
TEMP_NTC calculates from the measured resistance and the parameters of
the sensor, the measured temperature. RN is the resistance of the sensor
at 25°C, and B depends on the sensor and the specifcation of the sensor.
The module calculates the temperature according to the following formu-
la:

20.9. TEMP_PT

Type Function: REAL
Input RES: REAL (measured resistance in ohms)
R0: REAL (resistance at 0° C)
Output REAL (measured temperature)
TEMP_PT calculates the temperature of a PT-resistance from the RES sen-
sor input values (measured resistance value) and R0 (resistance at 0°C). If
the inputs has a temperature outside the range of -200 + 850°C, at the
output the temperature output +10000.0°C is passed.
The calculation is done using the formula:
for temperatures > 0 °C
RES_PT = R0 * (1 + A*T + B*T²)
and for temperatures below 0 ° C
RES_PT = R0 * (1 + A*T + B*T² + C*(T-100)*T³
A = 3.90802E-3; B = -5.80195E-7; C = -427350E-12

20.10. TEMP_SI

Type Function: REAL
Input RES: REAL (measured resistance in ohms)
RS: REAL (resistance at 0°C)
TS: REAL (temperature is defned in RS)
Output REAL (measured temperature)
TEMP_SI calculates the temperature of a resistor sensor input values from
the RES (resistance in ohms) and RS, Resistance at TS in °C. It is specifed
in contrast to the modules TEMP_NI and TEMP_PT with their R0 at 0°, the
resistance RS is given in SI sensors at diferent temperatures (eg 25° C for
KTY10). Therefore, the module has an input for RS and another for TS.
The calculation is done using the formula:
RES_SI = RS + A*(T-TS) + B*(T-TS)²
A = 7.64E-3; B = 1.66E-5
The calculation is suitable for temperatures from -50 +150 °C.
Clone this wiki locally