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. Stäubli & Bosch 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

Issue with Synchronizing Robot Position Data

  • NTT Vi
  • May 11, 2025 at 11:25 PM
  • Thread is Unresolved
  • NTT Vi
    Posts
    3
    • May 11, 2025 at 11:25 PM
    • #1

    Hi everyone,

    I use a measuring device mounted at the end of a robotic arm, Staubli TX2 90, controller CS9. This device requires the robot’s current position to be sent each time it receives a trigger signal, in order to generate point clouds of objects. I’ve programmed a function to retrieve the robot’s position; however, the data received is not the actual real-time position when the robot is moving. Instead, it returns the previous position, updated every 4 milliseconds.

    I’m looking for a way for the device’s software to reliably receive the accurate, real-time position every 4ms. I considered adding a 4ms delay, but the system needs to continuously receive position data; otherwise, the program stopped. Could you suggest a method to ensure that the software receives the correct position data at a 4ms interval?

    Thanks for your help.

  • klausi
    Reactions Received
    8
    Trophies
    3
    Posts
    37
    • May 12, 2025 at 10:25 AM
    • #2

    Hi NTT Vi

    I would suggest to check continuousLatch feature from expansion addon

    You'll need SRC version s8.10 or later

    Best regards.

  • Siberian_Robot
    Posts
    4
    • June 1, 2025 at 9:07 PM
    • New
    • #3

    I would look into taskCreateSync. You can set a synchronous task on a 4ms schedule.

  • Vi NTT
    Trophies
    1
    Posts
    36
    • June 3, 2025 at 1:55 PM
    • New
    • #4

    Thanks, klausi and Siberian_Robot, for your help.

    klausi:
    In my program, I use bLatch = watch(getLatch(jPosition) == true, 5), which returns a Bool.
    However, you mentioned using continuousLatch as getContinuousLatch(joint& jPosition[], num& nLost), which returns a Num.
    I'm not sure how to adapt my code to use this version. Could you clarify?

    Siberian_Robot:
    Previously, I used taskCreateSync("Recup", 0.004, bLatch, Recup_Pos_Robot()) in my program.
    But when I measure the parts, they appear to be offset by a certain distance.
    I suspect it's due to the 4ms sync timing, but it might be caused by something else. Do you have any idea what could be wrong?

  • klausi
    Reactions Received
    8
    Trophies
    3
    Posts
    37
    • June 4, 2025 at 10:08 AM
    • New
    • #5

    Hi, vi NTT

    If your measuring device is used to detect the edge of a part , the getLatch instruction would do the job:


    Use synchronous task with 4ms schedule, you may write:

    do

    if your_Condition_to_Enable_Latch_feature == true

    setLatch(diFastIn0)

    endIf


    if getLatch(jPosition) ==true

    // Convert to cartesian Pos

    pRobPos=JointToPoint(your_Tool,your_Frame,jPosition)

    // Send data to your measuring device via analog output

    aioset(aoPosX,pRobPos.trsf.x)

    .......

    endIf

    delay(0)

    until false

  • Siberian_Robot
    Posts
    4
    • June 5, 2025 at 1:56 AM
    • New
    • #6

    Regarding the result being consistently off by a certain distance It is likely related to the latency from serial communications. One way you could prove this out is decrease the velocity by ~half and see if the certain distance is ~half.


    Additionally, Staubli does have a way to set the control loop to 2ms (instead of the default 4ms) so you can get fresher joint locations. Unfortunately, I do not recall off hand how to implement this.

  • klausi
    Reactions Received
    8
    Trophies
    3
    Posts
    37
    • June 5, 2025 at 9:56 AM
    • New
    • #7

    Using the fast input of CS9 controller is the best way to capture robot position 'on the fly'

    The fast inputs trigger an interrupt directly on the robot's encoder bus 0.1ms response time. The robot position is then written into a register (jPosition) that can be read later (at VAL3 level)

    If your application consist of registering the robot's position when your measuring sensor triggers once, I think this is the way to go.

    If you need to synchronize in real time de data from your measuring sensor with robot's position then for sure, the communication delay is the bottleneck.

    If you are rather 'scanning' a part, I mean your measuring sensor triggers periodically during the robot's movement then chose the continuousLatch feature

  • Vi NTT
    Trophies
    1
    Posts
    36
    • June 11, 2025 at 10:12 AM
    • New
    • #8

    Thank you for your help.

    In my program, I used the faster input (CS9 receive signal trigger) from the scanner. When this signal is received, the robot's position is captured using setLatch and getLatch, and then sent via TCP/IP to the scanner software to generate the point cloud.

    I move the robot from one side of the rectangle to the other and then back again, but it doesn't return to exactly the same position — there’s a slight deviation.

    You mentioned that I should use a continuous latch, meaning I should replace setLatch and getLatch with enableContinuousLatch and getContinuousLatch. Is that correct?

    Best regards,
    Vi

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

  • Converting RoboGuide Robot Motion to TP Program for Real-Time Synchronization

    • MANIKANDAN_S
    • February 3, 2025 at 10:44 AM
    • Fanuc Robot Forum

Users Viewing This Thread

  • 1 Guest
  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