Go to Post This is an engineering competition. Do some. - JVN [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 23-02-2011, 01:26
bstites82 bstites82 is offline
Registered User
AKA: Blake Stites
FRC #2164 (multiple)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Harrisonville
Posts: 12
bstites82 is an unknown quantity at this point
Re: Code doesnt work With While Loops

for button latching like the example you cited, you can do one of two things. if you only need to latch one button, go to the teleop front panel and drag two Boolean controls and two Boolean constants onto the front panel. I recommend naming the controls something like 'previous button value' &'last latched value' and the indicators 'button value' & 'latched value'. in the upper right corner of the front panel, right click on the vi icon and choose show connectors. hover over an empty box on the left side until the wire spool shows up,click the box and then click one of the controls, repeat for other control. then do the same for the indicators on the right side of the vi. now in the teleop block diagram you can recreate the case structures from the example but wire the shift registers on the while loop to the controls and indicators. finally in the robot main vi right click on the while loop and 'add shift register'(twice) then wire the shift registers to the new terminals we created on the teleop vi. this gives your latching function access to the main loop. 2nd option check out the typedef tutorial on FRCMastery.com, it is similar but way more useful for multiple reasons.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 01:16.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi