|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Question about errror data in the default program
In the default code this year, in begin.vi, the error line is bundled into an array like this:
As I add other devices, should I expand the array and add those errors? Is whatever is handling errors able to expect errors from additional devices, or do I need to modify something else to anticipate them? Are these errors that are going to be displayed in the Driver Station? What's the best practice here? Thanks! |
|
#2
|
||||
|
||||
|
Re: Question about errror data in the default program
Quote:
Quote:
Quote:
Hope this helps! |
|
#3
|
|||
|
|||
|
Re: Question about errror data in the default program
Actually, the error handling in Begin is different from the rest of the project. Neither is wrong, and as with any language, error handling can be done in many ways and the selection is probably more style than conscious choice.
In this case, the Begin VI outputs an error which is wired to the other elements in Robot Main to make sure they don't start until Begin completes. In reality, there is no reason that the dependency has to be accomplished with the error wire, but this is a common pattern. The next thought is that if there is an error wire people may probe it as they debug. If Begin produces errors but doesn't propagate the error, this may lead to confusion. So Begin builds the array and propagates the errors whereas most of the rest of the template code relies on the auto error reporting and the console in the diagnostics screen. To answer the original question, if you won't confuse yourself or others on your team, it is fine to eliminate the extra wires and build arrays. Or your group of programmers can decide that the info is useful and to build the array to pass out. The most important thing is to be consistent and avoid confusion. Greg McKaskle |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Question about default camera data table in easyC pro | itsme | Programming | 1 | 16-01-2007 13:57 |
| Question about Solenoid and default code | waialua359 | Control System | 4 | 21-01-2006 18:21 |
| Where do I find the default program files? | d.courtney | Programming | 3 | 15-01-2005 17:52 |
| Downloading the DEfault program | gjibben | Programming | 1 | 11-02-2004 21:20 |
| Rookie Programmer has question about the default code | DanL | Programming | 3 | 26-01-2002 19:59 |