Go to Post You're part of what makes FIRST so special. - Matt Krass [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 17-02-2011, 20:22
UltimatJose's Avatar
UltimatJose UltimatJose is offline
Team 3080 Design Team/Build Team
AKA: Jose Ramirez
FRC #3080 (So-called Robotics)
Team Role: Driver
 
Join Date: Feb 2011
Rookie Year: 2009
Location: Rio Grande City Tx
Posts: 12
UltimatJose is an unknown quantity at this point
WHATS WRONG WITH OUR CODE???!!!

When i write the code, for example a 4 wheel drive system and i build and run it works through the driver station. but when i add to the code, say for example a motor, nothing works. but when i make a code only for that motor, it works. i just can't get them together. Help? could it be the classmate being stupid?
ps. the driver station says one loop could be starving another
  #2   Spotlight this post!  
Unread 17-02-2011, 20:31
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: WHATS WRONG WITH OUR CODE???!!!

Unless you really know what you are doing there should not be any loops inside your Teleop VI. There is already a loop wrapped around the Teleop VI. If you need more help than this please post the full Teleop VI that doesn't do what you expect it to.
__________________


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)
  #3   Spotlight this post!  
Unread 17-02-2011, 20:38
UltimatJose's Avatar
UltimatJose UltimatJose is offline
Team 3080 Design Team/Build Team
AKA: Jose Ramirez
FRC #3080 (So-called Robotics)
Team Role: Driver
 
Join Date: Feb 2011
Rookie Year: 2009
Location: Rio Grande City Tx
Posts: 12
UltimatJose is an unknown quantity at this point
Re: WHATS WRONG WITH OUR CODE???!!!



there is no loops other than the teleop loop
  #4   Spotlight this post!  
Unread 17-02-2011, 20:38
Pmaxm00 Pmaxm00 is offline
Lead Programmer
FRC #2974 (Team WALT)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Marietta, GA
Posts: 17
Pmaxm00 has a spectacular aura aboutPmaxm00 has a spectacular aura about
Re: WHATS WRONG WITH OUR CODE???!!!

I don't fully understand your dilemma, if you contact me through email (or private message) I can help you with it, and then if I cant figure out by walking you throw, I can check out your code if you wouldn't mind.
__________________

Impossibility? I accept your challenge.
  #5   Spotlight this post!  
Unread 17-02-2011, 20:47
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: WHATS WRONG WITH OUR CODE???!!!

Mechanisms are not controlled using the RobotDrive functions. Mechanisms (if they are connected to speed controllers) should be controlled using the functions in the Actuators->Motor Control palette. Specifically the Motor Set Output VI
__________________


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)
  #6   Spotlight this post!  
Unread 18-02-2011, 00:01
PSHRobotics PSHRobotics is offline
Registered User
FRC #1182
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Missouri
Posts: 38
PSHRobotics is an unknown quantity at this point
Re: WHATS WRONG WITH OUR CODE???!!!

Also note that you are referencing "Joystick 2" twice in your code and also getting its axis (and button) values twice in your code. I am not sure if this can cause confusion and break code, but i would recommend simply wiring the "axis 2 (y)" from the first Joystick 2 Get vi into the Arcade drive for your Motor Claw.
  #7   Spotlight this post!  
Unread 18-02-2011, 00:26
Aren Siekmeier's Avatar
Aren Siekmeier Aren Siekmeier is offline
on walkabout
FRC #2175 (The Fighting Calculators)
Team Role: Mentor
 
Join Date: Apr 2008
Rookie Year: 2008
Location: 대한민국
Posts: 735
Aren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond repute
Re: WHATS WRONG WITH OUR CODE???!!!

Are you properly opening these inputs and outputs in Begin.vi? The drive train and first joystick are initialized by default, but you will need to add references to others sensors and actuators as you add them.

It sounds like your main loop is running too slowly, making the Safety on your drive motors timeout. The drive motors by default have Safety enabled with a 100ms timeout. This means that you need to update the output values to these jags at least every 100ms, or the code will turn it off (for Safety). With nice friendly code, the main robot loop containing Teleop.vi should run at anywhere from 20 to 80ms, but will go over if you have lots of code, or, as it seems is the case, there are errors that are slowing everything down.

This safety timeout error can be identified on the Driver Station and going to the "Diagnostics" tab. There is a readout of error messages that will likely include something about Safety Timeout on Kicker (or whatever your mechanism is), the loop is not running fast enough. My guess is that its not running fast enough because of your interesting method of controlling other actuators. I second the need to use Motor Control from the WPILib>>Actuators>>Motor Control pallette, and emphasize that it needs to be initialized properly. If you hit a wall, feel free to ask, we're happy to help. I (and many others) can post screenshots of some of this if it helps. Just looking through Begin.vi will probably help some too.

Another thing, are you using PWM or CAN for the jaguar signal?

And the double joystick reference should compile fine, its just unnecessarily redundant.
Closed Thread


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 10:41.

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