|
Re: Begin.vi
One year, we had a bunch of For loops in Begin reading arrays of configuration data from a Globals vi. Each loop handled one "type" of resource: Motors, Digital In, Encoder, Analog In, Solenoid, etc. If we wanted to add another motor, we'd just add the appropriate information to the Motors array. Finish had a corresponding collection of For loops.
It was a lot of work setting it up in the first place, but it made changes simple. We eventually decided that the simplicity was not worth the up-front effort.
Our Begin vi this year does very little. Except for the framework's Error in/out etc., all it does is call our Drivebase and Superstructure VIs, passing them an enumerated "Begin" value. The real work of opening the resources is done in the Begin case of each.
|