This class provides motion-related interfaces that are not supported by the OmniCore SDK.
- Source
Methods
getAllJointsSolution(props) → {Promise.<any>}
Get all joint solutions
| Name | Type | Description |
|---|---|---|
props | JointsSolutionProps |
- Source
- Type:
- Promise.<any>
getChangeCount() → {Promise.<number>}
Gets the change count of the motion system.
- Source
- Type:
- Promise.<number>
const changeCount = await API.RWS.MOTIONSYSTEM.getChangeCount();
console.log(`Change count: ${changeCount}`);getJointTarget(mechunit) → {Promise.<API.MOTION.JointTarget>}
Gets the current joint position.
| Name | Type | Description |
|---|---|---|
mechunit | string |
- Source
- Type:
- Promise.<API.MOTION.JointTarget>
const jointTarget = await API.RWS.MOTIONSYSTEM.getJointTarget('ROB_1');
console.log(jointTarget); // Outputs the current joint positionsgetJointsFromCartesian(props) → {Promise.<any>}
Get all the joint solutions.
| Name | Type | Description |
|---|---|---|
props | JontsFromCartesianProps |
- Source
- Type:
- Promise.<any>
getLeadThroughStatus(mechunit) → {Promise.<any>}
Gets the lead-through status.
| Name | Type | Description |
|---|---|---|
mechunit | string |
- Source
- Type:
- Promise.<any>
const status = await API.RWS.MOTIONSYSTEM.getLeadThroughStatus('ROB_1');
console.log(`Lead-through status: ${status}`);getMechunit(name) → {Promise.<Mechunit>}
Gets the details of a mechanical unit.
| Name | Type | Description |
|---|---|---|
name | string | Name of the mechanical unit., e.g., 'ROB_1' |
- Source
- Type:
- Promise.<Mechunit>
const mechunit = await API.RWS.MOTIONSYSTEM.getMechunit('ROB_1');
console.log(mechunit); // Outputs details of the specified mechanical unitgetMechunits() → {Promise.<Array.<Mechunits>>}
Gets details of all the mechanical units.
- Source
- Type:
- Promise.<Array.<Mechunits>>
const mechunits = await API.RWS.MOTIONSYSTEM.getMechunits();
console.log(mechunits); // Outputs an array of mechanical unitsgetRobTarget(props) → {Promise.<API.MOTION.RobTarget>}
Gets the current robot position.
| Name | Type | Description |
|---|---|---|
props | RobTargetProps | See RobTargetProps |
- Source
- Type:
- Promise.<API.MOTION.RobTarget>
const robTarget = await API.RWS.MOTIONSYSTEM.getRobTarget('Tool1', 'WObj1');jog(jogdata, ccount) → {Promise.<any>}
Starts jogging. This request shall be sent cyclically during the jogging.
| Name | Type | Description |
|---|---|---|
jogdata | API. | Jogging speed for the axis. |
ccount | number | Counter value, which needs to be obtained using getChangeCount before start jogging. |
- Source
- Type:
- Promise.<any>
const jogData = [10, 0, 0, 0, 0, 0]; // Jogging along axis 1
const changeCount = await API.RWS.MOTIONSYSTEM.getChangeCount();
await API.RWS.MOTIONSYSTEM.jog(jogData, changeCount);setLeadThroughStatus(type, disableAutoLoadCompensation, mechunit) → {Promise.<any>}
Sets the lead-through status.
| Name | Type | Description |
|---|---|---|
type | string | API.RWS.LEADTHROUGHSTATUS.Inactive | API.RWS.LEADTHROUGHSTATUS.Active |
disableAutoLoadCompensation | string | Being Active if the precision mode is used. This is supported from RW7.6. |
mechunit | string | The name of the mechanical unit. |
- Source
- Type:
- Promise.<any>
await API.RWS.MOTIONSYSTEM.setLeadThroughStatus(
API.RWS.LEADTHROUGHSTATUS.Active,
'inactive',
'ROB_1'
);
console.log('Lead-through status set successfully.');setMechunit(props) → {Promise.<any>}
Sets the properties of a mechanical unit.
| Name | Type | Description |
|---|---|---|
props | SetMechunitProps | See SetMechunitProps |
- Source
- Type:
- Promise.<any>
await API.RWS.MOTIONSYSTEM.setMechunit({
name: 'ROB_1',
tool: 'Tool1',
wobj: 'WObj1',
});setRobotPositionJoint(j) → {Promise.<any>}
Sets the joint position target for GoTo task.
| Name | Type | Description |
|---|---|---|
j | API. |
- Source
- Type:
- Promise.<any>
const jointTarget = {
robax: { rax_1: 0, rax_2: 0, rax_3: 0, rax_4: 0, rax_5: 0, rax_6: 0 },
extax: { eax_a: 0, eax_b: 0, eax_c: 0, eax_d: 0, eax_e: 0, eax_f: 0 },
};
await API.RWS.MOTIONSYSTEM.setRobotPositionJoint(jointTarget);setRobotPositionTarget(r) → {Promise.<any>}
Sets the robot position target for GoTo task.
| Name | Type | Description |
|---|---|---|
r | API. |
- Source
- Type:
- Promise.<any>
const robTarget = {
trans: { x: 100, y: 200, z: 300 },
rot: { q1: 1, q2: 0, q3: 0, q4: 0 },
robconf: { cf1: 0, cf4: 0, cf6: 0, cfx: 0 },
extax: { eax_a: 0, eax_b: 0, eax_c: 0, eax_d: 0, eax_e: 0, eax_f: 0 },
};
await API.RWS.MOTIONSYSTEM.setRobotPositionTarget(robTarget);Type Definitions
Mechunit
Properties| Name | Type | Description |
|---|---|---|
axes | string | |
axesTotal | string | |
coords | string | |
hasIntegratedUnit | string | |
isIntegratedUnit | string | |
jogMode | string | |
mode | string | |
payload | string | |
status | string | |
task | string | |
tool | string | |
totalPayload | string | |
type | string | |
wobj | string | |
name | string |
- Source
Mechunits
Properties| Name | Type | Description |
|---|---|---|
activationAllowed | string | |
driveModule | string | |
mode | string | // 'Activated', ... |
name | string |
- Source
RobTargetProps
- Source
SetMechunitProps
Properties| Name | Type | Attributes | Description |
|---|---|---|---|
name | string | <optional> | |
tool | string | <optional> | |
wobj | string | <optional> | |
coords | string | <optional> | |
jogMode | string | <optional> | |
mode | string | <optional> | |
payload | string | <optional> | |
totalPayload | string | <optional> |
- Source