Quote:
Code:
If 117 < p1_y & p1_y < 137 THEN stop_p1_y
If 117 < p3_y & p1_y < 137 THEN stop_p3_y
goto end_zero
|
Ampersand (&) is the bitwise logical AND operator. You'd have to use the word AND instead.
Code:
IF (117 < p1_y) AND (p1_y < 137) THEN p1_y = 127
IF (117 < p3_y) AND (p3_y < 137) THEN p3_y = 127
or, if you're using a symmetric deadband:
cDeadband CON 10
IF ABS(p1_y - 127) < cDeadband THEN p1_y = 127
IF ABS(p3_y - 127) < cDeadband THEN p3_y = 127
<edited>
Sorry, figured most teams would be using the new compiler. We haven't had any problems and it really is a lot more productive than the old version. (knocking on wood heard in background)
</edited>