Hi looser,
instead of 'reversing the mathematical function' I just change the increment to positive/negative.
Please keep in mind: NEVER test floating point numbers for equality - use ALWAYS '>=' or '<='! Floating point numbers have only limited precision, so you get rounding errors very fast after repeated adding operations...
Best regards,
GerdW

using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019