I’m new with labview as well as the cRIO, so bear with me.
The Jaguar speed controllers we have hooked up to our robot don’t seem to be responding to our labview code. I’ve used both the default code installed with the FRC Labview disks as well as the tutorial up on national instruments, but nothing seems to work.
I’ve put probe points and indicators all over the place, hoping to get some insight as to what’s going wrong, but I haven’t come across anything helpful.
The indicator shows the speed being set to 1 and gets the speed as 1, but the speed controllers never seem to get that memo. The joysticks and everything attached to the driver station are definitely talking to the computer, but everything on the robot ignores what’s going on.
Any suggestions?
Could this be an hardware problem instead of software?
Thanks,
-August
EDIT: The spike relays don’t seem to be responding either, but I’m not quite sure about the program we have for that anyway.
What do you have the Jaguar’s PWM input connected to? In which direction are the cables plugged in?
Does the Driver Station display show that the robot is Enabled? What is the battery voltage as shown on the DS?
What is the state of the Robot Signal Light (or the green LED next to the RLS pins on the Digital Sidecar connected to the Digital I/O module plugged into slot 4 of the cRIO)? How about the three LEDs on the Digital Sidecar showing the presence of +12, +5, and +6 volts?
Maybe the problem is not hardware, or software… maybe the problem is that you are not getting enough sleep. You’d be surprised how clear things get after a good night of sleep
Some other things that can help us debug the issue:
What is the status of the light on the Jaguar? I think it goes like this:
Blinking yellow: Jaguar is not getting a signal (robot disabled, or PWM cable not connected correctly)
Solid yellow: Jaguar has good signal signal, telling it not to move. e.g.: when the joystick is right in the center. I think this corresponds to a value of 0 (in the LabVIEW world).
Solid green: Jaguar has a full-forward signal (I think this is a 1 in LabVIEW).
Solid red: Jaguar has a full-reverse signal (I think this is -1 in LabVIEW).
Blinking green/red: Jaguar has a signal to go fwr/reverse (but not full speed, eg: 0.7 or -0.2).
– Note: I say “I think” simply because I’m not 100% sure. Please check the Jaguar documentation (in usfirst.org website, or 2009 controller manual for exact detail). Anyone else reading that sees something wrong, please make appropriate corrections.
You mentioned that you were able to see the voltage as 11.6V; that would mean that your connection between the DS and the cRIO should be OK. But, just double-check that your team numbers (and thus IP addresses) are all set up correctly.
Another thing you can do is start a new FRC project, use the “Basic Framework” and don’t touch the code, just hit the Run button (arrow at the top of the screen). That will download the code to the cRIO and start running it. I think the Basic Framework is set up for arcade drive with Joystick on USB1 (DS), driving PWM1 and PWM2 on the digital sidecar. Try this and keep an eye on the the Jaguars connected to PWM1 and PWM2 as you move the joystick.
Feel free to add probes and/or indicators in the relevant signals of the block diagram to see what’s going on with your joystick values.
Oh, one more thing, is your digital sidecar hooked up to the correct Digital I/O module on the cRIO? There are two Digital IO modules on the cRIO, I think they are on slots 4 and 6. Make sure you have it hooked up to slot 4.
One last thing that I can think of at this point: do you have little jumpers on the two pins above the three-pin PWM connector on the sidecar? You should NOT put a jumper on those two pins if you are connecting the corresponding PWM signal to the Jaguar/Victor, you should only use a jumper if connecting that PWM directly to a Servo motor.