Go to Post I think that FIRST should just give up and officially recognize Chiefdelphi as the place to go for community and team resources. - Greg Needel [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 11-02-2012, 17:48
Luiz12 Luiz12 is offline
Registered User
FRC #4210
 
Join Date: Jan 2012
Location: South Gate
Posts: 45
Luiz12 is an unknown quantity at this point
Microswitch program..

Basically I want to press a button and let go but the motor begins to run until the switch is activated then I want it to roll back for 5 seconds. Can someone give me an example on how to do this using Labview.
  #2   Spotlight this post!  
Unread 11-02-2012, 17:58
Keyreaper's Avatar
Keyreaper Keyreaper is offline
Keyreaper
AKA: Cyrus Duong
FRC #1710 (Revolution Ravonics)
Team Role: Programmer
 
Join Date: May 2011
Rookie Year: 2011
Location: Olathe
Posts: 140
Keyreaper is an unknown quantity at this point
Re: Microswitch program..

Is this what you are trying to accomplish? I think some other programmers on here could help out and also make sure I haven't made mistakes....
http://imgur.com/a/oSPD4

Last edited by Keyreaper : 11-02-2012 at 18:05. Reason: Forgot joysticks...
  #3   Spotlight this post!  
Unread 11-02-2012, 18:20
Luiz12 Luiz12 is offline
Registered User
FRC #4210
 
Join Date: Jan 2012
Location: South Gate
Posts: 45
Luiz12 is an unknown quantity at this point
Re: Microswitch program..

Yes thank you..
  #4   Spotlight this post!  
Unread 11-02-2012, 18:32
Keyreaper's Avatar
Keyreaper Keyreaper is offline
Keyreaper
AKA: Cyrus Duong
FRC #1710 (Revolution Ravonics)
Team Role: Programmer
 
Join Date: May 2011
Rookie Year: 2011
Location: Olathe
Posts: 140
Keyreaper is an unknown quantity at this point
Re: Microswitch program..

Quote:
Originally Posted by Luiz12 View Post
Yes thank you..
I'm not sure it actually works, as I don't normally work with the wait.vi function so I'd build it up just to make sure.
  #5   Spotlight this post!  
Unread 19-02-2012, 20:20
MAldridge's Avatar
MAldridge MAldridge is offline
Lead Programmer
AKA: Rube #1
FRC #0418 (LASA Robotics)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Austin
Posts: 117
MAldridge will become famous soon enoughMAldridge will become famous soon enough
Re: Microswitch program..

make sure you don't put that in teleop. That wait will stall out the loop.
__________________
'Why are you a programer?' --Team Captain
'Because the robot isn't complicated enough!' --Me
  #6   Spotlight this post!  
Unread 19-02-2012, 20:29
Keyreaper's Avatar
Keyreaper Keyreaper is offline
Keyreaper
AKA: Cyrus Duong
FRC #1710 (Revolution Ravonics)
Team Role: Programmer
 
Join Date: May 2011
Rookie Year: 2011
Location: Olathe
Posts: 140
Keyreaper is an unknown quantity at this point
Re: Microswitch program..

Quote:
Originally Posted by MAldridge View Post
make sure you don't put that in teleop. That wait will stall out the loop.
He is correct... Perhaps a Elapsed timer would work better.
  #7   Spotlight this post!  
Unread 19-02-2012, 20:32
MAldridge's Avatar
MAldridge MAldridge is offline
Lead Programmer
AKA: Rube #1
FRC #0418 (LASA Robotics)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Austin
Posts: 117
MAldridge will become famous soon enoughMAldridge will become famous soon enough
Re: Microswitch program..

actually, you would do good to do it the way you have it here, but throw it into a separate loop in periodic tasks. There is no good way that I have found yet to do a delay on the cRIO without running it in parallel. Mainly because the timestamp is kind of flakey.
__________________
'Why are you a programer?' --Team Captain
'Because the robot isn't complicated enough!' --Me
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 01:35.

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