Go to Post Our behavior – both good and bad – is contagious. Set a good example, behave in a mature, reasoned, professional manner and we will find that others around us will too. - dlavery [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 13-01-2012, 20:32
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?
  #2   Spotlight this post!  
Unread 13-01-2012, 20:52
ssirovica's Avatar
ssirovica ssirovica is offline
Programming Captain
AKA: Sasha Sirovica
FRC #1458 (Red Ties)
Team Role: Programmer
 
Join Date: Sep 2011
Rookie Year: 2010
Location: Alamo
Posts: 26
ssirovica is an unknown quantity at this point
Re: Automatic limit switch

To stop a motor at a certain speed, that is a job for encoders. Encoders track the number of rotations of a shaft which you can use to compute the speed.

You could use a limit switch to stop a motor when the motor reaches a certain position, assuming that the motor turns some armature which physically turns the switch off.

The code for this in java would look like this:

DigitalInput limitSwitch = new DigitalInput(3); The constructor argument is the port its plugged into on the io board.

Then to get a Boolean value of weather it is closed or not use limitSwitch.get();

Good Luck!
__________________
Computers run on smoke. When you let the smoke out the computer stops working.
  #3   Spotlight this post!  
Unread 13-01-2012, 20:57
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

im using labview
  #4   Spotlight this post!  
Unread 13-01-2012, 21:21
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,101
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: Automatic limit switch

Quote:
Originally Posted by adrianfarmer View Post
im using labview
There's a sub-forum under "Programming" specifically for LabVIEW.

If you post there, you increase the chances that your post will be read by LabVIEW programmers.


Closed Thread


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 18:56.

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