Go to Post If it reads MINUS voltage, the power is reversed (and this is bad). - DonRotolo [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 13-02-2013, 11:03
mrwright's Avatar
mrwright mrwright is offline
Coach
AKA: Michael Wright
FRC #4522 (Team SCREAM)
Team Role: Coach
 
Join Date: Apr 2012
Rookie Year: 2013
Location: Missouri
Posts: 109
mrwright is a splendid one to beholdmrwright is a splendid one to beholdmrwright is a splendid one to beholdmrwright is a splendid one to beholdmrwright is a splendid one to beholdmrwright is a splendid one to beholdmrwright is a splendid one to behold
Rookie Help- Toggle a spike

We are trying to push a button on our joystick to make the spike remain on. I am assuming that this is a toggle function. We have searched for ways to toggle using LabView but there are some conflicting methods as to which one was best.

Can anyone help point us towards a sample code that will do this?
Reply With Quote
  #2   Spotlight this post!  
Unread 13-02-2013, 11:11
Omar's Avatar
Omar Omar is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Huntsville, AL
Posts: 122
Omar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of light
Re: Rookie Help- Toggle a spike

A simple search found a number of solutions

http://www.chiefdelphi.com/forums/sh...ghlight=toggle

http://www.chiefdelphi.com/forums/sh...ghlight=toggle

http://www.chiefdelphi.com/forums/sh...09&postcount=2
__________________
Omar
Reply With Quote
  #3   Spotlight this post!  
Unread 13-02-2013, 11:24
Omar's Avatar
Omar Omar is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Huntsville, AL
Posts: 122
Omar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of light
Re: Rookie Help- Toggle a spike

Make this a sub VI and make it re-entrant. Then use it where ever you need a toggle boolean output.
Attached Thumbnails
Click image for larger version

Name:	toggle.png
Views:	83
Size:	2.9 KB
ID:	13968  
__________________
Omar
Reply With Quote
  #4   Spotlight this post!  
Unread 13-02-2013, 18:35
Omar's Avatar
Omar Omar is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Huntsville, AL
Posts: 122
Omar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of light
Re: Rookie Help- Toggle a spike

Thats the way the Boolean constants used to look.
In LabVIEW 2012 they are single [T] or [F]

Right click on the init of the Feedback and create constant. Click it to switch it between [F] and [T]
__________________
Omar
Reply With Quote
  #5   Spotlight this post!  
Unread 14-02-2013, 10:35
plnyyanks's Avatar
plnyyanks plnyyanks is offline
Data wins arguments.
AKA: Phil Lopreiato
FRC #1124 (The ÜberBots), FRC #2900 (The Mighty Penguins)
Team Role: College Student
 
Join Date: Apr 2010
Rookie Year: 2010
Location: NYC/Washington, DC
Posts: 1,114
plnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond repute
Re: Rookie Help- Toggle a spike

Quote:
Originally Posted by Omar View Post
Make this a sub VI and make it re-entrant. Then use it where ever you need a toggle boolean output.
More information on re-entrant VIs: http://zone.ni.com/reference/en-XX/h...ts/reentrancy/ and http://digital.ni.com/public.nsf/all...256C59006B57CC

Basically, with a re-entrant VI, LabVIEW will allocate each instance of the VI like an independent sub-VI. This allows you to run all of the instances simultaneously without them interfering with each other.

To make a VI re-entrant, go to File»VI Properties (or hit crtl + I) and select "Execution" from the drop down menu.
__________________
Phil Lopreiato - "It's a hardware problem"
Team 1124 (2010 - 2013), Team 1418 (2014), Team 2900 (2016)
FRC Notebook The Blue Alliance for Android
Reply With Quote
  #6   Spotlight this post!  
Unread 14-02-2013, 13:54
mrwright's Avatar
mrwright mrwright is offline
Coach
AKA: Michael Wright
FRC #4522 (Team SCREAM)
Team Role: Coach
 
Join Date: Apr 2012
Rookie Year: 2013
Location: Missouri
Posts: 109
mrwright is a splendid one to beholdmrwright is a splendid one to beholdmrwright is a splendid one to beholdmrwright is a splendid one to beholdmrwright is a splendid one to beholdmrwright is a splendid one to beholdmrwright is a splendid one to behold
Re: Rookie Help- Toggle a spike

Thanks for the help! We got it working last night!
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 22:59.

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