Thread: SubVI Outputs
View Single Post
  #4   Spotlight this post!  
Unread 21-01-2013, 14:02
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,795
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: SubVI Outputs

Think of the shell of the subvi as a single-loop itself.
No output will be released from the subvi until it concludes, just as no new inputs are accepted until it's run again.
It's the same reason that long delays in Teleop.vi are bad.

One way around this is to use a global variable in place of Output and Moving? as a mechanism to pass along intermediate values.
You'd need an additional flag to indicate when it's safe to read those global values, and handle the tiny window where Output has been updated, but Moving? hasn't yet.

Teleop doesn't have this problem, because it writes settings out to the FPGA, rather than producing top-level vi outputs.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 21-01-2013 at 14:31.
Reply With Quote