TechTip: Calculating The Difference Between Two Values Using a Macro In a Weintek HMI
This TechTip is about using a macro for a simple calculation to determine the difference between 2 values. To calculate the difference between 2 values, first we use the “>=” operator to determine if value1 is greater than or equal to value2, if this is the case, our result is calculated value1 – value2. If value2 is greater than value1 then our result calculation is value2 – value1. The macro is shown below: As usual there’s a demo project available for you to try out using EasyBuilder Pro’s excellent simulator. Download the demo here.