|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: Is it possible?
Is it the same thing I did in the picture above?
Sorry, it's not autonomous. I just want the canon to be facing the target always. So when I shoot I won't have to aim. I will only need to be aware of distance. Last edited by elbuo : 11-02-2009 at 09:59. |
|
#2
|
||||
|
||||
|
Re: Is it possible?
you can do this but not with the code you have
the problem is the servos are position controlled, and the motors are velocity(ish) controlled, so you need some way to turn the motor motion into position. i suggest you read up on PID loops for such a task, and attach an encoder to the motor so you know its position. |
|
#3
|
|||
|
|||
|
Re: Is it possible?
What about converting the value that goes out into speed?
V=D/T So if I divide the value it would be acceptable...:S I don't really know much about PID ![]() I can't attach a servo to the motor because it will be moving a big gear...How can I do this :S |
|
#4
|
||||
|
||||
|
Re: Is it possible?
The problem is that motors are controlled by speed, while servos are controlled by angle or position. You must have an encoder or some other kind of position sensor on the motor for this to work.
If you have that, you can subtract what the software thinks is the middle point (85 I think). Assuming the motor is pointing straight at the beginning, that is the setpoint for the encoder. If it's negative, turn the motor in that direction and vice versa. Once the encoder gets close enough to the setpoint, stop turning the motor so it doesn't oscillate. |
|
#5
|
|||
|
|||
|
Re: Is it possible?
Okay, so how do I do this exactly?
Where should I connect the encoder? Because the globe motor won't have a transmision... And how do I make the change in labview? :S |
|
#6
|
|||
|
|||
|
Re: Is it possible?
Hey guys.... I can't seem to fix this
![]() |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Possible Problem!? | Gabriel Mendez | General Forum | 20 | 06-01-2008 01:30 |
| Possible DC Regional | spatel | General Forum | 3 | 26-04-2007 19:03 |
| Is it possible... | BLAZE | Pneumatics | 11 | 04-04-2005 22:02 |
| Is it possible... | Jon K. | CD Forum Support | 4 | 26-08-2002 00:01 |
| Possible Openings | archiver | 2001 | 0 | 24-06-2002 03:33 |