Yep, if UpperPos and LowerPos are used as the requested position in a motion command, then those expressions should work just fine. Otherwise, you should use a range like you did initially, since floating point positions are rarely identical unless purposely made identical.