Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   FRC Control System (http://www.chiefdelphi.com/forums/forumdisplay.php?f=176)
-   -   Cannot load code onto the cRIO (http://www.chiefdelphi.com/forums/showthread.php?t=91351)

Mtg Ruler 09-02-2011 15:58

Cannot load code onto the cRIO
 
Yesterday afternoon, our cRIO stopped accepting our LabVIEW code except for rare instances. As debugging has continued, we eventually got to the point today where code could be uploaded only after a reimage. We think the problem may be in the switches on the cRIO and flipped the Safe Mode switch to off based on some documentation. (http://decibel.ni.com/content/docs/DOC-2632). Now, the cRIO will not reimage because the code is corrupted, it said to go into safe mode and do it, but we could not connect to the 0.0.0.0 IP. I am also afraid that once the cRIO is successfully reimaged, we will still only be able to download code once.

Any Suggestions?

Things already tried, mostly in chronological order:
Checked IP addresses (correct)
Tethered it (failed to download code)
Ran in debug mode (failed to download code)
Pinged the cRIO (got response, but has not been tried since code corrupted)
restarted cRIO (no change)
changed robot battery (no change)
changed computers (no change)
ensured all files were up to date and reimaged to v27 (code loaded once)
reimaged to v25 (code loaded once)
Noticed Status light flashing 3 times, indicating safe mode
looked at switches, switched Safe mode to off (reimaging failed, status light still flashing 3 times, even after a power cycle)
switched Safe mode to on (reimaging still did not work)

randalcr 09-02-2011 16:40

Re: Cannot load code onto the cRIO
 
did you reboot the Crio after you changed the dip switch position? we had one Crio that had a similar problem and rebooting it after turning the safe mode switch on allowed us to image it.

Mark McLeod 09-02-2011 16:41

Re: Cannot load code onto the cRIO
 
The original problem of not being able to download your LabVIEW code could be due to an unconstrained loop in your code. An easy check is to test solely with unaltered default framework after your next successful reimaging.
Download a fresh default project, then download it again to see if that works right or gives you problems.
If the default code works without your modified code ever getting in the way, then it's probably your code that's sucking up all the CPU cycles and there are easy ways to further test for that.


You probably know all this, but I'll just repeat it.
The procedure to clear and reimage using Safe Mode is to
  1. Flip the Safe Mode switch on & cycle the power
  2. Use the cRIO Imaging Tool (you'll get a warning that it cannot be reimaged, but proceed anyway)
  3. Flip the Safe Mode switch off & cycle the power
  4. Use the cRIO Imaging Tool again to download v27
  5. Cycle the power and watch the cRIO yellow status LED. It should only come on once.
  6. Build and Run as startup an unchanged default project
Then, as a follow up:
  1. Test the project
  2. Confirm that you can download again

Mtg Ruler 10-02-2011 19:09

cRIO is working again
 
The cRIO now does work, and code is downloading fine.

The problems: the switches were in the wrong position, and a talk with someone from NI told us the correct arrangement (all switches with the white part in the on position)

We were running an unending while loop in periodic tasks. This was fixed by deleting that code and rewriting it without a while loop.

Thank you for all your help!


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

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