KUKA KRC4 Program selection by PLC

  • Hi!


    I have a KUKA robot with a krc4 controller. I would like to know if it is posible to select the program that the controller has to execute using a PLC. I mean, I would like to know if, when I have two programs in my controller called "program1" and "program2" and a PLC that controls the robotic cell, if it is possible to select one or the other program in the controller using that PLC.

  • Thank you guys! I'm new at this forum, so if you could help me finding the information about how to do it o guiding me to try to find it by myself, I would appreciate it very much!

  • as already stated, read the pinned topic READ FIRST before posting.

    it tells you what would be useful info to those trying to help, also what to refer to for self help.

    this is covered in key documentation listed there and how to find it.


    PLCs don't really work well with strings. neither do robots.

    standard way of interacting with outside world for both of them is to use digital I/O.

    Programming Manual for System Integrators and CWRITE manual cover exactly what you are asking...


    first one explains how to use EXT mode, configure AutoExtern I/O and adapt CELL.SRC.

    this is the standard way of doing what you are asking.


    optionally one can go "fancy" and transfer string from PLC to robot. assuming you know how to do that, use CWRITE command which is mentioned in first manuals but obviously also has its own separate manual. this is not a common way but allows one to select and start program based on string value rather than number. The difference is that:

    a) this takes much more of I/Os. instead of transmitting couple if boolean variables (I/O) you need to dedicate a whole lot of I/O since to transmit just one letter, you need 8 I/Os. for full program name which is 24 characters, this is 192 I/Os. if you want to transmit program name with calling parameters it is going to be even longer.

    b) this is slow...

    c) this options is not a ready to sue option so you will be on your own developing and testing and that will take a long time and require expert knowledge of KRL programming....


    i know since i have done it...

    it also means you need to ensure correctness of transferred string since you do not want to accidentally start wrong program. that would lead to a collision.

    also KRL does not really do strings, it uses character arrays. this means manipulation functionality is quite limited, crude, slow and to make it more fun there are some undocumented restrictions that may not apply here since program names are short.

    then there is checking if program is actually on the robot or not...


    so yes, i would suggest to stick with standard AutoExtern solution, rather than selecting program by name...

    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