Robotis Openmanipulatorx icon Robotis Openmanipulatorx Inverse kinematics for Robotis OpenManipulatorX: compute joint angles and MoveTo 3D (cm) positions, supports camera-to-CM mapping for pick-and-place. Try it →
Asked — Edited
Resolved Resolved by DJ Sures!

Executing Functions At A Specific Time Interaval

I am trying to write a script that does a specific function at 15 minutes, 30 minutes, and 1 hour. I cant figure out how to write it so if 15 minutes it resets that time, and continues to count until 30 minutes, and then an hour. Does anyone have an example of such a script.

Thanks.


ARC Pro

Upgrade to ARC Pro

Join the ARC Pro community and gain access to a wealth of resources and support, ensuring your robot's success.

Author Avatar
PRO
Synthiam
LinkedIn Thingiverse Twitter YouTube GitHub
#1  

$loopCount = 0

:loop

$loopCount++

sleep(1000 * 60 * 15)

IF ($loopCount = 1)

  say("15 minutes has expired")

ELSEIF ($loopCount = 2)

  say("30 minutes has expired")

ELSEIF ($loopCount = 3)

  say("45 minutes has expired")

ELSEIF ($loopCount = 4)

  say("60 minutes has expired")

  $loopCount = 0

ENDIF

goto(loop)
Author Avatar
PRO
USA
#2  

Very cool! Thanks.