Wiper encoder 'and' ignition switch

I’m a total noob, so apologies is my terminology is off

I’m using a keypad encoder, to control the wiper. however i need to stop them working if the ‘ignition switch is off’ (this is a new build car, so i need some functions to work with the key out to be road legal so planning to have the PMU perm live for the IVA test will revert to a traditional switched PMU later )

im using a switched live imput from the ignition switch. heres an example of my logic for the washers that also activate the wiper.

f_wash (is true a_ign_aux and k_wash)

because of the encoder i cant work out how to keep my 5 wipe settings. if i build an ‘f_function’ with the encoder , the wiper module treats it as an on off switch?

id do screen shots however im to new to upload anything.

thanks