|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Thank you for your help. I still haven't been able to successfully follow the target, but I'm still getting ideas. I have figured out how to write a global variable to use between the x axis of the camera in basic robot main vi and autonomous. I have also now decided that having a set number such as 90 degrees would be too specific for the bot and I should create a window for it to accept. I have put "In Range and Coerce" vi's into my autonomous case structure. What I would like to know now is how to get it to turn until it is in the correct "window". I could use a for loop, but that would require me to set a number of repetitions for the loop. What is the quickest way to correct my position? any sample vi's would be of GREAT assistance, saying as I am a visual learner.
|
|
#2
|
|||||
|
|||||
|
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. |
|
#3
|
|||
|
|||
|
Re: FOLLOWING the target using labview
Ok so in my copy of LabView, the Select vi was under comparison. Is this even the right vi? if so, I have wire the center boolean node to the "in range?" node of the in range vi. The output of this select vi yields a numeric value.
I have purposely left the two tank drive constants at 0 because I am not yet sure which direction it will need to turn in that case. |
|
#4
|
|||
|
|||
|
Re: FOLLOWING the target using labview
That will work, but it isn't really necessary to take a Boolean, convert to a number containing two values, then switch on the number.
One way to clean it up is to wire the Boolean to the switch. Greg McKaskle |
|
#5
|
||||
|
||||
|
Re: FOLLOWING the target using labview
Something else that labview has are the PID vi's, which will get your robot from point a to point b much more quickly and accurately than the bang-bang control method than you are currently using
|
|
#6
|
|||
|
|||
|
Re: FOLLOWING the target using labview
How do I find these PID vi's?
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Using LabView to make Robot track the trailer | rsisk | NI LabVIEW | 10 | 14-01-2009 14:12 |
| Using the CMU cam in LabView | VeedotJaydot | Technical Discussion | 1 | 10-09-2008 16:39 |
| Using LabView to Simulate the Robot without the DAQ | JillianM | National Instruments LabVIEW and Data Acquisition | 4 | 22-04-2008 11:23 |
| Using the Example LabVIEW Apps | Amin | National Instruments LabVIEW and Data Acquisition | 1 | 24-01-2006 08:51 |
| LabVIEW - CMUcam finds target but cant track | bear24rw | Programming | 6 | 13-01-2006 21:43 |