Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Electrical (http://www.chiefdelphi.com/forums/forumdisplay.php?f=53)
-   -   Code Problems (http://www.chiefdelphi.com/forums/showthread.php?t=87381)

dmitch 03-11-2010 18:36

Code Problems
 
Hey we're wanting to be able to run our robot from last year but it wont run. The electrical stuff is hooked up correctly, and the code runs. However, we can't get the code to compile onto the cRIO, so the robot won't run. Any Ideas?

Bot190 03-11-2010 21:20

Re: Code Problems
 
Your going to need to provide more information than that for us to provide any useful help.

First, you say that the code runs, but then you say that it doesn't compile.
Which is it?

Can you connect to the Crio, you can check by opening a command prompt and typing "ping 10.xx.yy.2" where xx.yy is your team number.

plnyyanks 03-11-2010 21:21

Re: Code Problems
 
Can you be more specific with errors? What language is the robot coded in?

dmitch 04-11-2010 19:00

Re: Code Problems
 
Ok sorry. First of all, it is coded in LabView. When I say the code runs but doesn't compile I mean that when i click the run arrow in LabView, it shows the code as running, however, it will not compile to the cRIO.
It is my first year being the head programmer because our programmer last year is now in college. As I understand it though, I'm supposed to get a message box saying "compiling to cRIO" (or something along those lines), and then when it has compiled, I can minimize LabView and open up the drivers station.
I wish I had more to say but our coach and I are both confused because everything seems to be hooked up correctly. We are pretty sure that is either a problem with the cRIO itself, the code, or the wiring because we have direct-wired it and it would not run. I believe the code works because I am not recieving any errors stopping it from running. Also, I believe the wiring is correct because it hasn't been touched since last March.
That leaves only the cRIO as we see it. We just want to make sure that there isn't something simple we're overlooking before we attempt to replace the $1000 cRIO.
A final note: my team only meets on Wednesdays before the season so that is when I am able to access the robot. If there is any other info i can provide you please tell me ASAP so I can try to get this solved quickly.

THANK YOU SO MUCH anyone that helps with this for taking some offseason time to help me out.

aechmtwash11 04-11-2010 19:43

Re: Code Problems
 
is your target set correctly? 10.xx.yy.2?

jspatz1 04-11-2010 19:43

Re: Code Problems
 
With a Labview program you must do a "build" step to compile, then deploy it to the Crio with "Run as startup." Are you familiar with these steps?

Ether 04-11-2010 20:35

Re: Code Problems
 
Quote:

Originally Posted by dmitch (Post 979659)
A final note: my team only meets on Wednesdays before the season so that is when I am able to access the robot. If there is any other info i can provide you please tell me ASAP so I can try to get this solved quickly.

Do you meet in the evenings, after normal working hours? Do you have convenient access to the internet in close proximity to where you will be actually working on the robot? Let this forum know in advance what hours you will be at the site working on the robot, and I'll bet you'll get at least a few knowledgeable LabVIEW folks standing by ready to answer questions you post while you are there and you can try the things that are suggested and provide immediate feedback.

Before your next team meeting, watch this video and ask questions here.



Alan Anderson 04-11-2010 20:52

Re: Code Problems
 
Quote:

Originally Posted by dmitch (Post 979659)
Ok sorry. First of all, it is coded in LabView. When I say the code runs but doesn't compile I mean that when i click the run arrow in LabView, it shows the code as running, however, it will not compile to the cRIO.

How are you trying to get it to "compile to the cRIO"? What happens when you try? You should be choosing the Build option under the right-mouse-button menu from the "FRC Robot Bootup Deployment" object at the very bottom of the project window. That object is nested under "Build Specifications" and "RT CompactRIO Target". Then, after the project has been built successfully, you need to choose the "Run as startup" option from the same menu.
Quote:

It is my first year being the head programmer because our programmer last year is now in college. As I understand it though, I'm supposed to get a message box saying "compiling to cRIO" (or something along those lines), and then when it has compiled, I can minimize LabView and open up the drivers station.
This sounds suspiciously like you're not running the Driver Station application.
Quote:

I wish I had more to say but our coach and I are both confused because everything seems to be hooked up correctly. We are pretty sure that is either a problem with the cRIO itself, the code, or the wiring because we have direct-wired it and it would not run. I believe the code works because I am not recieving any errors stopping it from running. Also, I believe the wiring is correct because it hasn't been touched since last March.
That leaves only the cRIO as we see it.
What do the indicators on the Driver Station's "Dagnostics" tab tell you?

If you haven't enabled the robot using the button on the "Operation" tab of the Driver Station application, none of the motors or relays or solenoids will be allowed to work.

kamocat 04-11-2010 21:59

Re: Code Problems
 
Here's some documentation to help you out. You shouldn't have to struggle through asking us basic questions when there's documents to walk you through it.

"Using the FRC Framework" from 2009 : http://decibel.ni.com/content/docs/DOC-2663
A couple things have changed (use of the global variable deemphasized, refnum registries, and the removal of Autonomous Independent this coming year), but it's still a good document. I would recommend PRINTING this one.
Methods of deployment are on page 13.
By the way, the second method of deployment, "DEPLOYING THE PROGRAM FROM THE PROJECT EXPLORER WINDOW", I have not managed to get work, though I haven't tried in almost two years.

2010 "Bench Test":
http://usfirst.org/uploadedFiles/Com...ed-Rev-0.7.pdf
There's a lot of stuff in this one that is about C++ and Java, so you probably don't want to print the whole thing. This includes methods of deployment.

dmitch 08-11-2010 20:16

Re: Code Problems
 
I never am going to have internet access during the time I'm actually working on the robot. However, I am running it tomorrow and I will have an answer for you then as to whether or not it works.

kamocat 08-11-2010 20:19

Re: Code Problems
 
Download it on a different computer and print out the useful sections.
I recommend you print the entirety of "Using the FRC Framework".

Cecil 08-11-2010 20:33

Re: Code Problems
 
This is a bit off topic.. but you said the last time it was used was in march.. Did you happen to reset the Gaming Adaptor to not have any encryption on it? If your router is unencrypted and the gaming adaptor is, it wont connect. I don't know if this would throw an error when you hit the run button, but it is worth a shot

dmitch 07-12-2010 21:23

Re: Code Problems
 
Ok sorry its been a while since i've been on. We smelled stuff burning last time we turned on our robot, so we took a further look and saw that several wires had slashes in them like someone had missed with the wire cutters...so we took apart all the wiring and are redoing it. (Yes that was serious.) And my question now is how on earth do you wire a PWM to a Jaguar? As i recall from my rushed intro last year the PWM can either hook into the sidecar or the cRIO slot??? And then go to either Jaguar or sensor??? (My knowledge on this part is REALLY fuzzy) I would prefer a diagram but if you have some words to post that will be very clear that would be great.:confused:

Mark McLeod 07-12-2010 21:34

Re: Code Problems
 
See if these wiring diagrams help explain where what goes.

mattiej 07-12-2010 21:34

Re: Code Problems
 
Quote:

Originally Posted by dmitch (Post 984222)
Ok sorry its been a while since i've been on. We smelled stuff burning last time we turned on our robot, so we took a further look and saw that several wires had slashes in them like someone had missed with the wire cutters...so we took apart all the wiring and are redoing it. (Yes that was serious.) And my question now is how on earth do you wire a PWM to a Jaguar? As i recall from my rushed intro last year the PWM can either hook into the sidecar or the cRIO slot??? And then go to either Jaguar or sensor??? (My knowledge on this part is REALLY fuzzy) I would prefer a diagram but if you have some words to post that will be very clear that would be great.:confused:

Sorry I don't have a picture. But what you do is use servo wires (Red, white, and black with three pronged push connectors) to connect the Jaguar to the Sidecar. The sidecar uses a serial (I think that is what it is called - it is really big) to connect to the cRIO. The Jaguar hooks up to the power supply via the red and black screws, and to the motor via the green and white screws. Hope this helps!

EDIT: Definitely use the diagrams above

dmitch 17-12-2010 08:32

Re: Code Problems
 
Thank You those diagrams are amazingly helpful! I'll be able to let you know if I need help with anything else after next wednesday.

dmitch 05-01-2011 21:02

Re: Code Problems
 
2 Attachment(s)
We have completely rewired our robot and it will turn on and thats as far as it will go. I need help with the ethernet cable wiring. The situation is as follows:

When we connect an ethernet cable from the laptop to the wireless router, and another one from the bridge to the cRIO, we recieve no robot communication but the ethernet and radio signals on the driver station are both green and the light on the 1st ethernet slot on the cRIO is lit up.

However, when we tether the ethernet cable, (directly from the laptop to the cRIO) we get the same green radio and ethernet signals but the light on the cRIO slot does not light up.

That probably didn't make sense so i've put together some diagrams that might make a little more sense, they are attached.


This probably isn't really clear but if you have any quesions please ask thank you. I am confused and my coach is not that familiar with the wiring on our robot. Any help would be great.

mattiej 05-01-2011 21:21

Re: Code Problems
 
Quote:

Originally Posted by dmitch (Post 991776)
When we connect an ethernet cable from the laptop to the wireless router, and another one from the bridge to the cRIO, we recieve no robot communication but the ethernet and radio signals on the driver station are both green and the light on the 1st ethernet slot on the cRIO is lit up.

However, when we tether the ethernet cable, (directly from the laptop to the cRIO) we get the same green radio and ethernet signals but the light on the cRIO slot does not light up.

1st: This may be a little simple and looking at your problem probably not the solution, but have you tried using a different Ethernet cable? It just may be you have a bad cable.

2nd: I don't know if you did it just for the picture or what, but are all the modules in for the cRio? In my experience it is generally bad to take them out.

3rd: Try to reset the bridge. It may just be a "frazzled up" in there and need some tuning.

4th: This one seems like the most likely one to me. What did you put as the ip address for your robot? It should be 10.xx.yy.2 , XX and YY being your team number (ex XXYY=3413).

5th: Read through the posts before. Some of those may be it too (router encryption being a big one)

Hope this helps!

Al Skierkiewicz 06-01-2011 07:30

Re: Code Problems
 
Can you say crossover ethernet cable?

Jon236 06-01-2011 07:41

Re: Code Problems
 
The fact that the Status light on the cRio stays on indicates a problem there. Check out these Troubleshooting documents http://www.team358.org/files/program...olSystem2009-/
You might have to re-image the cRio.

dmitch 06-01-2011 08:40

Re: Code Problems
 
Quote:

Originally Posted by mattiej (Post 991792)
4th: This one seems like the most likely one to me. What did you put as the ip address for your robot? It should be 10.xx.yy.2 , XX and YY being your team number (ex XXYY=3413).

All you have to do for this is just input the team number into the text box on the driver station, correct? If so, then I have done this. However, I waould like to make sure there isn't more to it.

kamocat 06-01-2011 13:11

Re: Code Problems
 
There sure is.
You can change the cRIO IP address with the re-imaging tool.
(You don't even need to reformat the cRIO to do this)

Frenchie461 13-01-2011 13:29

Re: Code Problems
 
Quote:

Originally Posted by dmitch (Post 979659)
Ok sorry. First of all, it is coded in LabView.

Well there's your problem :D

dmitch 14-01-2011 20:31

Re: Code Problems
 
we got a new cRIO for this year and we tried it in our old robot just to see what would happen. We weren't getting comms wirelessly so we tethered. But both tethered and wireless gave us the same problem: the ethernet and ds radio lights are always green. however, we cant get the bridge light to go on no matter what and so we have no robot comms. the status light on the cRIO is blinking the whole time. We are going to look at the cRIO light indicators tonight but any other ideas are welcome thank you.

Alan Anderson 15-01-2011 08:42

Re: Code Problems
 
Quote:

Originally Posted by dmitch (Post 1000273)
...the ethernet and ds radio lights are always green. however, we cant get the bridge light to go on no matter what and so we have no robot comms...

Have you reconfigured your wireless bridge since it was used in competition? It was set up with a security code at that time. You need to follow the instructions to connect to it using a web browser and reset the security to "none".

dmitch 15-01-2011 09:58

Re: Code Problems
 
How do you reconfigure the wireless bridge?


All times are GMT -5. The time now is 07:08.

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