Go to Post by the way when someone calles me a dork or geek, i tell them to look up dork and geek in the dictionary, and that i would rather be called nerd :) - Mike Schroeder [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 Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 06-03-2015, 21:14
youngpilot youngpilot is offline
Registered User
AKA: Mary Luking
FRC #2640 (The Hotbotz)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2014
Location: North Carolina
Posts: 7
youngpilot is an unknown quantity at this point
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!



Reply With Quote
  #2   Spotlight this post!  
Unread 06-03-2015, 21:32
tomy tomy is offline
Registered User
FRC #3038 (I.C.E. Robotics)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Stacy, Minnesota
Posts: 494
tomy has a spectacular aura abouttomy has a spectacular aura about
Re: Limit Switches....

Pictures didn't load. What language are you programming in?
Reply With Quote
  #3   Spotlight this post!  
Unread 06-03-2015, 21:38
Slade Slade is offline
Registered User
FRC #4471 (Spartrons)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Florida
Posts: 24
Slade is an unknown quantity at this point
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:


Last edited by Slade : 07-03-2015 at 20:36.
Reply With Quote
  #4   Spotlight this post!  
Unread 07-03-2015, 09:53
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,570
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
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.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
Reply With Quote
  #5   Spotlight this post!  
Unread 07-03-2015, 18:30
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,570
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
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?
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
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:54.

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