Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/www/team847.wildgardenseed.com/lib/smarty/Smarty_Compiler.class.php on line 270
FIRST Team 847 PHRED - First Click SubVI

First Click SubVI

 

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/www/team847.wildgardenseed.com/lib/smarty/Smarty_Compiler.class.php on line 270
Download: first_click_subvi.zip
PHRED Drive

Goal:
This subVI counts only the initial press of the button, only passing that one through even if the button is held continuously.

Theory of Operation:
The software compares the button press with the previous button press. If both are the same (False and False or True and True) then it feeds True to the case structure. If they are different it feeds False to the case structure. The case structure then swaps the True to False or False to True

Code for First Click subVI.Figure 1 - Code for First Click subVI.
Inputs and outputs for First Click subVIFigure 2 - Inputs and outputs for First Click subVI

Our Application:
This subVI was used to send a reset to a gyro on the first push of a joystick button but not allow the reset to happen continuously while the button was being held down. The feature allowed a driver to activate gyro control by holding down a joystick button.

Other Potential Applications:
Please contact Team 847 if you find other uses.

Hints and Warnings:
This is only designed for Boolean inputs, don’t put in scalar values.

Download: first_click_subvi.zip