The modification uses the EasyFlex function of the COMPACT. The formula to use is: (x - 4) * (20 - 0) / (20 - 4) + 0 where "x" is the value of our 4-20mA sensor. In our case, we can reduce the formula to: (x - 4) *20 / 16
You need to know the numerical value for 20mA, to do this put 20mA on the BECKHOFF input and note the maximum value in the display page on the CANOPEN inputs.
Divide this measurement by 20: then round it to the next higher unit, 1637
Go to EasyFlex, then add a user variable in the result, the BECKHOFF entry in variable 1, put the division in the operator, and a constant in variable 2 with the calculation of our previous division.
Input BECKHOFF / 1637
To apply the formula, all you have to do is take the result from line 1, place it in variable 1 of line 2, apply an operation against variable 2, and set a variable to retrieve the result from line 2.
After applying the formula with EasyFlex :
For 4mA : 0mA
For 20mA : 20mA
At this step the 4-20mA to 0-20mA conversion works.
You then need to add a line with the following multiplication: result of the 4-20mA to 0-20mA conversion times the result of the first division in order to convert to 20mA and obtain the starting numerical value.
To increase precision, add 0.01 to each user variable.
Conversion is done
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article