API.RWS. CONTROLLER

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.

Methods

getRobotType() → {Promise.<string>}

Gets the robot type.

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 type

getSpeedRatio() → {Promise.<number>}

Gets the speed ratio for program execution.

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.

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:
NameTypeDescription
speedRationumber

The speed ratio number in percentage.

Returns:
Type: 
Promise.<string>
Example
await API.RWS.CONTROLLER.setSpeedRatio(50); // Sets the speed ratio to 50%