EthernetKRL - Connected, But No Data Transmission

  • Hello,

    I'm currently working on sending data from a server to a kuka robot with little luck getting data through. The goal is: a scanner will scan material for defect points, and the robot will receive those points using EthernetKRL. Right now the server sends the data manually (I use a setup program to send the data myself, no auto-response yet). I confirmed that the server works with my laptop, using PuTTY to connect to the same port, and manually send data over. To keep things simple I started with sending a bool, a string, an int, and a real to test the data transfer.

    So far the program I have to initialize and open a connection to the server looks fine. I also included an interrupt to wait for data to be available after it has been sent from the server. The "Alive" flag[98] turns true, letting me know the connection is made. Then I'll manually send the data from the server, but the robot program just sits there waiting for the flag to let it know that data is available. I don't get any notifications from the EKI_CHECK() instructions I put in, so I'm not sure how else to check what's gone wrong.

    I included my Get_Defects() code below. You'll notice Defects_Read[] is initialized (declared in the .dat file, so not shown here), but it isn't used yet. This is where I'll eventually be copying an array of reals once I get data transferring correctly. I also included my repairs.xml file. You'll see the real array is commented out.

    I'm very new to data transfer and how that works, as well as to kuka robots in general. I'm hoping for some ideas on what I can do/read to figure out why the data isn't transferring to the robot, but I can do it on my laptop using PuTTY. Even questions I can ask the Kuka help desk, or things I need answered about the server end. Any help would be greatly appreciated.


    Robot: KR 90 R3700K Prime C4 FLR

    Controller: KR C4 NA

    KSS: V8.3.33

    Kernel: KS V8.3.329

    EthernetKRL: Version 2.2.9

    Robot IP Address:

    Server IP Address:

    Server Port: 26000

    Laptop IP Address:

  • Place your Ad here!
  • the flag is BOOL type, not REAL

    and if you want flag to tell you that SOME message is received, you need to nest it at the right XML level.

    the way you had it, flag 100 would be set, but not when anything was sent to SCANNER_TO_ROBOT.

    it would only be set if message contains both SCANNER_TO_ROBOT and TESTVAR

    this should fix it:

                <ELEMENT Tag="SCANNER_TO_ROBOT/TESTVAR/VARREAL" Type="REAL"/> <!-- this part was not ok...-->
                <ELEMENT Tag="SCANNER_TO_ROBOT" Set_Flag="100"/>              <!-- this part was not ok...-->

    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

    Edited once, last by panic mode ().

  • Thanks Panic!

    I made the change but my $Flag[100] still isn't turning true.

    I guess that means that nothing from Scanner_To_Robot is coming through then?

    Could this have something to do with the XML configuration written in all caps, and the robot program written in lower case? I know XML files are case sensitive, but KRL isn't.

  • ... or that message structure send by server does not match XML configuration.

    that includes wrong case...

    yes KRL is not case sensitive but everything in a string (between quotation marks) must be correct case or it will be not evaluated as a match:

    "A" = 0x41 = 65

    "a" = 0x61 = 97

    and obviously they are not the same...

    Example send

    RET=EKI_SetString(XmlPC[], "KRC/CurrProgName",        EKI_KRC_CURR_PROG[])
    RET=EKI_SetBool(XmlPC[], "KRC/Ready",                 EKI_KRC_READY)
    RET=EKI_SetBool(XmlPC[], "KRC/Faulted",               EKI_KRC_FAULTED)
    RET=EKI_SetBool(XmlPC[], "KRC/Idle",                  EKI_KRC_IDLE)
    RET=EKI_SetBool(XmlPC[], "KRC/TaskInProgress",        EKI_KRC_TASK_IP)
    RET=EKI_SetBool(XmlPC[], "KRC/TaskSuccessful",        EKI_KRC_TASK_SUCCESSFUL)
    RET=EKI_SetBool(XmlPC[], "KRC/TaskFailed",            EKI_KRC_TASK_FAILED)
    RET=EKI_SetInt(XmlPC[], "KRC/Tick",                   EKI_KRC_TICK)

    Example receive

    RET=EKI_GetString(XmlPC[],"PC/Command", EKI_PC_CMD[])

    this would also work:

    rEt=EkI_GeTstRing(XmlPC[],"PC/Command", EkI_pC_CmD[])

    but this would NOT...

    RET=EKI_GetString(XmlPC[],"PC/ComMANd", EKI_PC_CMD[])

    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

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