If it is not possible to control CMD bits 11-15 by Somachine, the best way is to program ATV logic. Switching signal from PLC can be passed to the logic via FB parameter M001.
Logic will read M001 and depending on lowest bit it will switch reference from CAN to AI1.
See attached example for ATV320 configuration including ATV logic inside.
Logic will read M001 and depending on lowest bit it will switch reference from CAN to AI1.
See attached example for ATV320 configuration including ATV logic inside.