Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Adding Additional Servos (http://www.chiefdelphi.com/forums/showthread.php?t=125556)

T.E.R.T.O.L.A 31-01-2014 17:29

Adding Additional Servos
 
We (the programmers) are rookies and are having trouble figuring out LabVIEW. We have our drive system working and are moving on to programming functions. The next step is to program two servos mounted on the front of the robot. They are meant to spin opposite of each other to pull the ball up between two rods. We were looking for a example program in LabVIEW to add servos and attach them to buttons on a Attack 3 Logitech Joystick and were not able to find any such example. Does anyone here know of a simple way to add 2 servos to the VI, regulate their speed and rotation direction, and attach their use to a button (the trigger)? Any help would be greatly appreciated.

Maximillian 31-01-2014 19:07

Re: Adding Additional Servos
 
Quote:

Originally Posted by T.E.R.T.O.L.A (Post 1335484)
We (the programmers) are rookies and are having trouble figuring out LabVIEW. We have our drive system working and are moving on to programming functions. The next step is to program two servos mounted on the front of the robot. They are meant to spin opposite of each other to pull the ball up between two rods. We were looking for a example program in LabVIEW to add servos and attach them to buttons on a Attack 3 Logitech Joystick and were not able to find any such example. Does anyone here know of a simple way to add 2 servos to the VI, regulate their speed and rotation direction, and attach their use to a button (the trigger)? Any help would be greatly appreciated.

I am a bit confused on how you are using servos. Are they actually servos or are they just motors? is it a mechanism like Ri3D team boom done?

A good resource for some examples is http://team358.org/files/programming...2009-/LabVIEW/.

Maximillian 31-01-2014 19:33

Re: Adding Additional Servos
 
1 Attachment(s)
If you are using motors then I made something that I think should work for you.


You can change the value from one to something else if you don't want it to spin at full speed. You may also have to change which motor it is that gets multiplied by -1 if it goes backwards. You should also add the motors to the finish.vi but I didn't show that.

I have no idea what button is the trigger on an attack 3. You can either look that up or just do trial and error. It may even be that the trigger isn't a button and is an analog signal which would probably make it one of the axis values.

If you want it to make it so that every time you hit the button it changes between on and off instead of having to hold it you can use a toggle.vi which I have attached. To use this you just put it in between the button and the select.

I hope this works I am new to this stuff too but I think that this should do what you want it to.

T.E.R.T.O.L.A 03-02-2014 18:02

Re: Adding Additional Servos
 
Thanks for the help. That website was really helpful! Yes they are motors not servos, sorry. How does one set the speed of a motor controlled by a button? Is there a rpm number somewhere that we can change?

Maximillian 03-02-2014 19:55

Re: Adding Additional Servos
 
Quote:

Originally Posted by T.E.R.T.O.L.A (Post 1337093)
Thanks for the help. That website was really helpful! Yes they are motors not servos, sorry. How does one set the speed of a motor controlled by a button? Is there a rpm number somewhere that we can change?

The way you change the speed is by changing the true value of the triangular Select function. I have it set at 1. You can change the number from anything from 1 to -1. 1 is full forward, 0 is stop, and -1 is full backwards.

Alan Anderson 03-02-2014 19:59

Re: Adding Additional Servos
 
Quote:

Originally Posted by T.E.R.T.O.L.A (Post 1337093)
How does one set the speed of a motor controlled by a button?

I'm not sure I understand the question. A button has only two states. If you want to set the motor's speed beyond simply "running" and "not running", you'll need some other kind of control. Usually one uses a joystick for that.

Perhaps you're asking how to change what value is sent to the motor controller when the button tells it to be "running"? That's controlled by the orange constant 1 wired into the True input of the triangular Select function in the posted code. You can make it anything from -1 to +1. If you want to be able to modify the value under driver control, the throttle input of an Attack 3 joystick is Axis 3. Wire it to the Select instead of the constant, and you can set the run speed using the throttle.

Quote:

Is there a rpm number somewhere that we can change?
To control RPM, you'll need a way to measure the RPM and some programming to change the motor output value to increase it when it's too low and decrease it when it's too high. For your application, do you really need a specific RPM, or are you just asking about being able to make it run relatively faster or slower?

Maximillian 03-02-2014 20:19

Re: Adding Additional Servos
 
Quote:

If you want to be able to modify the value under driver control, the throttle input of an Attack 3 joystick is Axis 3. Wire it to the Select instead of the constant, and you can set the run speed using the throttle.
Kinda off topic question but do you know if there is a list of what each button/axis of the attack 3 is in labview?

Mark McLeod 03-02-2014 20:51

Re: Adding Additional Servos
 
Here is the Attack 3 mapping



All times are GMT -5. The time now is 09:45.

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