Go to Post That seems like a pretty cool idea! Who'da thunk o' dat?! :rolleyes: - dlavery [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 14-01-2012, 17:50
adrianfarmer's Avatar
adrianfarmer adrianfarmer is offline
Registered User
FRC #3556
 
Join Date: Jan 2012
Location: Lake City, Fl
Posts: 8
adrianfarmer is an unknown quantity at this point
Question Automatic limit switch

I previously found out how to program a limit switch that i can manually use. Now my question is how do i program a limit switch that will cause my motor to automatically stop spinning when it reaches a certain speed or position?
Reply With Quote
  #2   Spotlight this post!  
Unread 14-01-2012, 18:18
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,731
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Automatic limit switch

Can you better describe your application?

It sounds like a sensor problem other than a limit switch.

A spinning motor speed is usually controlled by an digital encoder sensor.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #3   Spotlight this post!  
Unread 15-01-2012, 00:34
SuperS_5's Avatar
SuperS_5 SuperS_5 is offline
[Certified LabVIEW Developer]
FRC #1219
 
Join Date: Dec 2010
Rookie Year: 2010
Location: Canada
Posts: 140
SuperS_5 will become famous soon enoughSuperS_5 will become famous soon enough
Re: Automatic limit switch

I am guessing that you want to stop something like an arm or the robot when it touches something? If you already know how to use the digital switch, then it is simply using that input to switch between the commanded signal and a stationary command. More details would be helpful.
Screenshots of what you have so far would be helpful too.
__________________
Mike B
Reply With Quote
  #4   Spotlight this post!  
Unread 15-01-2012, 14:39
adrianfarmer's Avatar
adrianfarmer adrianfarmer is offline
Registered User
FRC #3556
 
Join Date: Jan 2012
Location: Lake City, Fl
Posts: 8
adrianfarmer is an unknown quantity at this point
Re: Automatic limit switch

we have the digital switch. we need something in the code that makes the motor stop when it starts binding or reaches a certain amount of rotations. So far we have been sent a digital input example.
Reply With Quote
  #5   Spotlight this post!  
Unread 15-01-2012, 14:40
DominickC DominickC is offline
Registered User
FRC #0023 (PNTA)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 1620
Location: Boston
Posts: 435
DominickC is an unknown quantity at this point
Re: Automatic limit switch

That sounds like a good job for a digital encoder.
Reply With Quote
  #6   Spotlight this post!  
Unread 15-01-2012, 20:03
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: Automatic limit switch

Programming the robot to stop a motor when a digital switch activates is easy. See the attached snippet for an example of something that will keep a motor from going forward if the limit switch input is true.

However, what you're describing doesn't sound like something a digital switch can detect. Can you give some more information about how your limit switch is going to be physically activated?
Attached Thumbnails
Click image for larger version

Name:	Limit Switch.png
Views:	51
Size:	21.7 KB
ID:	11393  
Reply With Quote
  #7   Spotlight this post!  
Unread 16-01-2012, 00:01
zaphodp.jensen zaphodp.jensen is offline
Alumni and Mentor of 3130
AKA: Pierce Jensen
FRC #3130 (East Ridge Robotics Ominous Raptors (E.R.R.O.R.'s))
Team Role: Mentor
 
Join Date: Oct 2009
Rookie Year: 2009
Location: Minnesota
Posts: 76
zaphodp.jensen is a jewel in the roughzaphodp.jensen is a jewel in the roughzaphodp.jensen is a jewel in the rough
Re: Automatic limit switch

An encoder would work best for this. To detect a bind, you would have the encoder, on a turn of the encoder, start a timer. If that timer reaches a certain value before the encoder triggers again, you would stop the motor. If it triggers, you would restart the timer again at zero.

If you wanted to stop after a number of revolutions, you would use a variable that would increment or decrement after a certain number of ticks, and if that number got to be higher or lower than a threshold, you would stop the motor in that direction, but allow it to turn the other way.

Sidenote about limit switches: Even easier, you could use the built in limit switch functions on the Jaguars to stop the motor. This wouldn't work for your application, but it is great for just about everything else! You just have to use a normally closed switch, and plug it into the limit switch ports (Removing the existing jumpers)! Simple, easy to use, save a DIO, and it relieves the cRIO of having to deal with the code!
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 04:29.

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