I would like to turn on robot with external switch. The switch is equipped with light. I would like to have the same funcionality as a green switch on teach pedant. When you press the switch to turn on the robot it is lighting green as soon as the robot is totally off.
This is going to depend on what setup/switch you’re using.
If you’re using an illuminated switch (switch that contains an LED/light) typically they have 3 connectors: 1 for Power, 1 for Ground, and 1 for Accessory (or ACC). The switch operates by opening and closing between the Power and ACC pins so for the UR I would connect the “Power” to “12V” and then the “ACC” to “ON”, this way when the button is pressed/enabled the 12V will connect to the ON port turning on the robot. The “Ground” pin from the switch would connect to “GND” on the terminal, this would allow the LED from the switch to turn on/off when the switch does.
If you’re connecting a switch and a lamp/indicator there’s 2 ways you can connect this to get it to work. First the switch would connect to “12V” and “ON” and then one way would be the lamp/indicator connected to “ON” and “GND”, as you said, or you connect the lamp/indicator to “GND” and the “ACC” connection of the switch. Power would only flow from the “12V” to the “ACC” when it’s on and then from the ACC to the “ON” port so either way should work.