# How to power off Cobot arm in program?

**URL:** <https://forum.universal-robots.com/t/how-to-power-off-cobot-arm-in-program/40046>\
**Category:** General Application Help: How do I?\
**Created:** [May 30, 2025, 5:05pm UTC](https://forum.universal-robots.com/t/how-to-power-off-cobot-arm-in-program/40046 "2025-05-30T17:05:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ivory](https://avatars.discourse-cdn.com/v4/letter/i/b487fb/32.png) [@Ivory](https://forum.universal-robots.com/u/Ivory)\
**Post date:** [May 30, 2025, 5:05pm UTC](https://forum.universal-robots.com/t/how-to-power-off-cobot-arm-in-program/40046/1 "2025-05-30T17:05:52Z")

</div>

Here’s the scenario. When a PLC is turned off, the Cobot will need to go to home position and power off its arm, not the control box. How do I put that in the Robot Program? The powerdown() script function powers off the whole thing which I don’t want.

---

<div class="post-metadata">

**Author:** ![efn](https://avatars.discourse-cdn.com/v4/letter/e/35a633/32.png) [@efn](https://forum.universal-robots.com/u/efn)\
**Post date:** [June 2, 2025, 6:31am UTC](https://forum.universal-robots.com/t/how-to-power-off-cobot-arm-in-program/40046/2 "2025-06-02T06:31:44Z")

</div>

I have not heard of this being achieved before. The only way I can see this being done is by sending a command to the dashboard server from the robot program if connection to the PLC is lost.  
Open a socket connection to the dashboard (127.0.0.1) with script command “socket\_open(“127.0.0.1”, 29999)”.  
Then try a “socket\_send\_string(“power off”)”. You might need to end it with a “socket\_send\_byte(10)”.

Again, not done it before. Also, the robot program will stop being executed with this. You won’t be able to have the robot program running with the robot arm off.
