The output of the PLC must be checked if it is possible to have this 200 mA out, and if this is sourcing or sinking.
If not use a very simple FET and a diode (1N4004).
my son does this for his AVR with 5 volts to 24 volts.
please use a few resistors on the Gate