Robot Reference Interface and Force Control
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
Comments
-
Moved to RobotWare forum.Henrik Berlin
ABB0 -
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!0
-
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.
0 -
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!0
-
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"?>
<Settings>
<Servers></Servers>
<Clients>
<Client Convention="CDP" Name="TestDevice" />
</Clients>
</Settings>
In the folder "TestDevice" (must be the same as set above as Name):
Configuration.xml
<?xml version="1.0" encoding="utf-8"?>
<Configuration>
<Enums>
<Enum Name="opmode" Link="Intern">
<Member Name="ReducedSpeed" />
<Member Name="FullSpeed" />
<Member Name="Automatic" />
</Enum>
</Enums>
<Records>
<Record Name="robotdata">
<Field Name="type" Type="Real" Alias="Type" />
<Field Name="status" Type="String" Alias="Status" />
<Field Name="OperationMode" Type="opmode" Link="Intern" Alias="Mode" />
<Field Name="PredictedTime" Type="Time" Link="Intern" Alias="Time" />
<Field Name="PlannedPose" Type="Frame" Link="Intern" Alias="Frame" />
<Field Name="PlannedJoints" Type="Joints" Link="Intern" Alias="Joints" />
<Field Name="FeedbackTime" Type="Time" Link="Intern" Alias="FTime" />
<Field Name="FeedbackPose" Type="Frame" Link="Intern" Alias="FFrame" />
<Field Name="FeedbackJoints" Type="Joints" Link="Intern" Alias="FJoints" />
</Record>
<Record Name="replydata">
<Field Name="type" Type="Real" Alias="Type" />
</Record>
</Records>
<Properties>
<Property Name="RobotMessage" Type="robotdata" Flag="WriteOnly" />
<Property Name="ReplyMessage" Type="replydata" Flag="ReadOnly" />
</Properties>
</Configuration>
and Description.xml:
<?xml version="1.0" encoding="utf-8"?>
<Description>
<Name>TestDevice</Name>
<Convention>CDP</Convention>
<Type>SomeType</Type>
<Class>SomeClass</Class>
<Network Address="localhost" Port="Lan">
<Channel Type="Cyclic" Protocol="Udp" Port="3000" />
</Network>
<Settings>
<TimeOut>2000</TimeOut>
<MaxLost>200</MaxLost>
<DryRun>false</DryRun>
</Settings>
</Description>
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!
0 -
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!0
-
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 ..?0
-
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
0 -
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.regardsAlessandro0
-
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
0 -
Dear Matthias,unfortunately RRI keeps on giving me troublesHereunder 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 ModuleMODULE RRI_moduleRECORD robotdata
num type;
string status;
ENDRECORDRECORD replydata
num type;
ENDRECORDPERS 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 reported4) 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!alessandro0 -
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
0 -
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...
regards0 -
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
0 -
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"?>
<Settings>
<Servers></Servers>
<Clients>
<Client Convention="CDP" Name="TestDevice" />
</Clients>
</Settings>- HOMEGSITestDeviceConfiguration.xml
<?xml version="1.0" encoding="utf-8"?>
<Configuration>
<Enums>
<Enum Name="opmode" Link="Intern">
<Member Name="ReducedSpeed" />
<Member Name="FullSpeed" />
<Member Name="Automatic" />
</Enum>
</Enums>
<Records>
<Record Name="robotdata">
<Field Name="type" Type="Real" Alias="Type" />
<Field Name="status" Type="String" Alias="Status" />
<Field Name="OperationMode" Type="opmode" Link="Intern" Alias="Mode" />
<Field Name="PredictedTime" Type="Time" Link="Intern" Alias="Time" />
<Field Name="PlannedPose" Type="Frame" Link="Intern" Alias="Frame" />
<Field Name="PlannedJoints" Type="Joints" Link="Intern" Alias="Joints" />
<Field Name="FeedbackTime" Type="Time" Link="Intern" Alias="FTime" />
<Field Name="FeedbackPose" Type="Frame" Link="Intern" Alias="FFrame" />
<Field Name="FeedbackJoints" Type="Joints" Link="Intern" Alias="FJoints" />
</Record>
<Record Name="replydata">
<Field Name="type" Type="Real" Alias="Type" />
</Record>
</Records>
<Properties>
<Property Name="RobotMessage" Type="robotdata" Flag="WriteOnly" />
<Property Name="ReplyMessage" Type="replydata" Flag="ReadOnly" />
</Properties>
</Configuration>- HOMEGSITestDeviceDescription.xml
<?xml version="1.0" encoding="utf-8"?>
<Description>
<Name>TestDevice</Name>
<Convention>CDP</Convention>
<Type>SomeType</Type>
<Class>SomeClass</Class>
<Network Address="localhost" Port="Lan">
<Channel Type="Cyclic" Protocol="Udp" Port="3000" />
</Network>
<Settings>
<TimeOut>2000</TimeOut>
<MaxLost>200</MaxLost>
<DryRun>false</DryRun>
</Settings>
</Description>0 -
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
0 -
If I perform a warm start, I don't get any error with or without xml files. The errors I can obtain are following reported1) 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.0
-
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.
0 -
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 folderregardsalessandro0
-
Hello.
I've got your files, but I cannot load it. I think you have to create a Pack&Go. But I'd a look at your files, and the settings.xml is faulty: you have added a client named "pippo" but your folder name is "TestDevice". Both of them and of course the sensor name in the RAPID code must be the same.
Please try to change pippo to TestDevice. If it isn't working then, please create a Pack&Go and send it to me.
Regards
0 -
I'm very sorry, I sent you the wrong file. Also with the correct name, i.ie. TestDevice, the result doesn't change. I tried to send you a Pack&Go, but the service offerd by the forum allows just few kind of files and, unfortunately, *.rspag is not included.you should give me a e-mail address...0
-
Maybe you could just include the rspag file into a zip?
0 -
0
-
Thanks. I've loaded the station. First of all, i get the following error: "Communication failure on I/O bus". I think this shouldn't be the problem, but is not ok anyhow. Then is started the program, but I did't get any error. Also, after deleting the GSI folder I get the mentioned error "Failed to access the config files".
I'm using RobotWare 5.13.02_2039. Maybe it's a problem with your RobotWare? Have you tryed to create a new station from the Pack&Go you just sent to me?
0 -
Dear Matthias, it is with great pleasure that I announce that RRI works!!!Unpacking the Pack&Go, as you hinted, turned out to be the solution of this mysterious problem... I can't believe it!As far as "Communication failure on I/O bus" is concerned, it's just due to the fact that I added "EtherNetIP port" option. It's not needed anyway.Thank you very much again for your fundamental helpkind regardsalessandro0
-
I think, the station you were using was not ok, even though you have added the RRI option. Using the Pack&Go, a new station with your previous options was created. So maybe creating a new station will also work.
0 -
Hi everybody,
my challenge in connecting IRC5 with an external PC via RRI has found another hitch...My UDP server, written in MATLAB, recieves data from IRC5. The message is hereunder reported
<RobotMessage Id="0" Ts="1975.407704"><Type>6640</Type><Status>Hi MATLAB, nice to hear you!</Status></RobotMessage>
Once received the string, the server arranges the answer and send it ro the IRC5
<ReplyMessage Id="0" Ts="1975.407704"><Type>6640</Type><Status>Hi robot, nice to hear you!</Status></ReplyMessage>
But none is received...
I don't know if the problem is the string's format, or the communication ports or something else
I attach a zip file with both the pack&go and the UDP server code. Does anybody have any ideas or suggestions? If you are not a Matlab user, could you just test the robot application with your server?
thanks for the help
regards
Alessandro
0 -
Hi Alessandro,I'm quite late, I know... nevertheless:Do you still need help with the RRI?0
-
I ran into the exact same issue - my PC is receiving the robot message, it then replies, but the robot controller doesn't show any updates in the PERS variables at all...any hints would be highly appreciated!0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 801 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings