View Single Post
  #6   Spotlight this post!  
Unread 26-01-2016, 08:51
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote