![]() |
need a simple motor program
I am using the basic FRC wizard to generate the program and the only modification is that i have switched the default 2 motor tank to a 4 motor arcade by simply replacing the VI's. This worked fine. i need to control a motor on the 2nd joystick y axis thru pwm 5. i understand a little about labview but i cannot figure out where to place code for this motor. does it need to placed inside the execute case struture on Teleop? do i need to set up references in the Begin part. the software gives examples but no clear explanation of where it goes. if someone could give me a simple solution and preferably a diagram, that'd be great!
|
Re: need a simple motor program
3 Attachment(s)
Did you find the single motor palette okay?
It can be gotten to in two different places: WPI Robotics Library -> Actuators -> MotorControl---------------------------------------- Begin.vi -- open everything here
|
Re: need a simple motor program
thanks. i've plugged this in and its running. i've tied it to a window motor and when i push on the stick full it moves but very slow, even for a window motor. while in operator mode the driver station shows the #5 PWM feedback as only about half even though i'm pushing the stick all the way. anyway to speed it up full?
|
Re: need a simple motor program
Are you using a Victor or a Jaguar?
Make sure the Motor Open in Begin.vi is set for the correct one. Other than that, I'd suspect the joystick wasn't doing it's best. Make sure when you plug in the USB joystick that it's in neutral. |
Re: need a simple motor program
victor. its set in the Begin.
|
Re: need a simple motor program
The Victor might need to be calibrated then.
Page 2 of this. No, strike that. The Dashboard PWM indicator could only be fooled by the joystick input. You can take the joystick out of the loop temporarily by changing the Motor Set Speed to use a constant (1=full backwards or -1=full forwards). Since the window motors probably attached to something, you can pull the breaker for it and just watch the Dashboard PWM indicator to see if it goes to full. |
Re: need a simple motor program
recalibrated the victor and switched joysticks. same effect. its like its running at almost half speed. any way to double the value between the joystick vi and get speed vi?
|
Re: need a simple motor program
Is the Victor status light going red when you push the joystick all the way forward-an indication of full speed?
You can certainly multiply the joystick output, but the range of the motor speed is only -1 to 1, the same as the joystick. A larger number would get cut back to 1. And calibrating the victor to the joystick range should have made it full speed no matter what. Not a low battery, bad wire connection, or anything simple like that is it? |
Re: need a simple motor program
you're right, doubling the value didn't help. it has the same behavior. wiring and all that looks good and everything works as expected (lights, blinkies, indicators) except it is slow.
|
Re: need a simple motor program
Is it a new motor, possibly damaged?
That's the only other thing that comes to mind. At full speed you should be able to test with a multi-meter to see if the motor's receiving the full 12v or close to it. Readings at other speeds won't come out right without a more sophisticated meter. |
Re: need a simple motor program
thats the only thing i can think of is a bad motor or controller. i'm gonna swap them out at the shop monday and see if something happens. this victor came out of an "old box" and may have went bad. might just switch it with a jaguar. thanks for the help. i really appreciate it.
|
Re: need a simple motor program
If the dashboard PWM isn't showing full value, then the problem is not on the robot side.
|
Re: need a simple motor program
Quote:
Run the code (open the Robot Main vi and click the white "run" arrow at the top) and probe the value coming out of the joystick vi. If it doesn't go full range (+1 to -1) as you move the joystick, that's a clue that the problem is in one direction. If it does go full range, that's a clue that the problem is in a different direction. What do you see? |
| All times are GMT -5. The time now is 11:04. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi