View Single Post
  #23   Spotlight this post!  
Unread 15-02-2010, 10:03
Unsung FIRST Hero
Mike Betts Mike Betts is offline
Electrical Engineer
no team
Team Role: Engineer
 
Join Date: Dec 2001
Rookie Year: 1995
Location: Homosassa, FL
Posts: 1,442
Mike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond repute
Re: Limit Switch Draws Tears

Quote:
Originally Posted by z2daj View Post
Now here is where things get interesting. We have read and tried all of the above solutions AND the reason why we posted the code was so that you could better understand our situtation. Just because we had 3 conditions for a boolean operation does not constitute snotty remarks. It is very eaasy to ignore the third condition as that is not our main problem. I think it is you that must read our responses to the solutions posted. Thank you Mr. Lim and those of you who posted solutions, we have tried all of them , but failure seems too proud to leave us this day.
This will be my last post on this thread.

You originally said that you had two limit switches wired to DI 4 on the digital sidecar.

You then posted a code fragment with this:

Dig1 = new DigitalInput(1, 1);

which is an example of code that can not possible work. Why? The Analog I/O module must be in slot #1.

I replied that the code fragment should have been

Dig1 = new DigitalInput(4, 4);

assuming the digital I/O module is plugged into slot 4 of the cRIO.

You then replied that you had "tried all of the possible solutions" and I asked you to tell us exactly how the switches are wired.

You did not.

The discussion of three conditions came about because you asked. I merely said that you had more than one issue... I also asked you to tell us what you were trying to accomplish. You did not.

The discussion of normally open versus normally closed was especially pertinent as we still do not know how the TWO switches are wired.

Since you will not tell us how things are wired we have to guess... Two normally open switches, wired in series and operated one at a time will never close a circuit and always return a 1 in your code... This is an example of why limit switches are almost always wired as normally closed.

You were asked to explain your wiring. You did not...
You posted code which could not work and you knew that it could not work because you are addressing the analog module...

And somehow you infer that we are to blame because we can not read your mind...

I am done here...

Good luck

Mike
__________________
Mike Betts

Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013

As easy as 355/113...