Kuka (possibly) complete list of functions and subprograms

  • Hi everybody,


    Here is what I *think* is a complete list of all functions and subprograms defined by Kuka, even the hidden ones. As you will see, some have a German comment attached to it. A quick google translate could help understanding them. I've done a tool in order to do that automatically for you and I am about to give it to the community (I will put it in the "Manuals, Software and Tools for KUKA Robots" section when done). The tool is a simple executable file that you run on the controller. It searches and gives the complete list for a given controller in HTML format. I will try to add system variables when I will have the time. A lot of them (functions/subs) are already known, but some of them seems pretty new to me. Here is a sample output:


    Kuka Subprograms and Functions List (V5.5)



      • (function) BOOL GETSYSSTATE (CHAR CMD[64]:IN, INT IPAR:OUT, REAL RPAR:OUT) ;Funktion gibt den Status des Systems zurück

      • (function) BOOL IS_KEY_PRESSED (INT KEY:IN) ;TRUE, wenn entsprechende Taste auf KCP gedrueckt ist

      • (function) CHAR[470] GETCYCDEF(INT INDEX:IN)[/i]

      • (function) CHAR[80] GET_DECL_PLACE(CHAR VARNAME[80] :IN) ;Funktion liefert den Deklarationsort

      • (function) INT PIDTOHD(INT ABSACCURFLAG :IN) ;Pid File von RDW auf Festplatte (IR_SPEC Verzeichnis) speichern

      • (function) INT CHECKPIDONRDC() ;Befindet sich ein Pid File auf der RDW

      • (function) INT PIDTORDC(CHAR STRVAR[470] :IN) ;Pid File auf RDW abspeichern

      • (function) RW_MAM_FILE SET_MAM_ON_HD(E6AXIS VALUES:IN) ; Individuelle MAMES-Werte auf HD speichern

      • (function) RW_MAM_FILE COPY_MAM_HD_TO_RDC() ; kopiere mam-File von HD auf RDW

      • (function) RW_MAM_FILE COPY_MAM_RDC_TO_HD() ; kopiere mam-File von RDW auf HD

      • (function) RW_MAM_FILE CHECK_MAM_ON_RDC() ; pruefe individuelle MAMES-Offsets auf RDW

      • (subprogram) ERR_CLEAR (ERROR_T PERR :OUT) ; Loescht KRL-$Err-Variable

      • (subprogram) ERR_RAISE (ERROR_T PERR :OUT) ; Verursacht einen definierten Interpreter-Laufzeitfehler

      • (function) REAL ABS (REAL X :IN)[/i]

      • (function) REAL SQRT (REAL X :IN)[/i]

      • (function) REAL SIN (REAL X :IN)[/i]

      • (function) REAL COS (REAL X :IN)[/i]

      • (function) REAL TAN (REAL X :IN)[/i]

      • (function) REAL ACOS (REAL X :IN)[/i]

      • (function) REAL ATAN2 (REAL X :IN, REAL Y :IN)[/i]

      • (function) INT MBX_REC (INT MBX_ID :IN,STOPMESS MESS :OUT)[/i]

      • (function) FRAME TOOL_ADJ (FRAME X)[/i]

      • (function) FRAME EK (FRAME TKRWE :IN,ESYS EXKIN :IN,FRAME TBAFL :IN) ;KINEMATIKZUWEISUNG

      • (function) FRAME LK(FRAME ROOT:IN,CHAR IP_ADDR[15]:IN,FRAME OFFSET:IN,ESYS EXKIN:IN) ;gelinkte Kinematik

      • (function) E6AXIS INVERSE (E6POS TOOLPOS :IN, E6AXIS START_AXIS :IN, INT STATUS :OUT)[/i]

      • (function) E6POS FORWARD (E6AXIS AXVAL :IN, INT STATUS :OUT)[/i]

      • (function) E6POS INV_POS (E6POS POS_VALUES :IN)[/i]

      • (function) INT IOCTL (INT DRVID :IN, INT REQUEST :IN, INT ARGUMENT :IN)[/i]

      • (function) INT CIOCTL (INT HANDLE :IN, INT REQUEST:IN, INT ARGUMENT :IN, CHAR PARAM[128] :IN, INT RETVAL :OUT) ;ioCtl fuer Kanaele

      • (function) INT SYNC()[/i]

      • (function) VAR_STATE VARSTATE ( CHAR VAR_STR [80] :IN )[/i]

      • (function) INT EXECFUNC ( CHAR FNAME[16]:OUT, INT IPAR[32]:OUT, REAL RPAR[32]:OUT, CHAR MSG[80]:OUT )[/i]

      • (function) BOOL WSPACEGIVE (INT SPACEID :IN) ;FREE A WORKSPACE

      • (function) BOOL WSPACETAKE (INT SPACEID :IN, INT ADVANCE :IN) ;BLOCK A WORKSPACE

      • (subprogram) SYNCCMD (SYNCTYPE SYNC_T:IN,CHAR ID_NAME[64]:IN,INT COOP_LIST:IN)[/i]

      • (function) RET_C_PSYNC_E CANCELPROGSYNC (CANCEL_PSYNC_E CMD:IN,CHAR ID_NAME[64]:IN)[/i]

      • (function) BOOL REMOTECMD (CHAR IP_ADDR[15]:IN,CHAR CMD[128]:IN)[/i]

      • (function) CHAR[256] REMOTEREAD(CHAR IP_ADDR[15] :IN, CHAR VARIABLE[128] :IN, INT ERROR :OUT) ; Lesen eines Variablenwertes auf einer externen Steuerung

      • (function) INT STRLEN (CHAR STRVAR[470]:IN)[/i]

      • (function) INT STRDECLLEN (CHAR STRVAR[470]:OUT)[/i]

      • (function) BOOL STRCLEAR (CHAR STRVAR[470]:OUT)[/i]

      • (function) INT STRADD (CHAR STRDEST[470]:OUT, CHAR STRTOADD[470]:IN)[/i]

      • (function) INT STRFIND (INT STARTAT:IN, CHAR STRVAR[470]:IN, CHAR STRFIND[470] :IN, CASE_SENSE_T CASE_MODE:IN)[/i]

      • (function) BOOL STRCOMP (CHAR STRCOMP[470]:IN, CHAR STRCOMP2[470]:IN, CASE_SENSE_T CASE_MODE:IN)[/i]

      • (function) BOOL STRCOPY (CHAR STRDEST[470]:OUT, CHAR STRSOURCE[470]:IN)[/i]

      • (function) BOOL ISMESSAGESET (INT MESSAGENO:IN)[/i]

      • (function) BOOL TIMER_LIMIT (REAL SECONDS:IN)[/i]

      • (function) INT SET_KRLMSG (EKRLMSGTYPE TYPE:IN, KRLMSG_T MSG:OUT,KRLMSGPAR_T PAR[3]:OUT, KRLMSGOPT_T OPT:OUT) ;Setzen einer KRL-Meldung

      • (function) BOOL EXISTS_KRLMSG (INT NHANDLE:IN) ; Meldungs handle auf Existenz pruefen

      • (function) BOOL CLEAR_KRLMSG (INT NHANDLE:IN) ;Loescht eine KRL-Anwendermeldung

      • (function) INT SET_KRLDLG (KRLMSG_T MSG:OUT,KRLMSGPAR_T PAR[3]:OUT, KRLMSGDLGSK_T SK[7]:OUT, KRLMSGOPT_T OPT:OUT) ;Setzt einen KRL-Dialog

      • (function) BOOL SET_KRLDLGANSWER (INT NHANDLE:IN, INT ANSWERSK:IN) ;Setzen der Dialogantwort durch HMI

      • (function) BOOL EXISTS_KRLDLG (INT NHANDLE:IN, INT ANSWER:OUT) ;Lesen der Dialogantwort in KRL

      • (function) INT GET_MSGBUFFER (MSGBUF_T MSGBUF[100]:OUT) ; Lesen des gesamten Meldungspuffers

      • (function) BOOL STRTOREAL (CHAR STRVAR[256]:IN, REAL RETVAL:OUT) ; Konvertierung STRING nach REAL

      • (function) BOOL STRTOBOOL (CHAR STRVAR[256]:IN, BOOL RETVAL:OUT) ; Konvertierung STRING nach BOOL

      • (function) BOOL STRTOINT (CHAR STRVAR[256]:IN, INT RETVAL:OUT) ; Konvertierung STRING nach INT

      • (function) BOOL STRTOSTRING (CHAR STRVAR[256]:IN, CHAR RETVAL[256]:OUT) ;Konvertierung KRL-String im String in einen String

      • (function) BOOL STRTOFRAME (CHAR STRVAR[256]:IN, FRAME RETVAL:OUT) ; Konvertierung STRING nach FRAME

      • (function) BOOL STRTOPOS (CHAR STRVAR[256]:IN, POS RETVAL:OUT) ; Konvertierung STRING nach POS

      • (function) BOOL STRTOE3POS (CHAR STRVAR[256]:IN, E3POS RETVAL:OUT) ; Konvertierung STRING nach E3POS

      • (function) BOOL STRTOE6POS (CHAR STRVAR[256]:IN, E6POS RETVAL:OUT) ; Konvertierung STRING in E6POS

      • (function) BOOL STRTOAXIS (CHAR STRVAR[256]:IN, AXIS RETVAL:OUT) ; Konvertierung STRING nach AXIS

      • (function) BOOL STRTOE3AXIS (CHAR STRVAR[256]:IN, E3AXIS RETVAL:OUT) ; Konvertierung STRING nach E3AXIS

      • (function) BOOL STRTOE6AXIS (CHAR STRVAR[256]:IN, E6AXIS RETVAL:OUT) ; Konvertierung STRING nach E6AXIS

      • (function) VAR_TYPE VARTYPE ( CHAR VAR_STR [80] :IN )[/i]

      • (function) INT GETVARSIZE ( SYS_VARS MESSAGENO:IN )[/i]

      • (function) INT SET_OPT_FILTER (E6POS TARGETPOS:IN)[/i]

      • (subprogram) MD_SETSTATE (CHAR DEVNAME[39] :IN, MD_STATE STATE :IN) ;SETS STATE OF MOTION DRIVER DEVICE

      • (function) MD_STATE MD_GETSTATE (CHAR DEVNAME[39] :IN) ;RETURNS STATE OF MOTION DRIVER DEVICE

      • (function) FRAME EB (FRAME ROOT :IN, CHAR DEVNAME[39] :IN, FRAME OFFSET :IN,INT SHIFTFRAME :IN) ;ACTIVATE MOTION DRIVER BASE

      • (function) FRAME EB_TEST (FRAME ROOT :IN, CHAR DEVICE_NAME[39] :IN, FRAME OFFSET :IN, INT FRAME_NR :IN, BOOL VALID :OUT) ;GET MOTION DRIVER BASE

      • (function) REAL EO ( CHAR DEVICE_NAME[39] :IN, REAL OFFSET :IN ) ; Aktivierung eines Nullpunkt-Achstreibers

      • (function) INT MD_CMD (CHAR DEV_NAME[39] :IN, CHAR CMD_STRING[64] :IN, INT INT_PARAM[16] :OUT, REAL REAL_PARAM[16] :OUT) ;EXECUTE MOTION DRIVER COMMAND

      • (function) INT EMI_ENDPOS (CHAR DEV_NAME[39] :IN, CHAR FILE_NAME[32] :IN, E6POS END_POS :OUT, E6AXIS END_AXIS :OUT) ;GET END POSITION AS POS- OR AXIS-DATA FROM AN EMI-DEVICE (EXTERNAL MOTION INTERFACE)

      • (function) INT EMI_STARTPOS (CHAR DEV_NAME[39] :IN, CHAR FILE_NAME[32] :IN, E6POS START_POS :OUT, E6AXIS START_AXIS :OUT) ;GET START POSITION AS POS- OR AXIS-DATA FROM AN EMI-DEVICE (EXTERNAL MOTION INTERFACE)

      • (function) INT EMI_RECSTATE(CHAR DEV_NAME[39]:IN, CHAR FILE_NAME[32]:IN) ;Get internal state of an EMI Record

      • (function) SIGINF GET_SIG_INF (CHAR SIGNAME[24]:IN) ;RETURNS INFORMATION FOR THE SIGNAL WITH NAME SIG_NAME

      • (subprogram) M_COMMENT(CHAR M_TXT[128]:IN) ;Motion Comment


    I hope this will help us go further in our understanding on how to program our *favorite* (really?) controller.

  • Been poking about at some of these as timer permits. VARSTATE and VARTYPE are definitely useful, and would be even more so if I can find a way to convert a variable name into a string variable.


    I had some hopes for GETVARSIZE, but it looks like that's not a function for determining the size of a variable. Instead, it seems to be a way for the system to check what size memory is allocated for certain system variables.


    GETVARSIZE receives a variable of type SYS_VARS. By digging through vxworks.rt, I found the SYS_VARS is an ENUM type with options #CYCFLAG, #FLAG, #TIMER, #AN_IN, #AN_OUT, and #COUNT_I. Sending #FLAG to GETVARSIZE returns an INT value of 1024. All the rest return 32.


    My guess is that this is a function to report on how many CYCFLAGs, Counters, $TIMERs, etc that the system is set up to support. This makes sense, since people writing KRL programs uner KSS 5.4 today might need their code to be able to run on old 2.6 or 4.2 systems, which (IIRC) supported fewer of some of these system variables.

  • BTW, Asimo, if it isn't asking for too much information, could you list what options are installed on the robot you pulled this list from? I ask b/c the KRLMSG and KRLDLG functions don't appear to exist on any of the robots I have access to, which have (between them) UserTech, RSI, Force-Torque Control, KukaVision, Absolute Accuracy, and KRLXML. I'm curious to see where those functions come from.

  • Hi there!


    I was testing this little tool in one KRC4 KSS 8.2 but is not working, it's a pitty... :angel: the find button never get enable even if the program detected well the version.


    Do you think there's any chance to uptade it to work with KSS 8.X? I think that maybe we will find interesting things on the new KSS.


    :merci:

    "¿Funciona? NO LO TOQUES!"

  • Please excuse my ignorance, but I don't know which file are you talking about, I just executed your program following the instruction on the post, pot even if he detects well the KSS version the find button never get enable... so... please... tell me which file I'm trying to parse and I'll send it to you... hehehehehe

    "¿Funciona? NO LO TOQUES!"

  • Asimo's original tool worked, as I recall, by locating the VxWorks.RT file in the robot and parsing out the plaintext function declarations. That file is probably in a different location in the KRC4, assuming that it still exists. Unfortunately, I don't think Asimo ever released the source code for his tool, so I'm not sure it can be modified to look in different locations.

  • Hi,


    EXECFUNC is not for calling KRL-subroutines/KRL-functions by a string from inside a KRL programm, but for calling VxWorks system functions/routines by a string from inside KRL programs.
    Moreover it is a pure developer feature not recommended for end users. You could cause serious harm to your controller using this feature. Also note this feature no longer is available in KRC4.


    Fubini

    Edited once, last by Fubini ().

Advertising from our partners