Go to Post As my boy Macklemore once said, "The greats weren't great because at birth they could paint, the greats were great because they paint a lot". - Andrew_L [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
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 24-01-2015, 14:12
Luid101 Luid101 is offline
Registered User
FRC #3949
 
Join Date: Dec 2014
Location: Canada
Posts: 17
Luid101 is an unknown quantity at this point
Angry Linear Actuator moves past limit switches

Hey guys!
We have a setup where there is a linear actuator with two limit switches above and below. The limit switches are wired directly into our jaguar to stop the actuator from going too high or too low and destroying itself. However sometimes it just goes past the limit switches. We thought the limit switches where malfunctioning but when we took them off and clicked them by hand the actuator didn't move. Then we thought the actuator wasn't clicking the limit switches so we bent the switches and tried again, but still no luck. Now we think the actuator might be moving to fast come to a complete stop once it hits the switch.
Long story short, now I need to create a code with labview that slows down the actuator before it hits the limit switches. I am thinking of starting a timer once the driver clicks the go up or down button, then once the timer has reached a particular time (a.k.a the time it takes for the actuator to reach a limit switch) I set the motor to a slower speed. Now here is the problem, I need to create a toggle switch to start the timer only once after the up or down button has been pushed (because the buttons are held to go up and down). And I need the timer to be updated only once but i don't know how to do that since my drive program is in a loop. Honestly I am stumped on how to program this with labview without creating code that will be extremely slow and buggy.
if you guys have a better idea on why the actuator is not working or have a better way to slow down actuators or have any idea about anything that you think would be helpful we would greatly appreciate it. At this point we already have two broken limit switches and one frustrated electrical team.
Reply With Quote
  #2   Spotlight this post!  
Unread 24-01-2015, 14:41
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,043
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Linear Actuator moves past limit switches

Quote:
Originally Posted by Luid101 View Post
We have a setup where there is a linear actuator with two limit switches above and below.
Please post a (focused) close-up picture showing how you have each of the limit switches mounted.


Reply With Quote
  #3   Spotlight this post!  
Unread 24-01-2015, 14:43
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,043
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Linear Actuator moves past limit switches

Quote:
Originally Posted by Luid101 View Post
We thought the limit switches where malfunctioning but when we took them off and clicked them by hand the actuator didn't move.
Did you mean to say the actuator didn't stop?


Reply With Quote
  #4   Spotlight this post!  
Unread 25-01-2015, 08:35
Luid101 Luid101 is offline
Registered User
FRC #3949
 
Join Date: Dec 2014
Location: Canada
Posts: 17
Luid101 is an unknown quantity at this point
Re: Linear Actuator moves past limit switches

Quote:
Originally Posted by Ether View Post
Did you mean to say the actuator didn't stop?


No the actuator stopped like it was supposed too when we clicked the limit switches by hand. Eliminating the possibility that there was a problem with the wiring or the device.
Reply With Quote
  #5   Spotlight this post!  
Unread 24-01-2015, 14:44
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,043
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Linear Actuator moves past limit switches

Quote:
Originally Posted by Luid101 View Post
Now we think the actuator might be moving to fast come to a complete stop once it hits the switch.
Are your motor controller(s) set to "brake" or "coast" mode?


Reply With Quote
  #6   Spotlight this post!  
Unread 24-01-2015, 15:18
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 429
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
Re: Linear Actuator moves past limit switches

This is a bit of a bandaid, but have you considered extending the length of the arm coming off the minor switch so that the actuator stays in contact with the limit switch for a longer period of time?
__________________
http://team2168.org
Reply With Quote
  #7   Spotlight this post!  
Unread 24-01-2015, 15:50
adciv adciv is offline
One Eyed Man
FRC #0836 (RoboBees)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2010
Location: Southern Maryland
Posts: 478
adciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to all
Re: Linear Actuator moves past limit switches

The reason it's probably not working is you have momentum in the system. Once the limit switch is triggered, you are telling the motor controller to stop applying power, but the momentum in the system will keep it moving for a while longer. At some point, the limit switch releases and the system no longer thinks it needs to stop.

You can also use a different method for sensing the actuator limits or ensure the limit switch is triggered even once the actuator is past the stop position.
__________________
Quote:
Originally Posted by texarkana View Post
I would not want the task of devising a system that 50,000 very smart people try to outwit.
Reply With Quote
  #8   Spotlight this post!  
Unread 24-01-2015, 21:07
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Linear Actuator moves past limit switches

To see how to do something only once when a joystick button is first pressed, search using the phrase "toggle button". There's an example code snippet attached to this post from 2013.
Reply With Quote
  #9   Spotlight this post!  
Unread 25-01-2015, 01:15
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,574
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Linear Actuator moves past limit switches

Definitely sounds like your inertia is taking you out the other side of your switch's range.

Limit switches really are meant to define limits, to keep motors from burning up. They really aren't so good at providing a "set point" unless the device moves slowly enough that you can stop it quickly. If you actually want to drive quickly to a set point, and then settle out on that point, use some sort of potentiometer and a PID or other feedback control loop. AndyMark has a string potentiometer good for 30", and you can make longer ones by using the same style potentiometer and larger reels. Short of that, you may want to put a second switch past the first one (maybe with overlap) so that even when neither switch is triggered, you have some information as to where the load is.
Reply With Quote
  #10   Spotlight this post!  
Unread 25-01-2015, 08:40
Luid101 Luid101 is offline
Registered User
FRC #3949
 
Join Date: Dec 2014
Location: Canada
Posts: 17
Luid101 is an unknown quantity at this point
Re: Linear Actuator moves past limit switches

Quote:
Originally Posted by otherguy View Post
This is a bit of a bandaid, but have you considered extending the length of the arm coming off the minor switch so that the actuator stays in contact with the limit switch for a longer period of time?
We might just use that if we have no other choice.
Reply With Quote
  #11   Spotlight this post!  
Unread 25-01-2015, 08:39
Luid101 Luid101 is offline
Registered User
FRC #3949
 
Join Date: Dec 2014
Location: Canada
Posts: 17
Luid101 is an unknown quantity at this point
Re: Linear Actuator moves past limit switches

Quote:
Originally Posted by Ether View Post
Are your motor controller(s) set to "brake" or "coast" mode?


Honestly we've never heard of coast or break mode until now but I think our jaguar is in coast mode now.
Reply With Quote
  #12   Spotlight this post!  
Unread 25-01-2015, 08:50
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,043
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Linear Actuator moves past limit switches

Quote:
Originally Posted by Luid101 View Post
Honestly we've never heard of coast or break mode until now but I think our jaguar is in coast mode now.
You will get a lot less overshoot in brake mode. Move the brake/coast jumper on the Jag from "coast" to "brake" and try that. It's very simple to do, so worth trying.


Attached Thumbnails
Click image for larger version

Name:	Jag_brake_coast.png
Views:	26
Size:	149.9 KB
ID:	17976  

Last edited by Ether : 25-01-2015 at 08:55. Reason: added attachment
Reply With Quote
  #13   Spotlight this post!  
Unread 27-01-2015, 08:41
Luid101 Luid101 is offline
Registered User
FRC #3949
 
Join Date: Dec 2014
Location: Canada
Posts: 17
Luid101 is an unknown quantity at this point
Thumbs up Re: Linear Actuator moves past limit switches

Quote:
Originally Posted by Ether View Post
You will get a lot less overshoot in brake mode. Move the brake/coast jumper on the Jag from "coast" to "brake" and try that. It's very simple to do, so worth trying.


Thanks! we did that and the problem hasn't come up since.
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 11:43.

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