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

Help with understanding how points are defined in .ls files

  • TTalma
  • January 9, 2025 at 7:46 PM
  • Thread is Unresolved
  • TTalma
    Posts
    4
    • January 9, 2025 at 7:46 PM
    • #1

    I am new to the FANUC system and am learning how to program .ls files. My ultimate goal is to have a C# application generate a file and load it into the controller and start the program. I found some sample code online and put together a program (Below).

    The issue I am having is I do not understand how the coordinates work when in the .LS file. For example I have point 1 defined as:

    P[1:"Point1"]{
    GP1:
        UF : 2, UT : 1, CONFIG : 'N U T, 0, 0, 0',
        X = 1000.000 mm,  Y =    0.000 mm,  Z =    0.000 mm,
        W =  -90.000 deg, P =   90.000 deg, R =    0.000 deg
    };

    At the home position the tool is in the correct orientation, Pointing in the -Z direction. When running my application it moves to this point, once reaching it the tool is pointing in the positive Y direction.

    I want the tool pointing in the -Z direction at all times , so I changed point 1 to look like:

    P[1:"Point1"]{
    GP1:
        UF : 2, UT : 1, CONFIG : 'N D B, 0, 0, 0',
        X = 1000.000 mm,  Y =    0.000 mm,  Z =    0.000 mm,
        W =    0.000 deg, P =    0.000 deg, R =    0.000 deg
    };

    This causes a fault when I try to run it, with the messages stating "Position not reachable"

    I used the virtual pendant to set a PR point, It's value (when viewing the data on the virtual pendant) is:

    PR[1:"Home"]{
    GP1:
        UF : F, UT : F, CONFIG : 'N D B, 0, 0, 0',
        X =  500.000 mm,  Y =  250.000 mm,  Z =   50.000 mm,
        W =    0.000 deg, P =    0.000 deg, R =    0.000 deg
    };

    And the system has no problem with that point.

    The points I put are within range of the machine so I don't understand what I am doing incorrectly. Could someone point me to a good definition of how to set the CONFIG value and the W,P,R values, as well as how they relate to each other in order to keep the tool pointing in -Z at each point?:question_mark::question_mark:


    My complete (Working, with Tool pointed in positive Y when not at home position ) program is here:
    /PROG MOVE_TO_POINT
    /ATTR
    OWNER = MNEDITOR;
    COMMENT = "Moves to position";
    PROG_SIZE = 7326;
    CREATE = DATE 17-11-17 TIME 07:43:46;
    MODIFIED = DATE 17-11-17 TIME 07:43:46;
    FILE_NAME = ;
    VERSION = 0;
    LINE_COUNT = 267;
    MEMORY_SIZE = 8102;
    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;
    /APPL
    /MN
    : ! ****************************** ;
    : ! Robot: XX ;
    : ! ****************************** ;
    : ;
    : UTOOL_NUM=1 ;
    : UFRAME_NUM=2 ;
    : ;
    :J P[1] 25% FINE ;
    : ;
    :J P[2] 50% FINE ;
    : ;
    :L P[3] 100mm/sec FINE ;
    : ;
    :J PR[1:Home] 25% FINE ;
    : ;
    /POS
    P[1:"Point1"]{
    GP1:
    UF : 2, UT : 1, CONFIG : 'N U T, 0, 0, 0',
    X = 1000.000 mm, Y = 0.000 mm, Z = 0.000 mm,
    W = -90.000 deg, P = 90.000 deg, R = 0.000 deg
    };
    P[2:"Point2"]{
    GP1:
    UF : 2, UT : 1, CONFIG : 'N U T, 0, 0, 0',
    X = 1000.000 mm, Y = 1000.000 mm, Z = 0.000 mm,
    W = -90.000 deg, P = 90.000 deg, R = 0.000 deg
    };
    P[3:"Point3"]{
    GP1:
    UF : 2, UT : 1, CONFIG : 'N U T, 0, 0, 0',
    X = 1000.000 mm, Y = 1000.000 mm, Z = 1000.000 mm,
    W = -90.000 deg, P = 90.000 deg, R = 0.000 deg
    };
    /END

  • Nation
    Typical Robot Error
    Reactions Received
    538
    Trophies
    9
    Posts
    1,919
    • January 9, 2025 at 8:13 PM
    • #2

    What are your values for UTOOL 1, and UFRAME 2? What arm are you using?

    The robot will attempt to move the TCP to the point defined in your UFRAME. Fanuc uses euler angles, defined from the currently active frame. We go over how they work in this thread.

    Since there are typically multiple solutions to a point, config narrows them down. I made a short video on them years ago:

    External Content www.youtube.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

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

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

  • TTalma
    Posts
    4
    • January 9, 2025 at 9:41 PM
    • #3
    Quote

    What are your values for UTOOL 1, and UFRAME 2? What arm are you using?

    I am unable to find the values for UTOOL and UFRAME. I am not sure what they are other than reading their definition.

    I am new to programing robot in general. The tool I am using is a pointer set to 180mm in the Z direction. all other values were set to 0.

    When setting up the project I used all defaults.

    The robot in my project is a M-710.

    Maybe images will help. Here is a picture of the robot in the home position, with the pointer in the correct orientation:


    Here is a picture of the tool pointing in the positive Y (incorrect orientation)

  • HawkME
    Reactions Received
    568
    Trophies
    11
    Posts
    3,268
    • January 10, 2025 at 3:57 AM
    • #4

    You changed your config from NUT to NDB. So I'm guessing your telling the robot to do a back flip.

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

Tags

  • coordinate system
  • Tool base
  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