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

Robot doesn't turn correctly in user frame

  • ath
  • November 14, 2023 at 5:07 PM
  • Thread is Unresolved
  • ath
    Trophies
    1
    Posts
    5
    • November 14, 2023 at 5:07 PM
    • #1

    I am trying to make my robot detect a user frame and rotate about the Y-Axis in a certain number of degrees.

    I am using PR to populate the value of the 5th position and apply these changes to the point in my tp program.

    The problem I am facing is that if the frame is created at 45 degree from world it will rotate correctly. However, if the frame is created at 0 degrees, it rotates about the X-axis instead. when checking how the user frame looks, they both looks correct.

    Any ideas please ?

  • 95devils November 14, 2023 at 5:10 PM

    Approved the thread.
  • Nation
    Typical Robot Error
    Reactions Received
    556
    Trophies
    9
    Posts
    1,937
    • November 14, 2023 at 5:20 PM
    • #2

    What are you trying to rotate about? The frame origin? A point? The TCP?

    Also, post your code please.

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

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

  • TitusLepic
    Reactions Received
    113
    Trophies
    7
    Posts
    442
    • November 14, 2023 at 6:08 PM
    • #3

    Agree with Nation, we need more information - however, if you're trying to do what I think you are, this post should help: Finding rotation around Z axis

  • ath
    Trophies
    1
    Posts
    5
    • November 15, 2023 at 4:19 PM
    • #4

    So here is the code below, I define a frame and set it in UF:1, and then I am trying to rotate about Y and Z. However, I am getting rotation about X and Z instead, if I change the orientation of the frame I get rotation about Y and Z.

    The rotation is supposed to take place at the TCP point, which is recorded in P[1]

    Code
    /MN
       1:  UTOOL_NUM=10 ;
       2:  UFRAME_NUM=1 ;
       3:  PR[1,5]=0    ;
       4:  PR[1,6]=0    ;
       5:L P[1] 1000mm/sec FINE    ;
       6:  PR[1,5]=(-35)    ;
       7:L P[1] 1000mm/sec FINE Offset,PR[1]    ;
       8:  PR[1,5]=35    ;
       9:L P[1] 1000mm/sec FINE Offset,PR[1]    ;
      10:L P[1] 1000mm/sec FINE    ;
      11:  PR[1,5]=0    ;
      12:  PR[1,6]=35    ;
      13:L P[1] 1000mm/sec FINE Offset,PR[1]    ;
      14:  PR[1,6]=(-35)    ;
      15:L P[1] 1000mm/sec FINE Offset,PR[1]    ;
      16:L P[1] 1000mm/sec FINE    ;
      17:  PR[1,5]=0    ;
      18:  PR[1,6]=0    ;
    /POS
    P[1]{
       GP1:
        UF : 1, UT : 10,    
        J1=    14.828623 deg,    J2=     7.152353 deg,    J3=   -29.061642 deg,
        J4=   -53.349148 deg,    J5=   -58.607075 deg,    J6=   102.550850 deg
    };
    /END
    Display More
  • hermann
    Reactions Received
    412
    Trophies
    9
    Posts
    2,629
    • November 15, 2023 at 5:37 PM
    • #5

    What about PR[1,4] ? :hmmm:

  • TitusLepic
    Reactions Received
    113
    Trophies
    7
    Posts
    442
    • November 15, 2023 at 5:40 PM
    • #6

    Here are a couple of articles that explain what is causing your robot to behave the way that it is.

    How is Orientation in Space Represented with Euler Angles? | Mecademic Robotics
    Learn how orientation in space is represented with Euler angles and understand their importance in defining tool reference frames.
    www.mecademic.com

    Understanding Gimbal Lock and how to prevent it

    As you noticed, creating the UFrame at a 45° offset to world gives you the behavior you want. I have no idea what your process or part geometry is, but if it's possible to define your UFrame that way that would be the easiest solution.

  • HawkME
    Reactions Received
    570
    Trophies
    11
    Posts
    3,270
    • November 16, 2023 at 12:51 PM
    • #7

    Definitely sounds like Gimbal lock. A quick fix is to use a tool offset for your rotation.

    Only use the regular offset for x,y,z frame offsets.

    Always use tool offset for w,p,r offsets.

    If you follow that rule then you shouldn't experience Gimbal lock.

    You can apply both a frame and tool offset onto a single motion instruction if needed.

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
  • rotation
  • user frame
  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