PLC program with Visual Components

Hi guys, I would like to ask you if there is a possibility to control a robot (Mitsubishi) that is already programmed in Visual Components through a PLC. That means not to write the whole programs in the PLC, but only to call the commands?
Example:
If IN(#1220) THEN
CallRoutineA()
ElsifIN(#1222) THEN
CallRoutineB()