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

recording joint positions during motion

  • zahid990170
  • June 7, 2021 at 1:46 PM
  • Thread is Unresolved
  • zahid990170
    Trophies
    2
    Posts
    41
    • June 7, 2021 at 1:46 PM
    • #1

    Hi all,

    I want to log joint angles (j1-j6) as the robot is moving. I made a simple program that jogs the robotic arm between a set of points (~4 or 5). On the TP, there is a POSN button. When, I press this button, I can see the arm position in Joint space ( the values of J1 through J6). I can also see the values changing as the arm is moving.

    As a first try, I would record the final position of the robotic arm in joint-space, after it has passed through all the points. Then, I can compare it with what I see on the press of POSN button.

    My program looks like this.

    1: PR[1] = JPOS-JPOS

    2: J P[1] 100% FINE

    3: J P[2] 100% FINE

    4: J P[3] 100% FINE

    5: J P[4] 100% FINE

    6: CALL COPY_PRG

    And, COPY_PRG looks like this:

    1: R[1] = PR[1, 1]

    2: R[2] = PR[1, 2]

    3: R[3] = PR[1, 3]

    4: R[4] = PR[1, 4]

    5: R[5] = PR[1, 5]

    6: R[6] = PR[1, 6]


    My idea was to check the value of 6 data registers (R[1] to R[6]) and see if indeed they got the joint angles.

    I am not yet very good in TP programming.

    • The above program is supposed to record the final position after the movement is complete. However, I do not see anything recorded to data registers as yet.
    • Also, how can we log the values in real-time.
    • Is there a simpler way to achieve this.

    thanks your help,

    Zahid

  • Doctor_C
    Reactions Received
    33
    Trophies
    4
    Posts
    198
    • June 7, 2021 at 2:52 PM
    • #2

    Zahid,

    PR[1]=JPOS - JPOS is going to zero out PR 1, you need to use PR[1]=JPOS and you should see results.

  • stare284
    Reactions Received
    24
    Trophies
    4
    Posts
    373
    • June 7, 2021 at 3:19 PM
    • #3

    You need to put it at the end as well.

  • zahid990170
    Trophies
    2
    Posts
    41
    • June 7, 2021 at 4:34 PM
    • #4

    thanks all,

    I made the change and I was able to see the results. And, the program looks as follows now .

    1: PR[1]=JPOS

    2:J P[1] 100% FINE

    3: PR[1]=JPOS

    4: CALL COPY_PRG

    5:J P[2] 100% FINE

    6: PR[1]=JPOS

    7: CALL COPY_PRG

    8:J P[3] 100% FINE

    9: PR[1]=JPOS

    10: CALL COPY_PRG

    11:J P[4] 100% FINE

    12: PR[1]=JPOS

    13: CALL COPY_PRG

    In this program, I have to copy the joint positions after each movement. I have a couple of questions to this end.

    • Firstly,

    I record the JPOS (PR[1]) only after the robot as moved to a point (P[1]). Is there any way to record the joint-angles even when the robot is is motion. i.e. between points (P[1] and P[2]) or (P[3] and P[4]) and so on?

    • Secondly,

    In this small program, I am manually, recording joint-angles after each move. Is there any built in registers (variables) that can be read to give joint angles while the robot is moving. For example, in ROS, there is a topic which can be subscribed to get real-time joint angles joint_states.

    thanks for your help !

    Zahid

  • EnergyAddict
    Reactions Received
    45
    Trophies
    4
    Posts
    133
    • June 8, 2021 at 1:30 PM
    • #5
    Quote from zahid990170
    • Firstly,

    I record the JPOS (PR[1]) only after the robot as moved to a point (P[1]). Is there any way to record the joint-angles even when the robot is is motion. i.e. between points (P[1] and P[2]) or (P[3] and P[4]) and so on?

    • Secondly,

    In this small program, I am manually, recording joint-angles after each move. Is there any built in registers (variables) that can be read to give joint angles while the robot is moving. For example, in ROS, there is a topic which can be subscribed to get real-time joint angles joint_states.

    thanks for your help !

    Zahid

    Check out HawkMe's answer in the thread Send the current position of the robot through profinet, where he suggests using the system variable SCR_GRP[1].$MCH_ANG.

    You can also look at using $SV_INFO[1].$AXIS_POS.

  • zahid990170
    Trophies
    2
    Posts
    41
    • June 8, 2021 at 1:37 PM
    • #6

    thank you EnergyAddict , I will check these options.

  • zahid990170
    Trophies
    2
    Posts
    41
    • June 8, 2021 at 2:15 PM
    • #7

    just a quick question,

    The robot has 6 axis, so there should be six joint angles. Why does the variable $SCR_GRP[1].$MCH_ANG has indices until 9. Similarly, the variable $SV_INFO[1].$AXIS_POS lists 9 indices.

    On the other hand, when I press POSN button on TP, it shows the position information in three representations.

    1. JOINT
    2. X, Y, Z
    3. USER

    Looking only at the JOINT, there is listed six joints only with corresponding angles.


    thanks,

  • EnergyAddict
    Reactions Received
    45
    Trophies
    4
    Posts
    133
    • June 8, 2021 at 2:24 PM
    • #8
    Quote from zahid990170

    Why does the variable $SCR_GRP[1].$MCH_ANG has indices until 9.

    You can purchase robots with an option for extended axes, such as a Rotating Table or a Linear Rail on which your robot is mounted.

    Your robot may have only 6 axis, and so the remaining indices will always be zero.

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

  • Fanuc
  • roboguide
  • Position Register
  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