View Single Post
  #8   Spotlight this post!  
Unread 30-01-2010, 22:29
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: Is there a Way To refrence a true false statement

This is in LabVIEW Help, but it's a bit hard to find.
  • Open the Begin.vi block diagram
  • Right-click for the Functions palette and go to Programming -> Structures and you'll see "GLOB" (for global variable) down at the bottom. Add that to your Begin.vi
  • Double click on the Global and you'll get a blank front panel.
  • Right-click on the Global front panel and add two boolean controls (doesn't matter which ones) to the global front panel. Rename them "Left Motor Invert" and "Right Motor Invert" or whatever you want to call them.
  • Save and close that global front panel. You'll be asked to give it a name, pick whatever you like, but be creative. I hate boring names.
  • Back in the Begin.vi block diagram right-click on that global you added before (it'll look like a globe), and choose Select Item -> Left Motor Invert.
  • Now copy and paste that global and right-click Select Item -> Right Motor Invert on that new one.
  • Wire both of those to you-know-where. Those values you wanted to send to Teleop.vi.
  • Save it and you now have global variables you can use anywhere.
Meanwhile, over in teleop.vi...
  • Highlight the two global variables you just made in Begin.vi and copy them.
  • Open the Teleop.vi block diagram and paste the global variables in.
  • Right-click on each of them and select "Change To Read" and now you can drag a wire from it to your case statement.
  • You can make more copies wherever you want to write back to them.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 30-01-2010 at 22:32.
Reply With Quote