This is WAY different than you originally asked for. A single button press is toggling on/off state, not turning on with press and off with release. To do this, you need something to remember the current state. flip-flop is the easiest solution with only 2 states (on or off).
Buttons 6 & 7 increase/decrease a stored value, so you will need a way to store that value. buffer is probably the easiest solution. Since there are multiple ways to change the buffer value, you need to select between multiple inputs. Each input event is generating a pulse, so select node is probably the easiest to implement.
To disable buttons 6 & 7 when any tool/transport/work are active, we use a âgateâ node (changes to button are ignored if gate-EN is false).
There were WAY too many wires crossing over, so I switch to bus nodes (to-bus & from-bus). These are labelled with some meaning (W+T1 is Work on + Tool1 on; !W+T1 is Work off + Tool1 on; !All is everything off; Lift for value of lift servo; etc.)
Note that this is untested, so there could well be errorsâŚ
The and/or/not nodes under the flip-flops are translations of your descriptions like Work is on AND tool on is on => W+T1. Each time one of these values changes to true, the select node registers that change from false to true as a pulse and selects the appropriate value. You gave values like âall the way upâ, 50, 10, 5, 2, but servo values will be between 0 and 1, so I used 1, 0.5, 0.05, 0.02; adjust as appropriate.
select lift X4 and X5 are bigger and smaller values of current Lift value, so selecting them (pushing buttons 6 or 7) will increase or decrease the lift value. You donât have to add/subtract 0.1 (or even use the same number for add & subtract); adjust to your needs. Note that a pulse is only generated when switching from false to true, so holding down button 6 or 7 will only change the value once. You must release & press again to continue to change the value. You can change this functionality by replacing the button6/7 code and using a continuously-pausible node:
Turn on the pulsing if everything is off and a button is being pressed (pressing both buttons is going to be a messâŚ). This will generate a lot of pulses quickly, so you will want to add/subtract very small values if you do this.
Note that there are still several undefined states. For example, there is no way to change throttle while using Tool2 or Tool3. It might make more sense to use POT for throttle if Tool1 is off instead of requiring all tools to be off. Now that you have the general techniques and structure, you should be able to make changes like that on your own.