Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Two limit switches, one button (http://www.chiefdelphi.com/forums/showthread.php?t=133601)

tcjinaz 03-02-2015 22:16

Re: Two limit switches, one button
 
Quote:

Originally Posted by Greg McKaskle (Post 1437585)
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"

tcjinaz 03-02-2015 22:21

Re: Two limit switches, one button
 
Quote:

Originally Posted by Alan Anderson (Post 1437612)
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

tcjinaz 04-02-2015 00:07

Re: Two limit switches, one button
 
Quote:

Originally Posted by tcjinaz (Post 1437994)
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

mshafer1 04-02-2015 22:34

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.

nickb705 10-02-2015 08:50

Re: Two limit switches, one button
 
Thanks so much to everyone who gave their impute! They work like a charm!


All times are GMT -5. The time now is 20:12.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi