![]() |
Window Motor Problem?
Hi everybody,
Our team is trying to use a window motor on our robot using LabView, but when we program the motor to turn clockwise with one button and counterclockwise with another button, the motor spins perfectly counter clockwise. When we try to spin it clockwise, the motor twitches instead of moving smoothly. At first we thought it was a jaguar problem, so we replaced it with a victor, but it still has the same problem. Any thoughts on why? Thanks, -Team #2367 |
Re: Window Motor Problem?
did you use the invert function or did you set a constant to -1? If you used the constant change it to the invert function.
the function is located in the programing pallet under numeric. |
Re: Window Motor Problem?
I don't think that's the problem, because we ran both of them counterclockwise (positive), and the motor still ran twitchy when we pressed one button and clean when we pressed the other
|
Re: Window Motor Problem?
Did you try running it right off a battery in both directions and try an identical motor in your setup? It may be a bad motor/gearbox.
|
Re: Window Motor Problem?
You may want to look into this.
|
Re: Window Motor Problem?
Quote:
|
Re: Window Motor Problem?
Quote:
|
Re: Window Motor Problem?
Can you post a screen shot of you code that is switch the motor from one direction to the other? This sounds like you might accidentally be sending the motor both a forward command and a reverse command. That can result in your speed controller randomly switch from forward to reverse at high speed, thus resulting in your motor twitching.
You beat me to the punch with testing with a CIM. Good job. That definitely isolates it to a programming or electrical problem. |
Re: Window Motor Problem?
It seems like a coding problem, but I can't figure out what the problem is at all. We tried both a Victor and a Jaguar, so I don't think that is the problem. The code is very standard, I just wired two buttons to a case block. And for one of them, I ran the motor forward when it was true, and backward when it was false. The motor itself is upside down, so it doesn't work properly when the motor is turning forward, but it works well in reverse.
|
Re: Window Motor Problem?
Quote:
|
Re: Window Motor Problem?
Quote:
I have 2 case blocks. One case block is wired to button 3 on our joystick. When that case is true, it sets the motor speed to -0.9. That one works smoothly. I also have another case block which is wired to button 4 on our joystick. When that case is true, it sets the motor speed to 0.9. When I press that button, the motor moves in the right direction, but it stops and jerks forward and then stops again. Note that I haven't put anything in the false part of the case blocks. Thanks so much for your help and once again I'm really sorry that I can't post a screen shot right now. |
Re: Window Motor Problem?
1 Attachment(s)
Quote:
What I like to do for programming two buttons to turn a motor is to pick a dominant case. That means that you pick one of the buttons that "wins" if both buttons are pressed. Then you can pretty easily use two Select blocks to set the motor speed. See my attached code snippet, in which button 3 "wins" and gets final say in the motor speed. |
Re: Window Motor Problem?
You could try switching imput buttons on your joystick to see if that helps also. I know our gamepads had a glitchy button on it. You might want to put the -1 value and then invert that into you motor output to see if it works also.
|
Re: Window Motor Problem?
Quote:
Quote:
|
Re: Window Motor Problem?
Quote:
Edit: I also use the Select statement for the values, not just cases. Keep forgetting I usually put global sets in there too. |
Re: Window Motor Problem?
[quote=cdizzle;1230855]Wait, so if I set my motor speed to 0 when false in the case block for button 3, will it affect the motor when the button 4 case block is true?
No it should just affect the output from case three. My next question is are you sending both button outputs into the same motor set output vi. This might be where Kevin's statement about overriding can occur if you use two different vi's. |
Re: Window Motor Problem?
1 Attachment(s)
Quote:
Quote:
Cecil's suggestion of putting the motor set block outside of the cases is also a good one. Then you know that you only have one motor set and it's only going to run once. Then you just have to figure out how to send it the appropriate value. It makes it pretty obvious if your value selection method isn't valid because you'll end up trying to wire two thing to the same input, which labview will complain about. |
Re: Window Motor Problem?
I got it working! Thanks for your help guys! I think something was overriding the reverse command, but I couldn't figure out what it was, so I just wired it to one SetMotorSpeed like you guys said to.
|
Re: Window Motor Problem?
Quote:
|
| All times are GMT -5. The time now is 02:17. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi