Go to Post Does FIRST know about some rare inverted mushroom that I do not? - sanddrag [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 Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 23-02-2011, 15:57
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
Buttons for controlling Extender

Hello, My team wants me to program an extender but when i deploy, the robot completely loses Teleop. Here is my program that i made. Can you guys give me feedback
Attached Thumbnails
Click image for larger version

Name:	Joystick Buttons.JPG
Views:	28
Size:	30.3 KB
ID:	10280  Click image for larger version

Name:	Expand.JPG
Views:	11
Size:	18.6 KB
ID:	10281  Click image for larger version

Name:	Retract.JPG
Views:	9
Size:	19.1 KB
ID:	10283  
Reply With Quote
  #2   Spotlight this post!  
Unread 23-02-2011, 16:06
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: Buttons for controlling Extender

It looks like you took a Motor example and called it from Teleop. As you have discovered, this does not work. There's a tutorial you can view from the LabVIEW Getting Started window that tells you how to integrate examples into the robot framework.

In your case, you need to do a couple of things to make the code work the way it looks like you are asking it to. Put the Motor Open in the Begin vi, and wire its device reference output to a Motor Refnum Set, giving it a memorable name. Put the Motor Close in the Finish vi, taking its device reference from a Motor Refnum Get with the name you chose. In your Expand and Retract functions, remove the while loop and take the Motor Set's device reference from a Motor Refnum Get just like the one you put in Finish.

Once you do that, the code should run. However, you don't appear to have any way to stop the motor. That might be a problem.
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:33.

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