Do you really want to use this Mercedes standard?
Think it would be easier to delete all those Mercedes procedures and write own simple ones, or use Kuka standard routines. Without this silly calls of main programs via sps.sub.
Mercedes normally has a complete documentation and templates for robot and plc programs. If you don't have the template for plc you will have big trouble. You have to analyze robot programs (all this p00.. stuff) and write a plc program that satisfy the signals the robot expects. I wouldn't do that.
If I don't use program number transfer, I can start the robot and can achieve a pause, now it is mainly impossible to change the program number via PLC.
The original ET200S with safety wire was hard to get in the first half of the year, so I replaced it with a regular ET200S.