|
Re: FOLLOWING the target using labview
Use the Select function from the boolean pallete in the block diagram.
If the gyro/camera axis is in the range you specfied as "the correct window", the "in range?" value will send a "true" value. You could send that the the select function. The Select function outputs the "false" input (talking about some kind of integer,double,cluster,array...) or "true" input. That is determend by the boolean value sent to the center input of the Select function(you'll se it's boolean).
Let's assume that we're controlling the right motor. The left motor is always "1". If you're in range, you'll get a "true" and the select function will output, let's say, the value of "1" to the right motor, so the robot will move straight.
If you're not in range, you'll ge a "false" and the select function will output "-1" which will spin the robot right on it's own center axis.
If it's not clear, I'll give you a visual example.
__________________
TEAM 2230 ZECHARIA'S ANGELS
2009 Microsoft Israel FRC Regional Winners!
2009 Microsoft Israel FRC Regional Chairman's Award Winners!!! --------------------------------- 2008 Microsoft Israel FRC Regional semi-finalist. 2008 Microsoft Israel FRC Regional Delphi's "Driving Tommorow's Technology" Award winner. 2008 Robot Driver --------------------------------- 2007 GM/Technion Israel FRC Regional semi-Finalist.
2007 GM/Technion Israel FRC Regional Xerox Creativity Award winner.
2007 Robot Driver.
|