Ethernet KRL - XmlServer program cannot start

  • Has any one got the EK-Xml successful in configuring EKI as Server?


    when I set the EKI as client and External System as Server everything works as expected but I want KRC to behave as Server where external system connects to KRC when needed.


    I tried all the possible configurations that explained in the document , when I start the XmlServer program it give error when it executes the EKI_Init method (Intrept configuration failed) error display. attached the program screenshot and Configuration file.

  • Place your Ad here!
  • I got it working by changing the port number to a range that is accepted by the KRC. I got this number from the EthernetKRL log file which can be found at C:\KRC\Roboter\Log\EthernetKRL.
    log show something like this:
    ERROR tFctCall 18:03:14.065 : Port '59152' out of bounds (54600-54615)


    I changed the port number to use inside this range 54600-54615 and it works.
    either KUKA needs to update their manual or configure the right outbound port number range while they setup the KRC PC.

  • it's terrible. you cannot really make thing work with manuals even with technican.


    we have as same configuration as yours, but we're in trouble to send integer value from PC to Robot.


    with manuals and advies we are able to send String and Bool value corrrectly from PC to Robot but not Integer and Real . in addtion we cannot watch the value on SmartHMI to get to know what we really sent is correct or not.

  • :loudly_crying_face: Envy~


    We are able to establish connection but ran into error when used GetInt instruction to read out integer value. Error msg on SmartHMI , KSS01422 Value invalid ...


    GetString, GetBool are working well. GetReal is also wroking well ...


    Could you pls advise?


    <ETHERNETKRL>

    <CONFIGURATION>
    <EXTERNAL>
    <TYPE>Client</TYPE>

    </EXTERNAL>

    <INTERNAL>
    <ENVIRONMENT>Submit</ENVIRONMENT>
    <IP>192.168.2.147</IP>
    <PORT>54600</PORT>
    <PROTOCOL>TCP</PROTOCOL>
    <ALIVE Set_Flag="1"/>

    </INTERNAL>

    </CONFIGURATION>

    <RECEIVE>
    <XML>
    <ELEMENT Tag="Robots/Command" Type="String" Set_Flag="2"/>
    <ELEMENT Tag="Robots/SensorA" Type="BOOL"/>
    <ELEMENT Tag="Robots/Integer/AState" Type="INT"/>

    </XML>

    </RECEIVE>

    <SEND>
    <XML>
    <ELEMENT Tag="RobotState/Joint/@A1" Type="REAL"/>
    <ELEMENT Tag="RobotState/Joint/@A2" Type="REAL"/>
    <ELEMENT Tag="RobotState/Joint/@A3" Type="REAL"/>
    <ELEMENT Tag="RobotState/Joint/@A4" Type="REAL"/>
    <ELEMENT Tag="RobotState/Joint/@A5" Type="REAL"/>
    <ELEMENT Tag="RobotState/Joint/@A6" Type="REAL"/>

    </XML>

    </SEND>

    </ETHERNETKRL>


    ********************************************************

    RET = EKI_GetString("xmls", "Robots/Command", RobCmd[])

    MsgNotify(RobCmd[]) ;show msg on PAD

    RET = EKI_GetBool("xmls", "Robots/SensorA", SenA)

    IF SenA==TRUE THEN

    MsgNotify("SenA == TRUE") ;show msg on PAD

    ENDIF

    ;RET = EKI_GetReal("xmls", "Robots/XPos", XPos)

    ;RET = EKI_GetReal("xmls", "Robots/YPos", YPos)

    ;RET = EKI_GetReal("xmls", "Robots/RotationA", RotationA)

    RET = EKI_GetInt("xmls", "Robots/Integer/AState", PickMotion)

  • you mentioned "KSS01422 Value invalid".


    This shows up when one tries to assign value to some variable from something (variable or function) that does not have the value or the value is invalid (just like stated by the message). So i am pretty sure that your program (not shown) was:

    a) running in a loop (no flow control, repeated access to buffer)

    b) not using notifications that something was received

    c) trying to read from buffer blindly, without checking if the data is really available


    All of those are recipes for disaster as you have already found out.

    Manual could be better but actually it covers a lot.


    Things to check:


    what is the EXACT content of the message that your client is sending to the server? did you send it and does it contain XML wrapper that matches your configuration? Any spelling mistakes? i see that you use paths of different length. this makes it easier to make a mistake and it is slower to process. if there is a typo, element would appear empty and that would explain above message


    WHEN do you try to read element? how do you know that something is actually received? i do not see notification flag in your configuration.


    did you implement any sort of flow control? if your clients sends message ONCE you can only read it ONCE. so if you are reading continuously (in a loop), program will of course crash... because when you read some element (by using GetInt or GetReal etc.) you are not just reading the element - you are also removing THAT element from the buffer. so if you try to read again, it will fail - unless when your client has sent the next message (at the right time).

    you need to make sure your data stream is in good order - your program has to be written to manage this. if left unchecked your program will fail:


    if messages are arriving at pace slower than your ability to process them - your connection will fail as soon as one element is not received (just as you are experiencing now).


    if messages are arriving at pace faster than your ability to process them - your connection will also fail when buffer overflows. all received messages end up in the buffer and if you receive more than you can process, buffer will start to swell. so by making buffer longer, you can delay inevitable but still - it will crash pretty soon even with buffer size set to a maximum.


    if you are receiving only occasional message or they are sparse (not all elements are populated all the time), you must check each element individually if the value you want to parse is actually received. only THEN try using corresponding function like GetInt(), GetReal() etc.


    if nothing is there (0 elements received), just skip it and check again in the next pass. this way your client can breathe without server failing.


    if there are many elements received you need to do some sort of managment to prevent buffer overlow. for exampe you could blck receiving when buffer is full. then process all messages in the buffer (or dump the buffer content) and then re-enable receiving again.



    btw. all of this is explained in the manual.

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • Try the following code from my running System and as Panic Mode wrote, it must not run endlessly in a loop.


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now

Advertising from our partners