View Single Post
  #8   Spotlight this post!  
Unread 05-02-2009, 13:03
Pasha Pasha is offline
Registered User
None #1403
 
Join Date: Jan 2008
Location: Ukraine
Posts: 8
Pasha is an unknown quantity at this point
Re: Limit Switchers Logic Problem

Quote:
Originally Posted by Dave Scheck View Post
I think the problem is that you blindly set the output to 0 when the switch is pressed. I think you want the logic to be something like this
Code:
IF left button is pressed
    IF left limit switch is pressed
        output = 0
    ELSE
        output = MOVE_LEFT_SPEED
You'll need something similar on the right side as well

That doesn't work because it would just continue to spin left forever and the limit switch would only
be checked when the button is pressed again.

The other logic would work maybe, but I'm not sure if the limit switcher would work. Also, I wish
this was C, I'd be done way sooner. However, I have to write this in LabView.


To Greg: I did set up the buttons to move the motors. That works perfect. When you press
right, it goes right, when it goes left it goes left. When I press stop, it stopped. Only
problem is the limits. Also, once the limit switch is pressed down, I do force the motor to 0.
This way the motor actually does stop. However, the limit stays true once it hits it, and the motor
is constantly forced to 0.

@DarKCroNo: You have a VI that toggles the joystick instead of auto updating?
Such as, you press right to be true, and it toogles to true, instead of auto updating it
back to false? If so, PLEASE GIVE!

@billbo911: I will look right into that as soon as class is over. Thanks!

Thanks for your support and I will keep everything updated on how this goes. This is a very
important task, and I need this working. Thanks for you help again.