waitForTrigger
Wait until a trigger reaches the specified active state.
Parameter
| Key | Type | Description |
|---|---|---|
| id | string | Trigger ID. If omitted, the trigger of printer is used. |
| printer | string | Printer ID. Used when id is omitted; required if more than one printer is available. |
| active | boolean | The active state to wait for. v6.0 |
| state | boolean | Deprecated name of active. |
| timeout | number | Timeout in seconds. Required. |
Either active or state is required. Both may be given, as long as they
agree, so that the same request also works with versions before v6.0.
Return value
An object with the position at the moment the trigger fired, or null if the timeout elapsed before the trigger fired.
| Key | Type | Description |
|---|---|---|
| position | number | Position in nanometers. |
| positionMeters | number | Position in meters, like getSpeedInfo. v5.4 |
Example
waitForTrigger {"id": "trigger1", "active": true, "timeout": 5.0}