08-16-2006 09:39 PM
08-17-2006 01:46 AM
You need to add a shift register to the loop (by right clicking the loop wall) and use that to remember the state of the joystick button in the previous iteration. Then, you should perform your transition code only when the value of the button is different from what it was in the previous iteration.
You can also encapsulate this in a simple change detection VI. Have a look at Labuseful's site or at the OpenG comparison package for examples.
To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here, here, here and here are a few you can start with and here are some tutorial videos. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).
08-17-2006 01:10 PM
08-17-2006 01:31 PM
Well, since I'm in the process of learning about events I would say use event structure for a joystick press and then set it up to write the bool to a global variable. That way you don't have to keep polling and using up that precious cpu.
Oh, and tst can you please check out my post on ctrlref during events? You seem to know what's goin on with these event thingys... thanks