EKI, Server Mode, and Ping

  • Ran into something interesting. I've recently spent some time on a KRC4 (KSS 8.5) that uses EKI 3.0.3 to communicate with a "streaming" data system. The unique (for me) parts of this setup were that the protocol was UDP, and the robot was acting as a server, not a client. All the communications were being handled from inside the SPS, as well.


    One of the issues I was asked to fix was that the "Alive" flag would not go False if the KLI cable was disconnected. The Channel XML file had no Ping setting, so I added one with a short delay, but that had an odd side effect: the Alive flag would never go True when I executed an EKI_OPEN. If I removed the Ping setting from the Channel file, everything worked as expected.


    The EKI manual includes very little detail about the Ping, but if I had to guess, I'd say that Server mode and Ping interact negatively. Or, there's a trick to using them together that I haven't figured out.


    I solved the problem by removing the Ping, and setting up an SPS element that monitors the Received flag and throws a fault if that flag doesn't change state for a few seconds. Since the remote system is sending data several times per second, this appears to work as intended so far. But I found the Server/Ping interaction curious enough to mention it (and hopefully help the next poor soul who encounters this).


    Sadly, I don't have any more time with this robot to really dig in and experiment:loudly_crying_face:

  • Hi SkyeFire,

    I had the same problem last week and it cost me hours to figure out the Ping problem. I wish I had read your post earlier. I used different intervals but I could not find the fault. I had to completely remove it to get the system function again. Does anyone know how the Ping option work with EKI, or is there any material I can read to find out?

  • i recall same issues.... unplugging cable wrecks it, ALIVE flag remains on for way too long.

    using short PING interval (200ms for example) seem to be used to update ALIVE if connection is possible, but unplugging cable goes back to 15sec timeout.

    so ALIVE is only useful to tell if ok to read/write data to an EKI channel... but it is not able to tell if remote side is really reachable.

    so as a workaround i used counter incrementing it on each send. this clearly tells on receiving side if the data link is working.

    same is done in reverse and watchdog timers are used to really detect connection loss. i wish this was handled by EKI.

    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

Advertising from our partners