For "SafeOpperation" it is a requirement that we validate the mastering of the robot.
The Master referencing test doesn't change the mastering of the robot it validates the current position of the robot servo motor to the stored value in the robots safety configuration.
The actual switch used can vary depending on the actual configuration of your system and if you are only using the robots internal safety with the extended SIB board or if you have a Safety PLC using CIP Safety or ProfiSafe. With just the SIB board it is simplest to use the KUKA master referencing switch and connect it to the robot. if you have a safety PLC you can use any in put to the safety PLC to indicate that the robot is in the specific position. this signal is then configured in the robots safety configuration to come from the safety signal for the safety plc.
the robot must have the axes mastered first.
the robots position is stored both in a move command. in the MasRefMain... might actually be a sub program from that...follow the setup, the KUKA Master Referencing switch can be used or optionally something else from your safety PLC.
If you are using a safety PLC and the Master referencing switch is connected to the PLC the Safety PLC sends the signal to the robot that the switch identifying the Master referencing position has been made.
The robot validates the robots current servo positions to the positions stored in the robots safety configuration.
If the Master Referencing test passes the robot safety is not violated
there are some more options with multiple external axes and configurations that don't allow all the axes to be check at the same time but basics are the same....
As always check this with your own safety risk assessment to your local requirements.