Any T100MD+ PLC can handle this quite easily. You do need to periodically check the RS232 port to see if the "switch" character or string is received. Since the PLC buffers incoming serial data up to 256 bytes, you don't have to poll the RS232 port all the time since incoming character will not be lost even if they are not read by the PLC program unless more than 256 bytes has been received, then the oldest data is lost.
All you need is to set up a clock pulse to periodically run a custom function that checks the serial port:
Clk:0.5s Chk232
|---||---------------{dCusF}
The above circuit set up the PLC to check serial port once every 0.5s. Inside custom function "Chk232" you need to check for incoming characters:
X = INCOMM(1)
IF X =
' whatever character used as switch
... ' take action
ELSE
.... ' otherwise do something else or just return.
ENDIF