View Single Post
  #6   Spotlight this post!  
Unread 05-02-2010, 10:37
Doug Norman's Avatar
Doug Norman Doug Norman is offline
Registered User
no team (National Instruments)
Team Role: Engineer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Austin, TX
Posts: 136
Doug Norman will become famous soon enoughDoug Norman will become famous soon enough
Re: Joystick Button One-Shot (a.k.a. Rising Edge) Detection

Here's a code snippet (picture) that does what you want. You could put this in your loop, or you could make it a subVI. If you make it a subVI to be used in multiple places, be sure to make it a reentrant subVI. That way it will allocate separate memory for each call. To make a subVI reentrant go to File>>VI Properties>>Execution and choose Reentrant execution.
Attached Thumbnails
Click image for larger version

Name:	joystick once true.jpg
Views:	271
Size:	19.7 KB
ID:	8524  
Reply With Quote