How do I know the time of the system to calculate the duration of a movement? getting the time before the movement and the time at the end of the movement would make the difference of these two variables and know the duration. CB3 to polyscope/program/expression/var (urp / txt) or script.
Time as such known from e.g. Java is not implemented in URScript.
So the sync() timer option in a thread, may be the prefereable option in URScript.
If done in Python, Java or similar, there are many native options to extract timestamps.
Hi! And what if I wanna implement in URScript this algorithm:
Start data logging, t=0s
while t<8s do
q=random(-pi/18,+pi/18) rad
v=random(0.5,2) rad/s
a = random(0.3,7) rad/s^2
movej(q0+q,v,a)
Wait random(0.1,1.0)
end while
Stop data logging