Scaling Data - Polynomials, Spans & FunctionsThe 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 ScalingThe 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 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 The dataTaker has linearization functions for all of the commonly used types of thermocouples, RTDs, IC temperature sensors and YSI thermistors. Channel FactorThe 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 FunctionsThe 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
* (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 which will return data in the format 1V 0.036 mV (Inv) 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 SpansThe 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. PolynomialsA 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 where Y is the calculated data in terms of the physical parameter measured Declaring PolynomialsThe 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 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 PolynomialsDefined 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" which will result in data of the format 5V 224.37 Kgm 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 PurposesPolynomials 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" 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 SensorThe 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. SpansA 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 Declaring SpansSpans are entered into the dataTaker in the general format Sn=a,b,c,d"units text" where S is the span identifier 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 SpansDefined 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" which will result in data of the format 1V 845.36 Deg C 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 LoopsWhile 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" 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 SpansThe 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 and the command STATUS4 produces a detailed report of defined Polynomials and Spans similar to 2 Polynomials/Span Limits Defined 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 SensorThe 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 ContentSection 1Construction of the dataTaker 50 Construction of the dataTaker 500 600
Section 2Powering Sensors from the dataTaker The RS232 COMMS Serial Interface Measuring 4-20mA Current Loops Measuring Frequency and Period 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 Installing The Panel Mount Display
Section 3Communication Protocols and Commands Entering Commands and Programs |