Go to Post Rules can be rewritten, problems can be fixed, but peoples' feelings are far from inanimate - they need more consideration than just being "corrected". - Eugenia Gabrielov [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 16-02-2011, 18:34
Team 2524 Team 2524 is offline
Registered User
FRC #2524
Team Role: Programmer
 
Join Date: Feb 2011
Rookie Year: 2011
Location: New York
Posts: 48
Team 2524 is an unknown quantity at this point
Perspective on code for motors and Robot arm

I am a rookie programmer and I went to another school(Team 3059) to help/teach us a little about programming in LabVIEW. This is one of the codes i built using parts of the code that Team 3059 gave us. (In Teleop.vi)

I need some advice and criticism on this code.

Thank You
Attached Thumbnails
Click image for larger version

Name:	RHS-TELOP.vi code -need to double check.jpg
Views:	74
Size:	111.5 KB
ID:	10145  
Reply With Quote
  #2   Spotlight this post!  
Unread 16-02-2011, 18:45
Ian McShane Ian McShane is offline
Registered User
FRC #3585 (Rogue Robots)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: NH
Posts: 141
Ian McShane will become famous soon enoughIan McShane will become famous soon enough
Re: Perspective on code for motors and Robot arm

It depends what you want it to do. i can't help you much if i don't know what it is supposed to do.
__________________
in FIRST, it's process over product, and team over robot.
http://www.roguerobotsof4h.com/
Team 3585 Rogue Robots of 4-H
Reply With Quote
  #3   Spotlight this post!  
Unread 16-02-2011, 18:48
Ian McShane Ian McShane is offline
Registered User
FRC #3585 (Rogue Robots)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: NH
Posts: 141
Ian McShane will become famous soon enoughIan McShane will become famous soon enough
Re: Perspective on code for motors and Robot arm

Oh, and what vi is this supposed to be in?
__________________
in FIRST, it's process over product, and team over robot.
http://www.roguerobotsof4h.com/
Team 3585 Rogue Robots of 4-H
Reply With Quote
  #4   Spotlight this post!  
Unread 16-02-2011, 20:10
Vikesrock's Avatar
Vikesrock Vikesrock is offline
Team 2175 Founder
AKA: Kevin O'Connor
no team
Team Role: Engineer
 
Join Date: Mar 2006
Rookie Year: 2007
Location: Manchester, NH
Posts: 3,305
Vikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond repute
Send a message via AIM to Vikesrock Send a message via MSN to Vikesrock Send a message via Yahoo to Vikesrock
Re: Perspective on code for motors and Robot arm

This code does not match the way that the framework is intended to function.

I would recommend heading over to www.frcmastery.com and watching at least the first video under "2011 FRC Steps to Robot Success" on the right side of the page. They really do a good job.
__________________


2007 Wisconsin Regional Highest Rookie Seed & Regional Finalists (Thanks 930 & 2039)
2008 MN Regional Semifinalists (Thanks 2472 & 1756)
2009 Northstar Regional Semifinalists (Thanks 171 & 525)
Reply With Quote
  #5   Spotlight this post!  
Unread 17-02-2011, 08:23
Team 2524 Team 2524 is offline
Registered User
FRC #2524
Team Role: Programmer
 
Join Date: Feb 2011
Rookie Year: 2011
Location: New York
Posts: 48
Team 2524 is an unknown quantity at this point
Re: Perspective on code for motors and Robot arm

I placed that code into the Telop.vi.

I placed this code into the Begin.vi.

Would this be a proper setup for using buttons to switch between robot arm and motor?
Attached Thumbnails
Click image for larger version

Name:	Big Arm and Little Arm.jpg
Views:	35
Size:	41.2 KB
ID:	10157  

Last edited by Team 2524 : 17-02-2011 at 08:33.
Reply With Quote
  #6   Spotlight this post!  
Unread 17-02-2011, 10:42
Chris Hibner's Avatar Unsung FIRST Hero
Chris Hibner Chris Hibner is offline
Eschewing Obfuscation Since 1990
AKA: Lars Kamen's Roadie
FRC #0051 (Wings of Fire)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1997
Location: Canton, MI
Posts: 1,488
Chris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond repute
Re: Perspective on code for motors and Robot arm

To make it less confusing, I would get rid of the tank drive and just use Motor Set Output for each motor.

Do you have a picture of the arm so we can see how it is supposed to work?
__________________
-
An ounce of perception is worth a pound of obscure.
Reply With Quote
  #7   Spotlight this post!  
Unread 17-02-2011, 10:47
DavidGitz's Avatar
DavidGitz DavidGitz is offline
Lead Technical Advisor
FRC #1208 (MeTool Brigade)
Team Role: Coach
 
Join Date: Dec 2006
Rookie Year: 1996
Location: O'Fallon, IL
Posts: 341
DavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud of
Send a message via AIM to DavidGitz Send a message via MSN to DavidGitz Send a message via Yahoo to DavidGitz
Re: Perspective on code for motors and Robot arm

Quote:
Originally Posted by Team 2524 View Post
I placed that code into the Telop.vi.

I placed this code into the Begin.vi.

Would this be a proper setup for using buttons to switch between robot arm and motor?
I don't see on this image the differentiation between Begin and Teleop. For your reference, the last function for each reference in the Begin should end with a Set Reference. The first function for each reference in Teleop should be a Get Reference.

And for clarification, why would you use Tank Drive on an Arm?
__________________
Reply With Quote
  #8   Spotlight this post!  
Unread 17-02-2011, 11:26
Team 2524 Team 2524 is offline
Registered User
FRC #2524
Team Role: Programmer
 
Join Date: Feb 2011
Rookie Year: 2011
Location: New York
Posts: 48
Team 2524 is an unknown quantity at this point
Re: Perspective on code for motors and Robot arm

Well, I thought it would be easier to be able to have two joystick controls for our robot since tank mode involves using two joystick controls, correct?

Arcade mode only uses one joystick?

Last edited by Team 2524 : 17-02-2011 at 11:30.
Reply With Quote
  #9   Spotlight this post!  
Unread 17-02-2011, 11:29
Chris Hibner's Avatar Unsung FIRST Hero
Chris Hibner Chris Hibner is offline
Eschewing Obfuscation Since 1990
AKA: Lars Kamen's Roadie
FRC #0051 (Wings of Fire)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1997
Location: Canton, MI
Posts: 1,488
Chris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond repute
Re: Perspective on code for motors and Robot arm

Quote:
Originally Posted by Team 2524 View Post
Well, I thought it would be easier to be able to use two have two joystick controls for our robot since tank mode involves using two joystick controls, correct?

Arcade mode only uses one joystick?
I guess I'm confused. Or you trying to drive an arm, or your drive system? The name of the Ref is "Big Arm" and "Little Arm", so I thought you are commanding motors on an arm.
__________________
-
An ounce of perception is worth a pound of obscure.
Reply With Quote
  #10   Spotlight this post!  
Unread 17-02-2011, 12:11
DavidGitz's Avatar
DavidGitz DavidGitz is offline
Lead Technical Advisor
FRC #1208 (MeTool Brigade)
Team Role: Coach
 
Join Date: Dec 2006
Rookie Year: 1996
Location: O'Fallon, IL
Posts: 341
DavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud of
Send a message via AIM to DavidGitz Send a message via MSN to DavidGitz Send a message via Yahoo to DavidGitz
Re: Perspective on code for motors and Robot arm

Quote:
Originally Posted by Team 2524 View Post
Well, I thought it would be easier to be able to have two joystick controls for our robot since tank mode involves using two joystick controls, correct?

Arcade mode only uses one joystick?
You should post the specifications for your system so we can help better.
Drive: What mode (Tank or Arcade)? Which Joystick(s) (need 1 for Arcade, need 2 for Tank)? What PWM Channels? What type of Speed Controllers?
Arm: How many Arms exactly (you referenced Big, Little Arms)? How do you want to control? (Joystick y-axis for each Arm I assume?) Which Joystick(s) control this? What PWM Channels?

The more text the better. So far the issue is not enough information and cryptic posts.
__________________
Reply With Quote
  #11   Spotlight this post!  
Unread 17-02-2011, 15:14
Team 2524 Team 2524 is offline
Registered User
FRC #2524
Team Role: Programmer
 
Join Date: Feb 2011
Rookie Year: 2011
Location: New York
Posts: 48
Team 2524 is an unknown quantity at this point
Re: Perspective on code for motors and Robot arm

Drive: Tank Mode
Joysticks: 2 for Tank Mode
Number of Arms: 2 (1 big Arm and 1 little Arm)
Speed Controller: 2 Jaguars(2 motors for Big Arm)
1 Victor(Little Arm)
PWM channels: 1 & 2 for Drive motors
PWM channels:3 & 4 for Big Arm
PWM channel: 5 for Little Arm

Arm Movement: Y-Axis direction(correct me if I'm wrong)

Goal: Be able to press a button to switch from Drive motors to Arm motors. I want to have each joystick control an arm.

I posted the Begin.vi and Telop.vi to make it easier.
Also Pictures of Big Arm and Little Arm.
Attached Thumbnails
Click image for larger version

Name:	110217-025946.jpg
Views:	17
Size:	92.7 KB
ID:	10169  Click image for larger version

Name:	110217-025908.jpg
Views:	13
Size:	116.6 KB
ID:	10170  Click image for larger version

Name:	110217-025846.jpg
Views:	14
Size:	121.3 KB
ID:	10171  
Reply With Quote
  #12   Spotlight this post!  
Unread 17-02-2011, 15:36
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,795
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Perspective on code for motors and Robot arm

Tank/Arcade Drive is for robot bases.

Arm and other appendage motors are done this way:
WPI robotics Library -> Robot Drive -> Advanced -> Motor Control
Attached Thumbnails
Click image for larger version

Name:	MotorExample.jpg
Views:	50
Size:	13.8 KB
ID:	10172  
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 17-02-2011 at 15:39.
Reply With Quote
  #13   Spotlight this post!  
Unread 17-02-2011, 15:47
Team 2524 Team 2524 is offline
Registered User
FRC #2524
Team Role: Programmer
 
Join Date: Feb 2011
Rookie Year: 2011
Location: New York
Posts: 48
Team 2524 is an unknown quantity at this point
Re: Perspective on code for motors and Robot arm

sorry, here is the telop vi.
Attached Files
File Type: vi Teleop.vi (18.7 KB, 7 views)
Reply With Quote
  #14   Spotlight this post!  
Unread 17-02-2011, 19:50
DavidGitz's Avatar
DavidGitz DavidGitz is offline
Lead Technical Advisor
FRC #1208 (MeTool Brigade)
Team Role: Coach
 
Join Date: Dec 2006
Rookie Year: 1996
Location: O'Fallon, IL
Posts: 341
DavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud of
Send a message via AIM to DavidGitz Send a message via MSN to DavidGitz Send a message via Yahoo to DavidGitz
Re: Perspective on code for motors and Robot arm

Attached .vi will perform this. Normally I would not post code but since we are only a few days left till shipment and you are struggling with tank drive here you go. Make sure you put the code that is marked "Begin.vi" in the Begin.vi and the code that is marked "Teleop.vi" in the Teleop.vi

A few suggestions:
1) Since your Arm will be controlled by 2 motors you should use a PWM Y-Cable and only use 1 PWM Channel on the DSC. I made this assumption in the code that I wrote since we received them in the KOP.
2) Get more joysticks. I would not want to be the drive team that only has 1 person driving AND operating the arm. It can get pretty confusing and besides it will maximize your efficiency if you have 2 people on your drive team.
Attached Files
File Type: vi Code.vi (21.7 KB, 12 views)
__________________
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 09:19.

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