This class provides a set of control station related interfaces that are not supported by the OmniCore SDK.
- Source
Methods
checkIfHeldWriteAccess() → {Promise.<void>}
Checks if write access is currently held. Throws an error if write access is not held. Use this API to verify write access before executing operations that require write access.
- Source
- Resolves if write access is held, throws error otherwise
- Type:
- Promise.<void>
await API.RWS.CONTROLSTATION.checkIfHeldWriteAccess()ensureMotionControlAllowed() → {Promise.<void>}
Ensures motion control is allowed in SPOC systems. Checks if motion control is already allowed, and if not, requests it automatically. This interface is only valid for RobotWare 8 or later and remote control stations.
- Source
- Resolves if motion control is ensured to be allowed, rejects if failure
- Type:
- Promise.<void>
await API.RWS.CONTROLSTATION.ensureMotionControlAllowed()generateControlStationID() → {Promise.<string>}
Generate a new control station ID.
- Source
- Type:
- Promise.<string>
const id = await API.RWS.CONTROLSTATION.generateControlStationID()isControlStation() → {Promise.<boolean>}
Returns true if current session is held by a control station.
- Source
- Type:
- Promise.<boolean>
let bControlStation = await API.RWS.CONTROLSTATION.isControlStation()isLocalControlStation() → {Promise.<boolean>}
Returns true if current session is held by a local control station (e.g., FlexPendant).
- Source
- Type:
- Promise.<boolean>
let bLocal = await API.RWS.CONTROLSTATION.isLocalControlStation()isSpocSystem() → {Promise.<boolean>}
Returns true if the controller is running with RobotWare 8 (SPOC system). Use this API to check system compatibility
- Source
- Type:
- Promise.<boolean>
let bWithSpocSystem = await API.RWS.CONTROLSTATION.isSpocSystem()monitorLocalIsConnected(callbackopt) → {Promise.<void>}
Monitors the local control station connection status. Returns true when a local control station is connected to the controller.
| Name | Type | Attributes | Description |
|---|---|---|---|
callback | function | <optional> | The callback function that is called when connection status changes. |
- Source
- Type:
- Promise.<void>
API.RWS.CONTROLSTATION.monitorLocalIsConnected((isConnected) => {
console.log('Local control station connected:', isConnected);
});monitorReleaseAppealCounter(callbackopt) → {Promise.<void>}
Monitors the write access release appeal counter. The counter increments when another client requests write access currently held by the current client.
| Name | Type | Attributes | Description |
|---|---|---|---|
callback | function | <optional> | The callback function that is called when counter changes. |
- Source
- Type:
- Promise.<void>
API.RWS.CONTROLSTATION.monitorReleaseAppealCounter((counter) => {
console.log('Release appeal counter:', counter);
});monitorResource(resourceType, callbackopt) → {Promise.<void>}
Monitors a control station resource.
| Name | Type | Attributes | Description |
|---|---|---|---|
resourceType | string | The type of resource to monitor (from MonitorResources enum). | |
callback | function | <optional> | The callback function that is called when the resource changes. |
- Source
- Type:
- Promise.<void>
API.RWS.CONTROLSTATION.monitorResource(
API.RWS.CONTROLSTATION.MonitorResources['write-access-status'],
(status) => {
console.log('Status:', status);
}
);monitorTPUSafetyProtocolConnected(callbackopt) → {Promise.<void>}
Monitors the TPU safety protocol connection status. Returns true when a local control station with safety protocol is connected.
| Name | Type | Attributes | Description |
|---|---|---|---|
callback | function | <optional> | The callback function that is called when connection status changes. |
- Source
- Type:
- Promise.<void>
API.RWS.CONTROLSTATION.monitorTPUSafetyProtocolConnected((isConnected) => {
console.log('TPU safety protocol connected:', isConnected);
});monitorWriteAccessStatus(callbackopt) → {Promise.<void>}
Monitors the write access status of control station. The callback receives an object with status (boolean) and name (string) properties indicating who holds write access.
| Name | Type | Attributes | Description |
|---|---|---|---|
callback | function | <optional> | The callback function that is called when write access status changes. |
- Source
- Type:
- Promise.<void>
API.RWS.CONTROLSTATION.monitorWriteAccessStatus((status) => {
console.log('Write access status:', status);
if (status.status) {
console.log('Write access held by:', status.name);
}
});releaseWriteAccess() → {Promise.<(object|void)>}
Releases the write access. This interface is only valid for RobotWare 8 or later. When the control station is running in TPU / FlexPendant, release write access through the FlexPendant UI. When the control station is running in browser, use this interface. This interface only supports remote control station for now. And it should be called when write access is no longer needed or before logging out.
- Source
- Resolves if release succeeds, rejects if failure
- Type:
- Promise.<(object|void)>
await API.RWS.CONTROLSTATION.releaseWriteAccess()requestWriteAccess(autoRegisterControlStationopt) → {Promise.<(object|void)>}
Requests the write access. This interface is only valid for RobotWare 8 or later. When the control station is running in TPU / FlexPendant, request write access through the FlexPendant UI. When the control station is running in browser, use this interface. This interface only supports remote control station for now. Throws an error if external control is not enabled or if write access is held by another client.
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
autoRegisterControlStation | boolean | <optional> | false | Whether to automatically register as a remote control station if not registered when requesting write access. |
- Source
- Resolves if request succeeds, rejects if failure
- Type:
- Promise.<(object|void)>
await API.RWS.CONTROLSTATION.requestWriteAccess()