View Single Post
  #5   Spotlight this post!  
Unread 11-02-2009, 03:08
Bomberofdoom's Avatar
Bomberofdoom Bomberofdoom is offline
Biggest FIRST addict in Israel
AKA: Nir Levanon
FRC #2230 (Zcharia's Angels)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Israel
Posts: 471
Bomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond repute
Send a message via MSN to Bomberofdoom
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.
Reply With Quote