Robot Reference Interface and Force Control

Hello everyone,

I’m using the force control and the robot reference interface (RRI) module. I want to use the RRI to receive the robot position and the force/torque values together in one message. Currently, I only manage to receive the robot position using RRI.

Does anybody knows if/how it is possible to also get the force/torque values?

Thanks in advance
Matthias

Moved to RobotWare forum.

Hey Matthias,

I’ve found your post and was very interested because I’m also trying to get position data via RRI to an external Device (PC).
I would appreciate it a lot if you could tell me, what I have to do in my RAPID Code except the SiConnect and SiSetCyclic Stuff.

I’m still wondering at which point I can get/see/ or change the data that is transmitted.
Another problem I have is that I cannot establish a connection to the PC, even if I set IP and Port numbers right in the “description.xml” for my Device.

Any help would be great!

Thanks in advance!

Hello niggos,

as far as I understand you, you are trying to submit only the position data to the pc. My problem was to get synchronous data from the force/torque sensor in addition to the position data.

I was following the documentation to set up the RRI. There were some traps if there were some errors in the file (wrong name, etc.) since I only get errors if the files are missing. If the configuration was invalid, I got no error and RRI simple wasn’t working.

The connection to the pc was no problem for me. I’ve written a small tcp server to which the station can connect to and received the RRI data in the defined intervall.

Hi Matthias,

you’re right, I want to get only the the positon data in intervalls as small as possible
(max 16 ms).
My problem is that I can’t imagine at what place in the code or on my PC I can change the Data to be sent to / be received from the roboter / the PC.

Here some questions:

  1. Am I right, that the messages sent/received by the SiGetCyclic and SiSetCyclic Functions are in XML-Format?
  2. Where can I see a change of that data?
  3. Do I have to send an xml file from my PC to the roboter?

As you can imagine, I’m quite confused because this stuff seems quite abstarct to me …

So, would you mind posting some code snippets of a running RRI Communication system including a valid description.xml / configuration.xml?

Maybe then I can get the information out of it I need for the solution of my probem.

Thanks again in advance!

Hi niggos,

I cannot test this currently, but here are my used settings for my virtual station:

Settings.xml:

<?xml version="1.0" encoding="utf-8"?>

In the folder “TestDevice” (must be the same as set above as Name):
Configuration.xml

<?xml version="1.0" encoding="utf-8"?>

and Description.xml:

<?xml version="1.0" encoding="utf-8"?> TestDevice CDP SomeType SomeClass 2000 200 false

In RobotStudio, the required code is:

the definitions:
RECORD robotdata
num type;
string status;
ENDRECORD

RECORD replydata
num type;
ENDRECORD

PERS sensor TestDevice := [-1,-1,0];
PERS robotdata RobotMessage := [0,“”];
PERS replydata ReplyMessage := [0];

and to start:
SiConnect TestDevice;
SiSetCyclic TestDevice, RobotMessage, 4;

Before starting the robot, I’ve started a server listening on port 3000 as defined in the config files. I was receiving the values set in RobotMessage in addition to the automatically added values as defined in the config files. The received data are in XML-Format.

If you change the values in RobotMessage somewhere in you RAPID-code, you get the updated values in the next RRI message. I haven’t tested sending data to the machine, but if I understand right, you have to send corresponding XML-data including all values of ReplyMessage (only an int in my case). After the machine has received the packet, it should update the values in ReplyMessage.

Hope this will help you!

Thanks a lot!

This migt save me a lot of time, that I actually don’t have …
I’ll try it out as soon as possible!

Hi Matthias,

before I go on, I already have a small question concerning the following line:

PERS sensor TestDevice := [-1,-1,0];

I wonder what the nums in the brackets stand for ..?

According to the documentation:

id
Data type: num
The internal identifier of the device, which will be set on the first operation with the device
from RAPID level. (Not implemented yet).

error
Data type: num
The error parameter is set when parameter state is set to STATE_ERROR. When state
goes from STATE_ERROR to STATE_CONNECTED parameter error is set to 0.

state
Data type: sensorstate
Reflects the actual communication state of the device.

Regards
Matthias

Hello everybody,
I’m a new user of RRI and I would like to ask you some questions this topic.

Have the *.xml files to be simply added in the proper path or is there some procedure in Robot Studio that must be followed in order to recognize them?

How did you write the code UDP server? By Matlab/Simulink or anything else?

Thank you very much for paying attention.

regards
Alessandro

Hello Alessandro,

the xml files must just be added to the proper path. Of course you must have installed the RRI option in your controller in order to use it.

Regards
Matthias

Dear Matthias,
unfortunately RRI keeps on giving me troubles :worried:

Hereunder I “briefly” report my configuration and actions.

  1. By means of System Builder, I made a new System with just RRI as further option.
  2. In the folder Home, I added the following files: GSI/Settings.xml, GSI/TestDevice/Description.xml, GSI/TestDevice/Configuration.xml. Their contents were copied from the code you posted previously.
  3. I wrote the following Rapid Module

MODULE RRI_module
RECORD robotdata
num type;
string status;
ENDRECORD

RECORD replydata
num type;
ENDRECORD

PERS sensor TestDevice := [-1,-1,0];
PERS robotdata RobotMessage := [0,“”];
PERS replydata ReplyMessage := [0];

PROC Main()
SiConnect TestDevice;
ENDPROC

ENDMODULE

“Compiling” this module, no errors are reported

  1. Finally, I start from Matlab an echoudp on port 3000 and, just after, I run the rapid program.

The result is that Rapid, not being able to initialize the communication, stops the application reporting the event message 112600.

If you, or somebody else, had the solution or just some hint, I would be grateful!

alessandro

Hello Alessandro,

are you sure that your udp server is running when you start the RAPID code? Do you get a connection request on your server? I’m not familar with matlab, but writing a simple server using the TcpListener class I had no problems.

Are you trying to connect from a robot or from a virtual controller?

Regards
Matthais

Yes, I’m almost sure it is running because it responds to a request sent by another client. As fare as the connection is concerned, I try to perform it from a VC: I really hope this is not the problem because I won’t have a robot available before next October…

regards

You can use a virtual controller (if I remember right, I’ve used my posted xml files with a virtual controller). Here are some things I would check:

  1. RRI module installed and xml files are in place (there should be an error message if the files are missing while the controller is starting).

  2. xml files are correct; most names etc. (including name of the folder) are case sensitive.

  3. Server is running and listening on the assigned port (3000 in my case)

Do you get an error on the SiConnect or when you call SiSetCyclic?

Regards
Matthias

I’ve just finished to run the application both with and without xml files and the result doesn’t change, thus the interface initialization fails in both cases.

Maybe the problem is in these files, otherwise I am really unable to explain this behavior…

Anyway, the files I added are:

  • HOMEGSISettings.xml
<?xml version="1.0" encoding="utf-8"?>
  • HOMEGSITestDeviceConfiguration.xml
<?xml version="1.0" encoding="utf-8"?>
  • HOMEGSITestDeviceDescription.xml
<?xml version="1.0" encoding="utf-8"?> TestDevice CDP SomeType SomeClass 2000 200 false

If I understand you correctly, you don’t get an error when you start the controller and the xml files are missing? In that case I think you don’t have installled the RRI module correctly. I’ve removed the xml files and got the following error: “Failed to access the config files”.

Regards
Matthias

If I perform a warm start, I don’t get any error with or without xml files. The errors I can obtain are following reported

  1. If I don’t install RRI, when I check the syntax, typical data types and function are not recognized, of course. It happens with or without xml files.

  2. If I install RRI, the initialization of communication fails in any case when I start the application, either with or without xml files.

What If you sent me your virtual system and udp server, so that I would be able to try on my computer? Or, I you preferred to, I could send mine.

Maybe it would help if you send me your station. Have you added the RRI option later to the station or have you included the RRI option already when you created the station. We experienced problems when options are added not at creation time.

First of all, I created a new system by means of System Builder. Then I created a empty station to which I added the system. To end with, I added the xml files.

If you give me a contact, I can send you the folder

regards

alessandro