Go to Post Everyone please breathe before you post. - Jessica Boucher [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 Rating: Thread Rating: 2 votes, 4.50 average. Display Modes
  #16   Spotlight this post!  
Unread 03-02-2015, 22:16
tcjinaz tcjinaz is offline
Tim
FRC #3853
Team Role: Mentor
 
Join Date: May 2011
Rookie Year: 2011
Location: Arizona
Posts: 206
tcjinaz has a spectacular aura abouttcjinaz has a spectacular aura about
Re: Two limit switches, one button

Quote:
Originally Posted by Greg McKaskle View Post
The limit switch is a simple wrapper over the DIO functions that were already available. They were added primarily for simulation. In order for a simulated robot to be able to identify how a digital line should toggle when something moves, it is useful to identify the switch, tell the physics engine where it is, how it is wired, etc. This is also true of the potentiometer. It is a simple wrapper over AI.

So the FPGA is doing the low level read and filter of the switch, but it is the RT side that is responsible for modifying a motor or other actuator in response. There is no new way to "tie things together" in the FPGA.

Greg McKaskle
Thanks. More "I needed to know that"
__________________
Software Mentor
3853 Pridetronics[

Reply With Quote
  #17   Spotlight this post!  
Unread 03-02-2015, 22:21
tcjinaz tcjinaz is offline
Tim
FRC #3853
Team Role: Mentor
 
Join Date: May 2011
Rookie Year: 2011
Location: Arizona
Posts: 206
tcjinaz has a spectacular aura abouttcjinaz has a spectacular aura about
Re: Two limit switches, one button

Quote:
Originally Posted by Alan Anderson View Post
If the hardware is built so that the limit switch is not active when the mechanism is at the end of its travel, then what you describe is possible. I wouldn't suggest designing it that way.
The system in question is pretty quick, and I'm not sure I'll get the nice long lever necessary. I'm thinking some latching & resetting by other actions may be in order. I was looking for a state machine this year...

Thank you,
Tim
__________________
Software Mentor
3853 Pridetronics[

Reply With Quote
  #18   Spotlight this post!  
Unread 04-02-2015, 00:07
tcjinaz tcjinaz is offline
Tim
FRC #3853
Team Role: Mentor
 
Join Date: May 2011
Rookie Year: 2011
Location: Arizona
Posts: 206
tcjinaz has a spectacular aura abouttcjinaz has a spectacular aura about
Re: Two limit switches, one button

Quote:
Originally Posted by tcjinaz View Post
Thanks. More "I needed to know that"
So, given "Normally Open" port true on open (and wiring GND to Signal on the DIO through the switch) and a 2.0V ish to 0.8 ish transition holding below 0.8V for more than 20nS, we will see WPI_SwitchGetLimitValueReturn true, and WPI_SwitchGetCount will increment.

When does WPI_SwitchGetLimitValueReturn reset? On a transition from -0.8V to 2.0V longer than 20nS?

The counter resets to zero on the call to Begin? And between autonomous and teleop?

I keep getting challenged (good questions, mostly) on stuff like this, so the ducks need to line up

TIA,

Tim
__________________
Software Mentor
3853 Pridetronics[

Reply With Quote
  #19   Spotlight this post!  
Unread 04-02-2015, 22:34
mshafer1 mshafer1 is offline
Programming Mentor
AKA: Matthew Shafer
FRC #3937 (Breakaway)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2008
Location: Arkansas
Posts: 53
mshafer1 is an unknown quantity at this point
Re: Two limit switches, one button

There have been some good comments posted here that I would recommend reading them - especially the one by cgmv123.

For those who are looking for more of a tutorial of one way of accomplishing this task - currently up while button 1 and not top limit switch else down while button 2 and not bottom limit switch -
Please refer to this tutorial that I have made, Click here for tutorial It is under limit switch tutorial, although the state machine tutorial is a similar scenario.
Reply With Quote
  #20   Spotlight this post!  
Unread 10-02-2015, 08:50
nickb705's Avatar
nickb705 nickb705 is offline
Registered User
AKA: Nick
FRC #3701 (Royal Robotics)
Team Role: Programmer
 
Join Date: Feb 2013
Rookie Year: 2011
Location: Gastonia
Posts: 10
nickb705 is an unknown quantity at this point
Re: Two limit switches, one button

Thanks so much to everyone who gave their impute! They work like a charm!
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 03:57.

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