Posts by lionpeloux

    Still struggling with this ...
    Now I want to have a softkey with the following label : "Butée >|". "|" is a valid ASCII character.

    The "|" character is not displayed and leads to a blank softkey (kicking out the last softkey I defined). Escaping like this "Butée >/|" does not work either.

    EDIT : the syntax "/|" seems to be reserved for parametrized output ...


    In the case of parameterized outputs, the parameters must be tagged on to the key, separated by the characters "/|". The translated text and the parameters are then combined in the language database.

    Any idea to achieve this ?


    KRC2, KR5002MT, KSS5.6

    I would like to get the total number of blocks in a given src program. Is that possible ? I could not find a system variable to get this information. I can use $PRO_IP to know where the pointer currently is in the program, but my goal is to get an estimation of when the program should finish ... Is there another option to evaluate the progression of a running program ?


    Lots of people are complaining (understandably) about the quality of the documentation provided by KUKA to its customers.
    Indeed we are often left with a bunch of crappy PDF documents, sometimes outdated, sometimes incorrect, sometimes incomplete ...
    For a billion dollar company it is quite unfair (personal opinion !).

    This forum is a great source of help for many of us, me included. There has been some attempts to propose here more structured documentation (see…rl-undocumented-features/). But the layout of a forum is not really adapted to this need.

    So I have been working on a website for that. The source code is open to every one on github and I am looking forward
    for comments, suggestions and hopefully for skilled peoples wishing to get involved and to collaborate through the github repo.


    I've recently been using KukavarProxy successfully. I don't know anything about Ethernet KRL though...

    I've provided a revised version of KukavarProxy (9.0) you can find here :

    I'm also working on a client (windows only) that is yet quite capable. Have a look to the dev branch if you are familiar with C# :

    I am planning to provide a first release of this client before July hopefully.

    Well, I did check this manual several times but could not sort this out myself.
    I've tested several format options but could not display a KRL message translating 10 to `B1010` for instance.

    So I ended up with a custom function with bit per bit testing :

    I would still be interested by a solution with SWRITE and %r format if someone is able to manage this !


    KRC2, KSS5.6, KR5002MT + track KL1500-3 + turntable

    I've been successfully using UserTech KFD files to get custom menus. However, I have an error when trying to write (with a script) to a STRING (CHAR[]) field of a custom STRUC.

    This is how my STRUC is defined :

    DEFDAT MdiManager PUBLIC
    	DECL GLOBAL MDIACTION_T requestedAction = {ID 0, Module[] " "}

    I can change the ID (INT) field by mean of this script :

    	SETVAR(FULLPATH[] "requestedAction.ID", VALUE[] "2001")

    But neither of these script will work on the field Module[] (String) :

    	SETVAR(FULLPATH[] "requestedAction.Module[]", VALUE[] "CELL")
    	SETVAR(FULLPATH[] "requestedAction.Module", VALUE[] "CELL")
    	SETVAR(FULLPATH[] "MdiManager/requestedAction.Module[]", VALUE[] "CELL")

    So my question are :

      • Is it possible to set string fields through SETVAR in KFD scripts ?

      • What is the proper syntax for FULLPATH[] ? Is it documented somewhere ?


    Ok, thanks.

    I've cloned the system and did .Net 2.0 > 3.0 > 3.5 > 4.0 updates with a restart after each.
    Apparently It worked. Will see in the next days if it truly allright.

    Regarding your remark, I've been digging into my idea of rewritting KukavarProxy to a more general KukacrossProxy that will exposes CrossComm interface to remote clients.

    I feel far more comfortable with C# so It is why I am going to stick with it. They are quite good networking libraries for that (ZeroMQ).


    I've recently been working with / collaborating to KukavarProxy. The code has been kindly released on github by IMST : and you can find an updated release on the repo (9.0.0) with few bug fixes & english translation I've submitted.

    On the other side, I'm working on a C# client library (.Net Standard) that I'm planning to release opensource in few weeks. It will allow to easily send read/write requests to kukavarproxy via C#.

    My question is about updating .Net Framework on KRC2 (WinXP embedded) or KRC4 (Win7 embedded). I would like to port KukavarProxy to C# but at the moment I am stuck with the old-old .Net 2.0 framework on my KRC2. I would rather go with at least .Net 3.5.

    Does anybody have ever tried to upgrade the .Net framework installed on a KRC2 ? To which version ? 3.5 ? 4.0 ?
    Is it safe ? Should I clone my current system with Clonezilla before doing this ?


    KRC2, KSS5.6, KR5002MT + track KL1500-3 + turntable

    I am working on a small utility to automate the milling of revolved parts.
    For this, I am using Rhino & Grasshopper, a CAD software with scripting capabilities.
    There, I just have to manually draw the part profile and the script will automatically generate the KRL program.

    I have identified 2 strategies :
    [list type=decimal]

    • Kinematic Coupling of the turntable (rotated $BASE with Bas.EK()) : create a segmented spiral and follow it all over the part (the part will be faceted but I can make the discretization small enough).

    • Kinematic Uncoupling of the turntable (fixed $BASE) : follow the profile from top to bottom while rotating the table (part will NOT be faceted).

    My questions are about speed control.

    My goal is to achieve constant radial speed of the TCP relative to the material (at about 2000mm/min). With strategy 2 I can control control & adapt the radial velocity by controlling the linear speed of the TCP along the profile curve, knowing the radius of my part at each point on the profile curve.

    => In general, in which base $VEL.CP is to be understand ? Is it $WORLD or $BASE ? In the latter case, will it mean that kinematic coupling of the turntable will be taken into account in the computation of the TCP linear speed, like in strategy 1?

    => I could not even find a way to ask the turntable to rotate a full turn at 5°/s for instance. There is no equivalent of $VEL.ORI for external axis right ? How should I proceed ?

    LIN_REL {E6POS : E2 360} ; which velocity ?

    This code is from WOP 6.0 (Way of Programming by Kuka France).
    I have to dig more into this "heartbeat" sort of timer that I don't yet fully understand.

    I was not aware of this point :


    The trick to the Pulse command is that, if you use it on a signal that is already in the commanded state, the signal will "invert" at the end of the Pulse duration time

    Could you confirm this behavior ? Is there any documentation where this is explained ? I couldn't find anything about this point in the expert programming manual ... but the documentation is often rather obscure !

    Thanks again for your kind help


    KRC2, KSS5.6, KR5002MT

    How do you advise to interact, at the KCP, to ask the user to make a choice or action : #waiting messages ? Dialog messages ?

    In my case I'm launching "actions" (predefined programs) from softkeys via UserTech / KFD. Each action can run only in a given $Mode_OP (T1, T2, AUT). When the action is launched and while the action is running, I need to check the current $MODE_OP. It the current mode is not the one that is required by the action to run, then I want to halt the program and ask the user to change the mode (through an interrupt). The execution is resumed when the selected mode is the one required by the action to run ... or the program is aborted.

    I can either :

      • Halt the program and display a #WAITING msg to ask the user to select the right mode. While waiting, I can monitor $MODE_OP and automatically clear the msg if it changes to the right mode. I the user "simulate" the message but $MODE_OP is still invalid I abort the program

      • Do basically the same thing but through a dialog message ...

    Any preferences you would advise ?

    I'm trying to understand the following statements (see code below). I believe this is related to the fact that interrupts are edge triggered as you told me but I might be wrong.
    What is the purpose of those PULSE statements ? I suppose it is, somehow, a way to arm/rearm the triggering.

    Why in the INIT section O_Flag_MoveEnable=FALSE is followed immediately by a PULSE (O_Flag_MoveEnable,FALSE,0.2 ) ? It is yet set to FALSE no ?
    Why in the MoveEnable_Management(1) subroutine the PULSE is not LOW to "rearm" the interrupt trigger after returning to the main program ?

    [list type=decimal]

    • O_Flag_MoveEnable = false at INIT

    • if O_Flag_MoveEnable goes to true at some point interrupt 97 gets triggered and throws MoveEnable_Management (1)

    • Then MoveEnable_Management (1) issues a PULSE (O_Flag_MoveEnable,TRUE,0.05 ) (case 1)


    Init function of systemcellmanagesps.sub (WOP 6) :

      ;FOLD Init + Interruptions for management MOVE ENABLE
      PULSE (O_Flag_MoveEnable,FALSE,0.2 )
      GLOBAL INTERRUPT DECL 97 WHEN O_Flag_MoveEnable DO MoveEnable_Management (1 )
      GLOBAL INTERRUPT DECL 98 WHEN NOT O_Flag_MoveEnable DO MoveEnable_Management (2 )

    And the subroutine :


    KSS5.6, KRC2, KR5002MT

    I'm having a hard time to understand why one of my interrupt is not triggered.
    It seams to me that when I activate my interrupt, if the triggering condition is already satisfied then the interrupt will never get triggered.

    Just a word about the context :

      • I am launching "actions" from the KCP through a set of softkeys (UserTech / KFD).

      • An action is launched by the SPS through CWRITE($CMD, state, mode, "RUN R1\mdi()").

      • Each action as an ID (eg. action.ID = 101), used to run the corresponding code through a switch condition.

      • Each action is valid for a given set of modes (eg. action.ValidModeOP = 'B0011' = EX|AUT|T2|T1 means the action can execute only in T1, T2 modes)

    I want to listen to $MODE_OP changes in the program to ensure that when an action is launched, it won't be executed in a non valid mode. If the user changes the mode to an unauthorized mode for the running action, the interrupt must be triggered, inform the user he must change back the mode to a valid mode or the program will be automatically canceled by the SPS through CWRITE($CMD, state, mode, "CANCEL 1").

    The SPS is responsible for cyclically checking if $MODE_OP is valid for the running action. $FLAG[99] is set to true if the mode is invalid, and false otherwise.
    Then, In my program, I must respond to $FLAG[99]==true with an interrupt.

    My problem arises when I launch an action with a yet invalid $MODE_OP, that is $FLAG[99] is true at the very beginning of the program. I have set up the following MWE to test and understand my problem :

    In the SPS loop, set $FLAG[99] = true when any program is launched :

        $FLAG[99] = true
        $FLAG[99] = false

    Then start this test src program :

    The interruption is working properly if I reverse $FLAG[99] just after activating the interrupt (ON 9). If I comment this line, the interrupt never gets triggered.

    $FLAG[99] = false                  ; comment this line > interrupt does not occur

    How would you explain that ? What I do not understand ?

    Thanks for your kind help,

    Oh gosh, you're right !

    Constant velocity on the circle means constant inward acceleration (perp to the path).
    But constant velocity on the line means null acceleration.

    So there is actually a jump in (perpendicular) acceleration at the tangency point and the only way to blend acceleration continuously while staying true to the path is to stop at the tangency point.

    What sort of blend is using the KRC ? Is this a kind of clothoid ?

    See :


    KRC2, KSS5.6, KR5002MT

    I am struggling with this (very) simple programme :

    LIN P1
    	LIN_REL P2
    	CIRC_REL P3, P4
    	LIN_REL P5
    	LIN P1

    P1, P2, P3, P4, P5 define a rectangle with a rounded edge (P2, P3, P4). See the attached figure.

    I am not able to find a way to make the robot follow this path exactly so it does not mark a stop in P2 and P4 (LIN-CIRC junctions).
    I know I can use the same set of instruction with C_DIS ($ADVANCE >= 1) and the bigger $APO.CDIS is the smoother the trajectory will be.
    But to have a smooth trajectory I need a quite big $APO.CDIS (around 50mm for a = 250mm) which is not desirable in my case.

    I would like to follow the exact path between P1>P2>P3>P4>P5 at constant velocity, which is physically possible because of tangency between LIN and CIRC. Is that possible for the robot ?

    Even more simple, what if I have three points P1, P2, P3, aligned. Will the robot always mark a stop in P2 if I write the following program and dont use C_DIS ?

    LIN P1
    LIN P2 ; robot mark a stop ?
    LIN P3


    I'm rewriting a TP on a cell (KSS5.6, KRC2). At the moment messages are managed through a WOP package which has a dedicated message database called MessAppli.db in C:/DATA.
    However, I would prefer to manage the messages independently from the WOP and hard code my messages in a dedicated .dat file, in some kind of CHAR array. Or alternatively to have my own database.

    My first question is :

    Has my system is in french I need do display my messages in french. But .dat files are automatically transcoded to us-ascii when they are copied to /KRC/R1. Thus, I can't display properly my messages with special or accentuated characters from a CHAR[] variables such as :

    DELC CHAR myMessage[100] = "ééèèoùùàààl'l'l'"

    Apparently KRL can understand hexa coding inside a char array with the syntax :

    DELC CHAR myMessage[100] = "this a message with an 'H0E' inside"

    So is there a way to know the correspondance between special/accentuated characters and the corresponding hexa code (for instance : "à" => 'HXXX') ?

    My seconde question is :

    As I said previously, The actual way of doing this is through a message database, in my case named C:/DATA/MessAppli.mdb. This database has mainly two tables, the first is ITEM {keystring, keyid} and the second is MESSAGES {keyid, langid, message}. Thus, for a certain keystring i can display a message in a given language.

    When I call Set_KrlMsg (#NOTIFY, msg, msgParams[], msgOptions), if msg.MSG_TXT[] corresponds to a keystring that is actually present in MessAppli.mdb I will display the corresponding message string from the DB. Otherwise, I will simply display the content of MSG_TXT[]. Internally, Set_KrlMsg takes care of the encoding problem I am facing.

    So my question is what is the process to create my own independant DB and how can I tell the system to search in this database when calling Set_KrlMsg ? Is this just a matter of adding a regex key somewhere ? Is it more complicated ?

Advertising from our partners