How to see if Robot is in LOCAL or REMOTE control?

Good morning,

my UR10 is connected to a Siemens PLC.
When the Robot is in “Remote” i can start the communication via Dashboard Server.
Therefore i have to Start a TCON block inside Siemens.

If i go back to the Robot and switch it to Local and then Back to Remote, my connection gets lost.
Then i have to deactivate the comminication and activate it again.

The Robot is connected via Profinet. Is there any Bit or INT that tells me whether the Robot is in Local or Remote Control?
Cause with a signal like that i could program smth at Siemens site.

Thank you in advance.

Kind regards!

Looks like maybe these bits?

I looked around on the Profinet manual to see if it had a description for these, but I couldn’t find one.

@eric.feldmann that is robot arm mode.
Remote vs local mode can only be queried from dashboard server interface with “is in remote control” command.

@mmi good to know. Is there any documentation actually detailing what the bits for profient/ethernertIP represent? For example there’s a byte dedicated to robot mode, yet no clarification on it. What does a value of 1,2,3 etc correspond to? This goes for all registers.

This should cover the most ambiguous ones.

1 Like

Good morning @mmi
but that is the problem…
Once I go to “Local” on the Robot HMI it will shut down my OUC Communication (but I don´t get a feedback).
So if i try to send commands (from PLC to Robot via Dashboard Server) nothing will happen.
I have to put the RObot back to “Remote” and then deactivate and reactivate the OUC communication.
Therefore it would b nice to see that the Robot has been put to Local-Mode.
So when the robot is not in “Remote” i cannot even ask for the “actual mode”…

Hallo @miwa @mmi

Is there any possibility to detect directly at the Robot, whether it is in Local Or Remote mode?
So that i could set an Output or an boolean output register?

Hi,

To answer the question from @kadams you won’t be able to query local/remote on the robot and then set an output of the robot. In theory this is possible but it would have to happen in a thread and since threads don’t run when the program is stopped you won’t get the status properly on the fieldbus interface at all times. So I advise against this.

You CAN query the dashboard server for certain status in remote or local mode. This document describes which commands will ONLY work ‘‘only in remote control’’ :
https://s3-eu-west-1.amazonaws.com/ur-support-site/42728/DashboardServer_e-Series.pdf

HOWEVER, doing socket communications on a PLC can be difficult. There is a 3rd party offering that allow you to do all the communication and query (including remote/local mode) via Ethernet/IP or ProfiNet. This product is a URcap software plugin that behaves as a gateway from the IO table of the fieldbus interface to the internal dashboard server of the robot. Here is a link to their site :
Products-Connect - Robot27

Hallo @bba
Thank you for your reply.

How can i do it in a thread? Is there any script i can use to ask for the actual mode?

Yes i know that manual and I´m able to use all the Signals to communicate with the Robot. ONLY if i swtich the Robot from Remote to Local and Back to Remote I have to activate the communication again.
Therefore i need (somehow) to detect, that the Operating mode has swapt.
Cause once i swapt the operation mode, i cannot send the Dashboard-Server Command (is in remote control).

The Product looks nice, but its not what I want/need as I´m already able to send all the commands that this company is providing with her add-on. It was tricky but i could find the right syntax to make the UR and Siemens PLC communicate to each other.
Which is absolutly fine as long as noone changes the operation mode.

Why not monitor your TCP connection in the PLC? :slight_smile:

I did this by checking the DONE from the TSEND block, and then make a watchdog that detects if the signal has been lost for 5 seconds. Then it will reconnect by itself.
pic1
pic2

Good morning @efn

Thank you very much for your answer!
I can see that you send ur signals with a Puls (10Hz).

At moment I send each Signal only once (not a pulse) Cause i figured out, that when i send a signal twice (like 2 times “play”) the answer from the UR is like “Could not undertand” or it jsut says “ay” (How do u manage to send the signal only once?)
This is my send block:

The signals (in this example for “play”) are created like this:

1: This is just an INT that will turn to “2” once i Press the Button “play” on my Siemens HMI.

2: If the answer is already “Starting program$L” I cannot send the “play” command again.

  1. AND i can only send the signal if the Robot is in Mode 7

Don´t you get “reading” problems when u send the Signals all the time?

I´m super thankful for any help I can get. As I couldn´t find much informations (online) regarding Communication between Siemens and UR.

Thank you very much!
Many greetings from Luxembourg!

A good morning to you, too, kadams. :slight_smile:

Ah, right. I use my connection to continuously send a string containing different variables. Not to send actual commands. That might be an issue then.

Maybe you could make a thread in your UR that sends a 1 and 0 switching each second to the PLC when it is running. And then monitor the TRCV for the received string/value? :slight_smile: And if the PLC stops receiving it, something is wrong and the PLC can try to reconnect?

Good morning @efn

Thank you for your hints!

What do you send, in case u don´t want the robot to change anything?
I mean how are the “Steps”
Like:

  1. Send “Play” to the UR
  2. Receive the answer “Starting program”
  3. Which signal do u send then/ What are u doing once u get that answer from the UR? DO u send a “Empty String”?

Are u using the TRCV block to read out the answer from the UR?

I tried to toggle a bit in a thread, but that is kind of “useless”. Cause if the Robot program is running (in Remote) and then i change it to “Local”, the UR will not stop the program. I can change between those Local/ Remote all the time without getting a different Signal. PLUS idk how to send a signal via dashboard server (i mean a own created signal).
For the “normal” communication i use Profinet and send/ receive signals through the register.

Can u even send more then 1 String at a time?
Or how do u create the signals u want to send to the robot (sequential or parallel?)
At moment this whole communication (UR <-> Siemens via Dashboard Server) is kind of trial and error to me.
Couldn´t fine a nice guidline on how to create the signal exchange (how it is supposed to b/work)

I´m glad and thankful for any hint.

Thank you
Greetings from Luxembourg!

It’s my mistake. I am not using the dashboard server at all. I am just using socket communication on a random port. :slight_smile:
Read more here: Ethernet socket communication via URScript - 15678

It simply allows you to send whatever you like as string. And you will not receive a reply except if you send something back from the UR.

So my idea won’t work with your current communication. But you could open up another socket and use that for watchdog/heartbeat, if you want to. I don’t think that’s an issue. :slight_smile: A lot of work for that, though.

Hi @efn

thank you very much.
This has to be done all via C#?
How can u create those kind of files?

I´m not familiar with any “higher” lenguage.
Basically I´m programming the Robot directly from its HMI :see_no_evil:

It´s strange to me that there is not an easy way to see whether the UR is in Local or Remote…
There are sooo many signals at the Profinet, so i can´t understand that there is no possibility to put that extra signal also in there:

Oh, no. You don’t need the C# part. You must set up the CON in the Siemens as server, so that’s the other way around than the dashboard server right now.
Then you open up a socket to the PLC in the robot with the commands provided in the guide.

BeforeStart
open≔socket_open(“127.0.0.1”,21)
Loop open≟ False
open≔socket_open(“127.0.0.1”,21)
targetPos≔p[0,0,0,0,0,0]
counter≔0

I don’t know much about the dashboard commands. I have mainly been exchanging string variables. :slight_smile: You can make a Feature Request for that feature to be added in future updates. It does sound like a good idea to include it in the dashboard server.

1 Like

You can query the robots dashboard server from within a robot program (using socket commands) but this will only work while a program is running. SO, if your plc is trying to query the robot (via fieldbus IO) and the program is not running the plc will get erroneous information.