Go to Post Don't you have some rovers to redirect or something Dave? - Rich Kressly [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 28-01-2009, 18:28
darty darty is offline
Registered User
None #0204
 
Join Date: Jan 2009
Location: NJ
Posts: 9
darty is an unknown quantity at this point
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.
  #2   Spotlight this post!  
Unread 28-01-2009, 20:33
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,753
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Trouble connecting to cRIO?

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
  #3   Spotlight this post!  
Unread 28-01-2009, 21:44
bomber7 bomber7 is offline
Humanoid
FRC #0585
Team Role: Programmer
 
Join Date: Feb 2007
Rookie Year: 2007
Location: CA - Tehachapi
Posts: 20
bomber7 is an unknown quantity at this point
Re: Trouble connecting to cRIO?

"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"
  #4   Spotlight this post!  
Unread 28-01-2009, 21:58
darty darty is offline
Registered User
None #0204
 
Join Date: Jan 2009
Location: NJ
Posts: 9
darty is an unknown quantity at this point
Re: Trouble connecting to cRIO?

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?
  #5   Spotlight this post!  
Unread 29-01-2009, 08:42
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Trouble connecting to cRIO?

Quote:
Originally Posted by darty View Post
Any other suggestions?
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.
  #6   Spotlight this post!  
Unread 29-01-2009, 08:52
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,753
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Trouble connecting to cRIO?

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
  #7   Spotlight this post!  
Unread 29-01-2009, 13:33
darty darty is offline
Registered User
None #0204
 
Join Date: Jan 2009
Location: NJ
Posts: 9
darty is an unknown quantity at this point
Re: Trouble connecting to cRIO?

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.
  #8   Spotlight this post!  
Unread 29-01-2009, 14:07
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Trouble connecting to cRIO?

Quote:
Originally Posted by darty View Post
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.
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.

Quote:
...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.
  #9   Spotlight this post!  
Unread 29-01-2009, 15:09
krupinski krupinski is offline
Team Captain
AKA: kyle
FRC #0204 (Eastern Robotic Vikings)
Team Role: Mechanical
 
Join Date: Jan 2009
Rookie Year: 2006
Location: South Jersey
Posts: 5
krupinski is an unknown quantity at this point
Re: Trouble connecting to cRIO?

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!!!
__________________
"just cause im the captain dosent mean i have all the answers!!!" - me
"Should the brain be smoking?"
"There are 10 types of people in this world, those who know binary and those who don't.."

Mountain Dew = Success!
  #10   Spotlight this post!  
Unread 29-01-2009, 16:33
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Trouble connecting to cRIO?

Quote:
Originally Posted by krupinski View Post
...we then deployed our own code that was made from the tutorial mentioned above,...
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++?
  #11   Spotlight this post!  
Unread 29-01-2009, 16:33
keen101's Avatar
keen101 keen101 is offline
Ubuntu Linux User
no team
Team Role: College Student
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Loveland, CO
Posts: 228
keen101 is a jewel in the roughkeen101 is a jewel in the roughkeen101 is a jewel in the roughkeen101 is a jewel in the rough
Re: Trouble connecting to cRIO?

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.

Last edited by keen101 : 29-01-2009 at 16:36.
  #12   Spotlight this post!  
Unread 29-01-2009, 16:38
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,589
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Trouble connecting to cRIO?

Quote:
Originally Posted by Alan Anderson View Post
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.
blip.tv is the site that NI uses for their video tutorials.
  #13   Spotlight this post!  
Unread 29-01-2009, 16:51
Analog's Avatar
Analog Analog is offline
Registered User
AKA: Bob Most
FRC #2619 (The Charge)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Midland, Michigan
Posts: 53
Analog will become famous soon enoughAnalog will become famous soon enough
Re: Trouble connecting to cRIO?

Quote:
Originally Posted by krupinski View Post
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!!!
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
  #14   Spotlight this post!  
Unread 29-01-2009, 17:23
darty darty is offline
Registered User
None #0204
 
Join Date: Jan 2009
Location: NJ
Posts: 9
darty is an unknown quantity at this point
Re: Trouble connecting to cRIO?

Quote:
Originally Posted by Alan Anderson View Post
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++?
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.
  #15   Spotlight this post!  
Unread 30-01-2009, 13:35
darty darty is offline
Registered User
None #0204
 
Join Date: Jan 2009
Location: NJ
Posts: 9
darty is an unknown quantity at this point
Re: Trouble connecting to cRIO?

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.

Last edited by darty : 30-01-2009 at 13:44.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Connecting to cRio, getting the jaguars to go solid yellow.... then nothing. DSST\neal.ian FRC Control System 11 30-01-2009 18:15
Connecting Axis camera to cRIO laultima FRC Control System 20 21-01-2009 16:56
Help! Connecting CRIO to the Power Block RyanJK Electrical 3 07-01-2009 17:28
Connecting Power Distribution block to cRio Paul Rodi Electrical 2 05-01-2009 18:20
Trouble connecting power bekahg Control System 2 21-01-2008 10:56


All times are GMT -5. The time now is 23:21.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi