├── LICENSE ├── docs ├── authors.md ├── contributing.md ├── index.md ├── javascripts │ └── extra.js ├── krl │ └── reference │ │ ├── system.functions.md │ │ ├── system.machinedata.md │ │ ├── system.messages.md │ │ ├── system.types.md │ │ ├── system.variables.md │ │ └── yaml │ │ ├── System.Functions.yml │ │ ├── System.Messages.yml │ │ ├── System.Types.yml │ │ └── System.Variables.yml └── stylesheets │ └── extra.css ├── main.py ├── mkdocs.yml ├── theme ├── main.html ├── partials │ └── toc-item.html ├── templates │ ├── macros_common.j2 │ ├── macros_enum.j2 │ ├── macros_function.j2 │ ├── macros_struc.j2 │ ├── macros_variables.j2 │ └── namespace.j2 └── tooltip.js └── website.code-workspace /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 OpenKuka 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /docs/authors.md: -------------------------------------------------------------------------------- 1 | 2 | ## Hi, I'm Lionel ([@lionpeloux](https://github.com/lionpeloux)) 3 | 4 | I'm a freelance structural engineer, researcher and entrepreneur from Lyon, France. 5 | I've come to robot programming recently for one of my clients, a small stonecutting workshop equipped with a `KR-500-2MT`. 6 | Because of my background in other areas, I see the power of community-based knowledge and I do believe that shared knowledge brings more value in almost any scenarios. 7 | 8 | ## Why this website ? 9 | 10 | Lots of people are complaining (understandably) about the quality of the documentation provided by Kuka to its customers. 11 | Indeed we are often left with a bunch of crappy pdf documents, sometimes outdated, sometimes incorrect, sometimes incomplete ... 12 | For a billion dollar company I find this is quite unfair (personal opinion !). 13 | 14 | So I wanted to build a modern documentation website to provide a better access to the language reference with powerful search and cross referencing capabilities. 15 | 16 | There is already a great source of support through the [Kuka Robot Forum](https://www.robot-forum.com/robotforum/kuka-robot-forum/). 17 | However, forums are not so great to provide structured content, which this site is all about. Though, they should complete well. 18 | 19 | -------------------------------------------------------------------------------- /docs/contributing.md: -------------------------------------------------------------------------------- 1 | 2 | Interested in contributing to this documentation ? Want to report a bug ? Before you do, please read the following guidelines. 3 | 4 | ## Submission context 5 | 6 | ### Got a question or problem ? 7 | For quick questions there's no need to open an issue as you can reach us on [gitter.im](https://gitter.im/OpenKuka/community). 8 | 9 | ### Found a bug ? 10 | 11 | If you found a bug in the source code, you can help us by submitting an issue to the issue tracker in our [GitHub repository](https://github.com/OpenKuka/Website/issues). Even better, you can submit a pull request with a fix. However, before doing so, please read the submission guidelines. 12 | 13 | ### Missing a feature ? 14 | You can request a new feature by submitting an issue to our GitHub repository. If you would like to implement a new feature, please submit an issue with a proposal for your work first, to be sure that it is of use for everyone. Please consider what kind of change it is: 15 | 16 | * For a major feature, first open an issue and outline your proposal so that it can be discussed. This will also allow us to better coordinate our efforts, prevent duplication of work, and help you to craft the change so that it is successfully accepted into the project. 17 | 18 | * Small features and bugs can be crafted and directly submitted as a Pull Request. However, there is no guarantee that your feature will make it into the master, as it's always a matter of opinion whether if benefits the overall functionality of the theme. 19 | -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | # Welcome to OpenKuka 2 | 3 | ## Better Kuka Robot Language documentation 4 | 5 | This website is a **community** effort to provide better documentation for the Kuka Robot Language (KRL). 6 | Its goal is to become a shared tool for robot developers (industrial, researcher, student, ...). 7 | 8 | ## Quick start 9 | 10 | Go to the [language reference](./krl/reference/system.types/) section to get started. 11 | Or hit the `s` or `f` key on your keyboard to search for a `KRL` entry. 12 | 13 | ## What to expect 14 | 15 | * full language reference documentation in a modern html layout with powerful search capabilities and cross referencing 16 | * additional resources (how to, tutorials, ...) 17 | * discover undocumented functionalities (crosscomm plugin, message database, ...) 18 | * easy to contribute 19 | 20 | ## Contributing 21 | 22 | All types of contributions are more than welcome. 23 | 24 | The language reference documentation is written in simple `YAML` files. 25 | A side each item (type, variable or function) you will find a small *pencil icon* that will redirect you to the corresponding definition lines in the yaml file. 26 | This way, it should be easy for anybody to propose corrections and enrichments of the existing documentation. 27 | 28 | Please, read the [guidelines](./contributing.md) if you are decided to collaborate. 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /docs/javascripts/extra.js: -------------------------------------------------------------------------------- 1 | tippy('#myButton', { 2 | content: "I'm a Tippy tooltip!", 3 | }) -------------------------------------------------------------------------------- /docs/krl/reference/system.functions.md: -------------------------------------------------------------------------------- 1 | 2 | {{NamespaceToMarkdown('System.Functions')}} 3 | -------------------------------------------------------------------------------- /docs/krl/reference/system.machinedata.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /docs/krl/reference/system.messages.md: -------------------------------------------------------------------------------- 1 | 2 | {{NamespaceToMarkdown('System.Messages')}} 3 | -------------------------------------------------------------------------------- /docs/krl/reference/system.types.md: -------------------------------------------------------------------------------- 1 | 2 | {{NamespaceToMarkdown('System.Types')}} -------------------------------------------------------------------------------- /docs/krl/reference/system.variables.md: -------------------------------------------------------------------------------- 1 | 2 | {{NamespaceToMarkdown('System.Variables')}} 3 | -------------------------------------------------------------------------------- /docs/krl/reference/yaml/System.Functions.yml: -------------------------------------------------------------------------------- 1 | functions: 2 | - name: StrCopy 3 | description: Copy the contents of a string variable to another string variable. 4 | parameters: 5 | - name: strDest[] 6 | pass: IN 7 | type: CHAR[] 8 | description: | 9 | The character string is copied to this string variable. 10 | Since `strDest[]` is an array of type `CHAR`, individual characters and constants are not permissible. 11 | - name: strSource[] 12 | pass: IN 13 | type: CHAR[] 14 | description: The contents of this string variable are copied. 15 | return-type: BOOL 16 | return-description: Returns `true` if the copy was successfull. Returns `false` otherwise. 17 | comments: | 18 | The function `StrCopy()` can be used to copy the contents of a string variable to another string variable. 19 | code-sample: 20 | krl: | 21 | DECL CHAR A[25], B[25] 22 | DECL BOOL C 23 | A[] = "" 24 | B[] = "Example" 25 | C = StrCopy(A[], B[]) 26 | output: | 27 | A[] = "Example" 28 | and C = true 29 | -------------------------------------------------------------------------------- /docs/krl/reference/yaml/System.Messages.yml: -------------------------------------------------------------------------------- 1 | description: | 2 | Programming messages in KRL. 3 | 4 | comments: | 5 | 6 | Message programming properties : 7 | 8 | * The message mechanism is reentrant, i.e. it can be started more than once at the same time. 9 | * Up to 3 parameters can be integrated into a message. 10 | * Generated messages are stored in a message buffer until they are deleted. 11 | Notification messages are not managed in the message buffer (“fire and forget” principle). 12 | * The messages can be easily checked or deleted. It is of no importance what order the messages were generated in or whether there are other messages present. 13 | Notification messages cannot be checked and cannot be deleted by means of a KRL instruction. 14 | 15 | enums: 16 | - name: EKrlMsgType 17 | data-type: ENUM 18 | description: Message types 19 | comments: | 20 | values: 21 | - name: NOTIFY 22 | description: Notification message 23 | - name: STATE 24 | description: Status message 25 | - name: QUIT 26 | description: Acknowledgment message 27 | - name: WAITING 28 | description: Wait message 29 | - name: DIALOG 30 | description: End of program reached 31 | - name: KrlMsgParType_T 32 | data-type: ENUM 33 | description: Message parameter types 34 | comments: | 35 | values: 36 | - name: VALUE 37 | description: The parameter is inserted into the message text as specified in text, int, real or bool. 38 | - name: KEY 39 | description: The parameter is a key that must be searched for in the message database. 40 | - name: EMPTY 41 | description: The parameter is empty. 42 | - name: MsgBufMsgType_T 43 | data-type: ENUM 44 | description: Message parameter types 45 | comments: | 46 | values: 47 | - name: SYS_QUIT 48 | description: Acknowledgement messages from the kernel system 49 | - name: SYS_STATE 50 | description: Status messages from the kernel system 51 | - name: USR_QUIT 52 | description: User-defined acknowledgement messages 53 | - name: USR_WAIT 54 | description: User-defined wait messages 55 | - name: USR_STATE 56 | description: User-defined status messages 57 | - name: USR_DLG 58 | description: User-defined dialog messages 59 | strucs: 60 | - name: KrlMsg_T 61 | data-type: STRUC 62 | description: Message data structure 63 | fields: 64 | - name: Modul[] 65 | data-type: CHAR[24] 66 | description: Originator displayed in the message window. 67 | - name: Nr 68 | data-type: INT 69 | description: Message number. Message numbers may be used more than once. 70 | - name: Msg_Txt[] 71 | data-type: CHAR[80] 72 | description: Message text (or key for a message database). 73 | - name: KrlMsgDlgSK_T 74 | data-type: STRUC 75 | description: Softkey data structure for dialog message 76 | fields: 77 | - name: Sk_Type 78 | data-type: KrlMsgParType_T 79 | description: The type of the softkey. 80 | - name: Sk_Txt 81 | data-type: CHAR[10] 82 | description: Label of the softkey (or key for a message database). 83 | - name: KrlMsgOpt_T 84 | data-type: STRUC 85 | description: Message options data structure 86 | fields: 87 | - name: Vl_Stop 88 | data-type: BOOL 89 | description: | 90 | If `true` `Set_KrlMsg()` or `Set_KrlDlg()` trigger an `ADVANCE` run stop. 91 | Default to `true`. 92 | - name: Clear_P_Reset 93 | data-type: BOOL 94 | description: | 95 | If `true` delete messages when the program is reset or deselected. 96 | In that case, all status messages, acknowledgement messages and wait messages generated by `Set_KrlMsg()` with the variable options are deleted. 97 | 98 | Notification messages can only be deleted using the softkeys Ackn. and Ackn. All. 99 | For dialog messages `Clear_P_Reset` si always set to `true`. 100 | - name: Clear_P_Saw 101 | data-type: BOOL 102 | description: | 103 | Delete message when a block selection is carried out using the softkey `Line Sel`. 104 | If `true` all status messages, acknowledgement messages and wait messages generated by `Set_KrlMsg()` with the variable options are deleted. 105 | Default to `false`. 106 | 107 | Notification messages can only be deleted using the softkeys Ackn. and Ackn. All. 108 | For dialog messages no block selection is possible while a dialog is present on the KUKA.HMI, as all operator control elements are deactivated. 109 | - name: Log_To_DB 110 | data-type: BOOL 111 | description: If `true` the message is logged. Default to `false`. 112 | - name: KrlMsgPar_T 113 | data-type: STRUC 114 | description: Message parameter data structure 115 | fields: 116 | - name: Par_Type 117 | data-type: KrlMsgParType_T 118 | description: Type of parameter. 119 | - name: Par_Txt[] 120 | data-type: CHAR[26] 121 | description: Text of the parameter (or key for a message database). 122 | - name: Par_Int 123 | data-type: INT 124 | description: This can be used to fill the placeholder with an integer value. It can only be used in conjunction with type=#value. 125 | - name: Par_Real 126 | data-type: REAL 127 | description: This can be used to fill the placeholder with a real value. It can only be used in conjunction with type=#value. 128 | - name: Par_Bool 129 | data-type: BOOL 130 | description: This can be used to fill the placeholder with a Boolean value. It can only be used in conjunction with type=#value. 131 | - name: MsgBuf_T 132 | data-type: STRUC 133 | description: Message buffer data structure 134 | comments: | 135 | Array of buffer elements containing all the messages in the buffer. 136 | The array is filled in ascending order, without gaps, starting with `Index = 1`. 137 | 138 | If there are fewer messages in the buffer than represented by the size of the array, these array elements are not initialized. 139 | fields: 140 | - name: Type 141 | data-type: MsgBufMsgType_T 142 | description: Message type. 143 | - name: Nr 144 | data-type: INT 145 | description: Message number. 146 | - name: Modul[] 147 | data-type: CHAR[24] 148 | description: | 149 | Represents the originator of the message. 150 | Only initialized for messages of type `#usr_...`, because with type `#sys_...` the parameter is usually a database key that cannot be used by the user. 151 | - name: Msg_Txt[] 152 | data-type: CHAR[80] 153 | description: | 154 | Message text or message database key. 155 | Only initialized for messages of type `#usr_...`, because with type `#sys_...` the parameter is usually a database key that cannot be used by the user. 156 | - name: Par_Type1 157 | data-type: KrlMsgParType_T 158 | description: Parameter type. 159 | - name: Par_Txt1[] 160 | data-type: CHAR[40] 161 | description: Text or database key of the parameter. 162 | - name: Par_Type2 163 | data-type: KrlMsgParType_T 164 | description: Parameter type. 165 | - name: Par_Txt2[] 166 | data-type: CHAR[40] 167 | description: Text or database key of the parameter. 168 | - name: Par_Type2 169 | data-type: KrlMsgParType_T 170 | description: Parameter type. 171 | - name: Par_Txt2[] 172 | data-type: CHAR[40] 173 | description: Text or database key of the parameter. 174 | - name: Handle 175 | data-type: INT 176 | description: internal handle for this message (only initialized for user-defined messages). 177 | variables: 178 | functions: 179 | 180 | - name: Set_KrlMsg 181 | description: Generate a message. 182 | parameters: 183 | - name: type 184 | pass: IN 185 | type: EKrlMsgType 186 | description: Defines the type of the message to be generated (`#notify`, `#state`, `#quit`, `#waiting`). 187 | - name: msg 188 | pass: OUT 189 | type: KrlMsg_T 190 | description: Structure defining the name, originator and message text 191 | - name: params 192 | pass: OUT 193 | type: KrlMsgPar_T 194 | description: Structure containing the message parameters 195 | - name: options 196 | pass: OUT 197 | type: KrlMsgOpt_T 198 | description: Structure containing the message reaction 199 | return-type: INT 200 | return-description: Returns a handle to the generated message. `handle > 0` on success, `handle = -1`on failure. 201 | comments: | 202 | The function Set_KrlMsg() generates a message. 203 | This means that the message is transferred to the message buffer and displayed from there in the message window. 204 | 205 | *Return* 206 | 207 | * `-1`: The message could not be generated (e.g.because the message buffer is too full). 208 | * `>0`: The message was generated successfully. 209 | 210 | The return value is a valid handle that can be used for further operations for this message, e.g. for deleting the message with `Clear_KrlMsg()`. 211 | No handle is required for notification messages. 212 | 213 | *Exceptions* 214 | 215 | * Notification messages are displayed in the message window by means of Set_KrlMsg(). They are not managed in the message buffer, however (“fire and forget” principle). 216 | * To generate dialog messages, the function Set_KrlDlg() must be used. 217 | 218 | - name: Exists_KrlMsg 219 | description: Checks whether a specific message still exists. 220 | parameters: 221 | - name: handle 222 | pass: IN 223 | type: INT 224 | description: The handle provided for the message by the function `Set_KrlMsg()`. 225 | return-type: BOOL 226 | return-description: Returns `true` if the message still exists in the message buffer. 227 | comments: | 228 | The function `Exists_KrlMsg()` can be used to check whether a specific message still exists. 229 | It also checks whether this message is still present in the message buffer. 230 | This means that the message is transferred to the message buffer and displayed from there in the message window. 231 | 232 | The function does not wait until the message has been deleted, but merely searches the buffer for the message with this handle. 233 | The KRL program must therefore be polled cyclically until the message has been deleted. 234 | 235 | Notification messages cannot be checked, as they are not managed in the message buffer. 236 | 237 | - name: Clear_KrlMsg 238 | description: Delete a a specific message. 239 | parameters: 240 | - name: handle 241 | pass: IN 242 | type: INT 243 | description: | 244 | The handle of the message to delete. This handle is returned by the function `Set_KrlMsg()`. 245 | return-type: BOOL 246 | return-description: | 247 | * `true` if the message was sucessfully deleted. 248 | * `false` otherwise 249 | comments: | 250 | The function `Clear_KrlMsg()` can be used to delete a message. 251 | This means that the message is removed from the message buffer and the message window. 252 | 253 | Notification messages cannot be deleted in this way, as they are not managed in the message buffer. 254 | Notification messages can only be deleted via the KUKA.HMI using the softkeys Ackn. and Ackn. All. 255 | 256 | * `-1` : all messages initiated by this process are deleted. 257 | * `-99`: all user-defined messages are deleted (for all processes: `ROBOT`, `SUBMIT` and `COMMAND` interpreters). 258 | 259 | - name: Set_KrlDlg 260 | description: Generates a dialog message. 261 | parameters: 262 | - name: msg 263 | pass: OUT 264 | type: KrlMsg_T 265 | description: Structure defining the name, originator and message text. 266 | - name: params 267 | pass: OUT 268 | type: KrlMsgPar_T 269 | description: Structure containing the message parameters. 270 | - name: softkey 271 | pass: OUT 272 | type: KrlMsgDlgSK_T 273 | description: Structure containing the softkey assignment. 274 | - name: options 275 | pass: OUT 276 | type: KrlMsgOpt_T 277 | description: Structure containing the message reaction. 278 | return-type: INT 279 | return-description: | 280 | Returns a handle to the generated dialog message. 281 | 282 | - `handle > 0` on success 283 | - `handle = -1` on failure 284 | 285 | comments: | 286 | The function `Set_KrlDlg()` generates a dialog message. 287 | This means that the message is transferred to the message buffer and displayed from there in the message window. 288 | 289 | The function merely generates the dialog. It does not wait until the dialog has been answered. A dialog cannot be generated until no other dialog is active. 290 | 291 | - name: Exists_KrlDlg 292 | description: Checks whether a specific dialog message still exists. 293 | parameters: 294 | - name: handle 295 | pass: IN 296 | type: INT 297 | description: The handle provided for the dialog message by the function `Set_KrlDlg()`. 298 | - name: answer 299 | pass: OUT 300 | type: INT 301 | description: Number `1..7` of the softkey used to answer the dialog. `0` if the dialog was deleted before answering. 302 | return-type: BOOL 303 | return-description: | 304 | * `true` if the dialog message still exists in the message buffer. 305 | * `false` if the dialog message no longer exists in the message buffer and has therefore been answered 306 | comments: | 307 | The function `Exists_KrlDlg()` can be used to check whether a specific dialog still exists. 308 | It also checks whether this dialog is still present in the message buffer. 309 | 310 | The function does not wait until the dialog has been deleted, but merely searches the buffer for the dialog with this handle. 311 | The KRL program must therefore be polled cyclically until the dialog has been answered or deleted. 312 | 313 | *Returns* 314 | 315 | * `1..7` : answer with the corresponding softkey. 316 | * `0` : the dialog has not been answered,but deleted (e.g. the dialog has been deleted by means of `Clear_KrlMsg()` by an interrupt or by a different process). 317 | 318 | - name: Get_MsgBuffer 319 | description: Copy the content of the message buffer. 320 | parameters: 321 | - name: msgBuf[] 322 | pass: OUT 323 | type: MsgBuf_T[100] 324 | description: Array of buffer elements containing all the messages in the buffer 325 | return-type: INT 326 | return-description: Returns the number of messages in the message buffer. 327 | comments: | 328 | The function `Get_MsgBuffer()` reads the message buffer and writes the messages in the buffer to the `OUT` parameter `msgBuff[]`. 329 | The size of the buffer is `100`. 330 | 331 | 332 | `Get_MsgBuffer()` can read the following message types from the buffer : 333 | 334 | * Status messages from the kernel system (#sys_state) 335 | * Acknowledgement messages from the kernel system (#sys_quit) 336 | * User-defined status messages (#usr_state) 337 | * User-defined acknowledgement messages (#usr_quit) 338 | * User-defined dialog messages (#usr_dlg) 339 | * User-defined wait messages (#usr_wait) 340 | -------------------------------------------------------------------------------- /docs/krl/reference/yaml/System.Types.yml: -------------------------------------------------------------------------------- 1 | enums: 2 | - name: ADAP_ACC 3 | data-type: ENUM 4 | description: Acceleration adaptation modes 5 | values: 6 | - name: NONE 7 | description: Acceleration adaptation not activated 8 | - name: STEP1 9 | description: Dynamic model without kinetic energy 10 | - name: STEP2 11 | description: Dynamic model with kinetic energy 12 | - name: ASYNC_STATE 13 | data-type: ENUM 14 | description: Asynchronous motion states 15 | values: 16 | - name: BUSY 17 | description: Asynchronous motions active, stopped or temporarily stored. 18 | - name: IDLE 19 | description: No asynchronous motions active or stopped (queue is empty); last motion terminated without an interrupt. 20 | - name: CANCELLED 21 | description: No asynchronous motions active or stopped (queue is empty); last motion was canceled. 22 | - name: PEND 23 | description: Asynchronous motion is planned, but is not currently being executed 24 | - name: ASYS 25 | data-type: ENUM 26 | description: 27 | values: 28 | - name: ROBOT 29 | description: Robot axes `A1..A6` 30 | - name: EXTAX 31 | description: External axes `E1..E6` 32 | - name: EXTAX2 33 | description: External kinematic system 34 | - name: AXWMODE 35 | data-type: ENUM 36 | description: Functional principles for axis-specific workspace monitoring 37 | values: 38 | - name: 'OFF' 39 | description: Work envelope monitoring deactivated 40 | - name: INSIDE 41 | description: The output is set if the TCP is located inside the work envelope 42 | - name: OUTSIDE 43 | description: The output is set if the TCP is located outside the work envelope 44 | - name: INSIDE_STOP 45 | description: The output is set and the robot stopped if the TCP is located inside the work envelope 46 | - name: OUTSIDE_STOP 47 | description: The output is set and the robot stopped if the TCP is located outside the work envelope 48 | 49 | - name: CIRC_TYPE 50 | data-type: ENUM 51 | description: Orientation control modes for CIRC blocks 52 | values: 53 | - name: BASE 54 | description: Space-related orientation control 55 | - name: PATH 56 | description: Path-related orientation control 57 | - name: COSYS 58 | data-type: ENUM 59 | description: Orientation control modes for CIRC blocks 60 | values: 61 | - name: AX 62 | description: Motions are relative to the axis-specific coordinate system 63 | - name: CAR 64 | description: Motions are relative to the Cartesian coordinate system. 65 | - name: CP_VEL_TYPE 66 | data-type: ENUM 67 | description: Reduction modes for CP path velocity 68 | values: 69 | - name: CONSTANT 70 | description: No reduction 71 | - name: VAR_T1 72 | description: Reduction in jog mode SStep(T1) 73 | - name: VAR_ALL 74 | description: Reduction in all modes 75 | 76 | 77 | 78 | - name: PRO_MODE 79 | data-type: ENUM 80 | description: Program run modes 81 | values: 82 | - name: ISTEP 83 | description: 'Incremental Step : block-by-block processing with a stop after each instruction (without `ADVANCE` run processing).' 84 | - name: PSTEP 85 | description: 'Program Step: complete processing of subprograms (without `ADVANCE` run processing).' 86 | - name: MSTEP 87 | description: 'Motion Step: step-by-step processing with a stop after each motion instruction (without `ADVANCE` run processing).' 88 | - name: CSTEP 89 | description: 'Continuous Step: Step-by-step processing with a stop after each motion instruction (with `ADVANCE` run processing).' 90 | - name: GO 91 | description: 'Continuous execution to the end of the program.' 92 | - name: BSTEP 93 | description: 'Back Step: Continuous execution backwards to the start of the program.' 94 | - name: PRO_STATE 95 | data-type: ENUM 96 | description: Process states 97 | values: 98 | - name: P_FREE 99 | description: Program not selected 100 | - name: P_RESET 101 | description: Program reset 102 | - name: P_ACTIVE 103 | description: Program active 104 | - name: P_STOP 105 | description: Program stopped 106 | - name: P_END 107 | description: End of program reached 108 | - name: SW_ONOFF 109 | data-type: ENUM 110 | description: Generic ON/OFF switch 111 | values: 112 | - name: 'ON' 113 | description: Switched `ON` 114 | - name: 'OFF' 115 | description: Switched `OFF` 116 | 117 | strucs: 118 | 119 | - name: AXBOX 120 | data-type: STRUC 121 | description: Axis-specific state data structure 122 | fields: 123 | - name: Mode 124 | data-type: ENUM 125 | type: AXWMODE 126 | description: Functional principle of the axis-specific workspace monitoring function 127 | - name: State 128 | data-type: BOOL 129 | description: Violation of the axis-specific workspace 130 | - name: Name[] 131 | data-type: CHAR[24] 132 | description: Name of the particular axis-specific workspace 133 | - name: AXIS_CAL 134 | data-type: STRUC 135 | description: Axis-specific state data structure 136 | fields: 137 | - name: A1 138 | data-type: BOOL 139 | - name: A2 140 | data-type: BOOL 141 | - name: A3 142 | data-type: BOOL 143 | - name: A4 144 | data-type: BOOL 145 | - name: A5 146 | data-type: BOOL 147 | - name: A6 148 | data-type: BOOL 149 | - name: E1 150 | data-type: BOOL 151 | - name: E2 152 | data-type: BOOL 153 | - name: E3 154 | data-type: BOOL 155 | - name: E4 156 | data-type: BOOL 157 | - name: E5 158 | data-type: BOOL 159 | - name: E6 160 | data-type: BOOL 161 | - name: AXIS_INC 162 | data-type: STRUC 163 | description: Axis-specific increments data structure 164 | fields: 165 | - name: A1 166 | data-type: INT 167 | constraint: '>= 0' 168 | - name: A2 169 | data-type: INT 170 | constraint: '>= 0' 171 | - name: A3 172 | data-type: INT 173 | constraint: '>= 0' 174 | - name: A4 175 | data-type: INT 176 | constraint: '>= 0' 177 | - name: A5 178 | data-type: INT 179 | constraint: '>= 0' 180 | - name: A6 181 | data-type: INT 182 | constraint: '>= 0' 183 | - name: E1 184 | data-type: INT 185 | constraint: '>= 0' 186 | - name: E2 187 | data-type: INT 188 | constraint: '>= 0' 189 | - name: E3 190 | data-type: INT 191 | constraint: '>= 0' 192 | - name: E4 193 | data-type: INT 194 | constraint: '>= 0' 195 | - name: E5 196 | data-type: INT 197 | constraint: '>= 0' 198 | - name: E6 199 | data-type: INT 200 | constraint: '>= 0' 201 | - name: AXIS 202 | data-type: STRUC 203 | description: "Robot axis `A1..A6` data structure." 204 | fields: 205 | - name: A1 206 | data-type: REAL 207 | - name: A2 208 | data-type: REAL 209 | - name: A3 210 | data-type: REAL 211 | - name: A4 212 | data-type: REAL 213 | - name: A5 214 | data-type: REAL 215 | - name: A6 216 | data-type: REAL 217 | 218 | - name: BUS 219 | data-type: STRUC 220 | description: L2 bus interface data structure. 221 | fields: 222 | - name: PROTO 223 | data-type: INT 224 | - name: PROC 225 | data-type: INT 226 | - name: RCO 227 | data-type: INT 228 | - name: BL 229 | data-type: INT 230 | - name: PT 231 | data-type: INT 232 | - name: TS 233 | data-type: INT 234 | - name: BAUD 235 | data-type: INT 236 | - name: TSL 237 | data-type: INT 238 | - name: MIN_TDSR 239 | data-type: INT 240 | - name: MAX_TDSR 241 | data-type: INT 242 | - name: TTR 243 | data-type: INT 244 | - name: HSA 245 | data-type: INT 246 | - name: G 247 | data-type: INT 248 | - name: DFLT_SAP 249 | data-type: INT 250 | 251 | - name: E6AXIS 252 | data-type: STRUC 253 | description: Robot axis `A1..A6` and external axis `E1..E6` data structure. 254 | fields: 255 | - name: A1 256 | data-type: REAL 257 | - name: A2 258 | data-type: REAL 259 | - name: A3 260 | data-type: REAL 261 | - name: A4 262 | data-type: REAL 263 | - name: A5 264 | data-type: REAL 265 | - name: A6 266 | data-type: REAL 267 | - name: E1 268 | data-type: REAL 269 | - name: E2 270 | data-type: REAL 271 | - name: E3 272 | data-type: REAL 273 | - name: E4 274 | data-type: REAL 275 | - name: E5 276 | data-type: REAL 277 | - name: E6 278 | data-type: REAL 279 | 280 | 281 | - name: FRA 282 | data-type: STRUC 283 | description: Fraction data structure. 284 | fields: 285 | - name: N 286 | data-type: INT 287 | description: numerator 288 | - name: D 289 | data-type: INT 290 | description: denominator 291 | 292 | - name: FRAME 293 | data-type: STRUC 294 | description: Frame data structure. 295 | fields: 296 | - name: X 297 | data-type: REAL 298 | - name: Y 299 | data-type: REAL 300 | - name: Z 301 | data-type: REAL 302 | - name: A 303 | data-type: REAL 304 | - name: B 305 | data-type: REAL 306 | - name: C 307 | data-type: REAL 308 | - name: E6POS 309 | data-type: STRUC 310 | description: Position data structure. 311 | fields: 312 | - name: X 313 | data-type: REAL 314 | - name: Y 315 | data-type: REAL 316 | - name: Z 317 | data-type: REAL 318 | - name: A 319 | data-type: REAL 320 | - name: B 321 | data-type: REAL 322 | - name: C 323 | data-type: REAL 324 | - name: E1 325 | data-type: REAL 326 | - name: E2 327 | data-type: REAL 328 | - name: E3 329 | data-type: REAL 330 | - name: E4 331 | data-type: REAL 332 | - name: E5 333 | data-type: REAL 334 | - name: E6 335 | data-type: REAL 336 | - name: S 337 | data-type: INT 338 | description: Status 339 | - name: T 340 | data-type: INT 341 | description: Turn 342 | - name: POS 343 | data-type: STRUC 344 | description: Position data structure. 345 | fields: 346 | - name: X 347 | data-type: REAL 348 | - name: Y 349 | data-type: REAL 350 | - name: Z 351 | data-type: REAL 352 | - name: A 353 | data-type: REAL 354 | - name: B 355 | data-type: REAL 356 | - name: C 357 | data-type: REAL 358 | - name: S 359 | data-type: INT 360 | description: Status 361 | - name: T 362 | data-type: INT 363 | description: Turn 364 | - name: SIGINF 365 | data-type: STRUC 366 | description: Signal info data structure. 367 | fields: 368 | - name: Typ 369 | data-type: ENUM 370 | description: | 371 | * `#IN` : signal is declared for inputs 372 | * `#OUT` : signal is declared for outputs 373 | * `#INV` : signal is not declared 374 | * `#IN0` : reserved for future use 375 | * `#OUT0` : signal for system outputs set to `false` 376 | - name: DTyp 377 | data-type: ENUM 378 | description: | 379 | * `#SYSI` : system signal of data type `INT` (whole number) 380 | * `#SYSB` : system signal of data type `BOOL` (logic state) 381 | * `#USRI` : user-defined global signal of data type `INT` 382 | * `#USRB` : user-defined global signal of data type `BOOL` 383 | - name: Idx 384 | data-type: INT 385 | constraint: '[0,4096]' 386 | description: Signal number. `O` for invalid signal or signal set to `false`. 387 | - name: Len 388 | data-type: INT 389 | constraint: '[0,32]' 390 | description: Signal length. `1` for signal of type `BOOL`. `0` for invalid signal. 391 | - name: SIGNAL 392 | data-type: STRUC 393 | description: A signal defines and alias to one or several IN/OUT 394 | comments: | 395 | A `SIGNAL` links predefined signal variables for inputs or outputs with a name. 396 | Such a link, i.e. a `SIGNAL` declaration, is required in order to be able to address an analog input or output. 397 | An input or output may appear in several SIGNAL declarations. 398 | - name: ACC_CAR 399 | data-type: STRUC 400 | description: Frame data structure with an additional magnitude field. 401 | fields: 402 | - name: X 403 | data-type: REAL 404 | description: X component 405 | - name: Y 406 | data-type: REAL 407 | description: X component 408 | - name: Z 409 | data-type: REAL 410 | description: X component 411 | - name: ABS 412 | data-type: REAL 413 | description: Magnitude ||X^2^ + Y^2^ + Z^2^|| 414 | - name: A 415 | data-type: REAL 416 | description: A component 417 | - name: B 418 | data-type: REAL 419 | description: B component 420 | - name: C 421 | data-type: REAL 422 | description: C component 423 | - name: CP 424 | data-type: STRUC 425 | description: Speed/Acceleration data structure 426 | fields: 427 | - name: CP 428 | data-type: REAL 429 | description: linear component 430 | - name: ORI1 431 | data-type: REAL 432 | description: Swivel component 433 | - name: ORI2 434 | data-type: REAL 435 | description: Rotational component 436 | - name: PRO_IP 437 | data-type: STRUC 438 | description: Process pointer data structure 439 | fields: 440 | - name: I_EXECUTED 441 | data-type: BOOL 442 | description: "`true` if the instruction is executed. `false` otherwise." 443 | - name: NAME[] 444 | data-type: CHAR[32] 445 | description: Name of the block in the `ADVANCE` run 446 | - name: NAME_C[] 447 | data-type: CHAR[32] 448 | description: Name of the block in the `MAIN` run 449 | - name: P_ARRIVED 450 | data-type: INT 451 | description: Path status for the programmed point 452 | - name: P_NAME[] 453 | data-type: CHAR[24] 454 | description: Name or aggregate of the end or auxiliary point 455 | - name: SNR 456 | data-type: INT 457 | description: Block number in the `ADVANCE` run 458 | - name: SNR_C 459 | data-type: INT 460 | description: Block number in the `MAIN` run 461 | -------------------------------------------------------------------------------- /docs/krl/reference/yaml/System.Variables.yml: -------------------------------------------------------------------------------- 1 | variables: 2 | - name: $A4PAR 3 | data-type: INT 4 | constraint : "`0` when unset. `1` when set" 5 | description: Set axis 4 parallel to the last rotational main axis 6 | - name: $ABS_ACCUR 7 | data-type: BOOL 8 | constraint : "`true` when switched `on`. `false` when switched `off`" 9 | description: Switch absolutely accurate robot model on/off 10 | - name: $ABS_CONVERT 11 | data-type: BOOL 12 | description: Conversion of point coordinates into absolutely accurate robot model 13 | - name: $ABS_RELOAD 14 | data-type: BOOL 15 | description: Reload absolutely accurate robot model 16 | - name: $ACC 17 | data-type: STRUC 18 | type: CP 19 | description: Accelerations in the `ADVANCE` run 20 | fields: 21 | - name: CP 22 | data-type: REAL 23 | unit: m/s^2^ 24 | description: Path acceleration in the `ADVANCE` run 25 | - name: ORI1 26 | data-type: REAL 27 | unit: °/s^2^ 28 | description: Swivel acceleration in the `ADVANCE` run 29 | - name: ORI2 30 | data-type: REAL 31 | unit: °/s^2^ 32 | description: Rotational acceleration in the `ADVANCE` run 33 | - name: $ACC_ACT_MA 34 | data-type: INT 35 | unit : '%' 36 | constraint : '[0,100]' 37 | description: Limit value of axial command acceleration 38 | - name: $ACC_AXIS[] 39 | data-type: INT[6] 40 | unit: '%' 41 | constraint: '[0,100]' 42 | description: Acceleration of the axes `A1..A6` in the `ADVANCE` run 43 | - name: $ACC_AXIS_C[] 44 | data-type: INT[6] 45 | unit: '%' 46 | constraint: '[0,100]' 47 | description: Acceleration of the axes `A1..A6` in the `MAIN` run 48 | - name: $ACC_C 49 | data-type: STRUC 50 | type: CP 51 | description: Accelerations in the `MAIN` run 52 | fields: 53 | - name: CP 54 | data-type: REAL 55 | unit: m/s^2^ 56 | constraint : \> 0 57 | description: Path acceleration in the `MAIN` run 58 | - name: ORI1 59 | data-type: REAL 60 | unit: °/s^2^ 61 | description: Swivel acceleration in the `MAIN` run 62 | - name: ORI2 63 | data-type: REAL 64 | unit: °/s^2^ 65 | description: Rotational acceleration in the `MAIN` run 66 | - name: $ACC_CAR_ACT 67 | data-type: STRUC 68 | type: ACC_CAR 69 | readonly: true 70 | description: The current values of the acceleration components and the total acceleration 71 | comments: | 72 | Acceleration due to gravity (9.81 m/s^2^) is automatically calculated into the acceleration caused by the motion. 73 | 74 | Note that `A`, `B` and `C` fields are not used. 75 | fields: 76 | - name: X 77 | data-type: REAL 78 | unit: m/s^2^ 79 | description: "`X` component of the acceleration expressed in `` frame." 80 | - name: Y 81 | data-type: REAL 82 | unit: m/s^2^ 83 | description: "`Y` component of the acceleration expressed in `` frame." 84 | - name: Z 85 | data-type: REAL 86 | unit: m/s^2^ 87 | description: "`Z` component of the acceleration expressed in `` frame." 88 | - name: ABS 89 | data-type: REAL 90 | unit: m/s^2^ 91 | constraint: \>= 0 92 | description: Acceleration magnitude. 93 | - name: $ACC_CAR_LIMIT 94 | data-type: STRUC 95 | type: ACC_CAR 96 | readonly: true 97 | description: Maximum permissible value for the acceleration components and the total acceleration 98 | fields: 99 | - name: X 100 | data-type: REAL 101 | unit: m/s^2^ 102 | description: "Maximum permissible value for the `X` component of the acceleration expressed in `` frame." 103 | - name: Y 104 | data-type: REAL 105 | unit: m/s^2^ 106 | description: "Maximum permissible value for the `Y` component of the acceleration expressed in `` frame." 107 | - name: Z 108 | data-type: REAL 109 | unit: m/s^2^ 110 | description: "Maximum permissible value for the `Z` component of the acceleration expressed in `` frame." 111 | - name: ABS 112 | data-type: REAL 113 | unit: m/s^2^ 114 | constraint: \>= 0 115 | description: Maximum permissible value for the acceleration magnitude. 116 | comments: | 117 | If the variable `` is set to `true`, then if the acceleration value is exceeded the robot is stopped (ramp-down braking) and an acknowledgement message is generated. 118 | 119 | Note that `A`, `B` and `C` fields are not used. 120 | - name: $ACC_CAR_MAX 121 | data-type: STRUC 122 | type: ACC_CAR 123 | readonly: true 124 | description: Saves the greatest absolute values of `` 125 | comments: | 126 | This variable can be set to `0` to determine the maximum values. 127 | - name: $ACC_CAR_STOP 128 | data-type: BOOL 129 | readonly: true 130 | constraint : "`true` when stop reaction is `activated`. `false` stop reaction is `deactivated`." 131 | description: Activates/Deactivates stop reaction when the value specified in `` is exceeded. 132 | - name: $ACC_CAR_TOOL 133 | data-type: STRUC 134 | type: FRAME 135 | readonly: true 136 | description: A point on the tool mounted on the robot at which the current effective acceleration is measured 137 | comments: | 138 | In the same way as ``, `` is also specified relative to the flange by means of the `X`, `Y` and `Z` coordinates. 139 | The angles of rotation `A`, `B` and `C` indicate the positions of the 3 axes of the coordinate system in which the acceleration components are then specified. 140 | The individual acceleration components and the total acceleration are all evaluated cyclically. 141 | 142 | Acceleration caused by gear unit torsion or flexion of the robot is not taken into consideration. 143 | - name: $ACC_EXTAX[] 144 | data-type: INT[6] 145 | unit: '%' 146 | constraint: '[0,100]' 147 | description: Acceleration of the external axes `E1..E7` in the `ADVANCE` run 148 | - name: $ACC_EXTAX_C[] 149 | data-type: INT[6] 150 | unit: '%' 151 | constraint: '[0,100]' 152 | description: Acceleration of the external axes `E1..E7` in the `MAIN` run 153 | - name: $ACC_MA 154 | data-type: STRUC 155 | type: CP 156 | description: Maximum values for path, swivel and rotational accelerations 157 | fields: 158 | - name: CP 159 | data-type: REAL 160 | unit: m/s^2^ 161 | description: Maximum path acceleration 162 | - name: ORI1 163 | data-type: REAL 164 | unit: °/s^2^ 165 | description: Maximum swivel acceleration 166 | - name: ORI2 167 | data-type: REAL 168 | unit: °/s^2^ 169 | description: Maximum rotational acceleration 170 | - name: $ACC_OV 171 | data-type: STRUC 172 | type: CP 173 | description: Data for acceleration with changes of override 174 | fields: 175 | - name: CP 176 | data-type: REAL 177 | unit: m/s^2^ 178 | description: Path acceleration with change of override 179 | - name: ORI1 180 | data-type: REAL 181 | unit: °/s^2^ 182 | description: Swivel acceleration with change of override 183 | - name: ORI2 184 | data-type: REAL 185 | unit: °/s^2^ 186 | description: Rotational acceleration with change of override 187 | - name: $ACT_BASE 188 | data-type: INT 189 | unit: index 190 | description: Number of the current BASE system 191 | - name: $ACT_EX_AX 192 | data-type: INT 193 | unit: index 194 | description: Number of the current external base kinematic system 195 | - name: $ACT_TOOL 196 | data-type: INT 197 | unit: index 198 | description: Number of the current tool coordinate system 199 | - name: $ACT_VAL_DIF 200 | data-type: INT 201 | unit: increments 202 | description: Maximum permissible difference of encoder actual values when switching on system. 203 | comments: If the limit values are exceeded, the message `Perform mastering` appears. 204 | - name: $ADAP_ACC 205 | data-type: ENUM 206 | type: ADAP_ACC 207 | description: Activation of acceleration adaptation. 208 | comments: "`#STEP1` and `#STEP2` require valid dynamic data (``)." 209 | - name: $ADVANCE 210 | data-type: INT 211 | unit: motion blocks 212 | constraint: '[0,5]' 213 | description: Specification of the `ADVANCE` run. 214 | - name: $ALARM_STOP 215 | data-type: SIGNAL 216 | unit: motion blocks 217 | constraint: '[0,5]' 218 | description: Specification of the `ADVANCE` run. 219 | - name: $ANA_DEL_FLT 220 | data-type: ENUM 221 | type: SW_ONOFF 222 | description: Analog output filter 223 | - name: $ANIN[] 224 | data-type: REAL[8] 225 | constraint: '[-1.0, 1.0]' 226 | description: Analog inputs `$ANIN[1]..$ANIN[8]` 227 | comments: | 228 | * `-1.0`maps to `-10V` 229 | * `+1.0`maps to `+10V` 230 | - name: $ANOUT[] 231 | data-type: REAL[16] 232 | constraint: '[-1.0, 1.0]' 233 | description: Analog outputs `$ANIN[1]..$ANIN[16]` 234 | comments: | 235 | * `-1.0`maps to `-10V` 236 | * `+1.0`maps to `+10V` 237 | - name: $APO_DIS_PTP[] 238 | data-type: REAL[12] 239 | unit: "`mm` or `°`" 240 | description: Maximum approximation distance for `PTP` motions. 241 | comments: | 242 | * `1..6` : axis `A1..A6` 243 | * `7..12` : external axis `E1..E6` 244 | - name: $ASYNC_AX 245 | data-type: SIGNAL 246 | description: Motion input for asynchronous external axes `E1..E6`, `negative` or `positive` direction. 247 | - name: $ASYNC_AXi_M 248 | data-type: SIGNAL 249 | description: Motion input for asynchronous external axes `E1..E6`, `negative` direction 250 | comments: | 251 | * `SIGNAL $ASYNC_AX1_M $IN[1026]` 252 | * `SIGNAL $ASYNC_AX2_M $IN[1026]` 253 | * `SIGNAL $ASYNC_AX3_M $IN[1026]` 254 | * `SIGNAL $ASYNC_AX4_M $IN[1026]` 255 | * `SIGNAL $ASYNC_AX5_M $IN[1026]` 256 | * `SIGNAL $ASYNC_AX6_M $IN[1026]` 257 | - name: $ASYNC_AXi_P 258 | data-type: SIGNAL 259 | description: Motion input for asynchronous external axes `E1..E6`, `positive` direction 260 | comments: | 261 | * `SIGNAL $ASYNC_AX1_P $IN[1026]` 262 | * `SIGNAL $ASYNC_AX2_P $IN[1026]` 263 | * `SIGNAL $ASYNC_AX3_P $IN[1026]` 264 | * `SIGNAL $ASYNC_AX4_P $IN[1026]` 265 | * `SIGNAL $ASYNC_AX5_P $IN[1026]` 266 | * `SIGNAL $ASYNC_AX6_P $IN[1026]` 267 | - name: $ASYNC_AXIS 268 | data-type: INT 269 | constraint: | 270 | * Bit = `0` (synchronous mode) 271 | * Bit = `1` (asynchronous mode) 272 | description: Bit arrays to switch external axes to asynchronous mode 273 | comments: | 274 | When `` is assigned in a KRL program, the newly-defined asynchronous axes are valid from this position until a new assignment is made. 275 | 276 | When `$ASYNC_AXIS` is defined, the `ADVANCE` run will be stopped if the value of `$ASYNC_AXIS` changes. 277 | Before a new value of `$ASYNC_AXIS` is saved, the system will wait until all synchronous motions (through advance run stop) and all asynchronous motions have been completed, and all axes are in position. 278 | Thus the instruction `$ASYNC_AXIS = ...` can be used – along with the system variable `` – to synchronize in time synchronous and asynchronous motions. 279 | `$ASYNC_AXIS` can only be modified in the KRL program, and not in the interrupt or in the `SUBMIT` interpreter. 280 | 281 | The bits correspond to the external axes in ascending order : 282 | 283 | * Bit 0 : external axis 1, 284 | * Bit 1 : external axis 2, 285 | * ... 286 | 287 | If the bit is set, the external axis will be switched to asynchronous mode; if it is reset, the external axis will be switched back to synchronous mode. 288 | - name: $ASYNC_FLT 289 | data-type: INT 290 | unit: ms 291 | constraint: '[0,16]' 292 | description: Filter for asynchronous external axes 293 | comments: | 294 | The value of `` is the filter length in milliseconds for all asynchronously coordinated motions. It corresponds to the system variable `FILTER` for synchronous motions. 295 | - name: $ASYNC_MODE 296 | data-type: INT 297 | unit: ms 298 | constraint: '[0,16]' 299 | description: Mode for asynchronous external axes 300 | comments: | 301 | In the machine data of the controller, the bit mask `` can be used to set various asynchronous motion execution modes. 302 | 303 | It is not possible to change modes while the robot controller is running. The modes can be combined in any way desired. 304 | 305 | Certain modes must be set in order to use special applications. 306 | In the standard setting (default mode) no `$ASYNC_MODE` bits are set. 307 | Only bit `0` is used at this time : 308 | 309 | * Bit 0 = 0 : default mode 310 | * Bit 0 = 1 (1st bit) : mode 1 311 | * Bit 1 = (2nd bit) : mode 2 block selection response 312 | - name: $ASYNC_OPT 313 | data-type: BOOL 314 | description: Option flag for *asynchronous axes are possible* 315 | comments: | 316 | * `true` : asynchronous axes possible 317 | * `false` : asynchronous axes not possible 318 | - name: $ASYNC_STATE 319 | data-type: ENUM 320 | type: ASYNC_STATE 321 | readonly: true 322 | description: Current asynchronous motion execution state 323 | comments: | 324 | `` can be used to check the current asynchronous motion execution state. 325 | 326 | Asynchronous and *normal* robot motions can be synchronized using this variable. 327 | - name: $ASYNC_T1_FAST 328 | data-type: INT 329 | constraint: '[0,1]' 330 | description: Control of the velocity reduction factor in `Test 1` mode 331 | comments: | 332 | * `0` : activated 333 | * `1` : deactivated 334 | - name: $ASYS 335 | data-type: ENUM 336 | type: ASYS 337 | description: Assignment of the jog keys 338 | - name: $AUT 339 | data-type: SIGNAL 340 | description: Signal declaration `Automatic` mode 341 | - name: $AUX_POWER 342 | data-type: SIGNAL 343 | description: Signal declaration for external power supply 344 | comments: | 345 | If `` has the value `true`, the external power supply is active; if the value is `false`, the external power supply is not active. 346 | - name: $AXIS_ACT 347 | data-type: STRUC 348 | type: E6AXIS 349 | description: Current axis-specific robot position 350 | - name: $AXIS_ACTMOD 351 | data-type: STRUC 352 | type: E6AXIS 353 | description: Display of axis angle modulo 180° 354 | - name: $AXIS_BACK 355 | data-type: STRUC 356 | type: E6AXIS 357 | description: Start position of the current motion block, axis-specific 358 | - name: $AXIS_CAL 359 | data-type: STRUC 360 | type: AXIS_CAL 361 | description: Display whether axis is referenced 362 | comments: "`true` when axis is referenced. `false` otherwise." 363 | - name: $AXIS_DIR[] 364 | data-type: INT[12] 365 | constraint: '{-1; 1}' 366 | description: Direction of rotation for axis `A1..A6` and external axis `E1..E6` 367 | comments: | 368 | * `1..6` : axis `A1..A6` 369 | * `7..12` : external axis `E1..E6` 370 | 371 | `1` for positive direction. `-1` for negative direction. 372 | - name: $AXIS_FOR 373 | data-type: STRUC 374 | type: E6AXIS 375 | description: Target position of the current motion block, axis-specific 376 | - name: $AXIS_HOME[] 377 | data-type: STRUC 378 | type: E6AXIS[5] 379 | description: Definition of the various home positions 380 | - name: $AXIS_INC 381 | data-type: STRUC 382 | type: AXIS_INC 383 | unit: increment 384 | description: Incremental actual values of the axes 385 | comments: Indication of the axis position in increments. 386 | - name: $AXIS_INT 387 | data-type: STRUC 388 | type: E6AXIS 389 | description: Robot position at the time of an interrupt 390 | - name: $AXIS_JUS 391 | data-type: STRUC 392 | type: AXIS_CAL 393 | description: Display whether axis is mastered 394 | comments: "`true` when axis is mastered. `false` otherwise." 395 | - name: $AXIS_RESO[] 396 | data-type: INT[12] 397 | unit : increments / revolution 398 | description: Resolution of the position sensing system 399 | comments: | 400 | Number of pulses per revolution of the encoder: 401 | 402 | * `1..6` : axis `A1..A6` 403 | * `7..12` : external axis `E1..E6` 404 | - name: $AXIS_RET 405 | data-type: STRUC 406 | type: E6AXIS 407 | description: Axis positions when leaving the programmed path, axis-specific 408 | - name: $AXIS_SEQ[] 409 | data-type: INT[12] 410 | description: Change in sequence of axis ... to axis ... 411 | comments: | 412 | * `1..6` : axis `A1..A6` 413 | * `7..12` : external axis `E1..E6` 414 | - name: $AXIS_TYPE[] 415 | data-type: INT[12] 416 | constraint: '[1,5]' 417 | description: Axis type identification 418 | comments: | 419 | Types : 420 | 421 | * `1` : Linear 422 | * `2` : Spindle 423 | * `3` : Rotational 424 | * `4` : Finitely rotating 425 | * `5` : Infinitely rotating 426 | 427 | Index : 428 | 429 | * `1..6` : axis `A1..A6` 430 | * `7..12` : external axis `E1..E6` 431 | - name: $AXWORKSPACE[] 432 | data-type: STRUC 433 | type: AXBOX[8] 434 | constraint: '[1,8]' 435 | description: Definition of axis-specific workspace monitoring 436 | 437 | - name: $BASE 438 | data-type: STRUC 439 | type: FRAME 440 | description: Base coordinate system in relation to the world coordinate system in the `ADVANCE` run. 441 | comments: | 442 | Offset and rotation of the base coordinate system in relation to the world coordinate system in the `ADVANCE` run. 443 | - name: $BASE_C 444 | data-type: STRUC 445 | type: FRAME 446 | description: Base coordinate system in relation to the world coordinate system in the `MAIN` run 447 | comments: | 448 | Offset and rotation of the base coordinate system in relation to the world coordinate system in the `MAIN` run. 449 | - name: $BASE_KIN[] 450 | data-type: CHAR[29] 451 | description: External kinematic / axes in base 452 | - name: $BOUNCE_TIME 453 | data-type: INT 454 | unit: ms 455 | description: Bounce time for EMT signals 456 | comments: | 457 | The signal is only accepted if it remains stable over the entire time period defined in `$BOUNCE_TIME`. 458 | - name: $BRAKE_SIG 459 | data-type: INT 460 | constraint: '{0,1}' 461 | description: Bit array for axis `A1..A6` and external axis `E1..E6` brakes 462 | comments: | 463 | * `0` : brake closed 464 | * `1`: brake open 465 | - name: $BRK_DEL_COM 466 | data-type: INT 467 | unit: ms 468 | description: Time after which the axis brakes are closed on completion of positioning during jogging 469 | - name: $BRK_DEL_EX 470 | data-type: INT 471 | unit: ms 472 | description: Brake delay time for external axes 473 | - name: $BRK_DEL_PRO 474 | data-type: INT 475 | unit: ms 476 | description: Time after which the axis brakes are closed on completion of posi- tioning in the program 477 | - name: $BRK_MAX_TM 478 | data-type: INT 479 | unit: ms 480 | description: Maximum deceleration time for path-maintaining Emergency Stop 481 | - name: $BRK_MODE 482 | data-type: INT 483 | unit: bit array 484 | constraint: "'Bbbbb'" 485 | description: Brake control mode 486 | comments: | 487 | The bits are counted from right to left : 488 | 489 | * `Bit 0` : axes `A1..A6` close (`b = 1`) / do not close (`b = 0`) at command end. 490 | * `Bit 1` : axes `A1..A6` close individually (`b = 1`) / together (`b = 0`). 491 | * `Bit 2` : axes `A1..A6` close (`b = 1`) / do not close (`b = 0`) during pauses in the motion. 492 | * `Bit 3` : external axes `E1..E6` brakes close individually (`b = 1`) / together (`b = 0`) with axes `A1..A6` during motion pauses. 493 | - name: $BRK_OPENTM 494 | data-type: INT 495 | unit: ms 496 | description: Time delay of command value output after axis brakes have been opened 497 | - name: $BUS_PAR 498 | data-type: STRUC 499 | type: BUS 500 | description: L2 bus interface (KRC32) 501 | 502 | 503 | - name: $CABLE2_MON 504 | data-type: BOOL 505 | description: Additional motor cable monitoring 506 | comments: | 507 | Specifies whether the connection of the second motor cable should be monitored (`true` for special machines) : 508 | 509 | * `true` : monitoring activated 510 | * `false` : monitoring deactivated 511 | - name: $CAL_DIFF 512 | data-type: INT 513 | description: Mastering difference for EMT mastering with check run 514 | - name: $CALP 515 | data-type: STRUC 516 | type: E6AXIS 517 | description: Reference point offset between mathematical zero point and encoder zero point 518 | - name: $CIRC_TYPE 519 | data-type: ENUM 520 | type: CIRC_TYPE 521 | description: Orientation control with CIRC blocks in the `ADVANCE` run 522 | - name: $CIRC_TYPE_C 523 | data-type: ENUM 524 | type: CIRC_TYPE 525 | description: Orientation control with CIRC blocks in the `MAIN` run 526 | - name: $CMD 527 | data-type: INT 528 | description: Display assignment number (handle) for command channel 529 | - name: $COM_NAME 530 | data-type: CHAR[486] 531 | description: Command which is to be processed after next start 532 | - name: $COM_VAL_MI[] 533 | data-type: REAL[12] 534 | description: Limitation of command speed for axis `A1..A6` and external axis `E1..E6` 535 | comments: | 536 | * `1..6` : axis `A1..A6` 537 | * `7..12` : external axis `E1..E6` 538 | - name: $CONF_MESS 539 | data-type: SIGNAL 540 | description: Signal declaration for `reset acknowledgement messages`. 541 | comments: | 542 | External confirmation 543 | - name: $COSYS 544 | data-type: ENUM 545 | type: COSYS 546 | description: Coordinate system for jogging 547 | - name: $COUNT_I[] 548 | data-type: INT[32] 549 | description: Freely usable integer variables 550 | comments: Used as counters in the VW package 551 | - name: $COUP_COMP[,] 552 | data-type: STRUC 553 | type: FRA[6,6] 554 | description: Axis coupling factors 555 | - name: $CP_VEL_TYPE 556 | data-type: ENUM 557 | type: COSYS 558 | description: Reduction of the CP path velocity 559 | comments: | 560 | If the axis limit values are exceeded, the CP velocity is reduced. 561 | Reduction is always active in Cartesian jogging. 562 | - name: $CP_VEL_TYPE 563 | data-type: ENUM 564 | type: CP_VEL_TYPE 565 | description: Reduction of the CP path velocity 566 | comments: | 567 | If the axis limit values are exceeded, the CP velocity is reduced. 568 | Reduction is always active in Cartesian jogging. 569 | - name: $CPVELREDMELD 570 | data-type: INT 571 | description: Generation of message if path velocity reduced 572 | comments: | 573 | The message contains the point name and the maximum reduction in the specific motion command. 574 | 575 | * `0` : Generation of message deactivated. 576 | * `1` : Generation of message in the event of block change in jog mode. 577 | * `100` : Generation of message in the event of block change in all modes. 578 | - name: $CURR_ACT[] 579 | data-type: REAL[12] 580 | unit: '%' 581 | constraint: '[-100,100]' 582 | description: Actual current of axes 583 | comments: | 584 | Current value of current of axes `A1..A6` and external axes `E1..E6` in percentage of maximum servo drive module current `$CURR_MAX` (-100% to +100%). 585 | 586 | * `1..6` : axis `A1..A6` 587 | * `7..12` : external axis `E1..E6` 588 | - name: $CURR_CAL[] 589 | data-type: REAL[12] 590 | description: Current calibration of axis in the power module 591 | comments: | 592 | For KRC `1a` and KRC `2` : `calibration = 1`. 593 | 594 | * `1` : High power 595 | * `2` : Medium / low power 596 | * `4` : Low power 597 | 598 | * `1..6` : axis `A1..A6` 599 | * `7..12` : external axis `E1..E6` 600 | - name: $CURR_COM_EX[] 601 | data-type: REAL[6] 602 | description: Current limitation for external axes in jog mode 603 | comments: | 604 | * `1..6` : external axis `E1..E6` 605 | - name: $CURR_LIM[] 606 | data-type: INT[12] 607 | unit: '%' 608 | constraint: '[0,100]' 609 | description: Current limitation 610 | comments: | 611 | * `1..6` : axis `A1..A6` 612 | * `7..12` : external axis `E1..E6` 613 | - name: $CURR_MAX[] 614 | data-type: REAL[12] 615 | unit: 'A' 616 | description: Maximum effective current on power module output 617 | comments: | 618 | Effective current must be present 619 | 620 | * `1..6` : axis `A1..A6` 621 | * `7..12` : external axis `E1..E6` 622 | - name: $CURR_MON[] 623 | data-type: REAL[12] 624 | description: Permissible rated current 625 | comments: | 626 | Defines the limit for `i^2^ x t` monitoring for `55°C` 627 | 628 | * `1..6` : axis `A1..A6` 629 | * `7..12` : external axis `E1..E6` 630 | - name: $CURR_RED[,] 631 | data-type: REAL[12,2] 632 | description: Current limitation for axes in `%` of the maximum current 633 | comments: | 634 | 635 | * `[1..6,:]` : axis `A1..A6` 636 | * `[7..12,:]` : external axis `E1..E6` 637 | 638 | * `[:,1]` : positive limit 639 | * `[:,2]` : negative limit 640 | - name: $CYC_DEFi[] 641 | data-type: CHAR[470] 642 | description: Input text for the corresponding cyclical flag 643 | comments: | 644 | * i in `[1,32]` 645 | - name: $CYCFLAG[] 646 | data-type: BOOL[32] 647 | description: Cyclical flags 648 | comments: | 649 | There are 32 cyclical flags available. 650 | These flags are cyclically updated independently of program execution. 651 | The default value is `false`. 652 | 653 | - name: $OV_PRO 654 | data-type: INT 655 | constraint: '[0, 100]' 656 | unit: '%' 657 | description: Program override 658 | comments: | 659 | Program override is the velocity of the robot during program execution. 660 | 661 | The program override is specified as a percentage of the programmed velocity. 662 | In T1 mode, the maximum velocity is 250 mm/s, irrespective of the value that is set. 663 | - name: $PRO_MODE 664 | data-type: ENUM 665 | type: PRO_MODE 666 | description: Program run mode dependent on `` 667 | - name: $PRO_MODE0 668 | data-type: ENUM 669 | type: PRO_MODE 670 | description: Program run mode of the `SUBMIT` interpreter 671 | - name: $PRO_MODE1 672 | data-type: ENUM 673 | type: PRO_MODE 674 | description: Program run mode of the `ROBOT` interpreter 675 | - name: $PRO_STATE 676 | data-type: ENUM 677 | type: PRO_STATE 678 | description: Process state dependent on `` 679 | - name: $PRO_STATE0 680 | data-type: ENUM 681 | type: PRO_STATE 682 | description: Process state of the `SUBMIT` interpreter 683 | - name: $PRO_STATE1 684 | data-type: ENUM 685 | type: PRO_STATE 686 | description: Process state of the `ROBOT` interpreter 687 | - name: $PRO_NAME[] 688 | data-type: CHAR[24] 689 | description: Process name dependent on `` 690 | - name: $PRO_NAME0[] 691 | data-type: CHAR[24] 692 | description: Process name of the `SUBMIT` interpreter 693 | - name: $PRO_NAME1[] 694 | data-type: CHAR[24] 695 | description: Process name of the `ROBOT` interpreter 696 | -------------------------------------------------------------------------------- /docs/stylesheets/extra.css: -------------------------------------------------------------------------------- 1 | h2.krl { 2 | font-weight: bold; 3 | color: #ff7043; 4 | text-transform: uppercase; 5 | } 6 | h3.krl { 7 | font-weight: bold; 8 | } 9 | hr.krl-section { 10 | border-bottom-style: solid; 11 | border-bottom-width: .2rem; 12 | /* border-bottom-color: #ff7043; */ 13 | margin: 1em 0 14 | } 15 | hr.krl-node { 16 | display: none; 17 | width: 0.5em; 18 | margin:auto; 19 | border-bottom: 0rem solid #ff7043; 20 | } 21 | /* md-icon md-content__icon krl krl-node tippy */ 22 | 23 | .krl-edit-icon { 24 | /* display: inline-block; */ 25 | position: relative; 26 | margin: 1rem 0; 27 | padding: 0; 28 | float: right; 29 | font-size: 1.2em; 30 | color: black; 31 | } 32 | 33 | 34 | 35 | .tippy-tooltip.dark-theme { 36 | /* Your styling here. Example: */ 37 | /* border-radius: 3px; 38 | background: var(--mdc-theme-dark-dark); 39 | color: var(--mdc-theme-lite); 40 | padding: .75rem; */ 41 | font-size: 1.0em; 42 | /* text-align: left; 43 | color: var(--mdc-theme-lite); */ 44 | } 45 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | import sys, os, glob 2 | import markdown 3 | import yaml 4 | from yaml.loader import SafeLoader 5 | import jinja2 6 | from jinja2 import Template, Environment, FileSystemLoader 7 | from collections import OrderedDict 8 | import re 9 | 10 | # https://stackoverflow.com/a/53647080/7060811 11 | class SafeLineLoader(SafeLoader): 12 | def construct_mapping(self, node, deep=False): 13 | mapping = super(SafeLineLoader, self).construct_mapping(node, deep=deep) 14 | # Add 1 so line numbering starts at 1 15 | mapping['line-start'] = node.start_mark.line + 1 16 | mapping['line-end'] = node.end_mark.line 17 | return mapping 18 | 19 | def declare_variables(variables, macro): 20 | """ 21 | This is the hook for the functions 22 | 23 | - variables: the dictionary that contains the variables 24 | - macro: a decorator function, to declare a macro. 25 | """ 26 | 27 | keys = ['enums', 'strucs', 'variables', 'functions'] 28 | 29 | 30 | def GetNameSpace(filepath): 31 | base = os.path.basename(filepath) 32 | filename = os.path.splitext(base)[0] 33 | tokens = filename.split('.') 34 | namespace = '.'.join(token.title() for token in tokens) 35 | return namespace 36 | 37 | def Load(): 38 | 39 | path = './docs/krl/reference/yaml/' 40 | namespaces = {} 41 | 42 | 43 | 44 | for filepath in glob.glob(os.path.join(path, '*.yml')): 45 | namespace = GetNameSpace(filepath) 46 | stream = open(filepath, 'r') 47 | dic = yaml.load(stream, Loader=SafeLineLoader) 48 | 49 | # add namespace to each element 50 | for k in keys: 51 | if k in dic and dic[k] != None: 52 | for i in range(len(dic[k])): 53 | dic[k][i]['namespace'] = namespace 54 | 55 | namespaces[namespace] = dic 56 | 57 | 58 | variables['allnamespaces'] = namespaces 59 | 60 | # add entries by type for cross ref 61 | for k in keys: 62 | k1 = "all" + k 63 | variables[k1] = [] 64 | for namespace in namespaces: 65 | if k in namespaces[namespace]: 66 | if namespaces[namespace][k] != None: 67 | variables[k1].extend(namespaces[namespace][k]) 68 | 69 | # create type index 70 | variables["alltypes"] = {} 71 | for k in keys[0:2]: 72 | for namespace in namespaces: 73 | if k in namespaces[namespace]: 74 | if namespaces[namespace][k] != None: 75 | for i in range(len(namespaces[namespace][k])): 76 | t = namespaces[namespace][k][i] 77 | variables["alltypes"][t['name']] = t 78 | 79 | # crossref index name = {value, path, line} 80 | variables["xref"] = {} 81 | for namespace in namespaces: 82 | for k in keys: 83 | if k in namespaces[namespace] and namespaces[namespace][k] != None : 84 | for i in range(len(namespaces[namespace][k])): 85 | node_value = namespaces[namespace][k][i] 86 | node_name = node_value['name'] 87 | node_path = namespace 88 | node_type = k 89 | variables["xref"][node_name] = {'value': node_value, 'type': node_type, 'path': node_path, 'line-start': node_value['line-start'], 'line-end': node_value['line-end']} 90 | 91 | 92 | md = markdown.Markdown(extensions=['pymdownx.caret']) 93 | 94 | 95 | Load() 96 | 97 | def split(txt, seps): 98 | default_sep = seps[0] 99 | 100 | # we skip seps[0] because that's the default seperator 101 | for sep in seps[1:]: 102 | txt = txt.replace(sep, default_sep) 103 | return [i.strip() for i in txt.split(default_sep)] 104 | 105 | def InlineMdFilter(text): 106 | if text != None: 107 | html = md.convert(text) 108 | # strip the enclosing

tags of the converted text 109 | html = html.strip() 110 | n = len(html) 111 | if html[0:3] == '

': 112 | html = html[3:] 113 | n = len(html) 114 | if html[n-4:n] == '

': 115 | html = html[0:n-4] 116 | 117 | # replace xref lables in the html 118 | return XRefFilter(html) 119 | else: 120 | return text 121 | 122 | def XRefFilter(html): 123 | regex = r'<xref:([\$\w]+)>' # match 124 | # regex = r'' # match 125 | 126 | def repl(match): 127 | key = match.group(1) 128 | if key in variables["xref"]: 129 | node = variables["xref"][key] 130 | path = "../" + node['path'].lower() + "/#" + key.lower().strip('$') 131 | return '' + str(key) + '' 132 | else: 133 | return key 134 | 135 | # return "bob" 136 | return re.sub(regex, repl, html, re.MULTILINE, re.IGNORECASE) 137 | 138 | 139 | def ArrayDimFilter(text): 140 | res = split(text, ('[', ']')) 141 | if len(res) > 1: 142 | return res[1] 143 | return '' 144 | 145 | def ArrayTypeFilter(text): 146 | res = split(text, ('[', ']')) 147 | if len(res) > 1: 148 | return res[0] 149 | return '' 150 | 151 | def EnumListFilter(values): 152 | html = [] 153 | for value in values: 154 | html.append("" + "#" + str(value['name']) + "") 155 | return ', '.join(html) 156 | 157 | @macro 158 | def NamespaceToMarkdown(namespace): 159 | 160 | variables['namespace_filter'] = namespace 161 | j2_env = Environment(loader=FileSystemLoader('./theme/templates/'), trim_blocks=True) 162 | j2_env.filters['markdown'] = lambda text: InlineMdFilter(text) 163 | j2_env.filters['arraydim'] = lambda text: ArrayDimFilter(text) 164 | j2_env.filters['arraytype'] = lambda text: ArrayTypeFilter(text) 165 | j2_env.filters['enumlist'] = lambda values: EnumListFilter(values) 166 | # j2_env.filters['xref'] = lambda text: XRefFilter(text) 167 | j2_env.filters['enum'] = lambda text: "`#" + str(text) + "`" 168 | j2_tpl = j2_env.get_template('namespace.j2') 169 | return j2_tpl.render(variables) 170 | 171 | @macro 172 | def GetTypePath(typename): 173 | if typename in variables["alltypes"]: 174 | t = variables["alltypes"][typename] 175 | return './' + t['namespace'].lower() + '/#' + typename 176 | else: 177 | return '' 178 | 179 | @macro 180 | def ListNamespaces(): 181 | path = './docs/krl-ref/ref/' 182 | namespaces = [] 183 | for filepath in glob.glob(os.path.join(path, '*.yml')): 184 | namespace = GetNameSpace(filepath) 185 | namespaces.append(namespace) 186 | return ', '.join(namespaces) 187 | 188 | 189 | # Give a name to each python function 190 | # macro(ListNamespaces, 'ListNamespaces') 191 | # macro(GetTypePath, 'GetTypePath') -------------------------------------------------------------------------------- /mkdocs.yml: -------------------------------------------------------------------------------- 1 | site_name: OpenKuka 2 | site_dir: '../openkuka.github.io' 3 | site_description: 'Community documentation for the Kuka Robot Language' 4 | site_author: Lionel du Peloux 5 | 6 | google_analytics: 7 | - 'UA-136856150-1' 8 | - 'auto' 9 | theme: 10 | name: 'material' 11 | custom_dir: 'theme' 12 | palette: 13 | primary: 'deep orange' 14 | accent: 'indigo' 15 | feature: 16 | tabs: true 17 | language: 'en' 18 | plugins: 19 | - search 20 | - macros 21 | 22 | repo_name: 'OpenKuka/Website' 23 | repo_url: 'https://github.com/OpenKuka/Website' 24 | 25 | extra: 26 | social: 27 | - type: 'github' 28 | link: 'https://github.com/openkuka' 29 | 30 | nav: 31 | - OpenKuka: 32 | - Home: index.md 33 | - Contributing: contributing.md 34 | - Author's notes: authors.md 35 | - Language Reference: 36 | - System.Types: krl/reference/system.types.md 37 | - System.Variables: krl/reference/system.variables.md 38 | - System.Functions: krl/reference/system.functions.md 39 | - System.Messages: krl/reference/system.messages.md 40 | 41 | markdown_extensions: 42 | - markdown.extensions.admonition 43 | - markdown.extensions.codehilite: 44 | linenums: true 45 | - attr_list 46 | - pymdownx.betterem: 47 | smart_enable: all 48 | - pymdownx.caret 49 | - pymdownx.details 50 | - pymdownx.smartsymbols 51 | - pymdownx.superfences 52 | - pymdownx.extra 53 | - pymdownx.extrarawhtml 54 | - toc: 55 | permalink: true 56 | 57 | extra_css: 58 | - 'stylesheets/extra.css' 59 | 60 | extra_javascript: 61 | # - 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_CHTML' 62 | # - 'https://unpkg.com/popper.js@1/dist/umd/popper.min.js' 63 | # - 'https://unpkg.com/tippy.js@4' 64 | # - 'javascripts/extra.js' 65 | 66 | -------------------------------------------------------------------------------- /theme/main.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} -------------------------------------------------------------------------------- /theme/partials/toc-item.html: -------------------------------------------------------------------------------- 1 |
  • 2 | 3 | {% set xref = config.extra.xref %} 4 | {% if xref[toc_item.title] is defined %} 5 | {% set xnode = xref[toc_item.title]['value'] %} 6 | {% if toc_item.children %} 7 | {{ toc_item.title }} 8 | {% else %} 9 | {{ xnode.name}} 10 | {% endif %} 11 | {% else %} 12 | {{ toc_item.title }} 13 | {% endif %} 14 | {% if toc_item.children %} 15 | 22 | {% endif %} 23 |
  • -------------------------------------------------------------------------------- /theme/templates/macros_common.j2: -------------------------------------------------------------------------------- 1 | {# show_comments #} 2 | {% macro show_details(comments, sample) %} 3 | {% if comments is defined or sample is defined %} 4 | **Comments** 5 | 6 | ??? note "..." 7 | 8 | {% if comments is defined and comments != none %} 9 | **Notes** 10 | 11 | {{ comments | markdown | indent(4) }} 12 | 13 | {% endif %} 14 | 15 | {% if sample is defined and sample != none %} 16 | *** 17 | **Code Sample** 18 | 19 | {% if 'krl' in sample -%} 20 | ```pascal tab="KRL" 21 | {{ sample['krl'] |string | indent(4) }} 22 | ``` 23 | {%- endif %} 24 | 25 | 26 | {% if 'output' in sample -%} 27 | ```txt tab="Output" 28 | {{ sample['output'] |string | indent(4) }} 29 | ``` 30 | {%- endif %} 31 | 32 | {% endif %} 33 | {% endif %} 34 | {% endmacro %} 35 | 36 | {# get_typelink #} 37 | {% macro get_typelink(typename) %} 38 | {% if '[' in typename %} 39 | {% set elType = typename | arraytype %} 40 | {% if elType in xref %} 41 | {% set anchor = '../' + xref[elType].path|lower + '/#' + elType|lower %} 42 | {{ elType }}[{{ typename | arraydim }}] 43 | {% else %} 44 | {{ typename }} 45 | {% endif %} 46 | {% else %} 47 | {% if typename in xref %} 48 | {% set anchor = '../' + xref[typename].path|lower + '/#' + typename|lower %} 49 | {{ typename }} 50 | {% else %} 51 | {{ typename }} 52 | {% endif %} 53 | {% endif %} 54 | {% endmacro %} 55 | 56 | 57 | {# 58 | show_section_title 59 | #} 60 | {% macro show_section_title(name) %} 61 | ## {{ name }} {: class=krl krl-section } 62 |
    63 | {% endmacro %} 64 | 65 | {# 66 | show_node_title 67 | #} 68 | {% macro show_node_title(name) -%} 69 | {% set node = xref[name] %} 70 | {% set url = "https://github.com/OpenKuka/openkuka.github.io/blob/master/krl/reference/yaml/" + node['path'] + ".yml#L" + node['line-start']|string + "-L" + node['line-end']|string %} 71 | {% set txt = "Edit this item on Github" %} 72 | 73 | ### {{ name }} {: class=krl krl-node } 74 |
    75 | {% endmacro %} 76 | -------------------------------------------------------------------------------- /theme/templates/macros_enum.j2: -------------------------------------------------------------------------------- 1 | {% import 'macros_common.j2' as common with context %} 2 | 3 | {# show_type #} 4 | {% macro show_type(enum) %} 5 | {% set name = enum.name %} 6 | {% set description = enum.description %} 7 | {% set dtype = enum['data-type'] %} 8 | {% set values = enum['values'] %} 9 | 10 | {{ common.show_node_title(name) }} 11 | *{{ description | markdown }}* 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
    NameType
    {{ name }}{{ dtype }}
    27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | {% for value in values %} 37 | {% set dtype = value['data-type'] %} 38 | 39 | 40 | 41 | 42 | {% endfor %} 43 | 44 |
    ValueDescription
    #{{ value.name }}{{ value.description | markdown }}
    45 | 46 | {% endmacro %} 47 | 48 | 49 | {# show_var #} 50 | {% macro show_var(enum) %} 51 | {% set name = enum.name %} 52 | {% set namespace = enum.namespace %} 53 | {% set description = enum.description %} 54 | {% set dtype = enum['data-type'] %} 55 | {% set type = enum['type'] %} 56 | 57 | {{ common.show_node_title(name) }} 58 | *{{ description | markdown }}* 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 |
    NameTypeConstraint
    {{ name }}{{ common.get_typelink(type) }}{{ show_enumlist(type) }}
    76 | 77 | {{ common.show_details(enum['comments'], enum['code-sample']) }} 78 | 79 | {% endmacro %} 80 | 81 | {% macro show_enumlist(type) %} 82 | {% set node = xref[type]['value'] %} 83 | {%- for value in node['values'] -%} 84 | #{{ value['name'] | upper }}{{ ' ,' if not loop.last }} 85 | {%- endfor -%} 86 | {% endmacro %} 87 | -------------------------------------------------------------------------------- /theme/templates/macros_function.j2: -------------------------------------------------------------------------------- 1 | {% import 'macros_common.j2' as common with context %} 2 | 3 | {# show_func #} 4 | {% macro show(function) %} 5 | {% set name = function.name %} 6 | {% set description = function.description %} 7 | {% set params = function.parameters %} 8 | {% set rtype = function['return-type'] %} 9 | {% set rdesc = function['return-description'] %} 10 | {% set comments = function.comments %} 11 | {% set sample = function['code-sample'] %} 12 | 13 | {{ common.show_node_title(name) }} 14 | *{{ description | markdown }}* 15 | 16 | **Parameters** 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | {% for p in params %} 29 | 30 | 31 | 34 | 35 | 36 | 37 | {% endfor %} 38 | 39 |
    ParameterTypeValue/RefDescription
    {{ p.name }} 32 | {{ common.get_typelink(p.type) }} 33 | {{ p.pass }}{{ p.description | markdown }}
    40 | 41 | 42 | {% if rtype is defined %} 43 | **Return** 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 |
    TypeDescription
    {{ rtype }}{{ rdesc | markdown }}
    59 | {% endif %} 60 | 61 | {{ common.show_details(comments, sample) }} 62 | 63 | {% endmacro %} -------------------------------------------------------------------------------- /theme/templates/macros_struc.j2: -------------------------------------------------------------------------------- 1 | {% import 'macros_common.j2' as common with context %} 2 | 3 | {# show_type #} 4 | {% macro show_type(struc) %} 5 | {% set name = struc.name %} 6 | {% set description = struc.description %} 7 | {% set dtype = struc['data-type'] %} 8 | {% set type = struc['type'] %} 9 | {% set fields = struc['fields'] %} 10 | 11 | {{ common.show_node_title(name) }} 12 | *{{ description | markdown }}* 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 26 | 27 |
    NameType
    {{ name }} 24 | {{ dtype }} 25 |
    28 | 29 | {% if fields != none and fields|length %} 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | {% for field in fields %} 40 | 41 | {% set dtype = field['data-type'] %} 42 | {% if dtype|upper == 'STRUCT' or dtype|upper == 'ENUM' %} 43 | {% set typename = field['type'] %} 44 | {% else %} 45 | {% set typename = field['data-type'] %} 46 | {% endif %} 47 | 48 | {% set type = field['type'] %} 49 | 50 | 51 | 52 | 53 | 54 | {% endfor %} 55 | 56 |
    FieldTypeDescription
    {{ field.name }}{{ common.get_typelink(typename) }}{{ (field.description or '') | markdown }}
    57 | {% endif %} 58 | 59 | {{ common.show_details(struc['comments'], struc['code-sample']) }} 60 | 61 | {% endmacro %} 62 | 63 | 64 | {# show_var #} 65 | {% macro show_var(struc) %} 66 | {% set name = struc.name %} 67 | {% set description = struc.description %} 68 | {% set dtype = struc['data-type'] %} 69 | {% set type = struc['type'] %} 70 | {% set fields = struc['fields'] %} 71 | 72 | {{ common.show_node_title(name) }} 73 | *{{ description | markdown }}* 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 87 | 88 |
    NameType
    {{ name }} 85 | {{ common.get_typelink(type) }} 86 |
    89 | 90 | {% if fields != none and fields|length %} 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | {% for field in fields %} 103 | {% set dtype = field['data-type'] %} 104 | {% if dtype|upper == 'STRUCT' or dtype|upper == 'ENUM' %} 105 | {% set typename = field['type'] %} 106 | {% else %} 107 | {% set typename = field['data-type'] %} 108 | {% endif %} 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | {% endfor %} 117 | 118 |
    FieldTypeUnitConstraintDescription
    {{ field.name }}{{ common.get_typelink(typename) }}{{ (field.unit or '') | markdown }}{{ (field.constraint or '') | markdown }}{{ (field.description or '') | markdown }}
    119 | {% endif %} 120 | 121 | {{ common.show_details(struc['comments'], struc['code-sample']) }} 122 | 123 | {% endmacro %} -------------------------------------------------------------------------------- /theme/templates/macros_variables.j2: -------------------------------------------------------------------------------- 1 | {% import 'macros_common.j2' as common with context %} 2 | 3 | {# show_scalar #} 4 | {% macro show_scalar(scalar) %} 5 | {% set name = scalar.name %} 6 | {% set namespace = scalar.namespace %} 7 | {% set description = scalar.description %} 8 | {% set dtype = scalar['data-type'] %} 9 | 10 | {{ common.show_node_title(name) }} 11 | *{{ description | markdown }}* 12 | 13 | {% if (dtype | upper == 'INT') or (dtype | upper == 'REAL') %} 14 | {% set unit = scalar['unit'] %} 15 | {% set constraint = scalar['constraint'] %} 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 |
    NameTypeUnitConstraint
    {{ name }}{{ dtype }}{{ (unit or '') | markdown }}{{ (constraint or '') | markdown }}
    34 | 35 | {% else %} 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 |
    NameType
    {{ name }}{{ dtype }}
    51 | 52 | {% endif %} 53 | 54 | 55 | {{ common.show_details(scalar['comments'], scalar['code-sample']) }} 56 | 57 | {% endmacro %} 58 | 59 | 60 | 61 | {# show_array #} 62 | {% macro show_array(array) %} 63 | {% set name = array.name %} 64 | {% set namespace = array.namespace %} 65 | {% set description = array.description %} 66 | {% set dtype = array['data-type'] %} 67 | 68 | {{ common.show_node_title(name) }} 69 | *{{ description | markdown }}* 70 | 71 | {% if (dtype | arraytype | upper == 'INT') or (dtype | arraytype | upper == 'REAL') %} 72 | {% set unit = array['unit'] %} 73 | {% set constraint = array['constraint'] %} 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 |
    NameTypeUnitConstraint
    {{ name }}{{ dtype }}{{ (unit or '') | markdown }}{{ (constraint or '') | markdown }}
    92 | 93 | {% else %} 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 |
    NameType
    {{ name }}{{ dtype }}
    109 | 110 | {% endif %} 111 | 112 | 113 | {{ common.show_details(array['comments'], array['code-sample']) }} 114 | 115 | {% endmacro %} -------------------------------------------------------------------------------- /theme/templates/namespace.j2: -------------------------------------------------------------------------------- 1 | {% set fences = 'true' %} 2 | 3 | {# MACROS #} 4 | {% import 'macros_common.j2' as common with context %} 5 | {% import 'macros_enum.j2' as macros_enum with context%} 6 | {% import 'macros_struc.j2' as macros_struc with context%} 7 | {% import 'macros_variables.j2' as macros_var with context%} 8 | {% import 'macros_function.j2' as macros_func with context%} 9 | 10 | {% set ns = allnamespaces[namespace_filter] %} 11 | {% set ns_desc = ns['description'] %} 12 | {% set ns_enums = ns['enums'] %} 13 | {% set ns_strucs = ns['strucs'] %} 14 | {% set ns_variables = ns['variables'] %} 15 | {% set ns_functions = ns['functions'] %} 16 | 17 | # {{ namespace_filter }} {: class=krl krl-namespace } 18 | 19 | {{ ns_desc | string | markdown }} 20 | 21 | {# ENUMS #} 22 | {% if ns_enums is defined and ns_enums != none%} 23 | {{ common.show_section_title('Enum Types') }} 24 | 25 | {% for enum in ns_enums | sort(attribute='name') %} 26 | {{ macros_enum.show_type(enum)|indent(0, true) }} 27 | {% endfor %} 28 | {% endif %} 29 | 30 | 31 | {# STRUCS #} 32 | {% if ns_strucs is defined and ns_strucs != none%} 33 | {{ common.show_section_title('Struc Types') }} 34 | 35 | {% for struc in ns_strucs | sort(attribute='name') %} 36 | {{ macros_struc.show_type(struc)}} 37 | {% endfor %} 38 | {% endif %} 39 | 40 | 41 | {# VARIABLES #} 42 | {% if ns_variables is defined and ns_variables != none%} 43 | {{ common.show_section_title('Variables') }} 44 | 45 | {% for var in ns['variables'] | sort(attribute='name') %} 46 | {% set name = var.name %} 47 | {% set description = var.description %} 48 | {% set dtype = var['data-type'] %} 49 | 50 | {# struc var #} 51 | {% if dtype|upper == 'STRUC' %} 52 | {{ macros_struc.show_var(var) }} 53 | 54 | {# enum var #} 55 | {% elif dtype|upper == 'ENUM' %} 56 | {{ macros_enum.show_var(var) }} 57 | 58 | {% elif '[' in dtype %} 59 | {{ macros_var.show_array(var) }} 60 | {% else %} 61 | 62 | {{ macros_var.show_scalar(var) }} 63 | {% endif %} 64 | 65 | {% endfor %} 66 | {% endif %} 67 | 68 | 69 | {# FUNCTIONS #} 70 | {% if ns_functions is defined and ns_functions != none%} 71 | {{ common.show_section_title('Functions') }} 72 | 73 | {% for func in ns_functions | sort(attribute='name') %} 74 | {{ macros_func.show(func)}} 75 | 76 | {% endfor %} 77 | 78 | {% endif %} 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /theme/tooltip.js: -------------------------------------------------------------------------------- 1 | tippy('.tippy', { 2 | arrow: true, 3 | arrowType: 'round', // or 'sharp' (default) 4 | }) -------------------------------------------------------------------------------- /website.code-workspace: -------------------------------------------------------------------------------- 1 | { 2 | "folders": [ 3 | { 4 | "path": "." 5 | } 6 | ], 7 | "settings": { 8 | "python.pythonPath": "venv/bin/python3.7" 9 | } 10 | } --------------------------------------------------------------------------------