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).