Go to Post I guess the freshmen had to learn the hard way, never turn your back on a robot. - Bcahn836 [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 14-02-2009, 15:43
airnate airnate is offline
Registered User
FRC #0236 (Techno Ticks)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2009
Location: southeastern CT
Posts: 93
airnate is a jewel in the roughairnate is a jewel in the roughairnate is a jewel in the rough
Re: Programing buttons in labview

The button behavior in the Get and GetRaw vis is identical. The only difference between Get and GetRaw is that the axis values are scaled to [-1,1] for the Get.

Judging from your description, it sounds like you may be having trouble with the clusters. Both Get.vi and GetRaw.vi output the axes and button values in clusters. The buttons indicator is a cluster (think container) of a number of independent buttons. If you drop a Get (or GetRaw) vi onto your block diagram, then you should be able to get at a single button's value by right clicking on the Button terminal and selecting Cluster, Class & Variant Palette and then selecting the first function (i.e. Unbundle by Name).

Wire the Unbundle by Name to the Buttons output of the Get.vi. By default you should see Button 1 in the Unbundle by Name but you can change that to any button you like (or stretch the Unbundle by Name to have multiple button outputs).

Don't forget to wire the device reference to the Get.vi or GetRaw.vi

Does this help?
Reply With Quote
  #2   Spotlight this post!  
Unread 14-02-2009, 16:22
zackcool123's Avatar
zackcool123 zackcool123 is offline
Registered User
FRC #1886
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Urbana
Posts: 23
zackcool123 can only hope to improve
Re: Programing buttons in labview

Oh, well we've been using unbundle by name already. Otherwise the wire types do not match. Sorry, I should have been a little more specific.
When we set it up like you said and run it (which it does successfully to a point) it runs for a second then pauses and selects the unbundle by name and brings it to the front on the computer screen. When we unpause it it skips it and brings up the next unbundle by name used similarly.
Reply With Quote
  #3   Spotlight this post!  
Unread 14-02-2009, 16:52
airnate airnate is offline
Registered User
FRC #0236 (Techno Ticks)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2009
Location: southeastern CT
Posts: 93
airnate is a jewel in the roughairnate is a jewel in the roughairnate is a jewel in the rough
Re: Programing buttons in labview

You may have accidentally added breakpoints to your program. Breakpoints will show up as red boxes, or red dots/highlights on the diagram.

To remove the breakpoint, right click on the red part and select Clear Breakpoint.
Reply With Quote
  #4   Spotlight this post!  
Unread 16-02-2009, 10:03
zackcool123's Avatar
zackcool123 zackcool123 is offline
Registered User
FRC #1886
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Urbana
Posts: 23
zackcool123 can only hope to improve
Re: Programing buttons in labview

Well, no. I removed those when after accidentally adding them in a different spot in the program. I didn't add them there and I double checked that. And it isn't just in one case, it is any case in which I use "Get" or "GetRaw." Even if it accidentally happened, deleting the whole thing and recreating it should get rid of the breakpoints anyway. So I'm at a loss for what to do.

Thank you for the suggestions.
Reply With Quote
  #5   Spotlight this post!  
Unread 16-02-2009, 19:54
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,752
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: Programing buttons in labview

The behavior you describe still sounds like a breakpoint. There are actually two types.

The most precise is the one put on nodes and wires. It looks like a red border around the node, or a red dot on a wire.

The second type is the pause button at the top of the window. This is a button you can just push at any point to pause execution. If a subVI has the pause set, then each time the subVI is called, it will stop at the first node, which could be an unbundle.

The other possibility is that there could be hidden code -- code under the edge of a structure or underneath a structure. Clearly this isn't well written code if it happens, but I've seen it on more than one occasion. In the edit menu is an item for removing Breakpoints from hierarchy. You might want to give that a try.

Greg McKaskle
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Labview Joystick Buttons... team877 NI LabVIEW 36 17-02-2009 19:23
Programing camera in labview frcchile NI LabVIEW 1 23-01-2009 13:03
buttons in LabView Pneumaticsman NI LabVIEW 4 12-01-2009 18:14
Programing a Digital Input on the DS in Labview popo308 NI LabVIEW 6 16-12-2008 06:11
Programing joystick buttons Shivang1923 Programming 8 09-02-2008 16:21


All times are GMT -5. The time now is 21:37.

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