Go to Post CAD is the oxygen for engineering. - Bharat Nain [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 18-02-2012, 16:59
stintzi stintzi is offline
Registered User
FRC #3290
 
Join Date: Jan 2012
Location: canada
Posts: 13
stintzi is an unknown quantity at this point
Limit Switch to control Spike

I am using two limit switches to control my spike relay, which controls my window motor. It only stops when Limit Switch 1 is hit, and when Limit Switch 2 is hit it continues moving but you can see and hear the spike's light flicker.
Attached Files
File Type: vi Teleop.vi (47.4 KB, 17 views)
Reply With Quote
  #2   Spotlight this post!  
Unread 19-02-2012, 19:18
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,113
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: Limit Switch to control Spike

The flicker is a clear sign that you're trying to control the Spike in more than one place, and they're contradicting each other. That's exactly what I see in your code, where you're setting the Spike based on the button presses and then using the limit switches after the fact to turn the Spike back off.

I suggest instead that you use the first limit switch to interrupt the signal from Button 6, and use limit switch 2 to interrupt the signal from Button 7. Do that by inverting the output of the DIO Get then ANDing the result with the button's value before wiring it to the Select node. The extra cases that turn off the Spike should be removed. That way you'll be setting the Spike's state in only one place.
Reply With Quote
  #3   Spotlight this post!  
Unread 19-02-2012, 20:01
chi-town-biker chi-town-biker is offline
Registered User
FRC #3135 (Robotic Colonels)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Chicago
Posts: 46
chi-town-biker is an unknown quantity at this point
Re: Limit Switch to control Spike

try this... (ignore the plow reference it refers to something else I'm working on)
Attached Thumbnails
Click image for larger version

Name:	spike with limits.gif
Views:	50
Size:	20.0 KB
ID:	12000  
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 22:07.

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