Quote:
Originally Posted by Greg McKaskle
If you open up the pre made 2 wheel drive subVI, it creates two motor dev refs and builds an array from them. You can follow this lead and have a single array entry in the robotdata which holds all of your motor refs. The slight downside to using an array is remembering what slot in the array is for what motor. There are plenty of ways for handling that, or you could build a cluster -- similar to a struct or record in other languages -- and there you can give the elements of the cluster descriptive names. The default value as the controls are dropped should be fine as their value will really be defined by the Open. All LV controls except refnums support a default value, and it is quite useful, but not always necessary.
Greg McKaskle
|
To cause less mistakes in the implementation of the array of Motor TypeDefs, you can create a ring terminal TypeDef (Strict), and use it as a constant on the block diagram. It's effectively the same as unbundling a cluster by name on the block diagram, but it's much neater on the Front Panel.