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. Fanuc 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

Shakey hand simulation

  • ChrisFS
  • February 16, 2024 at 11:57 AM
  • Thread is Unresolved
  • ChrisFS
    Reactions Received
    1
    Trophies
    3
    Posts
    8
    • February 16, 2024 at 11:57 AM
    • #1

    hi all,

    my company makes a handheld measuring device, but it can also be attached to robots for automative purposes. we use a Kawasaki robot to do the calibration of this. the process is that the robot moves the device into position, start the robot "shaking", take a measurement, stop the "shaking", and move to the next position.

    the shaking a just basically moving the device suedo-randomly in the cartesian x/y axes around the main position using relative offset movements.

    we have aquired a Fanuc CRX-10iA and have written a Tablet plugin to measure with the device - which works fine BUT without the shaking bit.

    I've been reading that the robot can't be moved using KAREL code but was suggested that a KAREL program could start a TP program to "shake".

    would this be something like:

    RUN_TASK "looping shake TP prog" -> measure code -> ABORT_TASK "looping shake TP prog" ?

    but this of course bring me to TP programs which i have very little experience with. how would i go about doing the shake in the TP program? i can't seem to find anything about moving the robot relatively using offsets in an easy way.

    the "shaking" offsets just needs to be something like:

    X,Y,Z,Rx,Ry,Rz

    1,0,0,0,0,0 -- 1mm X axis

    0,1,0,0,0,0 -- 1mm Y axis

    -1,0,0,0,0,0 -- -1mm X axis

    0,-1,0,0,0,0 -- 1mm Y axis - back to the start position

    this is simplified a bit but to give a idea of what i need to achieve

    thanks in advance for any help you can give me.

    regards,

    Chris

  • PnsStarter
    Reactions Received
    96
    Trophies
    6
    Posts
    337
    • February 16, 2024 at 1:08 PM
    • #2

    Hi

    use Offset command like

    Code
    J PR[10001] 100% FINE Offset,PR[10002]

    ( using local vars)

    -----


    Example:

    Code
    /PROG  TEST21
    
    1:J P[1] 100% FINE    ;
    2:  CALL SHAKE_RANDOM(5.1,1.1,1.1) ;
    3:J P[1] 100% FINE    ;
    Code
    /PROG  SHAKE_RANDOM
    
    1:  !AR[1]: MinMaxRandomX ;
    2:  !AR[2]: MinMaxRandomY ;
    3:  !AR[3]: MinMaxRandomZ ;
    4:  PR[10001]=LPOS    ;
    5:  R[10001]=AR[1]*(-1)    ;
    6:  R[10002]=AR[2]*(-1)    ;
    7:  R[10003]=AR[3]*(-1)    ;
    8:  !RAND2REG(Min,Max,targetReg) ;
    9:  CALL RAND2REG(R[10001],AR[1],1) ;
    10:  CALL RAND2REG(R[10002],AR[2],2) ;
    11:  CALL RAND2REG(R[10003],AR[3],3) ;
    12:  PR[10002,1]=R[1]    ;
    13:  PR[10002,2]=R[2]    ;
    14:  PR[10002,3]=R[3]    ;
    21:  PR[10002,4]=0    ;
    22:  PR[10002,5]=0    ;
    23:  PR[10002,6]=0    ;
    24:J PR[10001] 100% FINE Offset,PR[10002]    ;
    Display More
    Code
    No global Vars Version:
    1:  !AR[1]: MinMaxRandomX ;
    2:  !AR[2]: MinMaxRandomY ;
    3:  !AR[3]: MinMaxRandomZ ;
    4:  PR[10001]=LPOS    ;
    5:  R[10001]=AR[1]*(-1)    ;
    6:  R[10002]=AR[2]*(-1)    ;
    7:  R[10003]=AR[3]*(-1)    ;
    8:  !RAND2REG(Min,Max,targetReg) ;
    15: CALL RAND2REG(R[10001],AR[1],10001) ;
    16: CALL RAND2REG(R[10002],AR[2],10002) ;
    17: CALL RAND2REG(R[10003],AR[3],10003) ;
    18: PR[10002,1]=R[10001]    ;
    19: PR[10002,2]=R[10002]    ;
    20: PR[10002,3]=R[10003]    ;
    21:  PR[10002,4]=0    ;
    22:  PR[10002,5]=0    ;
    23:  PR[10002,6]=0    ;
    24:J PR[10001] 100% FINE Offset,PR[10002]    ;
    Display More

    RAND2REG is the sub prog which generate pseudo random values:

    TP-Tools/2reg/rand2reg at main · Backdate/TP-Tools (github.com)

    best

    Backdate/TP-Tools: A small collection of tools that simplify the commissioning and programming of Fanuc robots. (github.com)

  • ChrisFS
    Reactions Received
    1
    Trophies
    3
    Posts
    8
    • February 16, 2024 at 3:10 PM
    • #3

    hi @PnsStarter

    thanks for the quick answer. i think i can follow whats happening in there :smiling_face:

    but i get an error "INTP-204: (SHAKE_RANDOM, 4) Invalid value for index"

    here's the full code saved out...

    Code
    /PROG  SHAKE_RANDOM
    /ATTR
    OWNER        = MNEDITOR;
    COMMENT        = "";
    PROG_SIZE    = 582;
    CREATE        = DATE 24-02-16  TIME 14:00:36;
    MODIFIED    = DATE 24-02-16  TIME 14:00:36;
    FILE_NAME    = ;
    VERSION        = 0;
    LINE_COUNT    = 18;
    MEMORY_SIZE    = 890;
    PROTECT        = READ_WRITE;
    TCD:  STACK_SIZE    = 0,
          TASK_PRIORITY    = 50,
          TIME_SLICE    = 0,
          BUSY_LAMP_OFF    = 0,
          ABORT_REQUEST    = 0,
          PAUSE_REQUEST    = 0;
    DEFAULT_GROUP    = 1,*,*,*,*;
    CONTROL_CODE    = 00000000 00000000;
    LOCAL_REGISTERS    = 0,0,0;
    /MN
       1:  !AR[1]: MinMaxRandomX ;
       2:  !AR[2]: MinMaxRandomY ;
       3:  !AR[3]: MinMaxRandomZ ;
       4:  PR[10001]=LPOS    ;
       5:  R[10001]=AR[1]*(-1)    ;
       6:  R[10002]=AR[2]*(-1)    ;
       7:  R[10003]=AR[3]*(-1)    ;
       8:  !RAND2REG(Min,Max,targetReg) ;
       9:  CALL RAND2REG(R[10001],AR[1],10001) ;
      10:  CALL RAND2REG(R[10002],AR[2],10002) ;
      11:  CALL RAND2REG(R[10003],AR[3],10003) ;
      12:  PR[10002,1]=R[10001]    ;
      13:  PR[10002,2]=R[10002]    ;
      14:  PR[10002,3]=R[10003]    ;
      15:  PR[10002,4]=0    ;
      16:  PR[10002,5]=0    ;
      17:  PR[10002,6]=0    ;
      18:J PR[10001] 50% FINE Offset,PR[10002]    ;
    /POS
    /END
    Display More

    Edited once, last by ChrisFS (February 16, 2024 at 3:21 PM).

  • PnsStarter
    Reactions Received
    96
    Trophies
    6
    Posts
    337
    • February 16, 2024 at 3:47 PM
    • #4
    Quote from ChrisFS

    21 LOCAL_REGISTERS = 0,0,0;

    You have to setup your local registers in detail screen of prog

    e.g.

    LOCAL_REGISTERS = R,PR,SR; -->LOCAL_REGISTERS = 3,7,1;

    this will give you access to 3 local Register, 7 PR's and 1 StringReg

    in your case:

    LOCAL_REGISTERS = 3,2,0;

    Local Regs 10001-10003

    Local PRegs 10001-10002

    best

    Backdate/TP-Tools: A small collection of tools that simplify the commissioning and programming of Fanuc robots. (github.com)

  • ChrisFS
    Reactions Received
    1
    Trophies
    3
    Posts
    8
    • February 16, 2024 at 3:58 PM
    • #5

    hi @PnsStarter

    yes that's working perfectly now. thank you.

    Regards,

    Chris

  • Nation
    Typical Robot Error
    Reactions Received
    556
    Trophies
    9
    Posts
    1,937
    • February 16, 2024 at 8:50 PM
    • #6

    INC (incremental) motion option on a move could work as well.

    Check out the Fanuc position converter I wrote here! Now open source!

    Check out my example Fanuc Ethernet/IP Explicit Messaging program here!

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

Tags

  • FANUC KAREL PROGRAMMING
  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