Go to Post I urge them to build the kitbot and repeateadly smash it into a concrete wall in order to sate their anger. It will soon wane when they manage to do more damage to the wall than to the kitbot. That is honestly the reason that we ended up using the kitframe this year. - Andrew Blair [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 20-02-2013, 14:42
denton1003 denton1003 is offline
Registered User
FRC #4364
 
Join Date: Feb 2013
Location: Texas
Posts: 2
denton1003 is an unknown quantity at this point
Robot Main.VI Driving Issues

Last night as we were finishing up on the robot, I tried to deploy the RobotMain.VI to the cRIO with all of the added programming for the shooter/loader/etc.

The problem is that with all of these extra things on there, for some reason the driving motors no longer work.

When the extra programming is removed, the driving works fine.

One thing we noticed is that when the extra information is on there, all of the motors go solid except for the two Talons that would control the driving (whereas they would normally be solid without the extra programming).

Does anyone have any idea as to why this is happening/how to fix it?
Reply With Quote
  #2   Spotlight this post!  
Unread 20-02-2013, 15:09
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,835
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: Robot Main.VI Driving Issues

A coding problem like that is hard to help diagnose without being able to see any code.

Are you just looking for generic recommendations?
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #3   Spotlight this post!  
Unread 20-02-2013, 15:15
AquaMorph's Avatar
AquaMorph AquaMorph is offline
Alumnus of 2059
AKA: Christian Colglazier
FRC #2642 (Pitt Pirates)
Team Role: Mentor
 
Join Date: Jun 2010
Rookie Year: 2008
Location: Cary
Posts: 78
AquaMorph is on a distinguished road
Re: Robot Main.VI Driving Issues

Quote:
Originally Posted by denton1003 View Post
Last night as we were finishing up on the robot, I tried to deploy the RobotMain.VI to the cRIO with all of the added programming for the shooter/loader/etc.

The problem is that with all of these extra things on there, for some reason the driving motors no longer work.

When the extra programming is removed, the driving works fine.

One thing we noticed is that when the extra information is on there, all of the motors go solid except for the two Talons that would control the driving (whereas they would normally be solid without the extra programming).

Does anyone have any idea as to why this is happening/how to fix it?
Most likely you have to many functions in teleop.vi. If it does not run fast enough the wheel will not move. I believe it has to run faster than 20ms. Check the errors on the drive station. If this is the case it will say something about teleop.vi running too slowly.
__________________
FRC Drive: Play Store FRC Manager: Play Store
Reply With Quote
  #4   Spotlight this post!  
Unread 20-02-2013, 15:38
denton1003 denton1003 is offline
Registered User
FRC #4364
 
Join Date: Feb 2013
Location: Texas
Posts: 2
denton1003 is an unknown quantity at this point
Re: Robot Main.VI Driving Issues

Quote:
Originally Posted by AquaMorph View Post
Most likely you have to many functions in teleop.vi. If it does not run fast enough the wheel will not move. I believe it has to run faster than 20ms. Check the errors on the drive station. If this is the case it will say something about teleop.vi running too slowly.
How would I go about making it run faster? I'm not very adept at LabView, and I've only been able to do what I've done based on very basic tutorials.


Picture of Teleop.vi
Click image for larger version

Name:	TELEOP Screen.jpg
Views:	47
Size:	469.2 KB
ID:	14134
Reply With Quote
  #5   Spotlight this post!  
Unread 20-02-2013, 15:40
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,835
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: Robot Main.VI Driving Issues

That's got some things wrong with it.
Mostly the code isn't structured that way.
Teleop is supposed to be a quick execute and leave, so it can go pick up new driver orders.
The new code you added includes a While loop that doesn't ever let it leave to go get new driver commands, staying in there forever, because it's structured as a stand-alone program that's been stuck inside a sub-program. The For loops don't accomplish anything other then to slow down execution while they set the motor output over and over again to the same value.
  • Device Opens on the left belong in Begin.vi (you'll have to name them there and use the new names in Teleop to reference them).
  • Using the Device goes in Teleop.vi (remove the While loop and all the For loops)
  • Device Closes on the right go in Finish.vi
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 20-02-2013 at 15:52.
Reply With Quote
  #6   Spotlight this post!  
Unread 20-02-2013, 15:45
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Robot Main.VI Driving Issues

You have basically added an infinite loop to teleop and teleop is intended to be called and to return for each new joystick command.

If you move the loop and place it into Periodic Tasks.

Either that, or you can put the opens in the Begin.vi and store then in the name registry. Put the closes in the Finish.vi, and let the body of the loop remain in teleop.

Either approach should work for you.

Greg McKaskle
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 23:00.

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