Quote:
Originally Posted by grosh
Can I ask one more question? Can you explain the logic of the In Range and Coerce for this instance. I have read the context help but don't understand how it works in this instance.
|
In Range and Coerce takes a lower limit, an upper limit, and an input value. It then does two things.
1: It provides an "In Range" boolean output that is True when the value is between the limits, and False when the value is outside the limits. This feature is not used in the code I showed.
2: It provides a "Coerce"d output value that matches the input value when it is inside the limits, but does not exceed the limits in either direction when the input is outside the range. This is how the motor is kept from driving in a particular direction, by making sure the value never goes above 0.