|
Re: Periodic Task Shift Register
The top picture uses a local variable to hold a refnum instead of passing it by wire. The issue here is that nothing guarantees that the variable has been written to before it is read from.
The bottom image is much more complex code, but I only see one refnum that is in a cluster. If that were a cluster of refnums, you'd add to the cluster and access by name whenever you need it. So I'm not sure I follow.
The code below would be a bit cleaner if the subVIs were modified to take in higher level inputs. So instead of passing in a dozen Booleans, group them in your Var so that they make sense together for passing together. Not sure if that is easy, just seems like it might be applicable here.
Greg McKaskle
|