|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
How do you make a trim control?
Hi my team uses labview for programming and I'd like to know how to make a trimming control with the z axis of a joystick(which is the slider that has + and - on it). I'm wondering if there's a way to be able to either change the motor values with that or the joystick values. Please and thank you.
|
|
#2
|
|||
|
|||
|
Re: How do you make a trim control?
Hello,
Are you attempting to limit the motor power through the throttle, or control the motor power entirely? For the first one, since we get a value from -1 to 1, we need to scale it, by adding 1 and dividing by 2. Then Just multiply this value by the value you were sending into the motor controller. For Controlling the motor entirely off the throttle, just feed in the value for 2-way control, or scale it as specified above for more precise 1-way control. Hoped That Helped ![]() Sasha |
|
#3
|
|||
|
|||
|
Re: How do you make a trim control?
I'm trying to limit the motors power with the throttle.
|
|
#4
|
||||
|
||||
|
Re: How do you make a trim control?
You would have to take the drive stick value and either scale it to the Z slider value from the joystick, or limit it at the joystick.
If you want to scale it (like if the Z slider was at 70% and the joystick was at 90%, the output would be 63%), take the joystick input and multiply it by the Z input. If you want to limit it (like if the Z slider was at 70% and the joystick was at 90%, the output would be 70%), take the joystick input and do a greater than block and wire the boolean output to the boolean input on a select function block. After that, route the Z axis into the true input and the joystick axis to the false input After you have either of those, you have to add a couple of logic statements for going in reverse (Because -z axis * - joystick axis = positive number, driving the robot in the opposite direction) |
|
#5
|
||||
|
||||
|
Re: How do you make a trim control?
Is this for your drivetrain motors?
|
|
#6
|
|||
|
|||
|
Re: How do you make a trim control?
Yes this is for my drive chain motors
|
|
#7
|
||||
|
||||
|
Re: How do you make a trim control?
Why do you want to limit the throttle? (I ask because there may be better ways to accomplish what you want).
|
|
#8
|
|||
|
|||
|
Re: How do you make a trim control?
I just want to limit the power each motor gives out without changing the code each time one motor is more powerful than the other. So if I add in a control to the power of the motor we can fine tune it during competition more easily.
|
|
#9
|
||||
|
||||
|
Re: How do you make a trim control?
Quote:
|
|
#10
|
|||
|
|||
|
Re: How do you make a trim control?
|
|
#11
|
||||
|
||||
|
Re: How do you make a trim control?
One motor on each side?
Or 2 motors per gearbox, with 1 gearbox on each side? How many wheels? What kind of wheels? What is the wheel diameter? What is the gearbox ratio? What diameter is the driving pulley and the driven pulley? Last edited by Ether : 05-02-2014 at 11:03. |
|
#12
|
|||
|
|||
|
Re: How do you make a trim control?
1 motor per gearbox and 6 wheels, and we're using the wheels that came in the kit of parts. Everything else I don't know off the top of my head.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|