Go to Post I'm excited. Probably too much, but eh, I'm a big geek. - Brandon Martus [more]
Home
Go Back   Chief Delphi > Technical > National Instruments LabVIEW and Data Acquisition
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 16-03-2011, 15:27
Tub Tubs Tub Tubs is offline
Registered User
FRC #3049
 
Join Date: Feb 2010
Location: Washington
Posts: 23
Tub Tubs is an unknown quantity at this point
Extender trouble

Hello, i have made code to program a button to and extender, can any of you help me
Attached Thumbnails
Click image for larger version

Name:	Teleop.JPG
Views:	50
Size:	27.8 KB
ID:	10426  
Attached Files
File Type: vi Expander.vi (10.3 KB, 5 views)
Reply With Quote
  #2   Spotlight this post!  
Unread 16-03-2011, 15:57
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Extender trouble

The SubVI inside the while loop will be called repeatedly with whatever values the buttons had when the loop began. The loop will never end, so it will never provide a value to the Arcade Drive function. Whatever vi this code is in will hang. If it's in Teleop, your robot will be disabled almost immediately by the communication watchdog.

Tell us what you intend it to do and we can probably tell you a good way to make it happen.
Reply With Quote
  #3   Spotlight this post!  
Unread 17-03-2011, 00:42
Tub Tubs Tub Tubs is offline
Registered User
FRC #3049
 
Join Date: Feb 2010
Location: Washington
Posts: 23
Tub Tubs is an unknown quantity at this point
Extender trouble

I wanted a motor to push a metal bar out of the robot to block other robots
Reply With Quote
  #4   Spotlight this post!  
Unread 18-03-2011, 00:14
Danny Diaz's Avatar
Danny Diaz Danny Diaz is offline
Smooth Operator
AKA: FrankenMentor
None #0418
Team Role: Alumni
 
Join Date: Apr 2005
Rookie Year: 2003
Location: Manchester, NH
Posts: 545
Danny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond repute
Send a message via AIM to Danny Diaz
Re: Extender trouble

Quote:
Originally Posted by Tub Tubs View Post
I wanted a motor to push a metal bar out of the robot to block other robots
Then why not do yourself a favor and let the hardware do most (if not all) the work for you. In your code (the software side), all you need is to watch the value of a trigger on your joystick (or another button of your choice); once pressed, just tell your motor to "go" - don't worry about telling it to stop, let the hardware handle that for you. On the hardware side, use limit switches plugged into the Jags as stops on your bar; if done correctly, the limit switches will be normally-closed while the Bar is on your robot, and they will be open once your bar extends as far out as it needs to be. The open limit switch will cause the Jag to brake (not "break") the motor, acting as your stop.

There ya go, an incredibly simple mechanism to code and set up.

-Danny
__________________
Danny Diaz
Former Lead Technical Mentor, FRC 418
Reply With Quote
  #5   Spotlight this post!  
Unread 18-03-2011, 22:24
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Extender trouble

Quote:
Originally Posted by Tub Tubs View Post
I wanted a motor to push a metal bar out of the robot to block other robots
What kind of control do you need on the bar? Does it have to move at different speeds at different times, or can it always move at the same configured speed? Does it have to stop in the middle of its travel, or can it always move fully to one end of the other before stopping? Do you want it to extend when a joystick button is pressed and return when the button is released, or do you want it to extend based on one button and return based on a different button? How far do you want the bar to move?

The answers to these questions might point to a solution you aren't thinking of: use a pneumatic cylinder instead of a motor.
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 18:30.

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