# Activate digital output while robot is in safeguard stop

**URL:** <https://forum.universal-robots.com/t/activate-digital-output-while-robot-is-in-safeguard-stop/33538>\
**Category:** Technical Questions\
**Created:** [April 3, 2024, 10:46am UTC](https://forum.universal-robots.com/t/activate-digital-output-while-robot-is-in-safeguard-stop/33538 "2024-04-03T10:46:44Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![giorgigedaminski](https://avatars.discourse-cdn.com/v4/letter/g/898d66/32.png) [@giorgigedaminski](https://forum.universal-robots.com/u/giorgigedaminski)\
**Post date:** [April 3, 2024, 10:46am UTC](https://forum.universal-robots.com/t/activate-digital-output-while-robot-is-in-safeguard-stop/33538/1 "2024-04-03T10:46:44Z")

</div>

Hello everyone,  
I want to activate digital output (switch the light on) when robot goes into Safeguard Stop, light must be switched on. After pressing Safeguard Stop Reset button, it must deactivate.  
Is there any way to do this?

I couldn’t find it in I/O setup functions.

Regards,  
Giorgi

---

<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:** [April 3, 2024, 11:57am UTC](https://forum.universal-robots.com/t/activate-digital-output-while-robot-is-in-safeguard-stop/33538/2 "2024-04-03T11:57:00Z")

</div>

There’s no way to do this in PolyScope. You could install a relay in parallel to one of the Safeguard inputs, though. The relay must be NC.  
Then you can connect a light to the relay. 🙂

---

<div class="post-metadata">

**Author:** ![giorgigedaminski](https://avatars.discourse-cdn.com/v4/letter/g/898d66/32.png) [@giorgigedaminski](https://forum.universal-robots.com/u/giorgigedaminski)\
**Post date:** [April 3, 2024, 12:15pm UTC](https://forum.universal-robots.com/t/activate-digital-output-while-robot-is-in-safeguard-stop/33538/3 "2024-04-03T12:15:59Z")

</div>

I thought about that. But the problem is, that if the door is closed, light will get switched off and the robot will still be in safeguard stop, unless I press the reset button. So, safeguard stop mode and light activation will not match to each other. Am I wrong?

---

<div class="post-metadata">

**Author:** ![WattsUp](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/wattsup/32/5732_2.png) [@WattsUp](https://forum.universal-robots.com/u/WattsUp)\
**Post date:** [April 3, 2024, 3:41pm UTC](https://forum.universal-robots.com/t/activate-digital-output-while-robot-is-in-safeguard-stop/33538/4 "2024-04-03T15:41:58Z")

</div>

I cant acess my robots for testing, but if you set up a modbus connection to loopback ( 127.0.0.1 ) I think you could use the RB status / isProtectiveStopped addresses to get that signal, Then run a thread checking those and set output based on that.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/2/2d6afc317d223804d03114bc06c27ffec321933a.png)  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/0/058c54ec5a41b56d549e9634092ffcf30d4c6252.png)

---

<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:** [April 4, 2024, 5:50am UTC](https://forum.universal-robots.com/t/activate-digital-output-while-robot-is-in-safeguard-stop/33538/5 "2024-04-04T05:50:49Z")

</div>

That’s true. That won’t work… The only way is to use a safety relay, as I see it then. Or a PLC or something else to check the robot status and control the light.

---

<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:** [April 4, 2024, 5:52am UTC](https://forum.universal-robots.com/t/activate-digital-output-while-robot-is-in-safeguard-stop/33538/6 "2024-04-04T05:52:09Z")

</div>

It’s a good idea, but the thread will be paused while the robot is safeguard stopped, as far as I can tell. ☹

---

<div class="post-metadata">

**Author:** ![giorgigedaminski](https://avatars.discourse-cdn.com/v4/letter/g/898d66/32.png) [@giorgigedaminski](https://forum.universal-robots.com/u/giorgigedaminski)\
**Post date:** [April 4, 2024, 6:17am UTC](https://forum.universal-robots.com/t/activate-digital-output-while-robot-is-in-safeguard-stop/33538/7 "2024-04-04T06:17:40Z")

</div>

What makes my problem harder is, that robot always works in remote control, thus, threads do not work for me well.

---

<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:** [April 4, 2024, 7:40am UTC](https://forum.universal-robots.com/t/activate-digital-output-while-robot-is-in-safeguard-stop/33538/8 "2024-04-04T07:40:28Z")

</div>

Well. I don’t think you can solve this without a PLC or a safety relay installed.  
Or alternatively setting a digital output to high whenever the robot program is paused/stopped. This will however make the light go on no matter the reason the robot has stopped.

---

<div class="post-metadata">

**Author:** ![giorgigedaminski](https://avatars.discourse-cdn.com/v4/letter/g/898d66/32.png) [@giorgigedaminski](https://forum.universal-robots.com/u/giorgigedaminski)\
**Post date:** [April 4, 2024, 8:43am UTC](https://forum.universal-robots.com/t/activate-digital-output-while-robot-is-in-safeguard-stop/33538/9 "2024-04-04T08:43:22Z")

</div>

I think I’ll try using PLC. Thanks for your support.  
Cheers

---

<div class="post-metadata">

**Author:** ![mbush](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/mbush/32/76_2.png) [@mbush](https://forum.universal-robots.com/u/mbush)\
**Post date:** [April 4, 2024, 10:40am UTC](https://forum.universal-robots.com/t/activate-digital-output-while-robot-is-in-safeguard-stop/33538/10 "2024-04-04T10:40:46Z")

</div>

Have you thought about using a latching relay? The safeguard stop input would be the pulse that would latch the relay on, then you parallel the input for the reset to the robot to also reset the relay. This would allow the door to be closed but the light stay on until the reset button is pressed

Here is an example from Allen Bradley

 ![image](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/8/82b4a5d9f22f11dc29e34e7248fbbfd9639ccc54.png)

---

<div class="post-metadata">

**Author:** ![giorgigedaminski](https://avatars.discourse-cdn.com/v4/letter/g/898d66/32.png) [@giorgigedaminski](https://forum.universal-robots.com/u/giorgigedaminski)\
**Post date:** [April 4, 2024, 10:53am UTC](https://forum.universal-robots.com/t/activate-digital-output-while-robot-is-in-safeguard-stop/33538/11 "2024-04-04T10:53:43Z")

</div>

I haven’t tried this yet. Actually this is really good idea. Thanks a lot.

---

<div class="post-metadata">

**Author:** ![mbush](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/mbush/32/76_2.png) [@mbush](https://forum.universal-robots.com/u/mbush)\
**Post date:** [April 4, 2024, 10:55am UTC](https://forum.universal-robots.com/t/activate-digital-output-while-robot-is-in-safeguard-stop/33538/12 "2024-04-04T10:55:32Z")

</div>

You’re welcome, seems it would be a lot less expensive than adding a PLC just to control a light.

---

<div class="post-metadata">

**Author:** ![WattsUp](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/wattsup/32/5732_2.png) [@WattsUp](https://forum.universal-robots.com/u/WattsUp)\
**Post date:** [April 4, 2024, 12:13pm UTC](https://forum.universal-robots.com/t/activate-digital-output-while-robot-is-in-safeguard-stop/33538/13 "2024-04-04T12:13:01Z")

</div>

I wasn’t sure about the threads.  
Maybe a NC contact then lol.

---

<div class="post-metadata">

**Author:** ![Simon\_W](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@Simon\_W](https://forum.universal-robots.com/u/Simon_W)\
**Post date:** [April 5, 2024, 10:27am UTC](https://forum.universal-robots.com/t/activate-digital-output-while-robot-is-in-safeguard-stop/33538/14 "2024-04-05T10:27:10Z")

</div>

They way I use is not exactly what you are searching for, but maybe good enough, because the light is switched on during a Safeguard Stop, but also if no program is running.  
I connected the light to a safety output configured as Prog-Stop\_HI and in my program runs a thread that sets the output to LOW and a delay of 0.5 seconds. The delay is needed, otherwise the program runs in a error.

---

<div class="post-metadata">

**Author:** ![giorgigedaminski](https://avatars.discourse-cdn.com/v4/letter/g/898d66/32.png) [@giorgigedaminski](https://forum.universal-robots.com/u/giorgigedaminski)\
**Post date:** [April 5, 2024, 2:51pm UTC](https://forum.universal-robots.com/t/activate-digital-output-while-robot-is-in-safeguard-stop/33538/15 "2024-04-05T14:51:36Z")

</div>

Thanks for your response. I will try this way as well. But I don’t think that thread can work in remote control mode.
