Go to Post "We just fundraised $5000 for registration, and you spent it all on balloons?" - [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 15-02-2009, 22:38
windell747 windell747 is offline
Registered User
FRC #2477
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2001
Location: Hawaii
Posts: 158
windell747 will become famous soon enoughwindell747 will become famous soon enough
coding for limit switch

I'm attempting to write some code for turret aiming and I am using two limit switches to limit the swing of the turret. Currently the turret uses the camera to aim at the goal using a PID controller and there are no limit switches.

I don't know how to write the code that will cause the motor to move in the opposite direction and not confuse the PID controller. The code is written such that if the target moves out of the field of view of the camera, the turrnet will rotate in the direction the target was last seen.

Will the PID controller get confused if I force the motor to spin in the opposite direction after hitting the limit switch?

I also don't know how write the code to allow the limit switch to be let go before evaluating the switches again.

We are using labview.

I attached what I already have written for that section of code. I just put in a timer to make the motor move in the opposite direction for a certain amount of time assuming that the switch will be let go by then. I would like to do this better than I already have done. Any suggestions? Thanks!
Attached Thumbnails
Click image for larger version

Name:	code.jpg
Views:	80
Size:	87.8 KB
ID:	7473  
Reply With Quote
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
limit switch solomason519 Programming 9 09-02-2010 08:50
What is the essay for the Limit Switch? reader_girl932 Kit & Additional Hardware 0 11-02-2008 16:55
Using a limit switch to limit motion ManicMechanic Programming 16 20-12-2007 00:54
Limit Switch for PCM GeorgeC Programming 4 16-02-2007 13:21
limit switch wedellm Electrical 4 16-02-2007 13:01


All times are GMT -5. The time now is 10:32.

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