dataTaker - Data Loggers, Powerful and Flexible Data Acquisition & Data Logging Systems

Scaling Data - Polynomials, Spans & Functions

The dataTaker has many methods for scaling and manipulating data collected from input channels. Often a combination of the different methods can be used to linearise or calibrate the data from sensors.

Scaling data is principally used for converting or linearizing the electrical signals measured on the input channels, into units of the physical quantity that is being measured.

Other reasons for scaling data include adjusting for attenuation of inputs, specifying the resistance of current shunts, changing the magnitude of data, etc.

The methods available for scaling data with the dataTaker include

Automatic Scaling

Channel Factors

Spans

Polynominals

Intrinsic Functions

Calculations

Automatic Scaling

The input channels of the dataTaker accept many different signal types. The dataTaker automatically scales the standard signal types to their respective engineering units.

The fundamental signal types supported by the dataTaker include voltage, current, resistance, frequency and digital state, and this data is returned in predefined engineering units of millivolts, milliamps, Ohms, Hertz, State, etc.

Sensors with standardised characteristics such as thermocouples, RTD's, IC temperature sensors, vibrating wire transducers, and thermistors are automatically linearized to physical units such as temperature by internal polynomials, prior to being returned to the host or logged.

Automatic scaling of input channels is illustrated in the following program

BEGIN
 RA1M
  1V  2TK  3R
END

In this example the dataTaker automatically scales the data from raw output of the analog to digital converter to electrical units, and in the case of the type K thermocouple the dataTaker also performs cold junction compensation and linearization of the measured voltage to units of temperature. Data from tis program will be returned as

1V  1283.67 mV
2TK  86.2 Deg C
3R  2876 Ohms

The dataTaker has linearization functions for all of the commonly used types of thermocouples, RTDs, IC temperature sensors and YSI thermistors.

Channel Factor

The simplest method of scaling raw data from an input channel or internal channel is by applying a Channel Factor directly to the channel data. The raw data is simply multiplied by the Channel Factor.

The Channel Factor has a predefined function for most of the input signal types supported by the dataTaker, as follows

Voltage, Thermocouples, LM335 ñ the Channel Factor specifies an attenuation factor for these signal types if inputs have been externally attenuated. External attenuation mainly applies to voltage signals which exceed the input voltage range of the dataTaker, and must be externally reduced by an attenuator. The measured voltage is scaled up by the attenuation factor to the magnitude range of the original signal. The default Channel Factor for these types is 1.0.

Current, Current Loop, AD590, AD592 – the Channel Factor specifies the resistance of the current shunt used for measuring the current signals. The default current shunt resistance is 100.0 OhmsΩ, however larger and smaller shunt resistances can be used to suit different current magnitudes to be measured. The shunt resistance is used by the dataTaker to calculate current flow from the measured voltage produced across the shunt by the unknown current.

Bridge ñ the Channel Factor specifies the arm resistance for current excited resistance bridges. The default Channel Factor is 350.0 Ohms.

RTDs ñ the Channel Factor specifies the resistance of the RTD element at 0°C. However RTDs with a different resistance at 0°C can be supported by the dataTaker by specifying this as the Channel Factor. The default Channel Factor is 100.0 Ohms.

System Timers, Counters ñ the Channel Factor specifies the maximum or terminal count. The range of the counters can be customised by specifying different maximum or terminal counts as a Channel Factor. The default Channel Factor varies for System Timers, and is 65535 Counts for counters.

Frequency and Period ñthe Channel Factor sets the minimum measurable frequency, by defining the longest period. The default Channel Factor is 30 mSec, for 33Hz minimum frequency.

Vibrating Wire ñthe Channel Factor sets the delay between plucking the wire and reading the wire frequency. The default Channel Factor is 200 mSec.

Resistance, Channel Variables, System Variables ñ the Channel Factor is undefined, and so can be used to scale the data by a linear factor.

Digital ñ the Channel Factor is for various functions, depending on the signal types.

The Channel Factor is entered as a Channel Option (See Section III ñ Channel Options) for the input channel as follows

RA5S 1V(10.1) 4PT385(250.0) 7F(1000) 3CV(2.2)

1V(10.1) ñ an externally attenuated voltage is applied to analog channel 1. The dataTaker measures the input voltage, and multiplies this by the attenuation factor and returns the data in the magnitude range of the original signal.

4PT385(200.0) ñ a platinum RTD connected to analog channel 4 has a resistance of 250Ω Ohms at 0°C. The dataTaker uses this resistance rather than the default of 100 OhmsΩ when calculating the temperature represented by the signal from the device.

7F(1000) ñ a low frequency signal connected to analog channel 7 is less than the default minimum measurable frequency of 33 Hz. The Channel Factor sets maximum period to 1000mSec, enabling a minimum measurable frequency of 1 Hz.

The data stored in Channel Variable number 3 is simply scaled up by the factor of 2.2.

Intrinsic Functions

The dataTaker has 7 Intrinsic Functions that can be used to convert data in various ways.

The Intrinsic Functions are applied as Channel Options for the input channel or Channel Variable (See Section III ñ Channel Options). The Intrinsic Functions are mutually exclusive , such that only one Intrinsic Function can be applied to each channel or Channel Variable.

The Intrinsic Functions supported by the dataTaker are listed in the following table

 

Channel Option


Function

Unit Text Modifier

F1

Inverse of data (1/x)

(Inv)

F2

Square root of data (√Öx)

(Sqrt)

F3

Natural Logarithm of data (Logn)

(nLog)

F4

Logarithm Base 10 of data (Log10)

(Log)

F5

Absolute value of data (|x|)

(Abs)

F6

Square of data (x2)

(Squ)

F7

Grey code conversion (8 bit)*

(Gc)

* (See Section III ñThe Digital Input Channels

When Intrinsic Functions are applied to input channels or Channel Variables, the data is returned with the units text appropriate to the channel, appended with the units text modifier for the Intrinsic Function.

Using DeTransfer, Intrinsic Functions are applied to input channels and Channel Variables for example

BEGIN
 RA10M  1V(F1)  2V(F2)  3V(F3)  4V(F4)
END

which will return data in the format

1V  0.036 mV (Inv)
2V  4.758 mV (Sqrt)
3V  2.38 mV (nLog)
4V  4.356 mV (Log)

The channel number and units text are returned with the data according to the settings of the (/n /N) and (/u /U) Switches, Parameter22 and Parameter24 (See Section III ñ Format of Returned Data).

Using DeLogger, the Intrinsic Functions are applied to input channels and Channel Variables in the

 

in the Program Builder by first defining the channel or Channel Variable, then right click on the Data Use icon, select PropertiesÖ, select the Intrinsic tab in the Channel Properties dialog, and select the required function.

Intrinsic Functions can also be selected by right clicking on the channel icon, and follow the walking menu through Channel Options:Data Conversion:Calculation:Intrinsics and select the required Function from the list of Functions.

 

 

Introduction to Polynomials and Spans

The Polynomials and Spans extend the flexibility of the dataTaker, allowing the raw data for almost any type of sensor to be linearized to engineering units that are appropriate to the physical parameter being measured.

Polynomials are used to convert sensors with either curvilinear (non-linear) and linear calibrations, to engineering units.

Spans are used to convert sensors with linear calibrations to engineering units. Spans are particularly suited to current loop transmitters, which by definition have linear scaling.

The Polynomial and Span declarations are stored in a common area of dataTaker memory. A maximum of 20 Polynomials, 20 Spans, or any combination (eg. 17 Polynomials and 3 Spans) can be defined.

Polynomials

A Polynomial describes the relationship between the output signal from a sensor (which is plotted on the X axis of a graph), and the physical parameter that the sensor is measuring (which is plotted on the Y axis of a graph).

They are used to convert signals from sensors that have both curvilinear (non-linear) or linear calibrations.

The dataTaker supports a maximum of 20 polynomials, which are numbered 1 to 20. The Polynomial declarations share the internal storage memory with the Span declarations.

The polynomials can be defined as a 1st, 2nd, 3rd, 4th or 5th order polynomial, and units text can be defined appropriate to the new data.

Higher polynomial orders describe greater degrees of non-linearity in the relationship between the sensor signal and the physical parameter measured.

The polynomials are described mathematically as follows

ï first order (linear)         Y = a + bX
• second order              Y= a + bX + cX 2
• third order                  Y= a + bX + cX 2 + dX 3
• fourth order                Y= a + bX + cX 2 + dX 3 + eX 4
• fifth order                   Y= a + bX + cX 2 + dX 3 + eX 4 + fX 5

where

Y                       is the calculated data in terms of the physical parameter measured
X                       is the raw data measured from the sensor
a, b, c, d, e, f      are the polynomial coefficients

Declaring Polynomials

The Polynomial coefficients are entered into the dataTaker in the general format

Yn=a,b,c,d,e,f"units text"

where

Y                       is the polynomial identifier
n                       is the polynomial number (1 ñ 20)
a, b, c, d, e, f      are the polynomial coefficients
"units text"           is the user definable units text

The Polynomial number must be in the range of 1 to 20, and must not be a number used for a Span (see below).

The "units text" string is optional, and allows engineering units appropriate for the physical parameter being measured to be defined. The units text string is limited to a maximum of 7 characters, and may contain control characters which are entered in the two character format of eg. ^G  (Bell)  ^M (CR)  ^J (LF) etc.

The dynamic range for the calculated data from polynomials is ±1.00e-18  to  ±1.00e18.

An example of a curvilinear calibration between the output voltage and the applied load for a load cell is illustrated below

 

 

Figure 129 - A Load Cell Calibration

The polynomial for the curvilinear relationship between the millivolt output and applied load for the load sensor is obtained by a regression for example

Y=1.42+7.04X-0.099X2+0.001X3-2.88e-6X4+3.93e-9X5

The Polynomial is defined to the dataTaker in terms of its coefficients ñ the powers of X do not need to be entered because these are implied and the dataTaker understands this.

Using DeTransfer, the polynomial is entered into the dataTaker as polynomial number 1 as follows

Y1=1.42,7.04,-0.099,0.001,-2.88e-6,3.93e-9"Kgm"

where the polynomial coefficients only are listed. The coefficients are separated by commas, and there must be no included spaces. Any zero coefficients must be included to enable the following coefficients to be given the correct ascendancy.

The polynomial coefficients can be entered either in floating point format (1.42, 0.099), or exponential format (1.55e-3, 3.0e2)

While polynomials up to the 5th order (6 coefficients) are permitted, lower order polynomials can be used and are entered as follows

Y2=3.67,-1.22"KWatts"

which in this case describes a second order polynomial, which is a linear relationship.

Using DeLogger, Polynomials are entered in the Program Builder. Click on the Settings tab, right click on the Polynomial button and select PropertiesÖ to open the Polynomials dialog. Click on the tab for the Polynomial number you are defining, and Enter the coefficients and units text for the new Polynomial. Click Apply to store the values, and either click on the tab for the next Polynomial number to define, or click OK to finish.

 

 

DeLogger only allows 10 Polynomials and 10 Spans to be defined rather than any mix totalling 20 as the dataTaker allows.

Using Polynomials 

Defined Polynomials are specified as a Channel Option for input channels, Channel Variables, etc to linearise the original data.

Using DeTransfer, this is illustrated in the following program

Y1=1.42,7.04,-0.099,0.001,-2.88e-6,3.93e-9"Kgm"
Y2=3.67,1.22"KWatts"
Y9=84.65,3.9"m/sec"

BEGIN
 RA15M
  5V(Y1)  6V(Y2)  8F(Y9,"Speed")
END

which will result in data of the format

5V  224.37 Kgm
6V  85.63 Kwatts
Speed  26.431 m/sec

The channel number and units text are returned with the data according to the settings of the (/n /N) and (/u /U) Switches, Parameter22 and Parameter24 (See Section III ñ Format of Returned Data).

Polynomials can be specified as a Channel Option to sequences of channels using DeTransfer, as follows

R1H  1..5V(Y1)  6..10R(Y2)

where Polynomial Y1 is specified as a Channel Option to channels 1 through 5, and the Polynomial Y2 is specified as a Channel Option to channels 6 through 10.

Using DeLogger, defined Polynomials are specified as a Channel Option for input channels, Channel variables, etc in the Program Builder. Firstly, enter the input channel or Channel Variable into the work area. Right click on the channel icon, and follow the walking menu through Channel Options:Data Conversion:Scaling:Polynomial and select the required Polynomial from the list of defined Polynomials.

 

 

The channel will then change to show the Polynomial being applied between the channel icon and the data use icon.

Using Polynomials for Other Purposes

Polynomials can also be used to carry out various mathematical processing on data, and to attach custom units text to data.

A number of standard mathematical functions which can be implemented using polynomials, for example

squaring of data                                    Y1=0,0,1

cubing of data                                      Y1=0,0,0,1

scaling data by a constant multiplier          Y1=0,multiplier

adding a constant offset to data               Y1=offset,1

Dummy Polynomials can be used to add custom units text to data. This is particularly useful with Channel Variables which do not have units text. For example

Y1=0,1"Widgets"
BEGIN
 RA5M
  10CV(Y1)=(1CV+2CV)/(3CVñ5.67)
END

where Y1 is defined as a dummy polynomial (does not change the magnitude of the data) but has a custom units text which is applied to any data that the Polynomial is applied to.

Obtaining the Polynomial for a Sensor

The polynomial calibration for sensors can usually be obtained from the manufacturer of the sensor.

However in some cases it may be necessary to calculate the sensor polynomial from calibration tables or lookup tables supplied by the manufacturer. This can be done using one of the many statistical software packages available, which have functions for calculating polynomials or for fitting polynomials by least squares regression. The Microsoft Excel spreadsheet package has these functions.

Spans

A Span describes the linear relationship between the output signal from a sensor (plotted on the X axis of a graph), and the physical parameter that the sensor is measuring (plotted on the Y axis of a graph).

Spans are used to convert signals from sensors which have linear calibrations, into units in terms of the physical parameter being measured. Spans are particularly suited to converting data from current loop transmitters which by definition have linear scaling.

The dataTaker supports a maximum of 20 spans, numbered 1 to 20. The Span declarations share internal memory with the Polynomial declarations.

Spans are described mathematically as follows


where

S       is the calculated data in terms of the physical parameter
a       is the lower physical co-ordinate
b       is the upper physical co-ordinate
c        is the lower signal co-ordinate
d       is the upper signal co-ordinate

Declaring Spans

Spans are entered into the dataTaker in the general format

Sn=a,b,c,d"units text"

where

S                 is the span identifier
n                 is the span number (1 - 20)
a                 is the lower physical co-ordinate
b                 is the upper physical co-ordinate
c                 is the lower signal co-ordinate
d                 is the upper signal co-ordinate
"units text"     is the user definable units text

The span number must be in the range of 1 to 20, and must not be a number used for a Polynomial (see above).

The "units text" string is optional, and allows the engineering units for the physical parameter being measured to be defined. The units text string is limited to a maximum of 7 characters, and may contain control characters which are entered in the two character format of eg. ^G  (Bell)  ^M (CR)  ^J (LF) etc.

The dynamic range for the calculated data from spans is ±1.00e-18  to  ±1.00e18.

An example of a linear calibration between the output voltage and temperature for an infrared detector is illustrated below

 

 

Figure 130 ñ Infrared Detector Calibration

 

The infrared detector has an output of 200mV for a temperature of 320°C, and 500mV for a temperature of 1170°C.

Using DeTransfer, the Span for the linear relationship between the temperature and millivolt output signal from the infrared detector is entered into the dataTaker as follows

S1=320.0,1170.0,200.0,500.0"Deg C"

The Span co-ordinates are separated by commas, and there must be no included spaces. Embedded zero co-ordinates must be included to enable following co-ordinates to be given correct ascendancy.

The span co-ordinates may be entered either in floating point format (12.63, 0.001), or in exponential format (1.55e-3, 3.0e2)

Using DeLogger, Spans are entered in the Program Builder. Click on the Settings tab, right click on the Span button and select PropertiesÖ to open the Span dialog. Click on the tab for the Span number you are defining, and Enter the co-ordinates and units text for the new Span.

Click Apply to store the values, and either click on the tab for the next Span number to define, or click OK to finish.

 

 

DeLogger only allows 10 Polynomials and 10 Spans to be defined rather than any mix totalling 20 as the dataTaker allows.

Using Declared Spans

Defined Spans are specified as a Channel Option for input channels, internal channels, Channel Variables, etc to linearise the original data.

Using DeTransfer, this is illustrated in the following program

S1=0.0,1500.0,100.0,600.0"Deg C"
S15=20,100,-2500,2500"l/min"

BEGIN
 RA10M
  1V(S1)  3V(S15)
END

which will result in data of the format

1V  845.36 Deg C
3V  55.438 l/min

The channel number and units text are returned with the data according to the settings of the (/n /N) and (/u /U) Switches, Parameter22 and Parameter24 (See Section III ñ Format of Returned Data).

Spans may also be specified as a Channel Option to sequences of channels using DeTransfer as follows

R1H  1..5V(S1)  6..8R(S2)

the Span S1 is specified as a Channel Option to input channels 1 - 5, and Span S2 is specified as a Channel Option to input channels 6 - 8.

Using DeLogger, defined Spans are specified as Channel Option for input channels, Channel variables, etc in the Program Builder. Firstly, enter the input channel or Channel Variable into the work area of the appropriate Schedule. Right click on the channel icon, and follow the walking menu through Channel Options:Data Conversion:Scaling:Span and select the required Span from the list of defined Spans.

 

 

 

The channel will then change to show the Span being applied between the channel icon and the data use icon.

Spans for Current Loops

While the dataTaker allows the Spans to be used for any sensor type, Spans have particular relevance to current loop inputs. The current loop signal is in the range of 4 - 20mA that spans the measurement range of the sensor connected to the current loop transmitter.

The dataTaker returns current loop measurements as the percentage of the 4-20mA range that the particular current level represents. For example a 12mA signal in the 4 - 20mA range is returned as 50.00%.

When declaring Spans for current loop inputs, only the two physical span co-ordinates need to be declared. The dataTaker defaults the signal span co-ordinates to 0% and 100 %, which is the data range for current loops.

Using DeTransfer, declaring and using Spans for current loop inputs is illustrated below

S5=0.0,250.0"KPa"

BEGIN
 RA15M
  7L(S5)
END

In this example the sensor pressure range of 0 to 250KPa corresponds to 4 - 20 mA or 0 to 100% of output by the current loop device.

 

Spans for current loop devices can also be specified as a Channel Option to sequences of channels using DeTransfer as follows

R1H  3..5L(S1)

where Span S1 is specified as a Channel Option to channels 3 to 5.

The channel number and units text are returned with the data according to the settings of the (/n /N) and (/u /U) Switches, Parameter22 and Parameter24 (See Section III ñ Format of Returned Data).

Checking the Declaration of Polynomials and Spans

The Polynomials and Spans that have been declared to dataTaker can be checked at any time by the STATUS command. The general STATUS command includes information of the number of Polynomials and Spans defined as part of the general report. The STATUS4 command lists the individual definitions of Polynomials and Spans (See Section III ñ Status Command)

Using DeTransfer, the Polynomials and Spans is checked using the STATUS command as follows

STATUS

which produces a general report which includes details similar to

dataTaker 0 Version 7.00
A B C,none Scan Schedules Active, Halted
3,0 Alarms Active,Halted
2 Polynomial/Spans Defined
Logging is OFF
166350,0 Internal Data Points Free,Stored
79265,1670 Card Data Points Free,Stored
4090,0 Program Characters Free,Stored
/a/C/d/E/f/h/J/K/l/M/N/o/Q/R/S/t/U/v/w/x/y/Z

and the command

STATUS4

produces a detailed report of defined Polynomials and Spans similar to

2 Polynomials/Span Limits Defined
Y3=1.0e-2,1.21,1.03e1,2.2657"KWh"
S8=0,1000,4,20"Deg C"

Using DeLogger, the number of defined Polynomials and Spans can be checked by the dataTaker : Status option from the main menu bar, or the Status button on the main toolbar.

However the actual definition of the Polynomials and Spans are not shown here. These can be found in the Program Builder where the Polynomials and Spans were originally defined.

Obtaining the Span for a Sensor

The span calibration for sensors and current loop transmitters can usually be obtained from the sensor manufacturer.

This information is usually provided either as direct statement of the physical parameter and signal range end points, or a tabulation of the sensor calibration.

If a sensor is being used to measure a physical parameter over a smaller range than the full range of the sensor, then a span can be declared for this sub-range to provide greater resolution.

 

Page Content


Home

Title and Waranty

Go to: Section 2 | Section 3

Section 1


Construction of the dataTaker 50

Construction of the dataTaker 500 600

Construction of the CEM

Getting Started

 

Section 2


Interfacing

Powering the dataTaker

Powering Sensors from the dataTaker

The Serial Interfaces

The RS232 COMMS Serial Interface

The NETWORK Interface

Analog Process

Connect Analog

Analog Chns

Measuring Low Level Voltages

Measuring High Level Voltages

Measuring Currents

Measuring 4-20mA Current Loops

Measuring Resistance

Measuring Frequency and Period

Measuring Analog Logic State

Measuring Temperature

Measuring Temperature with Thermocouples

Measuring Temperature with RTDs

Measuring Temperature with IC Temperature Sensors

Measuring Temperature with Thermistors

Measuring Bridges and Strain Gauges

Measuring Vibrating Wire Strain Gauges

The Digital Input Channels

Monitoring Digital State

The Low Speed Counters

The Phase Encoder Counter

The High Speed Counters

The Digital Output Channels

The Channel Expansion Module

Installing The Panel Mount Display

 

Section 3


Programming the dataTaker

Communication Protocols and Commands

Entering Commands and Programs

Format of Returned Data

Specifying Channels

The Analog Input Channels

The Digital Input Channels

The Counter Channels

The Digital Output Channels

The Real Time Clock

The Internal Channels

Channel Options

Schedules

Alarms

Scaling Data - Polynomials, Spans and Functions

CVs Calcs and Histogram

Logging Data to Memory

Programming from Memory Cards

STATUS RESET TEST

Switches and Parameters

Networking

Writing Programs

Keypad and Display

Error Mess Text

Appendix A - ASCII

Appendix B - ADC Timing