Posts by Daniil1994

    Hi Danii
    I am going to work on a project involving simple communication between the KRC and a PC/Laptop. The configuration we are going to use is KRC as server and PC as client. Data exchange will be binary. Is there any update on your project and is there anything that I must look out for?

    We are using xml data exchange option. Much much simpler, because xml allows to parse data with ease, for both, KRC and external PC. Of course it depends on amount and type of data you would like to send/receive. So SkyeFire asked right questions!

    On which axis? It would be helpful to have the exact error message and error code number. Along with KSS version. What does the motion look like physically? What are the axes doing? Does the robot actually hit the axis limit physically, or is this error popping up predictively?

    1. 6-th axis

    2. Standard Workspace error message about reaching software limit switch on the way to "point".
    3. Yeah, robot hit the axis limit physically. Which mean that I have chosen wrong S and T for begging of movement.


    If it's A4 or A6, that implies you're going through a singularity and over-rotating the wrist. Your best way to avoid this might be to change your EOAT mounting so that your path doesn't move A5 near 0.

    Yeah, you are totally right here. Before using SPLINES I tried to use LIN but I had problems with dynamic limits when robot was moving A5 close to 0. So I have switched to SPLINES.

    Unfortunately, I am unable to adjust the mounting angle of the tool, as it needs to operate across a wide range of base Z levels. If I were to install an additional console that creates an angle between the 6th axis flange plane and the tool plane, there would be a Z level that would cause A5 to take a complementary angle to the console angle.

    I'll try to work out ON_ERROR_PROCEED, $cp_statmon and INVERSE solutions.
    By the way, do INVERSE calculation stop advance run pointer?


    I have faced situation when robot stopped and reported for "software limit reach" during SPLINE motion.
    Some facts about motion I ask robot to perform:
    1. It's quite long (~3000mm) almost straight motion. Motion can consist of 1-5 segments, depending on the required complexity of path.

    2. First point if motion is always PTP (with defined S and T). Due to motion nature, the selection of S and T parameters depends on the Z coordinate of the base (essentially, the height of the base), and the movements are performed relative to this base. So, like, from particular Z of base we are changing from 2 43 to 6 59.

    3. For single segment motion single SLIN used, for larger amount of segments combination of SLIN-SPL (SPL here makes transitions between SLIN more smooth) are used. Any amount of segments are packed into SPLINE in code. For example:

    4. Amount of segments is always different. As well as positions of each point (coordinates are calculated externally and sent to robot):

    • X coordinate changes along mentioned 3000mm
    • Amplitude of the possible change in the Z coordinate is 150mm
    • Angle B can vary from -5 to 5 degrees
    • A,C and Y are constant

    Single segment motion coordinates example:

    LINE_SCAN_POINTS[1]={X -115.000,Y 2003.44,Z -529.840,A -90.0000,B 2.58000,C 0.0,S 2,T 43}
    LINE_SCAN_POINTS[2]={X 3130.00,Y 2003.44,Z -607.700,A -90.0000,B 2.58000,C 0.0,S 2,T 43}

    Are there an option to check the possibility of executing a SPLINE motion before performing it? Or, may be, force robot to do additional checks during SPLINE planning, so it can report that there will be a problem?

    That's probably what you'll have to do. There's no way to check the entire path, but you can calculate an arbitrary number of points along that path at whatever spacing you wish. It's just a matter of how many loops of the calculation you want to run -- trying to check a 1m linear path at 0.01mm resolution would probably take the processor quite a few seconds.

    I have checked points with 100mm step, so step was not small enough, got it. INVERSE function can accept a point as starting position parameter. So, to properly check whole path with artificial points I shall use previous points as starting point for next check?
    Time doesn't matter, if it will take hours, I'll hold safety button on teach pendant the hole time ;)

    Is it possible to verify that robot can do linear movement before starting movement itself?

    Starting point is given as POS structure (with defined Status and Turn), end point as POS structure without defined Status and Turn (as I understand going from point to point using LIN or SLIN ignores endpoint Status and Turn trying to keep trajectory and speed along movement). Required trajectory is straight line between start and end points.

    I have tried to check start, end and some artificial points between them using INVERSE function, but ability to reach all this point on trajectory do not ensure that robot can do linear movement described by checked points.

    I'm pretty sure that parallel connections require separate ports for deconfliction.

    Also, in my experience (which is a few versions old now), opening and closing connections rapidly tends to cause errors. You might be better off creating some persistent connections and simply use some error trapping to delete and re-open the connection if/when there's a failure.

    I found a problem. Was not related to software part at all, a switch I used to create LAN network was guilty. So, now I can create up to 16 simultaneous connections as it stated in documentation.

    SkyeFire, how error trapping can be implemented? Through EKI_STATUS value control?


    If i recall correctly Ethernet KRL allows only one server (on the robot side). But in your case server is external, so robot is acting as client. That means (as long as your server support it) you can create several connection to it, either from same or from different robots.

    I'm using src modules to test things first, so sub modules were mentioned to give explanation of planned end system. I have written simple src module which tries to create two simultaneous connections from robot to server. Server is 100% capable to work with multiple connection form single client. Here is src module code:

    Here is "Call_to_server1.xml" internals:

    The difference between "Call_to_server1" and "Call_to_server2" are receive flag number (1 or 2) and different names for input and output buffers (with indices 1 or 2). External configuration contains right server connection parameters and they are the same for both configuration files.

    Considering basics of TCP\IP protocol, a connection or "socket" on server side is defined by combination of "Server IP, Server Port, Client IP, Client Port". So any other connection to the same server will have ether different Client IP or Client Port. The Client IP will be the same coz we are connection from the same robot. According to EthernetKRL documentation, we do not have access to port choice if KLI is acting as client, so, I suppose EthernetKRL package manages ports itself. So, in theory, my test program must work. But code gives EKI00023 error at line:


    what means that - "The Ethernet connection has already been initialized with the function EKI_Init()." And documentation advices me to close active connection before creating new....

    Either, I'm doing something wrong, or it is not possible to make several simultaneous connections from single robot to the same server, even if documentation states it is possible.


    I'm working on a project where it's necessary to communicate between Main Control Unit (Just a PC) and KUKA KRC4. For that, Ethernet KRL 2.2 (for KRC4 8.3) package was chosen. Provided EthernetKRL documentation is quite brief, but enough to understand and ensure basic communication.

    My task involves quite intensive communication where MCU acts as server and robot as client. Lets say I have 10 different queries, some of them use binary stream, some XML data option. I use binary stream when robot asks server about some information\data availability (and server request: yes or no). If data\information is available robot reconnects with different configuration file and receives data as XML structure. The difficulty lies in the fact that some requests must occur in parallel, independent of each other, because the requests calls happen in different submits (yeah, multisubmit module). Right now, this system is implemented in the following way -> I have separate sub ("Networking_manager.sub" ;)) which cycles all possible request, checks if this particular type of request is active (they can be activated from different subs), and if it is -> creates connection with proper configuration file, sends request, receives answer from server -> deactivates request ->move to next request type. So, robot constantly bombards the server with requests. Some times it works, but sometimes I receive errors about lost connection. Even if every RET variable returns 0 as result. And so, based on all the information above:

    1. Is it possible to create multiple simultaneous connections from robot to server with EthernetKRL? This would solve the problem like a charm. Documentation states ("...The number of active connections is limited to 16."), but I didn't managed to test is successfully.

    2. In my mind, there is another implementation option. Just make large single request which will contain all smaller requests with their status (active\inactive) and all "answer" data. So robot and MCU can just ping pong this single large data butch, changing necessary parts of it to communicate. Is it good option from your opinion?

    3. How would you implement such communication with Ethernet KRL?

    Thanks in advance!

    I have robot with camera attached to robot endeffector. Camera can accept 24v external triggers to grab images. Cameras line input is connected one of the terminals of Beckhoff EL2809 module, this output is linked to robot output signal. A task requires robot to move from point to point with LIN movement (~3210mm long path) triggering camera output every 30mm. During program robot makes 3 movements by 3210 mm so total impulse count must be 321. Triggering logic is located in sps.sub and works in a following way:

        CHECK_X = Start_Pos.X + (Scan_Index*Scan_Offset);scan offset=30
            PULSE (TAKE_PHOTO, TRUE, 0.005)
            Scan_Index = Scan_Index + 1

    Everything works perfectly until robot's speed is set to higher then 1m/s. The higher is speed the more triggers are missed (interesting effect - at 1.9m/s robot generated less impulses then at 2m/s):

    Robot speed0.
    Impulses received3213213213213213062231601268793
    Required impulse frequency Hz (calculated)1016.623.33033.336.643.35056.663.366.6

    1) What can be a cause for this effect? SPS.sub cycle time? EL2809 D-Ouput module operation speed (datasheet states that module switching time: typ. TON: 60 µs, typ. TOFF: 300 µs)?

    2) Are there better way to do the task without adding additional software packages to kuka?
    3) What additional package can help to overcome the "speed" problem? KUKA RSI may be?


    So, the task is trivial: send some data (points coordinates) from external system to KUKA. so, the first idea is to create txt file in ROBOTER\UserFiles\ and share this folder. External system will access it through LAN cable connected to KLI connector, KUKA will access it through CWRITE command channel $FCT_CALL functions. To test this solution I used my work Win10 laptop with installed WorkVisual, and everything was working.

    But actual planned external system - RPi4. Here I faced with problem - provide connection between RPi and KUKA. Straight LAN connection with LAN cable (RPi - KUKA KLI) doesn't work, even lan ports leds are not blinking (the cable itself is ok). The RPi had the same network settings as my laptop.

    I lack knowledge to understand the problem source. The KUKA doesn't like Linux? Is it necessary have special drivers installed to connect to a KLI? Maybe my approach is fundamentally wrong and won't work? And buying an EthernetKRL module is a more reliable option to ensure such a connection?

    Thank you in advance!