Working on setting up a Flash to Pass function for my race car where I press a momentary and have the high beams flash for either a set count (5x) or time (2-3s).
Ive been able to successfully program a latching button on my Grayhill can keypad to trigger a flash of the high beams using the timer function which will cancel after a period but then I have to double press the button to turn it off and back on again if I want to flash again.
Is there a way to program a "if/then" type of function where the if X momentary is pressed, then highbeams will flash according to the timer and counter? Or another way using counters that Im not seeing?
I plan to add mechanical momentary steering wheel buttons in the near future that will send a signal to an input to do the same thing.
Hi Jason,
This can be done yes, although the method to do so is not so obvious.
Here i am using keypad 1 button 1 as the switch to trigger the light flashes. The button is tied to the status of output 1, so that when output 1 flashes, so does the keypad button light.
You will then need to set up an on off timer at your desired frequency. In this case, i have selected 100ms on, 100ms off for quite a quick flash.
Now set up two counters as shown below. Counter 1 registers the keypad button click.
Counter 2 is set up to increment every time the timer status is 'On' AND the counter 1 value is not zero (when the keypad button has been pressed). The end value of counter 2 is used to set how many times you want the lights to flash.
You then just need to set up your output function like so. The output will be on when the timer status is 'on' AND when the counter 2 value is not zero (when it is counting up).
There may be a more elegant way to do this, but i haven't come up with anything yet. Let me know if you have any problems with the solution.