Table of Contents

Variable transformation, configuration of analogue inputs

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 is communicated from the I/O module RCIO 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:

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.

Configuration of AI - analog input for Pt1000 sensor using on Domat I/O module

If a resistance temperature sensor is connected to a physical analogue input of a module, we need to be sure that the correct physical value is measured, and that the correct type of transformation is used.

At first, the correct physical value must be chosen on the AI. This can be done by changing “Analog Type - MMIO/MCIO2” property in AI properties. We have three options how to measure temperature with Pt1000 sensor. The first one is to use “Temperature Pt1000 -50..150°C” option. In this case, the linearization would be done in I/O module. However, a recommended solution is to use “Resistance 0..1600Ohm” or “Resistance 0..5000Ohm” option. In this case, the linearization will be done in PLC, on the runtime level.




The next step is to set the correct transformation. To transform resistance to temperature, “ResistanceToTemperature” transformation must be chosen.

Then select „kind“ as Pt1000. This selects the set of coefficients in the linearisation table automatically. The last step, which is defined by character of AI, is to set variable pre_k to value 0.1. This will modify the input signal before SW transformation. Result of these steps is final value in °C. Resistance 0-1600 Ohm is on AI measured in range 0-16000 (Ohm * 10 for higher resolution), therefore it needs to be divided by 10 before entering the transformation. This setting can be specific for Domat I/O modules only.

The last step is to upload our configuration to the I/O module and to the PLC. Default setting on AI of I/O module is Voltage 0-10V. The AI setting needs to be changed to Resistance 0-1600 Ohm or 0-5000 Ohm. If all AIs are edited as necessary, the solution can be deployed to the PLC. The process of deployment is described in chapter Uploading of a program to a PLC. PLC must be then started in Commissioning mode. In this mode, the IDE is able to communicate directly with I/O modules and change their settings. Settings of Domat modules can be changed by clicking on “Domat - Configure module” option in the context menu of an I/O module.



This change will be shown immediately and I/O module does not need to be restarted manually.
The transformation is uploaded with the solution in the process of deployment. If we switch the PLC run mode to “Full run” or “Only communication” mode, all AIs should show correct measured temperature immediately. Remember to restart the PLC as Cold restart.

Hidden variables (namespace HW hidden)

If a transform is used on a data point, such as Lib.Core.v1_0.ResistanceToTemperature, new variables with namespace “hw_hidden” are visible in the Variable Browser after compilation. These variables are not available until the project has been compiled.

Unwrap a “HW hidden” variable to display the parameters of  the transformation in “Channel name”.“Device Name”.“Data Point”.“transformation” (e.g. channel.MCIO2.AI1.transformation). Start debug to watch the real values in the “PLC Value” column, while in the “Initial Value” the preset value in the controller is displayed.

Change of analog type

If analog type is changed on a data point, reconfigure the Domat 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).

Successful module reconfiguration is indicated by a dialog.

Change of data point transformation

A mere change of data point transformation 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. 

  1. 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.
  2. 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.