Each HW data point has value transformation properties. They are used to recalculate the raw value read over the I/O bus to a value which represents the corresponding physical value or written from variable to I/O.
If a transform has to be applied on the client side, for example a value of 1236 to 12.36, the raw value must be divided by 100. The coeficient K of a linear transformation is then 0,01. If this value is read, it is simple and logical. This logic needs to be applied for the writing process as well. If you have value of 12.36 in a program and you want to transform it to 1236 on a communication bus, the value must be divided by 100, and the coeficient is again 0,01. There is no difference between reading and writing here.
For example, a temperature measured by a passive Pt1000 sensor as resistance, multiplied by 10 to obtain higher resolution when communicated as INTEGER: for a Pt1000 sensor at 22 °C the communicated value on the I/O bus is 10857, which represents the sensor resistance of 1085.7 Ohm. This value is linearised in the Pt1000 specific linearisation table „resistancetotemperature“, and the output is temperature in °C.
These are the predefined transforms:
Identity - the value is not transformed, it is written as is
Resistance to temperature - linearisation curve for Pt100, Pt500, Pt1000, Ni1000-5000, Ni1000-6180 sensors. The transform has following parameters:
Kind - sensor type which determines the predefined linearisation curve
Pre_K - first linear pre-linearisation transform y = Kx + Q coefficient
Pre_Q - first linear pre-linearisation transform y = Kx + Q coefficient (used for sensor cable resistance compensation)
Post_K - second linear post-linearisation transform y = Kx + Q coefficient
Post_Q - second linear post-linearisation transform y = Kx + Q coefficient (used for compensation of absolute sensor measuring error in °C)
Threshold - detector for transform of an analogue value into binary value (if an AI is used as a DI). The transform has following parameters:
Threshold - a limit to switch from True to False and back
Invert - inverts the function: if Invert = True, the transform output is False if the input value is higher than the Threshold.
Window - if the input value is between predefined limits, the output is True, otherwise False. Example: damaged sensor detection - if the measured value is lower than -40 °C or higher than 150 °C, the sensor is damaged and the output value is True (using the Invert function)
Low - lower limit
High - higher limit
Invert - inverts the function: if Invert = True then if the value is within limits, the output is False, otherwise it is True.
LinearByTable- linearisaton curve with max. 8 points. The curve is defined using pairs of values - coordinates of the points in X and Y vectors.
XValues - vector with X coordinates of the linearisation curve points
YValues - vector with Y coordinates of the linearisation curve points
Active points - number of points used, max. 8, taken from the left of the vector
Pre_K - first linear pre-linearisation transform y = Kx + Q coefficient
Pre_Q - first linear pre-linearisation transform y = Kx + Q coefficient
Post_K - second linear post-linearisation transform y = Kx + Q coefficient
Post_Q - second linear post-linearisation transform y = Kx + Q coefficient
Negate - for bool type values, negates the input value
LinearByTwoPoints - a simple linear transform defined by two points
X1 - X coordinate of the first point
Y1 - Y coordinate of the first point
X2 - X coordinate of the second point
Y2 - Y coordinate of the second point
Linear - a simple linear transform defined by y = Kx + Q
K - multiplication coefficient
Q - addition coefficient
A transform is defined „from the physical inputs to the program (structured text)“, IO->ST - if there is a global variable mapped on a HW variable for writing (hardware analogue output), and a value multiplied by 100 shall be written, e.g. a HVAC integer, a constant of k=0,01 must be entered in the linear transform. This rule is used in other transformations as well. Transformations "LinearByTable" and "LinearByTwoPoints" have parameters X and Y. X stands for values, that are written to output. Y values are values visible in our project.
1) Change of analog type
If analog type is changed on a data point, reconfigure the modules accordingly by right click on the device - Domat module configuration. The modules must be online. It is not necessary to deploy the solution to apply the configuration in the module(s).
Successfull module reconfiguration is indicated by a dialog.
2) Change of data point transformation
A mere change of data point trasformation parameters does not require reconfiguration of the I/O module. To apply changes, just upload the solution to a PLC, and run PLC with warm restart. The change of parameters can be verified in Debug mode, in Variable Browser at the datapoint with hw_hidden namespace.
a) Change the transform e.g. from ResistanceToTemperature to another transform, e.g. Linear, upload the solution, and run the PLC with warm restart. Then, change the transform to its original value (from Linear to ResistanceToTemperature) and configure the temperature sensor type and parameters. After solution upload and warm restart, the new parameters are applied. This way does not require cold restart.
b) In case the project is allowed to be rerun with cold restart, change the parameter, upload the solution, and run the PLC with cold restart.
Hints and tips when configuring the data points
1. To configure a data point, it is not necessary to rerun the project with cold restart.
2. Reconfiguration of a data point is only required if an analog type has been changed..
3. After changing a transform, only solution upload and warm restart are necessary.
4. In case the project must not be rerun with cold restart (technological reasons) and a parameter change is necessary, proceed according to a) above.