Milliseconds in Timestamp for External Synchronization
I am trying to time synchronize measurements from external sensors to a continuous readout of my TCP position.
Is there a way I can get CTime() to return milliseconds as well as seconds?
Currently I have a semistatic task with a loop that when activated grabs an initial timestamp and then starts a clock variable which is read on every loop iteration. However, I don't know where within the second of that first timestamp the time was when the clock variable started. Leaving me with a +/- 500 millisecond uncertainty in my alignment of TCP position and my external data.
Any help or alternate suggestions would be appreciated.
Is there a way I can get CTime() to return milliseconds as well as seconds?
Currently I have a semistatic task with a loop that when activated grabs an initial timestamp and then starts a clock variable which is read on every loop iteration. However, I don't know where within the second of that first timestamp the time was when the clock variable started. Leaving me with a +/- 500 millisecond uncertainty in my alignment of TCP position and my external data.
Any help or alternate suggestions would be appreciated.
0
Comments
-
As far as I know, the CTime() has no way of returning milliseconds.We had a similar issue where we would stream data (among others also the TCP position) from a background task to a PC and we wanted to include a timestamp. Our approach was to use relative timestamps on the side of our robot by only adding the current readout of the clock variable to each datapoint, not the absolute time. We would then keep track of the absolute time only on our PC by adding the clock data received from the robot to the local clock time on the PC at the point where the first data package was received.0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 799 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings