Trouble connecting to cRIO?

Hey, new guy here, hoping smeone can point out what my team is doing wrong, I’d appreciate it. I’m a software guy so I don’t know too much about the hardware configuration of the bot but if you need to know something I don’t provide just let me know and I can ask someone on the team.

Basically, needing a starting point for how to program the bot, I recreated this program: http://www.blip.tv/file/1318696/ . To eliminate the chance that the wireless network was the problem, we ran an ethernet straight from the driver station to the cRIO. Also, to eliminate the chance that the computer might not be reading the joystick, we attached an indicator to the getaxis command to make sure the computer was reading the input, and it was.

Once everything was booted up and connected, the driver station read “No Code”, which I assumed was normal because the program wasn’t run yet. Once I ran the program, that turned into the voltage the cRIO was assuming, and I believed that meant that the ethernet cable was working and data was flowing from the driver station to the cRIO and back.

However, when the joystick is moved in the appropriate direction, the Jmotor doesn’t spin. We thought maybe we were using the wrong slot, so we tried all 4 (each in a different slot on the digital side car) of the motors, but none responded. The lights on each appropriate Jaguar continued to just blink, and I am told that if they were recieving any signal from the control car, that light would turn steady. Is the team missing a connection somewhere, or is there some switch on the side car that needs to be flipped, or does something need the be initialized in the program? The team’s been stuck on this for two days and we would really appreciate any help you can provide.

There are a good many things that need to be done correctly before you have a working robot control system. From your post it sounds like you may be winging it. You really need to find and follow the directions.

As for your direct problem, put the modules back in their original slots and make sure that the DS is inline between the computer and the cRIO, make sure that the disable/enable switch on the DS is enabled. If you are using the joystick, also set the switch on top to teleop. The DS communications enable the outputs by keeping the safety watchdog fed.

Greg McKaskle

“No Code” Doesn’t mean that the code hasn’t loaded. It means theres an error in the code. (At least in all the cases I’ve run into)

Say I tried to use a variable without initializing it. (Sorry for spelling) Nothing would work, and it would say “Battery: No Code”

To Greg: Yes we’re in Teleop and its enabled. As fr modules, are you reffering to the “cards” that plug into the slots on top of the cRIO? If so, those are all in their original positions. Any other suggestions?

Bomber: Oh, my mistake, but the point is there isn’t any code running when it says “No Code”, so it shouldn’t really be able to tell if theres any errors or not, because it hasn’t started transmitting, right?

http://www.usfirst.org/frccontrolsystem

Get the Control System Manual. Read it. Start with Chapter 1 Introduction. Continue with Chapter 2 Getting Started. Chapter 2 will step you through getting your system running. It points to detailed instructions in other chapters, rather than duplicating those instructions. You’ll have to pay close attention to the step-by-step directions in Chapter 2 and not get sidetracked by parts of the other chapters that aren’t in the sequence called out.

I reread the post, and I think I misunderstood some of your earlier investigations. If you haven’t already done so. Open up some example programs. Building the ones from the tutorial should also be fine, but the behavior of the watchdog has changed several times during development, so it is possible that those tutorials are have an issue, or that you’ve entered a value incorrectly.

Anyway, give the template robot and some examples a shot and that should help you troubleshoot.

Greg McKaskle

Alan: The guys who built the robot say that they followed the instructions of the manual to the T and that there’s nothing in the manual to change that could cause the problem.

Greg: It may sound obvious, but we actually didn’t think to try run any oif the default programs, so we’ll try it as soon as we can. Also, as for Watchdog, we thought hat might have been part of the problem yesterday and tried running the problem with Watchdog set to true, false, and just not even referenced.

Then I don’t know what to tell you. You say the Jaguars are blinking, which means they’re not getting a PWM signal, but you also say the Driver Station displays the battery voltage, which means both it and the cRIO have been updated from their original state. The instructions don’t say to do the update until after the PWM connection has been verified.

…we actually didn’t think to try run any oif the default programs…

Running the default program is at the core of the bench test.

Either you’re describing your problem in a way that I don’t understand, or your robot builders are mistaken.

ok… this is darty’s captain… the problem we have is a code issue… when we finished the benchtest the jags were working fine… we upgraded the cRIO and driverstation, then tested with the preloaded arcade and it worked still… we then deployed our own code that was made from the tutorial mentioned above, when we deployed however the jags received no pwm signal from our code… we wasted a few days trying to fix it to no avail… when this didnt work, our programers reimaged the cRIO to get back to what we knew worked,the default code… we then tested and the cRIO performed fine… we then deployed our code again and the pwm signal was missing again… what darty needs to know is how to get the signal to the jag from the cRIO, that is to say, what is the code needed to program the pwm for the jags… long story short, all our programers left last year and this is our programing teams first year… they need help… BAD!!!

I’ve never heard of the blip.tv site as a source of any information about the 2009 FRC controller. It’s blocked where I am, so I can’t look at it to find out.

You need to start with one of the templates in order for things to work properly. Are you programming with LabVIEW or are you using C++?

You may have to put a jumper on the digital sidecar, so it passes 5v through the PWM cable.

edit: oh, so you seem to have confirmed it’s a code problem then… nevermind.

blip.tv is the site that NI uses for their video tutorials.

Make sure that you reset the cRio after downloadiing the code. If you’ve re-flashed, you MUST do a complete power down to init the FPGA. I would recommend connecting a terminal program via the RS-232 port on the cRio so that you can see exactly the error that is causing the nocode condition. That’s how we fixed ours. Its pretty hard to understand what is wrong with the code without knowing why. Error messages will be displayed via RS-232 with codes that correspond to vxworks errors and warnings. HTH

It’s just a simple tutorial, made by National Instruments, that demonstarted a simple way to use a joystick (using open, getaxis, etc) and a jaguar controller. Its in LabVIEW.

Ok a little update. We reimaged the cRIO and let it power down/up. Then, we used the program that is automatically added when you reimage, the arcade drive, it worked.

Then, I opened LabVIEW and went under examples and opened up the sample Arcade Drive Example. The only change I made besides changing the target from 10.0.0.2 to 10.2.4.2 was to change motor type from Victor (the default) to Jaguar (what we’re running). And lo and behold, it still didn’t work. We also tried the entire process again using the Tank Drive Example, with identical results.

Also, if it makes a difference, we’re running Windows in a separate partition in a Mac.

Since I have experienced a similar issue, it sounds like this. What I would do is allow it to run on your cRIO for 20 minutes. See if you experience the same thing I reported in that thread.

Is your version of LabView different than what your cRio needs to run off of?
See here for our issues with that: http://www.chiefdelphi.com/forums/showthread.php?t=72406

Hey RMiller, your suggestion seemed like the most likely problem, so I walked into a meeting today with that as my prime suggestion, turns out another team member looked into it and reached the same conclusion. As soon as we get our laptop we’ll check…