I see, but it's not entirely possible the way you try. Suggest to analyze the specific behaviour of TL431 reference circuits and use it appropriately for your purposes. Optocouplers can't transmit measured values accurately due to gain variation and temperature drift. Thus usual TL431 circuits transmit the output of a PI error amplifier.
Viso = (Vact-Vref)*F(s)
Despite of possible offset and gain variations, Vact will always follow Vref.
Vref will however be set on the output side and can't be programmed in the controller. For a programmable setpoint you need a true isolation amplifier or something equivalent.