Sleep
{"cmd":"sleep", ...}
With this command, the controller sleeps for the number of seconds specified in the command. It can be used to create delay between execution of motion commands or other commands in the normal priority queue as it executes in the normal priority queue in the same order that it was received by the controller.
Key, value pairs
Key | Value | Required | Description |
---|---|---|---|
"cmd" | "sleep" | Yes | Sleep between motions. |
"id" | Int (>0) | No | Id can be any positive integer. If id is not provided, status of the command will not be returned from the controller. |
"time" | Double (>0) | No | Time is the amount of delay in seconds. |
Example
{"cmd":"sleep", "time":5}
After finishing all commands before this command, the controller waits for 5 seconds, before executing the next command.
Error codes
Stat | Value |
---|---|
-21 | time field is missing or invalid |
-300 | Halt already in process |
-400 | Alarm activated |