The RMP Motion Controller APIs

RPCs

rpc Axis (AxisRequest) returns (AxisResponse) {};
rpc AxisBatch (AxisBatchRequest) returns (AxisBatchResponse) {};

Request

message AxisRequest {
// Common request header
RSI.RapidServer.RequestHeader header = 1;
// Axis index
int32 index = 2;
optional AxisConfig config = 3;
optional AxisAction action = 4;
}

Response

message AxisResponse {
// Common response header. Always check the response header for errors.
RSI.RapidServer.ResponseHeader header = 1;
// Axis index
int32 index = 2;
optional AxisConfig config = 3;
optional AxisAction action = 4;
optional AxisInfo info = 5;
optional AxisStatus status = 6;
}

Batch Request and Response

message AxisBatchRequest {
// Common request header
RSI.RapidServer.RequestHeader header = 1;
repeated AxisRequest requests = 2;
}
message AxisBatchResponse {
// Common response header. Always check the response header for errors.
RSI.RapidServer.ResponseHeader header = 1;
repeated AxisResponse responses = 2;
}

Config

message AxisConfig {
// The number of encoder counts to UserUnits.
optional double user_units = 1;
// The origin position, typically set when homing.
optional double origin_position = 2;
// Give the Axis a name, if you like.
optional string user_label = 3;
// Default trajectory values.
optional TrajectoryDefaults defaults = 4;
optional HardwareTrigger amp_fault = 5;
optional HardwareTrigger home_switch = 6;
optional ErrorLimit error_limit = 7;
optional HardwareTrigger hardware_negative_limit = 8;
optional HardwareTrigger hardware_positive_limit = 9;
optional SoftwareTrigger software_negative_limit = 10;
optional SoftwareTrigger software_positive_limit = 11;
optional Settling settling = 12;
optional MotionConfig motion = 13;
optional Homing homing = 14;
optional int32 frame_buffer_size = 15;
// Internal messages.
message TrajectoryDefaults
{
optional double velocity = 1;
optional double acceleration = 2;
optional double deceleration = 3;
optional double jerk_percent = 4;
optional double position1 = 5;
optional double position2 = 6;
optional double relative_increment = 7;
}
message HardwareTrigger {
optional RSIAction action = 1;
optional bool trigger_state = 2;
optional double duration = 3;
}
message SoftwareTrigger {
optional RSIAction action = 1;
optional double trigger_value = 2;
}
message ErrorLimit {
optional RSIAction action = 1;
optional double trigger_value = 2;
optional double duration = 3;
}
message Settling {
optional double position_tolerance_fine = 1;
optional double position_tolerance_coarse = 2;
optional double velocity_tolerance = 3;
optional double time_seconds = 4;
optional bool on_stop = 5;
optional bool on_estop = 6;
optional bool on_estop_cmd_equals_actual = 7;
}
message MotionConfig {
// Seconds.
optional double stop_time = 1;
// Seconds.
optional double estop_time = 2;
// UserUnits per second.
optional double triggered_modify_deceleration = 3;
// Jerk percent (0-100).
optional double triggered_modify_jerk_percent = 4;
// UserUnits per second.
optional double estop_modify_deceleration = 5;
// Jerk percent (0-100).
optional double estop_modify_jerk_percent = 6;
}
message Homing {
optional RSIHomeMethod method = 1;
optional double offset = 2;
optional double velocity = 3; // this requires the home stage?
optional double slow_velocity = 4;
optional double acceleration = 5; // this requires the home stage?
optional double deceleration = 6; // this requires the home stage?
optional double jerk_percent = 7;
optional bool state = 8;
optional RSIHomeStage stage = 9;
optional RSIAction behavior = 10;
}
}

Action

message AxisAction {
optional Abort abort = 1;
optional EStopAbort e_stop_abort = 2;
optional EStopModifyAbort e_stop_modify_abort = 3;
optional EStopModify e_stop_modify = 4;
optional EStop e_stop = 5;
optional TriggeredModify triggered_modify = 6;
optional Stop stop = 7;
optional Resume resume = 8;
optional ClearFaults clear_faults = 9;
optional AmpEnableSet amp_enable_set = 10;
optional HoldGateSet hold_gate_set = 11;
optional PositionSet position_set = 12;
optional Move move = 13;
optional Gear gear = 14;
optional Home home = 16;
optional HomeCancel home_cancel = 17;
message Abort {}
message EStopAbort {}
message EStopModifyAbort{}
message EStopModify{}
message EStop {}
message TriggeredModify {}
message Stop {}
message Resume {}
message ClearFaults {}
message AmpEnableSet {
bool enable = 1;
optional int32 timeout_milliseconds = 2;
optional int32 duration = 3; // read-only how long did it take to enable? only set if you specify a timeout to wait for AMP_ACTIVE
}
message HoldGateSet {
bool state = 1;
}
message PositionSet{
double position = 1;
}
message Move {
// Request one type of motion.
oneof move {
AxisMovePointToPoint point_to_point = 3;
AxisMoveVelocity velocity = 4;
MoveStreaming streaming = 5;
}
// Specify the MotionID for this move. (If you don't specify one, it will be auto-incremented after each move.)
optional uint32 motion_id = 6;
// Specify MotionHold criteria, if you want the motion to hold execution until conditions are met.
optional MotionHold motion_hold = 7;
// Wait for motion to complete? (See ConfigSet settling criteria.)
bool blocking = 8;
}
message Gear {
bool enable = 1;
optional int32 master_axis_number = 2;
optional RSIAxisMasterType gearing_source = 3;
int32 numerator = 4;
int32 denominator = 5;
}
message Home {
optional bool move_to_zero = 1;
}
message HomeCancel {}
}
// Internal MoveRequest messages.
message AxisMovePointToPoint {
// Move to this position. Absolute, unless the relative boolean is true. (UserUnits)
double position = 1;
// Maximum velocity. (UserUnits/second)
double velocity = 2;
// Maximum acceleration. (UserUnits/second^2)
double acceleration = 3;
// Maximum deceleration. (UserUnits/second^2)
double deceleration = 4;
// Percentage of acceleration that will be smoothed. (0-100)
// Acceleration time will not change so if Jerk Percent is 100, maximum acceleration will be 2x the specified maximum.
double jerk_percent = 5;
// Final velocity. 0.0 is default. (UserUnits/second)
double final_velocity = 6;
// Set true if you intend position to be a relative increment.
bool relative = 7;
}
message AxisMoveVelocity {
// Move at this velocity. (UserUnits/second)
double velocity = 1;
// Maximum acceleration. (UserUnits/second^2)
double acceleration = 2;
// Percentage of acceleration that will be smoothed. (0-100)
// Acceleration time will not change so if Jerk Percent is 100, maximum acceleration will be 2x the specified maximum.
double jerk_percent = 3;
}
message MoveStreaming {
repeated double positions = 1;
repeated double velocities = 2;
repeated double accelerations = 3;
repeated double jerks = 4;
repeated double times = 5;
int32 empty_count = 6;
bool retain = 7;
bool final = 8;
// Specify the interpolation algorithm to use when only providing positions and no velocities nor accelerations.
// Uses the RapidCode method RapidCodeMotion::MovePT()
// The three currently supported ones are:
// RSIMotionTypePT (no interpolation)
// RSIMotionTypeBSPLINE (default)
// RSIMotionTypePVT is used in the RapidCode method RapidCodeMotion::MovePVT(), i.e. when positions and velocities are given.
optional RSIMotionType pt_motion_type = 9;
}

Info

message AxisInfo {
// Axis index.
int32 index = 1;
// Host and firmware addresses
repeated AddressInfo addresses = 2;
// NetworkNode information.
NetworkNodeInfo node_info = 3;
}

Status

message AxisStatus {
// Is the amp enabled?
bool amp_enabled = 1;
// The state (IDLE, MOVING, ERROR, etc.).
RSIState state = 2;
// The cause of the error (if in ERROR, STOPPED, STOPPING_ERROR state).
RSISource source = 3;
// Extra fault info from the drive
string source_name = 4;
// Positions.
PositionStatus position = 5;
// Command and actual velocity.
VelocityStatus velocity = 6;
// Command acceleration.
AccelerationStatus acceleration = 7;
// How many frames does the Axis have left to execute?
int32 frames_to_execute = 8;
// The motion id as stored in the Axis class (unsigned 16-bit integer).
uint32 motion_id = 9;
// The currently executing motion identifier (unsigned 16-bit integer).
uint32 motion_id_executing = 10;
// The currently exeucting motion element identifier (unsigned 16-bit integer).
int32 element_id_executing = 11;
//TODO add dedicated io status
message PositionStatus {
double command = 1;
double actual = 2;
double error = 3;
double target = 4;
double origin = 5;
double encoder_0 = 6;
double encoder_1 = 7;
double compensation = 8;
double backlash = 9;
}
message VelocityStatus {
double command = 1;
double actual = 2;
}
message AccelerationStatus {
double command = 1;
}
}
RSI::RapidCode::RSIAxisMasterType
RSIAxisMasterType
Sources available to a slave Axis for electronic gearing & camming.
Definition: rsienums.h:1136
RSI::RapidCode::RSIHomeStage
RSIHomeStage
Predefined Homing Stage sections.
Definition: rsienums.h:403
RSI::RapidCode::RSIMotionType
RSIMotionType
Streaming motion types.
Definition: rsienums.h:961
RSI::RapidCode::RSIHomeMethod
RSIHomeMethod
Definition: rsienums.h:307
RSI::RapidCode::RSISource
RSISource
Possible sources that have caused an Error state.
Definition: rsienums.h:940
RSI
RSI::RapidCode::RSIAction
RSIAction
Action to perform on an Axis.
Definition: rsienums.h:1033
RSI::RapidCode::RSIState
RSIState
State of an Axis or MultiAxis.
Definition: rsienums.h:806