Log in

View Full Version : Null motor error


rudun
30-10-2011, 19:46
We have gotten the black jaguar serial bridge set up. The jaguars have the latest firmware, we have flashed the crio with v92. I am able to spin a motor with BDC-Comm. However when the robot initializes it throws a null motor exception. we are using java and just using a try like this.


try { leftMotor = new CanJaguar(2); }
catch (Exception e) {
System.out.println(getMessage());
}

Alan Anderson
31-10-2011, 08:49
...when the robot initializes it throws a null motor exception.

From a quick look at the Java framework, it seems that the "Null motor provided" exception comes from the RobotDrive constructor. Check to make sure it's getting called with all necessary parameters.

rrossbach
02-11-2011, 18:52
We have gotten the black jaguar serial bridge set up. The jaguars have the latest firmware, we have flashed the crio with v92. I am able to spin a motor with BDC-Comm. However when the robot initializes it throws a null motor exception. we are using java and just using a try like this.


try { leftMotor = new CanJaguar(2); }
catch (Exception e) {
System.out.println(getMessage());
}



The class is CANJaguar, not CanJaguar.

- Ron

rudun
03-11-2011, 10:17
It turned out that it was a problem with the terminator. It was working with the bdc-comm utility, but was taking too long to return a signal to operate with the crio. After replacement we got it to work.

In response to the previous post it was a typo on the post, not the code. Otherwise we would not have been able to tell you what it was returning or been able to compile the code.

Thanks for the responses.