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

Verify a position configuration in program Fanuc

  • fan123
  • March 5, 2020 at 2:59 PM
  • Thread is Unresolved
  • fan123
    Trophies
    3
    Posts
    4
    • March 5, 2020 at 2:59 PM
    • #1

    Hello,

    In a Fanuc program, is there a way to know a position's configuration (P or PR)?

    The same as "IF (PR[21,1] = 20)..." for the X coordinate, but for the nofiguration in order to diferentiate a NUT000 from a NUT001

    It's a little bit a continuation of this thread : Change Configuration of a PR[] in Program

    Thank's in advance

  • Nation
    Typical Robot Error
    Reactions Received
    522
    Trophies
    9
    Posts
    1,900
    • March 5, 2020 at 4:18 PM
    • #2

    It doesn't appear like there is a way, in TP at least. You could write a small Karel program to do the compare, and then call it from TP. This is assuming you have the Karel option of course.

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

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

  • fan123
    Trophies
    3
    Posts
    4
    • March 5, 2020 at 6:26 PM
    • #3

    Thanks for your answer !

    I have the option, but i've never used it.
    Could you give me an example ? (I'll read a little bit about the karel after)

    Edit: I didn't want to use Karel, but if i am going to, could you add the way to also edit the NUT000 into a NUT001 and vice versa in karel ?

    Edited once, last by fan123 (March 5, 2020 at 6:31 PM).

  • TitusLepic
    Reactions Received
    112
    Trophies
    6
    Posts
    442
    • March 6, 2020 at 12:36 AM
    • #4

    Here's a program that will read the number of turns from a PR (PR[16] in this case), print that value to the user screen, then change the number of turns to 1. I think this demonstrates everything you asked about.

    Code
    PROGRAM CONFIGDEMO
    VAR
        myPos    :    XYZWPREXT
        myPR    :    INTEGER
        noTurns    :    INTEGER
        STATUS    :    INTEGER
    BEGIN
        myPR =16
        myPos = GET_POS_REG(myPR,STATUS)
        noTurns = myPos.CONFIG_DATA.CFG_TURN_NO3
        WRITE TPDISPLAY(noTurns, ' Turns', CR)
        myPos.CONFIG_DATA.CFG_TURN_NO3 = 1
        SET_POS_REG(myPR,myPos,STATUS)    
        
    END CONFIGDEMO
    Display More
  • HawkME
    Reactions Received
    567
    Trophies
    10
    Posts
    3,268
    • March 6, 2020 at 3:41 AM
    • #5

    Very interesting topic. But I'd like to ask what you are wanting this for? There may be a simpler solution.

    For example, Linear moves will ignore turn numbers and take the shortest path. Joint moves will honor the turn number, but if you do Joint MROT (minimum rotation) then you will get a joint move that ignores the turn number.

  • fan123
    Trophies
    3
    Posts
    4
    • March 9, 2020 at 11:22 PM
    • #6

    Hello,

    Thank you for your example @TitusLepic, we did something similar and it's functioning perfectly.

    @HawkME , Actually its for a palletizing program, and I wanted to have only one program and one set of points for 2 mirrored layers, and then use offsets and config to do *mirror* movements in the mirrored layer.

    With linear moves I had to much turns for some drops. (seems to always turn the same direction when its from a 180)
    I tested the MROT quickly, but as i have 3 drops per pick with different orientations (i.e. J6 = 0, 90, 180), the faster way to return is sometime a +180 = 360 instead of a -180 = 0(same as linear ??), and that is why I don't think I can use it here.
    What do you think about it ?

  • HawkME
    Reactions Received
    567
    Trophies
    10
    Posts
    3,268
    • March 10, 2020 at 2:17 AM
    • #7

    It sounds like you are wanting to command a specific turn number while doing a linear move. If that's the case then Linear Wjnt may work for you. It combines a linear move with exact turn numbers. It is not as fool proof as the Karel method, but is simple.

  • fan123
    Trophies
    3
    Posts
    4
    • March 10, 2020 at 10:27 PM
    • #8

    It didn't work well either (But I might test it more thoroughly with my next program..), so I am going on with the Karel method this time.

    That helped me a lot. 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
  • 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

  • Cubic-S, Thoughts/Opinions/Best Practices

    • ericwiz7923
    • March 2, 2020 at 2:04 PM
    • Kawasaki Robot Forum
  • Query for Operating in Tool Coordinates - Fanuc 200ic

    • PGUK
    • October 1, 2019 at 5:09 PM
    • Fanuc Robot Forum

Tags

  • fanuc 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