Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Help with Autonomous... (http://www.chiefdelphi.com/forums/showthread.php?t=75160)

elbuo 23-02-2009 21:16

Help with Autonomous...
 


I'm trying to make the autonomous so it will activate 2 motors for the whole period and nothing else besides the movement of the robot itself.

The movement is something I don't know where to start with... I want it to run forward for like 10 seconds and then start spinning:D It's a tank drive so I only need to move one of the axis... But how do I coordinate a movement after the other :S?

Alan Anderson 23-02-2009 23:00

Re: Help with Autonomous...
 
You want the robot to move at one speed and direction for a while, then change to move at another speed and direction? The sample Autonomous Independent does exactly that. It uses a clever trick to make things happen in sequence: chaining the error out of one VI to the error in of the next. The Delay and Feed VI takes care of the timing, and the dataflow inherent in LabVIEW takes care of the sequencing.

elbuo 24-02-2009 16:26

Re: Help with Autonomous...
 
I think you solved much of my issues :) Thank you a lot sir.
PS: You didn't tell me if the screenshot I posted works for keeping 2 motors on for the whole period.

Alan Anderson 24-02-2009 19:16

Re: Help with Autonomous...
 
Quote:

Originally Posted by elbuo (Post 827400)
PS: You didn't tell me if the screenshot I posted works for keeping 2 motors on for the whole period.

Both Motor Opens are configured for the same PWM output. That right there will keep it from controlling two motors.

I can't tell from the section you posted what the loop structure is surrounding it, but I suspect the Motor Close VIs are misplaced. They should go outside everything, in the same realm as the Motor Opens (but on the right instead of the left).

You don't need to do anything fancy with timing if you just want the motors to run during the whole autonomous period. Just turn them on and forget them; the parallel drive sequence will make it so that everything inside the loop runs for as long as your Delay and Feed VIs total.

elbuo 24-02-2009 19:33

Re: Help with Autonomous...
 
I left them in port 1 cause I didn't remember which were the correct ones :P

I can't place the close out of it...:S There is a connection error with the loop that isn't the T/F

Dr. Manhattan 24-02-2009 22:00

Re: Help with Autonomous...
 
Quote:

Originally Posted by Alan Anderson (Post 827112)
You want the robot to move at one speed and direction for a while, then change to move at another speed and direction? The sample Autonomous Independent does exactly that. It uses a clever trick to make things happen in sequence: chaining the error out of one VI to the error in of the next. The Delay and Feed VI takes care of the timing, and the dataflow inherent in LabVIEW takes care of the sequencing.

It's odd, for some reason our Autonomous VI that was written already doesn't do the delay. I'm not sure why, but will be looking into it. If you have any thoughts it would be hugely appreciated.


All times are GMT -5. The time now is 10:30.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi