The Wago 750-496 card measures current in the range 0…20 mA or 4…20 mA. The prototype has a transformation set with an output of 0…20,000 (uA). However, it would usually be more appropriate to scale the output in the physical units in which the connected sensor measures, i.e. kPa, bar, % rH, Pa, etc. The Linear with shift transformation is not very common, so we will show you how to work with it and how to set its coefficients for any measuring range of the connected sensor.
In Domat IDE, the default transformation settings for 0…20 mA look like this:
The Shift parameter does not mean adding a value before entering the "Kx + Q" function, but a bit shift of the input word. In the documentation - the Wago catalog sheet for the card - we can find the following information:
Of the sixteen-bit word, the first three bits (column XFÜ) are used as status and the analog value is contained in the highest 13 bits (column Binary). Its range is therefore 0…4095.
The sixteen-bit word read via the internal Kbus bus is first shifted to the right by three bits (integer divided by eight) in the transformation in Domat IDE, which is the aforementioned Shift, and then linearly scaled from 0…4095 to 0…20000 (uA), by multiplying it by the constant 4.8828:
4095 * 4.8828 = 19,995 (rounded to 20,000) uA, or 20 mA.
If a sensor with a range of 0…X is connected to the input, e.g. 0…200 kPa, we must adjust the constant K as follows:
K = X / 4095
and therefore for a 0…200 kPa sensor K = 200 / 4095 = 0.04884.
Shift remains equal to 3 and Q = 0, because 0 mA = 0 kPa.
Here the calculation is the same, but we must not forget to set the measurement range on the card to 4…20 mA.
The card then provides input values of 4…20 mA scaled to the range 0…32760, see again the card documentation:
After the already known shift by three bits to the right – removing the status bits – we get the range 0…4095 and again the above applies. For example, for a 0…1000 Pa sensor, the coefficients are as follows:
Shift = 3
K = 1000 / 4095 = 0.2442
Q = 0
However, a more interesting situation occurs if the measured value does not start with zero, e.g. with Premasgard 2121 differential pressure sensors, which can be set to a symmetrical range:
In that case, the signal (after a three-bit shift) 0…4095, which enters the Kx + Q transformation, must be scaled to a range of e.g. -500…500 Pa. How to do this?
It is necessary to solve a system of two equations. We gradually substitute both endpoints into y = Kx + Q:
-500 = K*0 + Q
500 = K*4095 + Q
After subtraction:
-1000 = - K*4095 and therefore K = -1000 / -4095 = 0.2442
We insert the calculated K into the second equation and obtain
500 = 0.2442 * 4095 + Q
Q = 500 – 0.2442 * 4095 = 500 – 1000 = -500
We proceed similarly for asymmetric ranges. If we want to generalize the relationship and call the measured range Min…Max, it applies to both signal types (0…20 mA and 4…20 mA, but we must not forget to set the correct value in the parameter Input Range - Current cards):
K = (Max – Min)/4095
Q = Max – 4095*K
And that's it.