|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
URGENT: Code not working for various reasons
So this morning's been long, at 9 AM I was told to come in to "fix the code" immediately I came across an error where, even after deploying, the driver station said "No Robot Code".
So I copied last year's code and edited it to this year's code. Then whenever I built the code it would just load the old code and our new code couldn't be built. Then I made a new project and put the new code in and that gave me the original problem; the last year's code was built again. After manually editing the old code directly and uploading that on the robot, it seemed as though the code ran only once and didn't loop. I tried to change the properties and the target file of the project but they didn't help either. Is there anybody who knows what to check?? Last edited by Reed501 : 01-02-2014 at 19:39. |
|
#2
|
||||
|
||||
|
[URGENT]"no robot code" on the driver station??[URGENT]
I still have the problems with the robot code.
Whenever I try to deploy the code on cRIO, the driver station says "no robot code" and I cannot use my latest code. I suppose an older program is still on the robot. Can anyone help us, this is an URGENT issue!! |
|
#3
|
||||
|
||||
|
Re: URGENT: Code not working for various reasons
That certainly is an interesting problem.
To make sure my interpretation is correct, the original problem was that the driver station was showing "No Robot Code". In an attempt to remedy this issue, you took your old code and edited it. When you deployed this "edited" code, the driver station recognized that there was code on the robot, however, it was the old "unedited" code. Then I am a little confused on what came next. You say that you made a new project with the new code and this resulted in the original problem; deploying the program would give the robot the old code. This is confusing to me because you said the original problem was that the driver station not seeing code. So if you could maybe clarify a little on what exactly happened after each action that would be great. Also, maybe some specifications on what language you are using along with whatever else you have even the slightest suspicion of being the root of the problem. These things will really help us help you solve this problem. Unfortunately, I do not have an exact answer to this. Here is what I would do if I were in your situation. 1) Ensure I am seeing Robot Communication in the driver station (if not there is another problem) 2) Check to make sure I am deploying everything properly from the correct files. 3) Restart both the computer and the robot. 4) Reformat the cRIO 5) Replace the ribbon cable 6) Post my updated findings on CD |
|
#4
|
||||
|
||||
|
Re: [URGENT]"no robot code" on the driver station??[URGENT]
What language are you using?
No code means that your code is not deployed to the robot and that it has no code to run. Ah, I see that you actually already have a thread on this. Request this post is locked. |
|
#5
|
||||
|
||||
|
Re: [URGENT]"no robot code" on the driver station??[URGENT]
This is the third time you have posted this. It's really hard for anybody to help you, as this could be caused by a large number of things. Try loading a new default robot project on the robot.
|
|
#6
|
||||
|
||||
|
Re: URGENT: Code not working for various reasons
The original issue I am still on is when copying the project, the old code is being built. This in Windriver C++. The only thing I haven't done on the checklist is reformat the cRIO, because whenever I reformat it, it never reformats. I stay on the same image and it only displays "Rebooting cRIO..." I have to end the process because it will do so forever. Thanks, that may be the underlying problem.
|
|
#7
|
|||
|
|||
|
Re: URGENT: Code not working for various reasons
I apologize in advance for suggesting something really lame for the
Quote:
i.e. we were connected to the cRIO with the imaging tool, started the Format process, stuck on Rebooting cRIO for a very long time. Turned out we were now connected to the School's WiFi instead of the robot WiFi. (this sort of thing often happens when robot power is cycled, taking down the D-Link too. I can't explain why it happened in this case). If you are stuck there again, check that you can ping the robot: cmd> ping 10.xx.yy.2 or see if you can get to the dlink cmd> pint 10.xx.yy.1 |
|
#8
|
||||
|
||||
|
Re: URGENT: Code not working for various reasons
Quote:
- How to Re-Image you cRIO (doubt you need this but may be a nice refresher) - CD post of cRIO formatting issue - Some other webpage Keep in mind this may not be the issue at all. It could be something so simple that it keeps getting overlooked. C++ is the only setup I am not familiar with unfortunately. Hopefully someone with experience on this specific issue will chime in soon. Until then, keep updating CD with new, worthwhile discoveries. When you do figure this out (and you will), be sure to post the solution in case one of us finds ourselves in a similar situation. Wish you the Best! |
|
#9
|
||||
|
||||
|
Re: [URGENT]"no robot code" on the driver station??[URGENT]
If I recall correctly, when ever we fully deploy code onto our robot, we have to restart it before the driver station indicates that code is on the robot. We are using labview.
|
|
#10
|
|||||
|
|||||
|
Re: URGENT: Code not working for various reasons
You didn't say what programming language you're using. My advice in this post applies only to LabVIEW. If that's not what you use, ignore it.
When you copy a project's folder, the build destination doesn't change. You have to open the FRC Robot Boot-up Deployment properties and change the Information category to have the correct Local destination directory. You are building the code by right-clicking on the FRC Robot Boot-up Deployment line and choosing Build from the menu, and then installing it on the robot by choosing Run as startup, right? Last edited by Alan Anderson : 01-02-2014 at 23:49. |
|
#11
|
||||
|
||||
|
Re: [URGENT]"no robot code" on the driver station??[URGENT]
When you download the code and reboot the cRIO, open up netconsole and look at the output when the cRIO boots up. If there is an error within the code the code will not run, so check the output which will show what the error is. This is what I do whenever it happens to me, and I use C++ as my programming language. It may or may not work for you, but you can try. I'm not sure if netconsole works with the other programming languages.
|
|
#12
|
|||
|
|||
|
Re: [URGENT]"no robot code" on the driver station??[URGENT]
Quote:
A clarification for all of you that are kind enough to help. We programmed in C++. Sadly I have next to no knowledge in programming so there isn't much else I can tell you. All I know is when we use a basic code that we wrote to see if the code was being properly uploaded, everything was good on the Driver Station. We were also able to do the same once adding basic drivetrain code to (coded 6 talons). However our issue came up when we attempted to add pneumatics onto the code. Whenever we tried to activate the compressor there was no signal on sidecar. The solenoids were getting signal though! Again I would like to sincerely apologize for the minor post spamming, I hope that you guys are able to help. Thanks, Kevin |
|
#13
|
|||||
|
|||||
|
Re: URGENT: Code not working for various reasons
3 threads merged into 1
|
|
#14
|
|||
|
|||
|
Re: URGENT: Code not working for various reasons
When deploying code from WindRiver, have you gone into Window->Preferences->FIRST Downloader Preferences and made sure the right file is selected? Simply creating a new project or building a different one doesn't change this setting. Also make sure that the project was built -- just deploying code doesn't automatically rebuild for you.
|
|
#15
|
|||
|
|||
|
Re: URGENT: Code not working for various reasons
The original problem posted by the OP re: no code was figured out (though Reed may not be fully aware as he was offline today). The problem is as discussed here where code errors/issues are not surfaced when compiling or linking or deploying. They are only surfaced in Netconsole after you deploy and then restart crio (when using WindRiver c++, not sure about elsewhere). So, if you are not paying attention to Netconsole you could be led to believe that you have deployed code, but you haven't. The code seems to get FTPd to crio, but not implemented on crio restart.
This being a "single-mode OS" seems to be the underlying force behind this happening. At least in some cases. If you run into this kind of problem (where you successfully deploy code, but DriverStation continues to say no robot code) then check Netconsole for hints as to why. Regards |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|