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

Robot aproximation / continuous motion logic

  • Arcadium
  • July 8, 2024 at 8:32 AM
  • Thread is Resolved
  • Arcadium
    Trophies
    1
    Posts
    6
    • July 8, 2024 at 8:32 AM
    • #1

    Hello,

    I have a question regarding approximation of point together with if statement.

    I have attached two program examples, one within $IN[10] as a condition can't approximate a point even if the input is false, while other runs motion program smoothly with approximation.


    I would like to know if it's possible to approximate points before/afer non executed if staement. Or in other words run that if statement with advanced run.


    KRC 4, KSS 8.6.8

    Images

    • PXL_20240707_122341922.jpg
      • 379.33 kB
      • 1,593 × 1,200
      • 12
    • PXL_20240707_122314580.jpg
      • 392.94 kB
      • 1,593 × 1,200
      • 9
  • Fubini
    Reactions Received
    283
    Trophies
    9
    Posts
    1,904
    • July 8, 2024 at 10:19 AM
    • #2

    Lookup continue keyword. Placed directly in the line of code in front of the advance run breaking instruction the if statement will be evaluated by advance run instead if main run.

    Fubini

  • SkyeFire
    Reactions Received
    1,060
    Trophies
    12
    Posts
    9,456
    • July 8, 2024 at 5:00 PM
    • #3

    Be very careful about using CONTINUE, however. It works, but it causes the IF (or anything else immediately following it) to be evaluated several moves (not commands, motions) ahead of the main pointer. How many moves is controlled by $ADVANCE, which is 3 by default.

    So your IF statement could easily be evaluated (and pass or fail) well before you expect it to.

  • panic mode
    Reactions Received
    1,296
    Trophies
    11
    Posts
    13,136
    • July 10, 2024 at 3:12 PM
    • #4

    in order to use robot properly, one must get familiar with it. this means taking training and reading documentation. in this case issue is advance run pointer so one need to get familiar how it works and what are the dangers and downsides. as mentioned before, robot program is processed by two instruction pointers main pointer runs motion, advance run pointer runs ahead and collects information for main pointer motion planner.

    in a simple block of instructions (no branches or loops) that is processed once... each instruction is processed ... but only ONCE. either by main or advance run pointer... but never both... so your program basically tells robot what is processed by which pointer.

    placing CONTINUE directly before instruction will tell robot to process that one instruction using advance run pointer. but... once instruction is processed (in this case it is checking an input), it is no longer considered... so later on when main pointer reaches that instruction, it simply notes "nothing for me to do here, this is already processed" and moves on. even if the state of the input changed....

    for example consider signal "OK TO PICK/LOAD PART TO/FORM THE PRESS"... clearly this can lead to collisions. which is exactly why instructions using inputs and outputs are normally processed using main pointer.

    so to make run robot smoothly, one tries to get things processed in advance run pointer. then when main pointer reaches the instruction, it simply proceeds without need to stop.

    but... the question also becomes how much of the code is processed by the advance run pointer... what if you have a loop with just couple of instructions? because while main pointer is busy with one thing (maybe just one motion), advance run pointer can run through content of the loop more than once before detecting the input state changed. this means that robot (main pointer) will have to process all that advance run pointer has gathered for main pointer to process... and that could be several motions before it catches up with the advance run pointer...

    so... you may want to limit that by adding line

    $ADVANCE=1

    that is the smallest number of motions that still allows approximation.

    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

  • Arcadium
    Trophies
    1
    Posts
    6
    • July 21, 2024 at 2:29 PM
    • #5

    Hello, I didn't had a time to reply, but I wanted to thank you all for the answers. The continue before some of the conditions works perfectly although at some places I had to reduce the $ADVANCE value.

    I actally had official Kuka trainng, but I mosty do evrything with inlin forms. I didn't realize that continue works with if statement as well, even though it's kind of obvious. And for advance run, this is not first robot I have programmed, so I have encountered it and the magic of WAIT SEC 0 line :grinning_squinting_face:


    Anyway, thanks again

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
  • krc5
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • 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
  • krc5
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000
  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