02-23-2010 11:38 AM
In LabVIEW, FRC errors are automatically logged to a file on the robot at c:\WPI_Error.txt. This is the file that you see when you click "View Log File..." on the Driver Station. If you have not configured a Cypress board for Enhanced I/O, you may be getting errors constantly logged to file. This could affect the loop rates for Teleop etc. If you think this may be a problem, you can turn off the automatic error logging. It is easy to turn off, because it is controlled by a global variable.
To turn off error logging:
1. From your project, open the Begin.vi and switch to its diagram.
2. Click back on your project, then type Ctrl-F to bring up the Find Project Items dialog.
3. Type ErrorsGlobal into the dialog and hit Enter – it should highlight the ErrorsGlobal.vi in your project.
4. Drag ErrorsGlobal.vi from your project to the diagram of Begin.vi
5. It should drop on the diagram as "log errors to file?". If it does not, click on it and choose "log errors to file?"
6. This is a global variable. Wire a FALSE constant to it. To do this you can right-click on the terminal (along the left hand side) and choose Create>>Constant. Click on the T/F
constant to change it from T to F.
The way this works is that when your Begin.vi runs, the global will be set to FALSE. Then down inside FRC error VIs the global is read. If an error occurs and the global is FALSE, nothing is written to the WPI_Error.txt file. Only FRC Errors from wired error terminals get logged. In our testing, the constant logging did not detrimentally affect our loop rates. However, if you have a lot of I/O happening in your loop, this might make a difference.
02-23-2010 06:41 PM
How does this affect the lifetime of the flash memory on the cRIO?
02-23-2010 06:53 PM
To be accurate, I'd have to say all file saves affect the lifetime. So you could argue turning off error logging would help. However, this has been brought up in the past, and we had discussions with the hardware designers of the cRIO. They were not concerned about the life of the flash memory.
02-24-2010 08:07 PM
I was referring to life that may already be reduced because of all the excess logging. For example, we probably run our robot at least 12 hours a week. At 1 error message a second, that works out to 100,000 writes in a little over 2 weeks. That's the lifespan of some cheap flash memory.
I guess my major question was did the hardware designers consider that someone might write to the flash memory every second when they gave their analysis?
02-25-2010 07:29 AM
The cRIO is often used as a platform for logging and triggering, so the flash-based storage should be fine for this level of use. The file I/O drivers on this and most all storage devices implement caching, so the number of flash writes is far smaller than the number of file writes. When the storage device eventually starts to fail, it should log failures and errors for analysis. Even with the background logging, these error should not occur for many years.
Greg McKaskle