View Single Post
  #35   Spotlight this post!  
Unread 28-01-2010, 10:56
Bryscus's Avatar
Bryscus Bryscus is offline
EE, CpE
AKA: Bryce B.
FRC #0180 (SPAM)
Team Role: Engineer
 
Join Date: Jan 2009
Rookie Year: 1999
Location: Jupiter, FL
Posts: 173
Bryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud of
Re: Black jaguars: not working

Quote:
Originally Posted by ozrien View Post
ellisk,

I just to confirm where you are...

You are using wind river c++ with "latest" checked out code from firstforge, or the last file release (zip under the file release link)?

You have latest FRC_2CANPlugin.out file from ctr website.

FRC_2CANPlugin.out is in the "ni-rt/system" directory on the ftp server in the cRIO.

ni-rt.ini is modified so that ";FRC_2CANPlugIn.out" is IMMEDIETELY after FRC_NetworkCommunication.out.
Note that FRC_2CANPlugIn.out now should be before FRC_UserProgram (in the past releases it would have been after but that was incorrect, causing all sorts of problems).

And also have you successfully viewed the web dashboard in the 2CAN and have confirmed that the Jaguar ID for your jag is the same one used in the constructor of CANJaguar?
ozrien,

I've been using CAN control for over a couple weeks now, but I'm using the serial port. CANJaguar.h is necessary for the project to build. ellisk only shows 2CAN.h included. Could this be his/her problem?

- Bryce

P.S. ellisk, I would verify yourself that your Jaguars are set with the correct ID. Also, that they have the correct firmware. There are two firmware files, one for the black Jags and one for the gray Jags. TI just released a new version of the firmware, so you can take this time to reflash with the newest: http://www.luminarymicro.com/index.p...d&Itemid=59 1

P.S.S. Unless you just didn't show it, you're also missing START_ROBOT_CLASS(Spy); that comes after your class. If this line is not there, the cRio won't deploy your code. This line creates a new task with your program...

P.S.S.S. Here's an example of what my code would be using CAN over the serial port.

Code:
#include "WPILib.h"
#include "CANJaguar.h"



class Spy : public SimpleRobot
{
	CANJaguar *mtr;

public:
	Spy(void)
	{	
                mtr = new CANJaguar (5);  //or whatever ID you have set
		GetWatchdog().SetEnabled(false);
	}

	void Autonomous(void)
	{

	}

	void OperatorControl(void)
	{

		while (true) {
			mtr->Set(0.5);
			Wait(0.5);
		}
	}
};

START_ROBOT_CLASS(Spy);
__________________
The opulence of the front office decor varies inversely with the fundamental solvency of the firm.
Reply With Quote