Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Limit Switches.... (http://www.chiefdelphi.com/forums/showthread.php?t=135532)

youngpilot 06-03-2015 21:14

Limit Switches....
 
I'm a first year programmer and have never really worked with limit switches before. We've tried out multiple different programs to make it work, but all of them have failed. Other teams have helped us, but there's been no success. Attached is a program we've tried recently but it hasn't worked. We know now that's it's supposed to be in DIO, but last year's program was in Relay, so we tried it. Could anyone get us some examples or suggestions as to what we should be doing?? We'd like to get these working soon and we've had no success. Thanks so much!




tomy 06-03-2015 21:32

Re: Limit Switches....
 
Pictures didn't load. What language are you programming in?

Slade 06-03-2015 21:38

Re: Limit Switches....
 
My team did our arm control like so (Not the same team as poster. Just showing an example):

Its under Robotics Library > Sensors > Switch and we used it like so:


GeeTwo 07-03-2015 09:53

Re: Limit Switches....
 
What's happening?

If you're getting zero output when the limit switches aren't engaged, perhaps you have negative logic on the limit switches; try reversing the true and false inputs.
Or better, put a boolean "not" gate between the output of the switch and input of the selector.

GeeTwo 07-03-2015 18:30

Re: Limit Switches....
 
First, some "is it plugged in and is the hardware working" questions:
  • You referred to DIO vs Relay. The limit switches must be plugged into DIO.
  • Do you have limit switches physically installed to the DIO pins?
  • How are these connected? The simplest setup is for the switch to connect/break a connection between the signal and ground pin. A connection which involves the +5V pin won't work, because the signal pin is already internally pulled up to high voltage.
  • When your mechanism reaches the limits of travel, do the switches engage?
  • When your mechanism reaches the limits of travel, does the voltage at the signal pin change? The easiest way to watch this is to install a short "PWM extension cable" at the RIO end of your sensor cable and measure the voltage between the ground and signal (black and white) wires.

Finally, while I am not an NI/LV programmer, it looks to me like your two arms are always supposed to do the same thing, as their input is split from the same data line. This "one degree of freedom" is being controlled by two separate joystick axes, one of which is inverted. I suppose these are left and right analog triggers on the xBox controller or something similar (yes, those triggers are mapped to axes 2 and 3, and return 0 to 1 values). It appears your intent is to disregard axis 2 when you're at the top, and axis 3 when you're at the bottom. Presuming that the axes return positive values, your motors are set up to work properly if they require negative input voltage to go up, and positive to go down. If your setup is not like this, then how is it set up and what are you expecting it to do?


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

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