Math Channel or Function Channel?

Hi,

a quick question for gear indication on the ADU. My Ecu (Maxxecu) puts out ecu_gearcount (0-6) over Canbus and ADU shows the right gear in gear indication. But I also want to show R when I engage reverse gear. The only way to tell the ADU that reverse is engaged is via the reverse_gear_switch which is wired directly to the PMU. PMU, ECU and ADU are all on Canbus.

So I wanted to create a math channel or a function channel that functions like following: If reverse_switch=1(actif); channel output =-1 else (reverse_switch=0) channel output is ecu_gearcount.

As you can see, logic is not the problem, but I can not really figure out how to do that actually; if I should use a Math channel or a Funciton channel or even something else.

maybe someone can point me to the right direction?

Best regards and thanks a lot :slight_smile:

Use the choose function if the switch is active; return -1 if not. Choose the channel you have from the ECU.

Really nice Greg, thanks a lot :smiley: