The TIMER problem

Typically: "How do I... ", "How can I... " questions
Post Reply
Sanchez2k
Posts: 4
Joined: 01 Dec 2017, 01:29

The TIMER problem

Post by Sanchez2k » 03 Dec 2017, 21:06

Hi !

If I start simulation then the robot immediately begins to work, but I need to put time that the robot starts later enough this time. How can I do the timer or any sensor algoritm? What do you recommend? Thank you.

coppelia
Site Admin
Posts: 6497
Joined: 14 Dec 2012, 00:25

Re: The TIMER problem

Post by coppelia » 05 Dec 2017, 21:39

Hello,

this depends whether you are using a threaded or non-threaded child script. With threaded child scripts, you can simply use a simWait.

With a non-threaded child script, you can use a counter or check the time and compare it with the start time, using simGetSimulationTime.

Cheers

Sanchez2k
Posts: 4
Joined: 01 Dec 2017, 01:29

Re: The TIMER problem

Post by Sanchez2k » 06 Dec 2017, 18:32

Can you show a script example? Thank you :)

Post Reply