Hello everyone,
Recently, I have installed RSI technology package 2.3 in my robot KR 16-2 with KSS version 5.6 but when I running the example program in RSI software some error occured.
The PC program can received the data from robot but the robot showed some error and the screenshot was in attachment below.
I appreciate for any ideas! ^O^
RSI PROGRAM ERROR
-
jane3von -
November 21, 2013 at 12:57 PM -
Thread is marked as Resolved.
-
-
According to the error message, your input values are exceeding the tolerance limit for PATHCORR. What are the numbers being sent to the PATHCORR object?
-
According to the error message, your input values are exceeding the tolerance limit for PATHCORR. What are the numbers being sent to the PATHCORR object?Hi SkyeFire,
I have used the similar data to send to the robot but the error still occurred.
The PC program is an example in RSI 2.3 as bellow://////////////////////////////////////////////////////////////////////////////
///KUKA Roboter GmbH
///Bluecherstr. 144
///86165 Augsburg
///Germany
///
///Topic: C# Code: Server-apllication with module RSI object: ST_Ethernet
/// Best effort: Microsoft Windows System and Console Application Projekt.
///Date: 21. 08 2008
///Developer: Rajko Rolke
//////////////////////////////////////////////////////////////////////////////private static void anyfunction()
{
// starting communication by separate process
System.Threading.Thread secondThread;
secondThread = new System.Threading.Thread(new System.Threading.ThreadStart(StartListening));
secondThread.Start();
}
// second thread
private static void StartListening()
{
uint Port = 6008; // port number TCP/IP
uint AddressListIdx = 0; // network card index
System.Xml.XmlDocument SendXML = new System.Xml.XmlDocument(); // XmlDocument pattern
System.Net.Sockets.Socket listener; // create system socket
System.Net.Sockets.Socket handler; // create system socket
// Data buffer for incoming data.
byte[] bytes = new Byte[1024];
// Establish the local endpoint for the socket.
// Dns.GetHostName returns the name of the
// host running the application.
System.Net.IPHostEntry ipHostInfo = System.Net.Dns.Resolve(System.Net.Dns.GetHostName());
System.Net.IPAddress ipAddress = ipHostInfo.AddressList[AddressListIdx];
System.Net.IPEndPoint localEndPoint = new System.Net.IPEndPoint(ipAddress, (int)Port);// Create a TCP/IP socket.
listener = new System.Net.Sockets.Socket(System.Net.Sockets.AddressFamily.InterNetwork, System.Net.Sockets.SocketType.Stream, System.Net.Sockets.ProtocolType.Tcp);
// open Socket and listen on network
listener.Bind(localEndPoint);
listener.Listen(1);// Program is suspended while waiting for an incoming connection.
// bind the first request
handler = listener.Accept();
// no connections are income
listener.Close();
// string members for incoming and outgoing data
String strReceive = null;
String strSend = null;// load sending data by external file
SendXML.PreserveWhitespace = true;
SendXML.Load("ExternalData.xml");
while(true)
{
// wait for data and receive bytes
int bytesRec = handler.Receive(bytes);
if (bytesRec == 0)
{
break; // Client closed Socket
}
// convert bytes to string
strReceive = String.Concat(strReceive,System.Text.Encoding.ASCII.GetString(bytes,0,bytesRec));
// take a look to the end of data
if ((strReceive.LastIndexOf("</Rob>")) == -1)
{
continue;
}
else
{
// mirror the IPO counter you received yet
strSend = SendXML.InnerXml;
strSend = mirrorIPOC(strReceive,strSend);
// send data as requested
byte[] msg = System.Text.Encoding.ASCII.GetBytes(strSend);
handler.Send(msg,0,msg.Length,System.Net.Sockets.SocketFlags.None);
}
strReceive = null;
}
}
// send immediately incoming IPO counter to have a timestamp
private static string mirrorIPOC(string receive, string send)
{
// separate IPO counter as string
int startdummy = receive.IndexOf("<IPOC>")+6;
int stopdummy = receive.IndexOf("</IPOC>");
string Ipocount = receive.Substring(startdummy,stopdummy-startdummy);
// find the insert position
startdummy = send.IndexOf("<IPOC>")+6;
stopdummy = send.IndexOf("</IPOC>");
// remove the old value an insert the actualy value
send = send.Remove(startdummy,stopdummy-startdummy);
send = send.Insert(startdummy,Ipocount);// send back the string
return send;
}
The SRC code was as bellow:
&ACCESS RVO
&REL 6
&PARAM TEMPLATE = C:\KRC\Roboter\Template\vorgabe
&PARAM EDITMASK = *
DEF RSIEthernet( )
; =============================================
;
; EXAMPLE OF: ST_ETHERNET
; Type: RSI Object
;
; =============================================
;FOLD Overview notes
; =============================================
; NAME
; KUKA.Ethernet.RSIXML
; COPYRIGHT
; KUKA Robter GmbH
;
; =============================================
;ENDFOLD;FOLD INI
;FOLD BASISTECH INI
GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
INTERRUPT ON 3
BAS (#INITMOV,0 )
;ENDFOLD (BASISTECH INI)
;FOLD USER INI
;Make your modifications here;ENDFOLD (USER INI)
;ENDFOLD (INI)HALT
; The current position will be used as SAK movement!
PTP $POS_ACT
; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!; Create RSI Object ST_Ethernet, read object configuration .../INIT/ERXConfig.xml
err = ST_ETHERNET(hEthernet,0,"RSIethernet.xml")
IF (err <> #RSIOK) THEN
HALT
ENDIF
; err = ST_SETPARAM(hEthernet,eERXmaxLatePackages,1) ; after "value" to late packages the robot stopps
; err = ST_SETPARAM(hEthernet,eERXmaxLateInPercent,10) ; RSIWARNING if the limit reached
; err = ST_SETPARAM(hEthernet,eERXmaxFieldOfView,1000) ;reset every 'value' statistics.
; err = ST_SETPARAM(hEthernet,eERXFastCycle,1) ; FALSE: Time to answer 11ms / TRUE: Fast cycle: answer <2ms necessary!
; err = ST_SETPARAM(hEthernet,eERXerrorFlag,1) ; $FLAG[1] will be set in case off errors
;FOLD RSI-Objects to link in ST_Ethernet
; read $IN[1-16]
err = ST_DIGIN(hDin,0,1,2,0)
IF (err <> #RSIOK) THEN
HALT
ENDIF
err = ST_NEWLINK(hDin,1,hEthernet,1)
IF (err <> #RSIOK) THEN
HALT
ENDIF; read $OUT[1-3]
err = ST_DIGOUT(hDout1,0,1,0,0)
IF (err <> #RSIOK) THEN
HALT
ENDIF
err = ST_DIGOUT(hDout2,0,2,0,0)
IF (err <> #RSIOK) THEN
HALT
ENDIF
err = ST_DIGOUT(hDout3,0,3,0,0)
IF (err <> #RSIOK) THEN
HALT
ENDIF
err = ST_NEWLINK(hDout1,1,hEthernet,2)
IF (err <> #RSIOK) THEN
HALT
ENDIF
err = ST_NEWLINK(hDout2,1,hEthernet,3)
IF (err <> #RSIOK) THEN
HALT
ENDIF
err = ST_NEWLINK(hDout3,1,hEthernet,4)
IF (err <> #RSIOK) THEN
HALT
ENDIF; make sine signal
UNIT_RSI = 3601
err = ST_SOURCE(hsource,0,UNIT_RSI)
IF (err <> #RSIOK) THEN
HALT
ENDIF
err = ST_SETPARAM(hsource,1,1)
IF (err <> #RSIOK) THEN
HALT
ENDIF
err = ST_SETPARAM(hsource,3,50)
IF (err <> #RSIOK) THEN
HALT
ENDIF
err = ST_NEWLINK(hsource,1,hEthernet,5)
IF (err <> #RSIOK) THEN
HALT
ENDIF
;ENDFOLD;FOLD RSI-Objects to link out of ST_Ethernet
; link RKorr to correction on path
err = ST_PATHCORR(hPath,0)
IF (err <> #RSIOK) THEN
HALT
ENDIF
err = ST_NEWLINK(hEthernet,1,hPath,1)
IF (err <> #RSIOK) THEN
HALT
ENDIF
err = ST_NEWLINK(hEthernet,2,hPath,2)
IF (err <> #RSIOK) THEN
HALT
ENDIF
err = ST_NEWLINK(hEthernet,3,hPath,3)
IF (err <> #RSIOK) THEN
HALT
ENDIF
err = ST_NEWLINK(hEthernet,4,hPath,4)
IF (err <> #RSIOK) THEN
HALT
ENDIF
err = ST_NEWLINK(hEthernet,5,hPath,5)
IF (err <> #RSIOK) THEN
HALT
ENDIF
err = ST_NEWLINK(hEthernet,6,hPath,6)
IF (err <> #RSIOK) THEN
HALT
ENDIF; DiO map to $OUT[8-24]
err = ST_MAP2DIGOUT(hMapDio,0,hEthernet,19,2,2)
IF (err <> #RSIOK) THEN
HALT
ENDIF
; show RKorr on $SEN_PREA[1-6]
err = ST_MAP2SEN_PREA(hmap,0,hEthernet,1,1)
IF (err <> #RSIOK) THEN
HALT
ENDIF
err = ST_MAP2SEN_PREA(hmap,0,hEthernet,2,2)
IF (err <> #RSIOK) THEN
HALT
ENDIF
err = ST_MAP2SEN_PREA(hmap,0,hEthernet,3,3)
IF (err <> #RSIOK) THEN
HALT
ENDIF
err = ST_MAP2SEN_PREA(hmap,0,hEthernet,4,4)
IF (err <> #RSIOK) THEN
HALT
ENDIF
err = ST_MAP2SEN_PREA(hmap,0,hEthernet,5,5)
IF (err <> #RSIOK) THEN
HALT
ENDIF
err = ST_MAP2SEN_PREA(hmap,0,hEthernet,6,6)
IF (err <> #RSIOK) THEN
HALT
ENDIF; show DiO on $SEN_PINT[1]
err = ST_MAP2SEN_PINT(hmap,0,hEthernet,19,1)
IF (err <> #RSIOK) THEN
HALT
ENDIF
;ENDFOLDerr = ST_ON1(#BASE,1)
;err = ST_ON1(#TCP,1)
;err = ST_ON1(#WORLD,1)
IF (err <> #RSIOK) THEN
HALT
ENDIF;bl=FALSE
;bl=STRTOE6POS("{X 0,Y 0,Z 0,A 0,B 0,C 0,A1 0,A2 0,A3 0,A4 0,A5 0,A6 0,E1 0,E2 0,E3 0,E4 0,E5 0,E6 0,S 0,T 0}",pose6)
;IF bl == FALSE THEN
;HALT
;ENDIFST_MOVESENS(1)
; *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=**=*=*=*=*=*=*=*=*=*=*
;ST_SKIPSENS() ;Hold on - until RSI-Break reason occur
; *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=**=*=*=*=*=*=*=*=*=*=*PTP $POS_ACT
END
The DAT file :
&ACCESS RVO
&REL 6
&PARAM TEMPLATE = C:\KRC\Roboter\Template\vorgabe
&PARAM EDITMASK = *
DEFDAT RSIEthernet
;FOLD EXTERNAL DECLARATIONS;%{PE}%MKUKATPBASIS,%CEXT,%VCOMMON,%P
;FOLD BASISTECH EXT;%{PE}%MKUKATPBASIS,%CEXT,%VEXT,%P
EXT BAS (BAS_COMMAND :IN,REAL :IN )
DECL INT SUCCESS
;ENDFOLD (BASISTECH EXT)
;FOLD USER EXT;%{E}%MKUKATPUSER,%CEXT,%VEXT,%P
;Make here your modificationsDECL RSIERR err
INT hEthernet,hmap
INT hDin,hDout1,hDout2,hDout3,hAxis,hPath,hMapDiO
INT UNIT_RSI
INT hsource
BOOL bl
E6POS pose6;ENDFOLD (USER EXT)
;ENDFOLD (EXTERNAL DECLERATIONS)
ENDDATThe RSIEthernet.xml was as bellow:
<ROOT>
<CONFIG>
<IP_NUMBER>192.0.1.2</IP_NUMBER> <!-- IP Number of the socket !-->
<PORT>6008</PORT> <!-- Port Number of the socket !-->
<PROTOCOL>TCP</PROTOCOL> <!-- TCP or UDP, Protocol of the socket !-->
<SENTYPE>ImFree</SENTYPE> <!-- The name of your system send in <Sen Type="" > !-->
<PROTOCOLLENGTH>Off</PROTOCOLLENGTH> <!-- On or Off, Send the length of data in bytes before XML data begins!-->
<ONLYSEND>FALSE</ONLYSEND> <!-- TRUE means the client don't expect a answer. Do not send anything to robot!-->
</CONFIG>
<!-- RSI Data: TYPE= "BOOL", "STRING", "LONG", "DOUBLE" !-->
<!-- INDX= "INTERNAL" switch on internal read values. Needed by DEF_...!-->
<!-- INDX= "nmb" Input/Output index of RSI-Object / Maximum of RSI Channels: 64 !-->
<!-- UNIT: The same like RSI Units, insert decimal or hex (0x......) values. !-->
<!-- HOLDON="1", set this output index of RSI Object to the last value !-->
<!-- DEF_Delay count the late packages and send it back to server !-->
<!-- DEF_Tech: .C = advance .T = main run / .C1 advance set function generator 1 !-->
<SEND>
<ELEMENTS>
<ELEMENT TAG="DEF_RIst" TYPE="DOUBLE" INDX="INTERNAL" UNIT="0" />
<ELEMENT TAG="DEF_RSol" TYPE="DOUBLE" INDX="INTERNAL" UNIT="0" />
<ELEMENT TAG="DEF_AIPos" TYPE="DOUBLE" INDX="INTERNAL" UNIT="0" />
<ELEMENT TAG="DEF_ASPos" TYPE="DOUBLE" INDX="INTERNAL" UNIT="0" />
<ELEMENT TAG="DEF_EIPos" TYPE="DOUBLE" INDX="INTERNAL" UNIT="0" />
<ELEMENT TAG="DEF_ESPos" TYPE="DOUBLE" INDX="INTERNAL" UNIT="0" />
<ELEMENT TAG="DEF_MACur" TYPE="DOUBLE" INDX="INTERNAL" UNIT="0" />
<ELEMENT TAG="DEF_MECur" TYPE="DOUBLE" INDX="INTERNAL" UNIT="0" />
<ELEMENT TAG="DEF_Delay" TYPE="LONG" INDX="INTERNAL" UNIT="0" />
<ELEMENT TAG="DEF_Tech.C1" TYPE="DOUBLE" INDX="INTERNAL" UNIT="0" />
<ELEMENT TAG="DiL" TYPE="LONG" INDX="1" UNIT="0" />
<ELEMENT TAG="Digout.o1" TYPE="BOOL" INDX="2" UNIT="0" />
<ELEMENT TAG="Digout.o2" TYPE="BOOL" INDX="3" UNIT="0" />
<ELEMENT TAG="Digout.o3" TYPE="BOOL" INDX="4" UNIT="0" />
<ELEMENT TAG="ST_Source" TYPE="DOUBLE" INDX="5" UNIT="3601" />
</ELEMENTS>
</SEND>
<RECEIVE>
<ELEMENTS>
<ELEMENT TAG="DEF_EStr" TYPE="STRING" INDX="INTERNAL" UNIT="0" />
<ELEMENT TAG="RKorr.X" TYPE="DOUBLE" INDX="1" UNIT="1" HOLDON="1" />
<ELEMENT TAG="RKorr.Y" TYPE="DOUBLE" INDX="2" UNIT="1" HOLDON="1" />
<ELEMENT TAG="RKorr.Z" TYPE="DOUBLE" INDX="3" UNIT="1" HOLDON="1" />
<ELEMENT TAG="RKorr.A" TYPE="DOUBLE" INDX="4" UNIT="0" HOLDON="1" />
<ELEMENT TAG="RKorr.B" TYPE="DOUBLE" INDX="5" UNIT="0" HOLDON="1" />
<ELEMENT TAG="RKorr.C" TYPE="DOUBLE" INDX="6" UNIT="0" HOLDON="1" />
<ELEMENT TAG="AKorr.A1" TYPE="DOUBLE" INDX="7" UNIT="0" HOLDON="0" />
<ELEMENT TAG="AKorr.A2" TYPE="DOUBLE" INDX="8" UNIT="0" HOLDON="0" />
<ELEMENT TAG="AKorr.A3" TYPE="DOUBLE" INDX="9" UNIT="0" HOLDON="0" />
<ELEMENT TAG="AKorr.A4" TYPE="DOUBLE" INDX="10" UNIT="0" HOLDON="0" />
<ELEMENT TAG="AKorr.A5" TYPE="DOUBLE" INDX="11" UNIT="0" HOLDON="0" />
<ELEMENT TAG="AKorr.A6" TYPE="DOUBLE" INDX="12" UNIT="0" HOLDON="0" />
<ELEMENT TAG="EKorr.E1" TYPE="DOUBLE" INDX="13" UNIT="0" HOLDON="0" />
<ELEMENT TAG="EKorr.E2" TYPE="DOUBLE" INDX="14" UNIT="0" HOLDON="0" />
<ELEMENT TAG="EKorr.E3" TYPE="DOUBLE" INDX="15" UNIT="0" HOLDON="0" />
<ELEMENT TAG="EKorr.E4" TYPE="DOUBLE" INDX="16" UNIT="0" HOLDON="0" />
<ELEMENT TAG="EKorr.E5" TYPE="DOUBLE" INDX="17" UNIT="0" HOLDON="0" />
<ELEMENT TAG="EKorr.E6" TYPE="DOUBLE" INDX="18" UNIT="0" HOLDON="0" />
<ELEMENT TAG="DEF_Tech.T2" TYPE="DOUBLE" INDX="INTERNAL" UNIT="0" />
<ELEMENT TAG="DiO" TYPE="LONG" INDX="19" UNIT="0" HOLDON="1" />
</ELEMENTS>
</RECEIVE>
</ROOT>The data send to the robot is in attachment.
I just can not understand that the send data was only a little different from the robot's initial data and why it was wrong data?
-
The correction values you are sending are massive.
The values for RKorr should be a correction to be applied to the current robot position; not the position you want to go to. You are basically asking the robot to move over 1000mm in a single ipo cycle. I see that you're also giving a value for both RKorr and AKorr - I really have no idea what the robot will do in this case. They are intended to be used separately.
So, the error you are getting looks to be correct. By default, for safely reasons, the POSCORR object stops the robot from accepting a value in RKorr that exceeds some small value (50mm if my memory serves).
-
The correction values you are sending are massive.The values for RKorr should be a correction to be applied to the current robot position; not the position you want to go to. You are basically asking the robot to move over 1000mm in a single ipo cycle. I see that you're also giving a value for both RKorr and AKorr - I really have no idea what the robot will do in this case. They are intended to be used separately.
So, the error you are getting looks to be correct. By default, for safely reasons, the POSCORR object stops the robot from accepting a value in RKorr that exceeds some small value (50mm if my memory serves).
Thanks for your advice! I have modified the data send to robot and only use RKorr but the error still happened.
my new code is :
Code
Display More&ACCESS RVP &REL 60 &PARAM TEMPLATE = C:\KRC\Roboter\Template\vorgabe &PARAM EDITMASK = * DEF myTestRSI( ) ;ENDFOLD ;FOLD INI ;FOLD BASISTECH INI GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( ) INTERRUPT ON 3 BAS (#INITMOV,0 ) ;ENDFOLD (BASISTECH INI) ;FOLD USER INI ;Make your modifications here ;ENDFOLD (USER INI) ;ENDFOLD (INI) ;HALT ; The current position will be used as SAK movement! PTP $POS_ACT ; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ; Create RSI Object ST_Ethernet, read object configuration .../INIT/ERXConfig.xml err = ST_ETHERNET(hEthernet,0,"RSIethernet.xml") IF (err <> #RSIOK) THEN HALT ENDIF ; err = ST_SETPARAM(hEthernet,eERXmaxLatePackages,1) ; after "value" to late packages the robot stopps ; err = ST_SETPARAM(hEthernet,eERXmaxLateInPercent,10) ; RSIWARNING if the limit reached ; err = ST_SETPARAM(hEthernet,eERXmaxFieldOfView,1000) ;reset every 'value' statistics. ; err = ST_SETPARAM(hEthernet,eERXFastCycle,1) ; FALSE: Time to answer 11ms / TRUE: Fast cycle: answer <2ms necessary! err = ST_SETPARAM(hEthernet,eERXerrorFlag,1) ; $FLAG[1] will be set in case off errors ;RSI-Objects to link out of ST_Ethernet err = ST_PATHCORR(hPath,0) IF (err <> #RSIOK) THEN HALT ENDIF err=ST_SETPARAM(hPath,1,-50) IF (err <> #RSIOK) THEN HALT ENDIF err=ST_SETPARAM(hPath,2,-50) IF (err <> #RSIOK) THEN HALT ENDIF err=ST_SETPARAM(hPath,3,-50) IF (err <> #RSIOK) THEN HALT ENDIF err=ST_SETPARAM(hPath,4,-50) IF (err <> #RSIOK) THEN HALT ENDIF err=ST_SETPARAM(hPath,5,-50) IF (err <> #RSIOK) THEN HALT ENDIF err=ST_SETPARAM(hPath,6,-50) IF (err <> #RSIOK) THEN HALT ENDIF err=ST_SETPARAM(hPath,7,50) IF (err <> #RSIOK) THEN HALT ENDIF err=ST_SETPARAM(hPath,8,50) IF (err <> #RSIOK) THEN HALT ENDIF err=ST_SETPARAM(hPath,9,50) IF (err <> #RSIOK) THEN HALT ENDIF err=ST_SETPARAM(hPath,10,50) IF (err <> #RSIOK) THEN HALT ENDIF err=ST_SETPARAM(hPath,11,50) IF (err <> #RSIOK) THEN HALT ENDIF err=ST_SETPARAM(hPath,12,50) IF (err <> #RSIOK) THEN HALT ENDIF ; link RKorr to correction on path err = ST_NEWLINK(hEthernet,1,hPath,1) IF (err <> #RSIOK) THEN HALT ENDIF err = ST_NEWLINK(hEthernet,2,hPath,2) IF (err <> #RSIOK) THEN HALT ENDIF err = ST_NEWLINK(hEthernet,3,hPath,3) IF (err <> #RSIOK) THEN HALT ENDIF err = ST_NEWLINK(hEthernet,4,hPath,4) IF (err <> #RSIOK) THEN HALT ENDIF err = ST_NEWLINK(hEthernet,5,hPath,5) IF (err <> #RSIOK) THEN HALT ENDIF err = ST_NEWLINK(hEthernet,6,hPath,6) IF (err <> #RSIOK) THEN HALT ENDIF err = ST_ON1(#BASE,1) IF (err <> #RSIOK) THEN HALT ENDIF ; *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=**=*=*=*=*=*=*=*=*=*=* ST_SKIPSENS() ;Hold on - until RSI-Break reason occur ; *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=**=*=*=*=*=*=*=*=*=*=* PTP $POS_ACT END
the error was still happened at the ST_SKIPSENS() need for help
-
what kind of error? same as before or something else? what are the correction values?
-
what kind of error? same as before or something else? what are the correction values?same as before !
This is error message: "1030 P_15 SEN:RSI execution error <execute>-RSI stopped" ? The no is 1030 and the source is P_15 .
First, when I executed the RSI code connected with external PC , the PC send data to the robot controller and the robot moved quickly as the data command but after a while ,only about 100ms , the error happened and the robot controller show the error message: "1030 P_15 SEN:RSI execution error <execute>-RSI stopped"
This is the data PC send to robot controller: only Y correction dataCode<Sen Type="ImFree"> <EStr>ERX Message! Free config!</EStr> <RKorr X="0.0000" Y="0.1000" Z="0.0000" A="0.0000" B="0.0000" C="0.0000" /> <AKorr A1="0.0000" A2="0.0000" A3="0.0000" A4="0.0000" A5="0.0000" A6="0.0000" /> <EKorr E1="0.0000" E2="0.0000" E3="0.0000" E4="0.0000" E5="0.0000" E6="0.0000" /> <Tech T21="0.00" T22="0.00" T23="0.00" T24="0.00" T25="0.00" T26="0.00" T27="0.00" T28="0.00" T29="0.00" T210="0.00" /> <DiO>125</DiO> <IPOC></IPOC> </Sen>
Thanks for any idea!
-
Can you check the packet coming from the robot. Look at the value in the <Delay> tag. If this number grows then the ST_SKIPSENS will stop
Sent from my HTC One using Tapatalk
-
Can you check the packet coming from the robot. Look at the value in the <Delay> tag. If this number grows then the ST_SKIPSENS will stopSent from my HTC One using Tapatalk
You are right !
The value in the <Delay> tag was grow form 0 to 1,2,3...9 and the error happened!
How to solve this problem? And why it happened? Actually, I never attention this tag and do not know its meaning.
This 2 attachments pic explain the <Delay> tag and the ST_ETHERNET object default value 10 lead to error?
-
Each time the robot does not receive a valid reply within the same IPO cycle it increments the Delay counter. So this means that the robot is not receiving valid replies and/or not receiving replies in time. It normally means that the reply you are sending does not match the format it is expecting or sometimes that the reply is too late. It could also be that you are not including the correct IPOC number in the reply to the robot.
The best thing that you can do is use Wireshark to log the traffic both ways, then you can look at the exact messages and their timing.
-
Each time the robot does not receive a valid reply within the same IPO cycle it increments the Delay counter. So this means that the robot is not receiving valid replies and/or not receiving replies in time. It normally means that the reply you are sending does not match the format it is expecting or sometimes that the reply is too late. It could also be that you are not including the correct IPOC number in the reply to the robot.The best thing that you can do is use Wireshark to log the traffic both ways, then you can look at the exact messages and their timing.
The IPOC number is 6ms every data interval , I tried to increased the IPOC number to 12ms every time but the robot controller show error immediately when I run the program. I think I can not set the IPOC number because its value depends on the received data form robot controller's IPOC number !
Please see the example code from KUKA C#_ServerApplication.cs below:
Code
Display More// send immediately incoming IPO counter to have a timestamp private static string mirrorIPOC(string receive, string send) { // separate IPO counter as string int startdummy = receive.IndexOf("<IPOC>")+6; int stopdummy = receive.IndexOf("</IPOC>"); string Ipocount = receive.Substring(startdummy,stopdummy-startdummy); // find the insert position startdummy = send.IndexOf("<IPOC>")+6; stopdummy = send.IndexOf("</IPOC>"); // remove the old value an insert the actualy value send = send.Remove(startdummy,stopdummy-startdummy); send = send.Insert(startdummy,Ipocount); // send back the string return send; }
I think this error may happen as the IPOC number is too small, only 6ms interval , lead to delay to error ?
I have another question form this error that is how to keep the statement to receive external data send from PC, that is the code on the robot controller only stay on ST_SKIPSENS and it how to keep waiting for receive external data if PC do not send data for a while ?At this time, I think the only thing I can do is learn the Wireshark to check the send and receive data between PC and robot controller !
-
I think you have the same problem as i have...
The C# example program which is attached to the kuka rsi is not right at all, because it is not ensured that with tcp you only get ONE package from the robot at all with every receive command...
Sometimes you get one sometimes a half one, but then you have to wait till the full package is here...
Iam trying to fix it, maybe it is hetter to get the protocoll length first and then read the length which stands there, after that you read again the protocoll length and so on....
Maybe someone has an example for that?
It is really annoying that the kuka example programm is wrong at all....
-
I think you have the same problem as i have...The C# example program which is attached to the kuka rsi is not right at all, because it is not ensured that with tcp you only get ONE package from the robot at all with every receive command...
Sometimes you get one sometimes a half one, but then you have to wait till the full package is here...
Iam trying to fix it, maybe it is hetter to get the protocoll length first and then read the length which stands there, after that you read again the protocoll length and so on....
Maybe someone has an example for that?
It is really annoying that the kuka example programm is wrong at all....
Thank you seehma !
I also fond that problem and I even modified the received data. But the error was still happened , finally I fond there were logs on the robot called rsiErrors.log and rsiAll.log. I read the error log and it repeated said like that: 25.03.14 09:50:35 Error: ERX: Defined timeout limit reached. Answer from server missed!25.03.14 09:50:35 Error: Executing object 1000000.
In the end, I know the problem is the C# example program expends too much time in sending data after the previous sending data.
Therefore, I simplify the code as much as I can to communicate with robot (that is I spend least time to continue to send data) and the robot can move well until the data exceed the max setting value and still no error happen.
So I think I solve the problem in the end!
I hope it can help you.
-
Hey,
i dont think that c# is the problem there, it is simple the tcp protocol. btw not the protocoll at all...
When i see the wireshark logs the following happens (see tcp connection establishment http://de.wikipedia.org/wiki/Transmission_Control_Protocol)
o i got from the robot the syn message
o my c# application (the socket type does this automatically sends the syn,ack back
o the robot answers with an acknoledge (len=0) and the first data packet with one and a half RSI XML Message
o then the robot sends the second data package with 1/2 and another one message so i get with the first 2 tcp packets 3 xml packets...
o then my application starts answering 4 times and so onafter about 20 packets the communication works ...
BUT not allways sometimes i see that the delay counter is rising to 10-15 and then again 0
there is a option in the kuka config file that the kuka robot sends the protocol length first and then the xml string, but in my case it does not work. Weather i have this option on or off i allways get the packets with the same size (i see this in my wireshark logs)
when this would work, you can first read the protocol length and after that exact the bytes from the length, then you are answering the robot with a right string and again you read prot length and then string with the length...
Maybe someone here can help us and say why i dont get the length from the robot!?
i have KSS 5.5.11 and RSI 2.3 running on a KRC2 ed05....iam releasing a framework (C# and matlab) to remote the robot over the RSI interface, maybe you are interested? it will be open source!
....
-
Hey,i dont think that c# is the problem there, it is simple the tcp protocol. btw not the protocoll at all...
When i see the wireshark logs the following happens (see tcp connection establishment http://de.wikipedia.org/wiki/Transmission_Control_Protocol)
o i got from the robot the syn message
o my c# application (the socket type does this automatically sends the syn,ack back
o the robot answers with an acknoledge (len=0) and the first data packet with one and a half RSI XML Message
o then the robot sends the second data package with 1/2 and another one message so i get with the first 2 tcp packets 3 xml packets...
o then my application starts answering 4 times and so onafter about 20 packets the communication works ...
BUT not allways sometimes i see that the delay counter is rising to 10-15 and then again 0
there is a option in the kuka config file that the kuka robot sends the protocol length first and then the xml string, but in my case it does not work. Weather i have this option on or off i allways get the packets with the same size (i see this in my wireshark logs)
when this would work, you can first read the protocol length and after that exact the bytes from the length, then you are answering the robot with a right string and again you read prot length and then string with the length...
Maybe someone here can help us and say why i dont get the length from the robot!?
i have KSS 5.5.11 and RSI 2.3 running on a KRC2 ed05....iam releasing a framework (C# and matlab) to remote the robot over the RSI interface, maybe you are interested? it will be open source!
....
My KSS is 5.6.10 and the RSI 2.3 running on a KRC2 and my robot is KR16-2.
Actually, sometimes my robot can work well but sometimes it run error.
And your opinion is XML data error ?
I did not used wireshark and can you give me a link about your open source ?
I hope we can discuss a lot about this error. Thank you very much !
-
as i said i did my tests with the example program of kuka and with my project... its the same effect.
When you start to communicate with the robot, the first packages do not have the right size, so when your do the Socket.Receive Command in C# you get the 1 1/2 XML Data into your Buffer, but it is not valid...The big problem is also that this example code answers the robot on any package... weather it is right or wrong...
attached you see the connection establishment between PC and robot...
i think the only right way is to read exact the bytes, the robot sends with the protocolLength attribute in the config XML in the init directory... then you allways get the right XML data and it should work from the first packet on...
-
as i said i did my tests with the example program of kuka and with my project... its the same effect.
When you start to communicate with the robot, the first packages do not have the right size, so when your do the Socket.Receive Command in C# you get the 1 1/2 XML Data into your Buffer, but it is not valid...The big problem is also that this example code answers the robot on any package... weather it is right or wrong...
attached you see the connection establishment between PC and robot...
i think the only right way is to read exact the bytes, the robot sends with the protocolLength attribute in the config XML in the init directory... then you allways get the right XML data and it should work from the first packet on...
You mean that the received data from robot from first package is not a right XML data in communication and can modify the config XML file to get the right XML data .
If it works can you tell me where is the config XML in the init directory and how to modify ?
On the other hand, I once consulted the KUKA technical staff and they said that it is common to have this problem in communication between PC and
robot and it can not avoid because the robot is a machine and it will happen this error when communicate with external device like PC.So I only try to joint the XML data from two received data and make one right XML data from them. The process is complex and has to think of many conditions (such as first receive one and half XML data then next time maybe only another half or another half with third one etc). I also used TCP/IP in PC (also send XML data to communicate) and KRL in robot to communicate with PC and robot and found this error too. Therefore in RSI communication this error happen is not surprised me.
I modified the C# example program and only used the first received XML data to get the IPOC time from robot.
Then I send XML data to robot with the IPOC time added 6ms in every send XML data. Sometimes it works well but not every time. I think maybe other problem still exist ?
-
no the thing that i mean is that TCP is allways a streaming protocoll, so it is possible that you receive more than one xml-message in the first package with the code of the kuka example. you have to buffer these bytes and send one message back after receiving the first normal xml string...
here is my project...
it is open source so you can use it, i would appreciate it that when you find errors or something like this that you either fix them or contact me that i can fix them!i hope it can help you...
if you or anyone else have any question feel free to contact me!
best regards
m.
-
Does anyone have a sample program (and the source files) that controls the robot through RSI successfully?
The sample programs in KUKA's RSI manual works fine but there are no source files -
look at this github account, its a C# dll where you can connect to the robot and drive remotely...
http://www.github.com/seehma/KMC
you only have to build your own client which uses the dll... maybe another c# programm?
when you need more info just ask!
best regards
m.
-