Sorry, I am not clear enough.
Can I use different formulas for different buttons in the window where the command is sent?
They are all output channels (19). https://imgur.com/a/K6Gfpt1 https://imgur.com/NGl3BMG
A command is bound to an output channel. The output channel has only 1 formula. So you should do all the required calculations in a one formula. Depending the pressed button, you get CmdVal = 0,1,2,… that you can use in the formula.