The RWS.CONTROLLER class provides a set of controller-related interfaces that are not supported by the OmniCore SDK. It includes methods for retrieving robot types, system information, and managing program execution settings such as speed ratio.
- Source
Methods
getRobotType() → {Promise.<string>}
Gets the robot type.
- Source
Returns:
A promise with a string containing the robot type.
- Type:
- Promise.<string>
Example
const robotType = await API.RWS.CONTROLLER.getRobotType();
console.log(robotType); // Outputs the robot typegetSpeedRatio() → {Promise.<number>}
Gets the speed ratio for program execution.
- Source
Returns:
- Type:
- Promise.<number>
Example
const speedRatio = await API.RWS.CONTROLLER.getSpeedRatio();
console.log(`Current speed ratio: ${speedRatio}%`);getSystemInfo() → {Promise.<any>}
Gets the system information.
- Source
Returns:
- Type:
- Promise.<any>
Example
const systemInfo = await API.RWS.CONTROLLER.getSystemInfo();
console.log(systemInfo);setSpeedRatio(speedRatio) → {Promise.<string>}
Sets the speed ratio for program execution. The setting requires the editing mastership and only supports the Auto mode.
Parameters:
| Name | Type | Description |
|---|---|---|
speedRatio | number | The speed ratio number in percentage. |
- Source
Returns:
- Type:
- Promise.<string>
Example
await API.RWS.CONTROLLER.setSpeedRatio(50); // Sets the speed ratio to 50%