Update: I've removed all irrelevant information and simplified the question.
The OPA548 operational amplifier provides adjustable current limit that can be controlled digitally with a current-out DAC. Below is a circuit from the datasheet. I've calculated that Iset current 0~6.7µA will give me desired output range 0~100mA.
However, OPA548 is powered by isolated ±25V DC-DC. So, I would like to isolate current limit control too, using IL300 optocoupler.
Question Can I simply connect photodiode to control pin like this:
Or do I need something more complicated, like current mirror:
As I understand it, the first option corresponds to input range about 0.56 mA at forward gain K2 = 0.012. This is just a fraction of the optocoupler's normal operational range 10 mA.
I think the formula for resistors in second option is Ilim = Id * R1 / R2, which means it can be adjusted to better use operational range.