FANUC precise time and NTP

  • Hi !


    I need help for the some Time functions on a Fanuc robot arm.


    I have a Fanuc Robot Arm connected to a PC doing all the computations. For my application, I need to sync the external PC and the robot's controller and I did it via the SNTP protocol.

    Let's say the SNTP protocol is working, I now need to retrieve the precise time. However, the function GET_TIME is only precise up to 2 seconds (according to the manual) and this is not precise enough for me.


    My current workaround was to have a karel program polling the GET_TIME function continuously. Each time the value returned by the function was incremented, a millisecond counter was reset (I later used the system variable $FAST_CLOCK). The "precise" time was simply the concatenation of GET_TIME and the value of the counter.


    I am not happy with this solution as it is not precise enough (when compared to the external PC's clock - KAREL is not very precise I think).


    - What do you recommend for this synchronization problem ? It seems stupid to me not to be able to retrieve a time precise up to milliseconds... (as one could expect even from a cheap PC)

    - Did someone already face a similar problem ?

    - Does somebody know where is the time-register stored (the register from where the GET_TIME function is getting the time) ? Maybe it already contains the precise clock and one could simply access it to read the time ?


    Thanks for any help :)


    Note : there is a GET_USEC_TIM function that returns the microseconds but this variable overflows very rapidly and is not linked to the GET_TIME (I was exepcting it to be in phase with the increment of the GET_TIME variable).

  • AD
  • I need to have the arm configuration (joints) linked to a precise timestamp. Basically I am sending packets containing the 6 joints + timestamps and storing them in a buffer on the external PC's side.

    My application should be able to read this buffer in order to know at a precise time what the arm configuration was. The application is vision-related and hence I really need to have a milliseconds-precision on the timestamp..

  • my question is simply : is precise time retrieval (more precise than the GET_TIME function) possible on a FANUC robot ? even a cheap raspberry can do it :)



    the application i am currently developing : the robot is moving an object whose dimensions are not know (don't ask why - the robot started with this object in hand). The robot is moving that object around and cameras need to be triggered for segmenting that object in order to know what it is. In order to know where to look in the image, precise timestamp as well as joint position need to be output. The scene has to be captured dynamically and hence it is NOT allowed to stop the robot.

  • Sounds like you need high speed position output. Reading the description on it, Looks like it can output at up to 500hz.


    The data packet contains a clock section.

    thank you for this info ! This was already suggested by FANUC but it uses the GET_USEC_TIM function. The time retrieved by this function is started at the controller's boot. It is hence not linked to the NTP time...

    also the microseconds are encoded in 4 bytes so it will overflow too rapidly..

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now