Go to Post "Recycle Rush? What's that, some sort of charity marathon?" - Chak [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 09-02-2013, 20:26
cdizzle cdizzle is offline
Registered User
FRC #2367
 
Join Date: Oct 2012
Location: Bay Area, CA
Posts: 42
cdizzle is an unknown quantity at this point
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
Reply With Quote
  #2   Spotlight this post!  
Unread 09-02-2013, 20:41
nicholsjj's Avatar
nicholsjj nicholsjj is offline
Registered User
AKA: John Nichols
no team (Devil Bots)
Team Role: Coach
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Murpyhsboro, IL.
Posts: 261
nicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant future
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.
__________________
2011-FRC Team 3862, Team Captain
2012-FRC Team 3862, Strategy Mentor
2013-FRC Team 3885, Programming Mentor, Razorback Regional, Curie Inspector
2014- FRC Team 3885, Programming Mentor, Arkansas Regional, Newton inspector
2015-??? Teacher Murphysboro High School


“They call it coaching but it is teaching. You do not just tell them…you show them the reasons.”- V. Lombardi

Reply With Quote
  #3   Spotlight this post!  
Unread 09-02-2013, 21:08
cdizzle cdizzle is offline
Registered User
FRC #2367
 
Join Date: Oct 2012
Location: Bay Area, CA
Posts: 42
cdizzle is an unknown quantity at this point
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
Reply With Quote
  #4   Spotlight this post!  
Unread 09-02-2013, 21:17
nathannfm's Avatar
nathannfm nathannfm is offline
Registered User
AKA: Nathan
FRC #3940
Team Role: Mentor
 
Join Date: Jun 2010
Rookie Year: 2005
Location: Kokomo, IN
Posts: 331
nathannfm has a brilliant futurenathannfm has a brilliant futurenathannfm has a brilliant futurenathannfm has a brilliant futurenathannfm has a brilliant futurenathannfm has a brilliant futurenathannfm has a brilliant futurenathannfm has a brilliant futurenathannfm has a brilliant futurenathannfm has a brilliant futurenathannfm has a brilliant future
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.
__________________

[2016-20??]: Mentor: FRC Team 3940"CyberTooth"
[2013-2016]: Mentor: FRC Team 365 "MOE"
[2012-2013]: Mentor: FRC Team 3929 "Atomic Dragons"
[2011-2012]: Mentor: FRC Team 365 "MOE"
[2008-2011]: Student: FRC Team 365 "MOE"
[2007-2008]: Student: FTC Team 365 "MOE"
[2005-2007]: Student: FLL Team "The MOEstangs"
Reply With Quote
  #5   Spotlight this post!  
Unread 09-02-2013, 21:17
Nirvash's Avatar
Nirvash Nirvash is offline
Registered User
AKA: Bryan
FRC #4676
Team Role: Programmer
 
Join Date: Feb 2011
Rookie Year: 2011
Location: Orland Park, IL
Posts: 221
Nirvash has a spectacular aura aboutNirvash has a spectacular aura about
Re: Window Motor Problem?

You may want to look into this.
__________________
Team 3488 - Electrical Lead/Programming Lead 2011-2013
Team 4676 - Electrical/Programming Mentor 2013-Present
Reply With Quote
  #6   Spotlight this post!  
Unread 09-02-2013, 21:22
cdizzle cdizzle is offline
Registered User
FRC #2367
 
Join Date: Oct 2012
Location: Bay Area, CA
Posts: 42
cdizzle is an unknown quantity at this point
Re: Window Motor Problem?

Quote:
Originally Posted by nathannfm View Post
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.
We tried that, and it runs smoothly in both directions.
Reply With Quote
  #7   Spotlight this post!  
Unread 09-02-2013, 21:25
cdizzle cdizzle is offline
Registered User
FRC #2367
 
Join Date: Oct 2012
Location: Bay Area, CA
Posts: 42
cdizzle is an unknown quantity at this point
Re: Window Motor Problem?

Quote:
Originally Posted by Nirvash View Post
You may want to look into this.
We tried running it with a standard CIM motor, and we still had the same problems, so I don't think it has anything to do with the locking pins on the window motor.
Reply With Quote
  #8   Spotlight this post!  
Unread 09-02-2013, 22:51
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,713
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
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.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
Reply With Quote
  #9   Spotlight this post!  
Unread 09-02-2013, 22:51
cdizzle cdizzle is offline
Registered User
FRC #2367
 
Join Date: Oct 2012
Location: Bay Area, CA
Posts: 42
cdizzle is an unknown quantity at this point
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.
Reply With Quote
  #10   Spotlight this post!  
Unread 09-02-2013, 22:57
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,713
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: Window Motor Problem?

Quote:
Originally Posted by cdizzle View Post
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.
I'm having difficulty parsing what you're doing. You've wired two buttons to one case block? Are you having one button that turns the motor on/off and the second one that picks the direction? I think it'd be a lot clearer if you posted the VI or a screenshot of it.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
Reply With Quote
  #11   Spotlight this post!  
Unread 10-02-2013, 00:29
cdizzle cdizzle is offline
Registered User
FRC #2367
 
Join Date: Oct 2012
Location: Bay Area, CA
Posts: 42
cdizzle is an unknown quantity at this point
Re: Window Motor Problem?

Quote:
Originally Posted by Kevin Sevcik View Post
I'm having difficulty parsing what you're doing. You've wired two buttons to one case block? Are you having one button that turns the motor on/off and the second one that picks the direction? I think it'd be a lot clearer if you posted the VI or a screenshot of it.
I'm really sorry, but my code's all at the lab, so this is the best that can do for now, but I'll try to explain it as well as I can.

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.
Reply With Quote
  #12   Spotlight this post!  
Unread 10-02-2013, 01:29
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,713
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: Window Motor Problem?

Quote:
Originally Posted by cdizzle View Post
I'm really sorry, but my code's all at the lab, so this is the best that can do for now, but I'll try to explain it as well as I can.

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.
That's certainly a recipe for weirdness if you're pressing both buttons at once. Also, how on earth does your motor stop after you let go of a button? If you let go of the counter clockwise button, does the motor stop or keep going? If your motor stops then you're clearly setting the motor speed to 0 somewhere else, since it's not in your false cases. If you're setting speed to 0 elsewhere, then your button 3 code is beating out the zero speed code and keeping things moving. Your button 4 code occasionally loses to the zero speed code and thus sometimes the motor stops, and sometimes it moves. Assuming you're setting speed to 0 somewhere.

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.
Attached Thumbnails
Click image for larger version

Name:	Motor Snippet.png
Views:	36
Size:	5.8 KB
ID:	13911  
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
Reply With Quote
  #13   Spotlight this post!  
Unread 10-02-2013, 02:10
nicholsjj's Avatar
nicholsjj nicholsjj is offline
Registered User
AKA: John Nichols
no team (Devil Bots)
Team Role: Coach
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Murpyhsboro, IL.
Posts: 261
nicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant future
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.
__________________
2011-FRC Team 3862, Team Captain
2012-FRC Team 3862, Strategy Mentor
2013-FRC Team 3885, Programming Mentor, Razorback Regional, Curie Inspector
2014- FRC Team 3885, Programming Mentor, Arkansas Regional, Newton inspector
2015-??? Teacher Murphysboro High School


“They call it coaching but it is teaching. You do not just tell them…you show them the reasons.”- V. Lombardi

Reply With Quote
  #14   Spotlight this post!  
Unread 10-02-2013, 02:15
cdizzle cdizzle is offline
Registered User
FRC #2367
 
Join Date: Oct 2012
Location: Bay Area, CA
Posts: 42
cdizzle is an unknown quantity at this point
Re: Window Motor Problem?

Quote:
Originally Posted by Kevin Sevcik View Post
That's certainly a recipe for weirdness if you're pressing both buttons at once. Also, how on earth does your motor stop after you let go of a button? If you let go of the counter clockwise button, does the motor stop or keep going? If your motor stops then you're clearly setting the motor speed to 0 somewhere else, since it's not in your false cases. If you're setting speed to 0 elsewhere, then your button 3 code is beating out the zero speed code and keeping things moving. Your button 4 code occasionally loses to the zero speed code and thus sometimes the motor stops, and sometimes it moves. Assuming you're setting speed to 0 somewhere.
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?

Quote:
Originally Posted by nicholsjj View Post
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.
Yeah, we tried both of those things, and neither worked.
Reply With Quote
  #15   Spotlight this post!  
Unread 10-02-2013, 02:36
Cecil's Avatar
Cecil Cecil is offline
Registered User
AKA: Alex Hummel
FRC #2010 (Lightning Bots)
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2006
Location: Champion
Posts: 343
Cecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to behold
Re: Window Motor Problem?

Quote:
Originally Posted by Kevin Sevcik View Post
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.
What I've always done is just put the numbers in the case statements, with the Set VI outside the case. The true cases have the values to set the motor to, and the false cases both have 0 in it. Just to the right of the case, I put an addition operator in. That way, if one button is pressed, it adds 0, not affecting the output. 0+0 = 0, x+0 = x, and x+y=0. (Of course, this only works when both positive and negative values are the same...)

Edit: I also use the Select statement for the values, not just cases. Keep forgetting I usually put global sets in there too.
__________________
I'm right 90% of the time, so why worry about the other 3%?
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 02:17.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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