API.RWS. MOTIONSYSTEM

This class provides motion-related interfaces that are not supported by the OmniCore SDK.

Methods

getAllJointsSolution(props) → {Promise.<any>}

Get all joint solutions

Parameters:
NameTypeDescription
propsJointsSolutionProps
Returns:
Type: 
Promise.<any>

getChangeCount() → {Promise.<number>}

Gets the change count of the motion system.

Returns:
Type: 
Promise.<number>
Example
const changeCount = await API.RWS.MOTIONSYSTEM.getChangeCount();
console.log(`Change count: ${changeCount}`);

getJointTarget(mechunit) → {Promise.<API.MOTION.JointTarget>}

Gets the current joint position.

Parameters:
NameTypeDescription
mechunitstring
Returns:
Type: 
Promise.<API.MOTION.JointTarget>
Example
const jointTarget = await API.RWS.MOTIONSYSTEM.getJointTarget('ROB_1');
console.log(jointTarget); // Outputs the current joint positions

getJointsFromCartesian(props) → {Promise.<any>}

Get all the joint solutions.

Parameters:
NameTypeDescription
propsJontsFromCartesianProps
Returns:
Type: 
Promise.<any>

getLeadThroughStatus(mechunit) → {Promise.<any>}

Gets the lead-through status.

Parameters:
NameTypeDescription
mechunitstring
Returns:
Type: 
Promise.<any>
Example
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.

Parameters:
NameTypeDescription
namestring

Name of the mechanical unit., e.g., 'ROB_1'

Returns:
Type: 
Promise.<Mechunit>
Example
const mechunit = await API.RWS.MOTIONSYSTEM.getMechunit('ROB_1');
console.log(mechunit); // Outputs details of the specified mechanical unit

getMechunits() → {Promise.<Array.<Mechunits>>}

Gets details of all the mechanical units.

Returns:
Type: 
Promise.<Array.<Mechunits>>
Example
const mechunits = await API.RWS.MOTIONSYSTEM.getMechunits();
console.log(mechunits); // Outputs an array of mechanical units

getRobTarget(props) → {Promise.<API.MOTION.RobTarget>}

Gets the current robot position.

Parameters:
NameTypeDescription
propsRobTargetProps

See RobTargetProps

Returns:
Type: 
Promise.<API.MOTION.RobTarget>
Example
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.

Parameters:
NameTypeDescription
jogdataAPI.MOTION.JogData

Jogging speed for the axis.

ccountnumber

Counter value, which needs to be obtained using getChangeCount before start jogging.

Returns:
Type: 
Promise.<any>
Example
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.

Parameters:
NameTypeDescription
typestring

API.RWS.LEADTHROUGHSTATUS.Inactive | API.RWS.LEADTHROUGHSTATUS.Active

disableAutoLoadCompensationstring

Being Active if the precision mode is used. This is supported from RW7.6.

mechunitstring

The name of the mechanical unit.

Returns:
Type: 
Promise.<any>
Example
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.

Parameters:
NameTypeDescription
propsSetMechunitProps

See SetMechunitProps

Returns:
Type: 
Promise.<any>
Example
await API.RWS.MOTIONSYSTEM.setMechunit({
  name: 'ROB_1',
  tool: 'Tool1',
  wobj: 'WObj1',
});

setRobotPositionJoint(j) → {Promise.<any>}

Sets the joint position target for GoTo task.

Parameters:
NameTypeDescription
jAPI.MOTION.JointTarget
Returns:
Type: 
Promise.<any>
Example
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.

Parameters:
NameTypeDescription
rAPI.MOTION.RobTarget

See API.MOTION.RobTarget

Returns:
Type: 
Promise.<any>
Example
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
NameTypeDescription
axesstring
axesTotalstring
coordsstring
hasIntegratedUnitstring
isIntegratedUnitstring
jogModestring
modestring
payloadstring
statusstring
taskstring
toolstring
totalPayloadstring
typestring
wobjstring
namestring

Mechunits

Properties
NameTypeDescription
activationAllowedstring
driveModulestring
modestring

// 'Activated', ...

namestring

RobTargetProps

SetMechunitProps

Properties
NameTypeAttributesDescription
namestring<optional>
toolstring<optional>
wobjstring<optional>
coordsstring<optional>
jogModestring<optional>
modestring<optional>
payloadstring<optional>
totalPayloadstring<optional>