Go to Post Do you mean...? If so, it's illegal under . (insert your favorite reminder to read the manual here) - EricH [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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 14-01-2012, 15:20
Bongle's Avatar
Bongle Bongle is offline
Registered User
FRC #2702 (REBotics)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Waterloo
Posts: 1,069
Bongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond repute
Send a message via MSN to Bongle
Cannot drive more than 3 jaguars at once

We're having issues getting our 2011 robot to run.

We've got our digital sidecar in slot 2, as the instructions say.

If we use the SimpleTemplate sample, it will drive the Jaguars on PWM 1 and 2 (green lights and the motors turn).

If we modify the SimpleTemplate sample to drive PWMs 3 and 4, it will happily drive those motors (green lights and the motors turn).

If we modify the SimpleTemplate sample to use the RobotDrive constructor that takes PWMs 1, 2, 3, and 4 (as our 2011 robot used 4 drive motors), it fails to send signals to any Jaguar - they give us a slow orange blink.

If we remove the RobotDrive class and manually declare Jaguars attached to various PWMs, it will only work if we use 3 or fewer Jaguars. As soon as we construct the 4th Jaguar (whether or not we call the Set() function on it), the program fails to send a signal to the Jaguars.

To summarize:
-All 4 Jaguars have power and PWMs going to them - we can successfully drive any of them if we set our program to use those PWMs.
-As soon as we attempt to use 4 motors, whether via RobotDrive or via Jaguar class instances, it fails.
-We get no error messages in the console
-If we put a printf in the main operator control loop, it gets called continuously, indicating that the loop is running properly.

I noticed some "syncgroup" parameters in the Jaguar class header that default to 0 - is there something we're supposed to do with that?

Here's the 4-Jaguar code that fails - can someone try it on their robot and confirm whether it works or not?
Code:
#include "WPILib.h"

class RobotDemo : public SimpleRobot
{
	Joystick stick; // only joystick

	Jaguar frontRight;
	Jaguar backRight;
	Jaguar frontLeft;
	Jaguar backLeft;
public:
	RobotDemo(void):
		frontRight(1),
		backRight(2),
		frontLeft(3),
		backLeft(4),
		stick(1)		// as they are declared above.
	{
	}

	void Autonomous(void)
	{
	}

	void OperatorControl(void)
	{
		while (IsOperatorControl())
		{
			frontLeft.Set(0.3);
			frontRight.Set(0.3);
			backLeft.Set(0.3);
			backRight.Set(0.3);
			
			Wait(0.005);				// wait for a motor update time
		}
	}
};

START_ROBOT_CLASS(RobotDemo);

Last edited by Bongle : 14-01-2012 at 15:24.
Reply With Quote
  #2   Spotlight this post!  
Unread 14-01-2012, 17:30
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,572
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Cannot drive more than 3 jaguars at once

It sounds like there's a problem with the power cable to your digital sidecar. If the digital sidecar doesn't have power, it can drive a few PWMs, but not all.
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 14:43.

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