|
"Squaring" robot
Hello -
I've ran into a little bit of a roadblock. We've got two rangefinders - One on the left and one on the right of our robot. I am trying to read the values of both of them, and if the difference between them is not within an acceptable, predefined distance, move the drive motors accordingly to "square" the robot with the nearest wall.
Now, I've confirmed that the two Rangefinders are working, as I have a numeric readout within Teleop.vi. I've written this code into Pereodic.vi within a Flat Sequence Structure which is triggered by a joystick button press. Here's the odd part...If the rangefinders are within the difference defined, the sequence continues on to the next frame. However, if the rangefinders are NOT within the defined difference, nothing happens.
Any help/suggestions? Thanks.
EDIT - I attached a picture of the code in question. Anyone need it in a .vi?
Last edited by DominickC : 06-02-2012 at 19:43.
|