View Full Version : Already allocated ports for Relays?

01-29-2010, 02:15 PM
My students had some weird stuff going on last night while trying to test out some of the code they wrote to turn a Relay on and off with a joystick button.

Code compiled and downloaded to the robot fine, but when enabled, the robot did nothing (even driving code that previously worked did nothing).

Switching over to the developer side, we noticed an allocation error for our Relay channel. It said that channel had already been used. We have it on the digital sidecar, using slot 6, channel 2. We have no other Relays connected, though do have Jaguars plugged into the other side of the sidecar. No where else in the code do we assign a Relay to the same channel.

Last year, we used C++ with pretty much the same code we are trying in Java now.

Any one else experience errors like this and know what we're missing?


01-30-2010, 03:31 PM
i'll answer my own question. :) just in case other teams experience the same problem.....

it turns out that if there is not a second set of green lights at the bottom of the sidecar, all relay ports are unhappy. we switched over to the other sidecar, which did have the happy green lights, and all is good in relay land.

moral of the story: don't always trust the electrical team when they tell you things are ready to go. :)

01-31-2010, 01:34 AM
This thread is strange. An error that claims a relay is already in use is always a software problem. The software does not know if the sidecar is powered or not. Naturally it does need to be powered for it to actually work, but it has nothing to do with the errors.