Overdrive function

I would like to build a function:

When the transmission is in 4th gear (signal for this is available) and I then press a button on the gear lever - The PMU should send a signal to the overdrive so that 5th gear is engaged..

If I press the button again or the transmission is no longer in 4th gear, the overdrive should be deactivated again.

I only want to press the button once for a short time and then release it. So far, I’ve only managed to create a function where the PMU requires the button to be pressed continuously; otherwise, 5th gear is deactivated directly again.

There’s definitely a solution for that, but I haven’t found it yet.

It would be great if you could help me.

Go to the preject tree and create a new switch, use your physical input pin as the switching channel, select latching switch with 2 states, 0 and 1.

Thank you very much. I’ve built the function into the software and will test it tomorrow.

It worked right away. Thank you again!