ZLC Robot

KUKA Robot WorkVisual Editor KRL Program

KRL (KUKA Robot Language) is a professional programming language for KUKA robots. Its program structure, variables, syntax and programming environment are similar to C language. However, since KRL is an industrial-grade control language, its programming difficulty is simpler and easier to learn than C language. The content of this article is to use the templates provided by KUKA to write and modify programs in the KRL editor of WorkVisual to achieve offline programming. To write KRL programs in WorkVisual software, you need to learn how to use file processing and KRL editing. File processing is mainly related to the establishment of program files, while KRL editing is related to the writing and modification of programs. 1 File processing (1) Activate template cataloging In WorkVisual, operators can select different templates and build different types of frameworks according to the type of program they are writing, mainly including CELL, Expert, Modul, Function and other templates.

WorkVisual is a crucial tool for KUKA robot programming. It enables users to create and edit robot programs easily. With an intuitive interface, one can define motion paths, set parameters, and manage I/O signals. It also supports offline programming, facilitating efficient development and debugging. Overall, it streamlines the process of KUKA robot configuration and operation.


When programming in WorkVisual, the system provides two templates: KRL Templates (General) VW Templates (Volkswagen)    Non-Volkswagen companies use general templates. Before using the template, you need to activate the template catalog. Select the menu “File > Catalog Management”, the “Catalog Management” dialog box pops up, select the “KRL Templates” catalog, click the “arrow” key to activate the catalog, as shown in the figure below, if you want to deactivate, click the reverse arrow.
(2) Open the file in the KRL editor    Select the “File” tab in the “Project Structure” and follow the “KRC\R1\Programme” path.
(3) Add files using templates    To add files with the help of KRL templates, first left-click the directory where the file needs to be added, as shown in the figure. After clicking the “Add” option, select the KRL template type and click “Add”.
After entering the program name in the pop-up dialog box, the file is added.
(4) Import files    When the project needs to import external files, right-click the folder where the program needs to be added and select “Add External File” to add the file. The types of external files that can be imported include SRC, DAT, SUB and KRL format files.
2 Editor Usage (1) KRL Editor Operation Interface
① Program Area ② Subroutine List in File ③ Variable Declaration List ④ Analysis Bar When the mouse hovers over the mark, the error description is displayed. Click the mark and the cursor quickly jumps to the relevant position in the program. ⑤ Square (2) KRL Editor Color    The KRL Editor will identify the components of the input code and automatically distinguish them with different colors. The color can accurately identify the type of code.
(3) Automatic Completion    In the KRL Editor, the automatic completion function can be used when entering code. This function can help programmers write code quickly and correctly. The elements that can realize the automatic completion function include: KRL Keywords (such as DEF, FOR, etc.) Defined variable names Known function names Defined subroutines    When executing automatic completion, enter the first letter of the code, and the elements that match the input characters will automatically appear. After selecting an element and pressing Enter, the complete element will be added to the program segment.
(4) Quickfix    When a red wavy line appears in the code or a mark in the analysis bar indicates a code error or inconsistency, you can use the Quickfix light to repair it. Click the drop-down button of the light to display a repair suggestion. Select the suggestion and press Enter to automatically repair it. As shown in the figure, an error occurs when declaring the variable “L”. The repair light displays a repair suggestion. In this example, selecting “Delete Declaration” will delete the variable declaration and fix the error.
(5) Folding folder work    The code in the KRL editor can use folders to structure the program, making the program structure more organized and concise, and improving the readability of the program. Click “+” or double-click to open the fold, and click “-” or double-click to close the fold.

Leave a Reply

Your email address will not be published. Required fields are marked *