1. Home
    1. Dashboard
    2. Search
  2. Forum
    1. Unresolved Threads
    2. Members
      1. Recent Activities
      2. Users Online
      3. Team Members
      4. Search Members
      5. Trophys
  3. Articles
  4. Blog
  5. Videos
  6. Jobs
  7. Shop
    1. Orders
  • Login or register
  • Search
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • Blog Articles
  • Products
  • More Options
  1. Robotforum - Support and discussion community for industrial robots and cobots
  2. Forum
  3. Industrial Robot Support and Discussion Center
  4. KUKA Robot Forum
Your browser does not support videos RoboDK Software for simulation and programming
Visit our Mainsponsor
IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Sponsored Ads

Tips and tricks

  • Serpantinas
  • August 18, 2020 at 11:22 AM
  • Thread is Unresolved
  • Serpantinas
    Reactions Received
    2
    Trophies
    3
    Posts
    81
    • August 18, 2020 at 11:22 AM
    • #1

    Hello,

    Recently I found out that MsgLib.src file exists and it allows for fast message programming, don't know if it is mentioned in Message manual for KSS8.3 but I didn't read it and did it the hard way :grinning_squinting_face:

    One more very simple but in the beginning it was a great help is to use Wait sec 0 to stop advanced run.

    I was thinking maybe people could share their finds on functions, tips and tricks that makes their life easier with Kuka.

  • Mentat
    Reactions Received
    61
    Trophies
    5
    Posts
    243
    • August 27, 2020 at 12:39 PM
    • Best Answer
    • #2

    I prefer using "Wait for True", that way it's easier (for me) to distinguish that stopping advance pointer is the only reason that line is there.

    Writing functions to iterate over commonly used structures like pos, frame, axis and the like was game changing. Highly recommend.

    Use ptp $Axis_act for quick BCO instead of $pos_act- unlike the latter it works predictably in singularities.

    Assigning pos to frame to remove status and turn is obvious, but still useful.

    Something that I use quite a lot:

    Code
    IF _DebugMode then
        Halt
    ENDIF

    Very easy to remove after debugging, as opposed to just Halt.

    Use VarState function to write functions with default parameters or to turn structures with missing elements into strings.

    Geometric operator can be used to avoid stopping advance pointer when there is a need to change $tool and or $base.

    Don't do complex things like trajectory planing or collision avoidance in KRL.

    Don't use literals for inputs, outputs, timers, interrupt priorities and the like- name them all in one .dat file. $In[_IDTableVacOk] is a lot easier to read than $in[15]. Then, when changing, you have to change number in one place only, instead of combing through the code and hoping you didn't miss anything.

    Similarly, using functions to return base or tool frame is better, since it's easier to remember and impossible to accidentally change them.

    TIMER_LIMIT(Time) is great when you need a simple timer in combination with other things that run in main.

    E.g. while not $in[_DI_PressOk] or TimerLimit(3)

    Another obvious thing, but you can modify workspaces programmatically.

  • hermann
    Reactions Received
    404
    Trophies
    9
    Posts
    2,595
    • August 28, 2020 at 3:24 PM
    • #3
    Quote from Mentat
    _DebugMode,

    _IDTableVacOk

    Why for heavens sake do you use an underscore at beginning of a name? My tipp is: don't do this.

  • panic mode
    Reactions Received
    1,267
    Trophies
    11
    Posts
    13,033
    • August 28, 2020 at 5:55 PM
    • #4

    i could see that it could be handy to tell if variables are declared by Mentat or Hermann :grinning_face_with_smiling_eyes:

    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

  • Online
    SkyeFire
    Reactions Received
    1,040
    Trophies
    12
    Posts
    9,380
    • August 28, 2020 at 5:58 PM
    • #5
    Quote from hermann

    Why for heavens sake do you use an underscore at beginning of a name? My tipp is: don't do this.

    Speaking purely for myself, I use it as a naming convention. Variables declared in the subroutine start with an underscore, while variables declared in .DATs are not. I also have a set of standard prefixes for specific variable types, and function arguments (by-value or by-ref).

  • hermann
    Reactions Received
    404
    Trophies
    9
    Posts
    2,595
    • August 28, 2020 at 7:12 PM
    • #6

    For me it is too easy to overlook the underscore. Had a colleague who also used this method, and sometimes there where variables with same name but one with, and one without an underscore. :astonished_face: In my opinion that is the worst case. Can remember one day I wasted at least an hour until I detected the difference.

    Edit: That was is a very very long time ago. The screens in that times where monochrome with low resolution, since that time I hate those underscores at beginning and ending of a name. May be I should rethink my opinion.:smiling_face:

  • Online
    MOM
    Reactions Received
    175
    Trophies
    7
    Posts
    1,419
    • August 28, 2020 at 11:19 PM
    • #7

    Hi,

    there is also another option:

    user lower or upper CamelCase

    regards

    MOM

  • Online
    MOM
    Reactions Received
    175
    Trophies
    7
    Posts
    1,419
    • August 28, 2020 at 11:35 PM
    • #8

    Hi,

    this actually is something which has to defined in a "STYLE GUIDE"!

    Some one likes to do it with an underscore

    Someone likes to do it with lower or uppercase CamelCase

    Someone likes to do it with hungarion notation

    As long as it is defined in a style guide and all the others follows it is Ok

    regards

    MOM

  • Online
    MOM
    Reactions Received
    175
    Trophies
    7
    Posts
    1,419
    • August 28, 2020 at 11:39 PM
    • #9

    As a tip for all using KSS 1.x thru 7.x to address i/o's

    IO.pdf

    regards

    MOM

  • panic mode
    Reactions Received
    1,267
    Trophies
    11
    Posts
    13,033
    • September 2, 2020 at 4:04 PM
    • #10

    MOD() is one function that comes in handy

    Code
    DEFFCT INT MOD(x1:in, x2:in )
       DECL INT x1,x2
       RETURN  x1-x2*(x1/x2)
    ENDFCT

    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

  • Y105657LL
    Reactions Received
    1
    Trophies
    2
    Posts
    35
    • September 2, 2020 at 9:25 PM
    • #11

    Love your robs.he will work good:grinning_squinting_face:

  • Dzonzi
    Reactions Received
    10
    Trophies
    3
    Posts
    221
    • September 3, 2020 at 7:30 AM
    • #12

    What is the difference between wait sec 0 and wait for true and why the second one is better?

  • Mentat
    Reactions Received
    61
    Trophies
    5
    Posts
    243
    • September 3, 2020 at 10:52 AM
    • #13
    Quote from Dzonzi

    What is the difference between wait sec 0 and wait for true and why the second one is better?

    There might not be any discernible difference in KRL code execution, but at least for me personally, it's very easy to remember that "Wait for True" has only one purpose- to stop the advance pointer. "Wait sec 0" might have been "Wait sec 0.3" before, it's now not needed there at all, but I forgot to remove it. So it's not better somehow, just easier to recognize.

  • massula
    Reactions Received
    200
    Trophies
    8
    Posts
    1,421
    • September 30, 2020 at 4:46 PM
    • #14

    This is probably known by some people here, but since I didn't found any mention on manuals, I would leave the tip.

    This week I accidentally discovered that WorkVisual KRL editor also has a column selection mode, and it is triggered by the same shortcut used in Notepad++ (Ctrl + Alt + Left mouse button) Alt + Left mouse button (thanks Mentat ).

    The funny part is that this feature is present since WoV 3.0.10 2.2.2, older version I've tested here.

  • Mentat
    Reactions Received
    61
    Trophies
    5
    Posts
    243
    • October 1, 2020 at 9:20 AM
    • #15
    Quote from massula

    This is probably known by some people here, but since I didn't found any mention on manuals, I would leave the tip.

    This week I accidentally discovered that WorkVisual KRL editor also has a column selection mode, and it is triggered by the same shortcut used in Notepad++ (Ctrl + Alt + Left mouse button).

    The funny part is that this feature is present since WoV 3.0.10, older version I've tested here.

    Use this quite often, works with just alt+leftmouse.

  • massula
    Reactions Received
    200
    Trophies
    8
    Posts
    1,421
    • October 1, 2020 at 1:42 PM
    • #16

    Nice to know that Alt + Left mouse button do the job.

    At first, I was thinking on N++ shortcut because I stumbled on this while switching between N++ and WoV, and did the shortcut at the wrong window.

    And I went back a little bit more in time and tested with older WoV versions. This works since 2.2.2.

  • Mentat
    Reactions Received
    61
    Trophies
    5
    Posts
    243
    • November 5, 2021 at 1:26 PM
    • #17

    In the newer (8.5 +) KSS versions I have not found a file to permanently disable the 6D mouse, but there is now a Rights management in StartUp section. That's where you can set Jogging using the 6D mouse to Deactivated, so no one has to suffer anymore :grinning_squinting_face:

  • Hes
    Reactions Received
    40
    Trophies
    2
    Posts
    238
    • October 30, 2022 at 2:39 PM
    • #18

    to revive an old thread in the hopes it might gain some traction again. One of the things i do regularly is place ilf's after a return in normal subroutines. That way you can use the generated points in raw krl, code looks clean, you dont get massive comment blocks in the middle of your code explaining what they represent. But the ilfs are never run. And all thought points are bunched up in one place.

  • panic mode
    Reactions Received
    1,267
    Trophies
    11
    Posts
    13,033
    • October 30, 2022 at 3:20 PM
    • #19

    one can edit

    C:\KRC\User\ProjectExternalFileList.xml

    then when WoV project is transferred from KRC to your computer, it includes also few other files of interest like ConfigMon.INI or UserTech files. Do not forget to include the ProjectExternalFileList.xml itself. I became interested in this because of UserTech since some of final touches would be likely done on the controller. Sometimes i would make a mistake and overwrite already made changes on the controller by deploying WoV project that was not updated. I did not want to make edits in two places or deploy project for every change. I wanted to always work on the most recent version and this solves it. But for me it is more than just that. I am usually one preparing but not the one actually deploying projects. So instructions to techs what to do and in what order are now much shorter: "...just deploy the project"

    an example:

    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

  • Hes
    Reactions Received
    40
    Trophies
    2
    Posts
    238
    • October 30, 2022 at 9:58 PM
    • #20

    I´m sure this is both well known and very well documented somewhere but I actually noticed it by accident. Previously I´ve been using variable -> overview or right mouse button in WV and monitor. Nice but what if I want to see any variable at any point in time and not just fill up the monitor window?

    When using the debugging in WV (F5 hotkey) you can actually mouse over the variables when the program is run and they will read out their current value.

Advertising from our partners

IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Advertise in Robotics
Advertise in Robotics

Job Postings

  • Anyware Robotics is hiring!

    yzhou377 February 23, 2025 at 4:54 AM
  • How to see your Job Posting (search or recruit) here in Robot-Forum.com

    Werner Hampel November 18, 2021 at 3:44 PM
Your browser does not support videos RoboDK Software for simulation and programming

Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Thread Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Similar Threads

  • Robotic training

    • sCZot
    • March 5, 2020 at 8:47 AM
    • Mitsubishi Robot Forum
  • BG logic

    • Kyle0588
    • April 24, 2017 at 7:32 PM
    • Fanuc Robot Forum
  • How to Flip a fanuc Robot?

    • jariuscs
    • October 17, 2019 at 7:42 PM
    • Fanuc Robot Forum
  • Kuka Integration with plastics molding press- active output

    • bagged2drag
    • September 24, 2018 at 9:07 PM
    • KUKA Robot Forum
  • Kuka KRC1 - Transferring files between robots

    • maaron
    • March 15, 2018 at 8:04 PM
    • KUKA Robot Forum
  • M-20iA Joint 5/6 wrist assembly replacement

    • DaveP
    • January 22, 2018 at 10:11 PM
    • Fanuc Robot Forum

Users Viewing This Thread

  • 1 Guest
  1. Privacy Policy
  2. Legal Notice
Powered by WoltLab Suite™
As a registered Member:
* You will see no Google advertising
* You can translate posts into your local language
* You can ask questions or help the community with your knowledge
* You can thank the authors for their help
* You can receive notifications of replies or new topics on request
* We do not sell your data - we promise

JOIN OUR GREAT ROBOTICS COMMUNITY.
Don’t have an account yet? Register yourself now and be a part of our community!
Register Yourself Lost Password
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on Google Play
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on the App Store
Download