APIs, concepts, guides, and more
rapidcode.proto
1// This file describes the gRPC interface for the RapidCode services of RapidServer.
2
3syntax = "proto3";
4package RSI.RapidCodeRemote;
5import "rsienums.proto";
6import "rapidgrpc.proto";
7
8/*** Service Definitions ***/
9
10// Provides an interface for the RMP, and a way to interact with RapidCode objects
11// (MotionController, Axis, MultiAxis, RTOS, etc.)
12service RMPService {
13
15 // RPC for MotionController: Sends config/actions, receives updated config, action details, status, and read-only info.
16 rpc MotionController(MotionControllerRequest) returns (MotionControllerResponse) {};
18
20 // RPC for Network: Sends config/actions, receives updated config, action details, status, and read-only info.
21 rpc Network(NetworkRequest) returns (NetworkResponse) {};
23
25 rpc Axis (AxisRequest) returns (AxisResponse) {};
26 rpc AxisBatch (AxisBatchRequest) returns (AxisBatchResponse) {};
28
30 // Use a zero-based index, unlike RapidCode which uses a motion index.
31 rpc MultiAxis (MultiAxisRequest) returns (MultiAxisResponse) {};
32 rpc MultiAxisBatch (MultiAxisBatchRequest) returns (MultiAxisBatchResponse) {};
34
36 rpc NetworkNode (NetworkNodeRequest) returns (NetworkNodeResponse) {};
37 rpc NetworkNodeBatch (NetworkNodeBatchRequest) returns (NetworkNodeBatchResponse) {};
39
41 rpc Recorder (RecorderRequest) returns (RecorderResponse) {};
42 rpc RecorderBatch(RecorderBatchRequest) returns (RecorderBatchResponse) {};
44
46 rpc UserLimit (UserLimitRequest) returns (UserLimitResponse) {};
47 rpc UserLimitBatch(UserLimitBatchRequest) returns (UserLimitBatchResponse) {};
49
51 rpc RTOS(RTOSRequest) returns (RTOSResponse) {};
52 rpc RTOSBatch(RTOSBatchRequest) returns (RTOSBatchResponse) {};
54
56 rpc RTTask (RTTaskRequest) returns (RTTaskResponse) {};
57 rpc RTTaskBatch(RTTaskBatchRequest) returns (RTTaskBatchResponse) {};
59
61 rpc RTTaskManager (RTTaskManagerRequest) returns (RTTaskManagerResponse) {};
62 rpc RTTaskManagerBatch(RTTaskManagerBatchRequest) returns (RTTaskManagerBatchResponse) {};
64}
65
67message MotionControllerConfig {
68 // The number of Axis objects.
69 optional int32 axis_count = 1;
70
71 // The number of MultiAxis objects. (internal MotionCount - AxisCount)
72 optional int32 multi_axis_count = 2;
73
74 // The number of UserLimits.
75 optional int32 user_limit_count = 3;
76
77 // The number of data recorders.
78 optional int32 recorder_count = 4;
79
80 // The sizes of each recorder's buffer.
81 repeated int32 recorder_buffer_sizes = 5;
82
83 // The number of position compensators.
84 optional int32 compensator_count = 6;
85
86 // The number of points for each position compensator.
87 repeated int32 compensator_point_counts = 7;
88
89 // The size of each Axis' frame buffer. Must be power of 2.
90 repeated int32 axis_frame_buffer_sizes = 8;
91
92 // A 32-bit integer for users to specify a version.
93 optional int32 user_version = 10;
94
95 // A double to specify the sample rate in Hertz (samples per second)
96 optional double sample_rate = 11;
97}
98
100
101
102
104message AddressInfo {
105 // The requested address type.
106 oneof address_type {
107 RSIControllerAddressType controller = 1;
108 RSIAxisAddressType axis = 2;
109 RSIMultiAxisAddressType multi_axis = 3;
110 }
111
112 // The 64-bit host address from the server. This address can be used to configure the recorder.
113 uint64 host_address = 4;
114
115 // The data type at this address. Useful for using the Recorder service.
116 RSIDataType data_type = 5;
117
118 // The internal RMP firmware address. (What you might see in VM3.)
119 uint64 firmware_address = 6;
120
121 // The 0-based object index for use when accessing Controller Addresses
122 // Not used with Axis or MultiAxis addresses.
123 optional int32 index = 7;
124
125 // IO bit mask
126 optional int32 mask = 8;
127}
128
129message MotionControllerMemory {
130 message Integer {
131 uint64 host_address = 1;
132 int32 value = 2;
133 }
134 message Double {
135 uint64 host_address = 1;
136 double value = 2;
137 }
138 message Block {
139 uint64 host_address = 1;
140 bytes values = 2;
141 int32 size = 3;
142 }
143 oneof memory {
144 Integer integer = 1;
145 Double double = 2;
146 Block block = 3;
147 }
148}
149
150message MotionControllerCreationParameters {
151 // Path to the RMP firmware (RMP.rta), license file, etc.
152 optional string rmp_path = 1;
153 optional string node_name = 2; // [Windows/INtime] INtime Node used for RMP and RMPNetwork.
154
155 optional string primary_nic = 3;
156 optional string secondary_nic = 4;
157
158 optional int32 cpu_affinity = 5; // [Linux] CPU used for RMP and RMPNetwork
159 optional int32 rmp_thread_priority_max = 6; // [Linux] Relative thread priority
160
161 optional int32 controller_index = 7; // for future multiple controller support
162}
163
164message MotionControllerAction {
165 // Create a MotionController. You must do this before using any other RapidCode remote service!
166 optional MotionControllerCreationParameters create = 1;
167
168 repeated MotionControllerMemory memory_sets = 2;
169 repeated MotionControllerMemory memory_gets = 3;
170 repeated AddressInfo address_gets = 4;
171 optional Shutdown shutdown = 5;
172 optional ProcessorUsageClear processor_usage_clear = 6;
173
174 // shutdown the RMP
175 message Shutdown {}
176
177 // clear the RMP's processor usage
178 message ProcessorUsageClear {}
179}
181
182
183
185message MotionControllerInfo {
186 // The RMP serial number.
187 uint32 serial_number = 1;
188
189 // The RapidCode version.
190 string rapid_code_version = 2;
191
192 // RMP firmware version.
193 string firmware_version = 3;
194
195 // The number of licensed Axis objects.
196 int32 axis_license_count = 4;
197
198 repeated AddressInfo addresses = 5;
199
200 // Constants from the MotionController object
201 Constants constants = 6;
202
203 message Constants {
204 // Default time to wait when calling NetworkStart()
205 uint32 network_start_timeout_milliseconds_default = 1;
206
207 // Maximum number of Axis objects supported.
208 uint32 axis_count_maximum = 2;
209
210 // Maximum number of motion objects supported (One required for each Axis and MultiAxis).
211 uint32 motion_count_maximum = 3;
212
213 // Maximum number of nodes allowed on the network.
214 uint32 network_node_count_maximum = 4;
215
216 // maximum number of Recorder objects supported
217 uint32 recorder_count_maximum = 5;
218
219 // Maximum number of Position Compensator objects supported.
220 uint32 compensator_count_maximum = 6;
221
222 // Maximum number of 64-bit values that can be stored in the User Buffer.
223 uint32 user_buffer_data_count_maximum = 7;
224
225 // Default RMP sample rate in hertz.
226 double sample_rate_default = 8;
227
228 CreationParameters creation_parameters = 9;
229
230 message CreationParameters {
231 // MotionControllerAction::Create::rmp_path maximum string buffer length
232 uint32 path_length_maximum = 1;
233
234 // The default value of MotionControllerAction::Create::cpu_affinity
235 uint32 cpu_affinity_default = 2;
236
237 // The default value of MotionControllerAction::Create::rmp_thread_priority_max
238 uint32 rmp_thread_priority_maximum_default = 3;
239
240 // The range required for RMP and RMPNetwork threads. rmp_thread_priority_max must be greater than or equal to this value.
241 uint32 rmp_thread_priority_range = 4;
242 }
243 }
244
245 // The parameters that were used to create the MotionController.
246 MotionControllerCreationParameters creation_parameters = 7;
247}
249
250
251
253message MotionControllerStatus {
254 // The RMP sample counter.
255 int32 sample_counter = 1;
256
257 // Network node count.
258 uint32 network_node_count = 2;
259
260 // The percentage of the firmware sample time used by the RMP.
261 double processor_usage = 3;
262
263 // The most recent time (in microseconds) between firmware samples
264 uint32 firmware_timing_delta = 4;
265
266 // The number of 32-bit words free in the RMP firmware memory.
267 int32 external_memory_size = 9;
268}
270
271
272
274message MotionControllerRequest {
275 // Common request header.
276 RSI.RapidServer.RequestHeader header = 1;
277
278 optional MotionControllerConfig config = 2;
279 optional MotionControllerAction action = 3;
280}
282
283
285message MotionControllerResponse {
286 // Common response header. Always check the response header for errors.
287 RSI.RapidServer.ResponseHeader header = 1;
288
289 optional MotionControllerConfig config = 2;
290 optional MotionControllerAction action = 3;
291 optional MotionControllerInfo info = 4;
292 optional MotionControllerStatus status = 5;
293}
295
297message FirmwareValue {
298 oneof value {
299 bool bool_value = 1;
300 int32 int8_value = 2;
301 uint32 uint8_value = 3;
302 int32 int16_value = 4;
303 uint32 uint16_value = 5;
304 int32 int32_value = 6;
305 uint32 uint32_value = 7;
306 float float_value = 8;
307 double double_value = 9;
308 int64 int64_value = 10;
309 uint64 uint64_value = 11;
310 }
311}
313
315message NetworkConfig {}
317
319message NetworkAction {
320 // Shutdown the network.
321 optional Shutdown shutdown = 1;
322
323 // Start the network.
324 optional Discover discover = 2;
325 optional Start start = 3;
326 optional DiscoverAndStart discover_and_start = 4;
327
328 // Evaluate network timing.
329 optional TimingMetricsEnable timing_metrics_enable = 5;
330 optional TimingMetricsDisable timing_metrics_disable = 6;
331 optional TimingMetricsClear timing_metrics_clear = 7;
332
333 // Used to override firmware values with your custom outputs.
334 repeated OutputOverride output_override = 8;
335
336 // Generate ENI file
337 optional EniGenerate eni_generate = 9;
338
339 // Creating the object does the job.
340 message Shutdown { }
341
342 message Discover {
343 // Default: MotionController::NetworkStartTimeoutMillisecondsDefault which is 30000 ms.
344 optional uint32 timeout_milliseconds = 3;
345 }
346 message Start {
347 // Default: RSINetworkStartModeOPERATIONAL.
348 optional RSINetworkStartMode mode = 1;
349 // Default: MotionController::NetworkStartTimeoutMillisecondsDefault which is 30000 ms.
350 optional uint32 timeout_milliseconds = 2;
351 }
352
353 message DiscoverAndStart {
354 // Default: RSINetworkStartModeOPERATIONAL.
355 optional RSINetworkStartMode mode = 1;
356 // Default: MotionController::NetworkStartTimeoutMillisecondsDefault which is 30000 ms.
357 optional uint32 timeout_milliseconds = 2;
358 }
359
360 message TimingMetricsEnable {
361 // Determines when low_count increases.
362 optional uint32 low_threshold = 1;
363 // Determines when high_count increases.
364 optional uint32 high_threshold = 2;
365 }
366 message TimingMetricsDisable {}
367 message TimingMetricsClear {}
368
369 message OutputOverride {
370 // Index of the output.
371 int32 index = 1;
372 // Turn on or off overriding of the firmware value with the override_value.
373 optional bool override = 2;
374 // Your custom value rather than our intended firmware value.
375 optional int64 override_value = 3;
376 }
377
378 message EniGenerate {
379 // result of the attempt to generate the ENI file.
380 optional RSINetworkEniResult result = 1;
381 // resulting output from rsiconfig (which is used to generate the ENI file)
382 optional string output = 2;
383 }
384}
386
388message NetworkRequest {
389 // Common request header.
390 RSI.RapidServer.RequestHeader header = 1;
391
392 optional NetworkConfig config = 2;
393
394 optional NetworkAction action = 3;
395}
397
399message NetworkResponse {
400 // Common response header. Always check the response header for errors.
401 RSI.RapidServer.ResponseHeader header = 1;
402
403 optional NetworkConfig config = 2;
404 optional NetworkAction action = 3;
405 optional NetworkInfo info = 4;
406 optional NetworkStatus status = 5;
407}
409
411message NetworkStatus {
412 RSINetworkState state = 1;
413 int32 node_count = 2;
414 int32 counter = 3;
415 bool synchronized = 4;
416 RSINetworkStartError last_start_error = 5;
417
418 // output logged from RMPNetwork when it closes.
419 string log_message = 6;
420
421 // NetworkTiming in RapidCode. Used to evaluate stability.
422 TimingMetricsStatus timing_metrics = 7;
423
424 // Collection of all Network PDO Inputs.
425 repeated PdoInputStatus pdo_inputs = 8;
426
427 // Collection of all Network PDO Outputs.
428 repeated PdoOutputStatus pdo_outputs = 9;
429
430 // Logical OR of AL Status registers from all nodes. 8 = all Operational.
431 uint32 al_status = 10;
432 // Cumulative count of missed cyclic EtherCAT frames since network startup.
433 uint32 missed_cyclic_frame_count = 11;
434 // Most recent cyclic frame period in microseconds.
435 uint32 cyclic_frame_period_us = 12;
436 // Distributed Clock synchronization error in nanoseconds.
437 int32 synchronization_error_ns = 13;
438 // Number of nodes actively responding on the network.
439 uint32 active_node_count = 14;
440 // The host network interface type used for EtherCAT frame I/O.
441 RSINetworkInterfaceType interface_type = 15;
442
443 message TimingMetricsStatus {
444 // Most recent value.
445 uint32 delta = 1;
446 // Lowest recorded since last clear.
447 uint32 min_recorded = 2;
448 // Highest recorded since last clear.
449 uint32 max_recorded = 3;
450 // Count below low_threshold since last clear.
451 uint32 low_count = 4;
452 // Count above high_threshold since last clear.
453 uint32 high_count = 5;
454 }
455
456 message PdoInputStatus {
457 // The index of this PDO in RMP firmware.
458 int32 index = 1;
459 // The raw 64-bit value of this PDO.
460 int64 value = 2;
461 }
462
463 message PdoOutputStatus {
464 // The index of this PDO in RMP firmware.
465 int32 index = 1;
466 // The raw 64-bit value that was sent on the network.
467 int64 sent_value = 2;
468 // The raw 64-bit override value that can be written by software.
469 int64 override_value = 3;
470 // The raw 64-bit value that the RMP is going to send, unless overridden.
471 int64 firmware_value = 4;
472 // Whether or not the override_value is being used.
473 bool override_enabled = 5;
474 }
475}
477
479message NetworkInfo {
480 RSINetworkType type = 1;
481 int32 pdo_input_count = 4;
482 int32 pdo_output_count = 5;
483
484 // Collection of all Network PDO Inputs.
485 repeated PdoInputInfo pdo_inputs = 6;
486
487 // Collection of all Network PDO Outputs.
488 repeated PdoOutputInfo pdo_outputs = 7;
489
490 message PdoInputInfo {
491 string name = 1;
492 AddressInfo address_info = 2;
493 int32 bit_size = 3;
494 int32 bit_offset = 4;
495 }
496
497 message PdoOutputInfo {
498 string name = 1;
499 AddressInfo sent_value_address = 2;
500 AddressInfo override_value_address = 3;
501 AddressInfo firmware_value_address = 4;
502 int32 bit_size = 5;
503 int32 bit_offset = 6;
504 }
505}
507
508
509
510
512message AxisRequest {
513 // Common request header
514 RSI.RapidServer.RequestHeader header = 1;
515
516 // Axis index
517 int32 index = 2;
518
519 optional AxisConfig config = 3;
520 optional AxisAction action = 4;
521}
523
525message AxisResponse {
526 // Common response header. Always check the response header for errors.
527 RSI.RapidServer.ResponseHeader header = 1;
528
529 // Axis index
530 int32 index = 2;
531
532 optional AxisConfig config = 3;
533 optional AxisAction action = 4;
534 optional AxisInfo info = 5;
535 optional AxisStatus status = 6;
536}
538
540message AxisBatchRequest {
541 // Common request header
542 RSI.RapidServer.RequestHeader header = 1;
543
544 repeated AxisRequest requests = 2;
545}
546
547message AxisBatchResponse {
548 // Common response header. Always check the response header for errors.
549 RSI.RapidServer.ResponseHeader header = 1;
550
551 repeated AxisResponse responses = 2;
552}
554
556message AxisStatus {
557 // Is the amp enabled?
558 bool amp_enabled = 1;
559
560 // The state (IDLE, MOVING, ERROR, etc.).
561 RSIState state = 2;
562
563 // The cause of the error (if in ERROR, STOPPED, STOPPING_ERROR state).
564 RSISource source = 3;
565
566 // Extra fault info from the drive
567 string source_name = 4;
568
569 // Positions.
570 PositionStatus position = 5;
571
572 // Command and actual velocity.
573 VelocityStatus velocity = 6;
574
575 // Command acceleration.
576 AccelerationStatus acceleration = 7;
577
578 // How many frames does the Axis have left to execute?
579 int32 frames_to_execute = 8;
580
581 // The motion id as stored in the Axis class (unsigned 16-bit integer).
582 uint32 motion_id = 9;
583
584 // The currently executing motion identifier (unsigned 16-bit integer).
585 uint32 motion_id_executing = 10;
586
587 // The currently exeucting motion element identifier (unsigned 16-bit integer).
588 int32 element_id_executing = 11;
589
590 // Is electronic gearing enabled?
591 bool gear_enabled = 12;
592
593 // Status bits related to the motor.
594 MotorStatusBits motor_status_bits = 13;
595
596 // Status bits related to motion.
597 MotionStatusBits motion_status_bits = 14;
598
599 // DS402 status bits, for drives that support DS402.
600 Ds402StatusBits ds402_status_bits = 15;
601
602 // Dedicated output bits.
603 DedicatedOutputBits dedicated_output_bits = 16;
604
605 // Dedicated input bits.
606 DedicatedInputBits dedicated_input_bits = 17;
607
608 // Homing status
609 bool home_state = 18;
610 RSIHomeStage home_stage = 19;
611
612 // The states of the general purpose input bits, DigitalInputsGet().
613 uint32 general_input_bits = 20;
614
615 // The states of the general purpose output bits, DigitalOutputsGet().
616 uint32 general_output_bits = 21;
617
618 message PositionStatus {
619 double command = 1;
620 double actual = 2;
621 double error = 3;
622 double target = 4;
623 double origin = 5;
624 double encoder_0 = 6;
625 double encoder_1 = 7;
626 double compensation = 8;
627 double backlash = 9;
628 }
629
630 message VelocityStatus {
631 double command = 1;
632 double actual = 2;
633 }
634
635 message AccelerationStatus {
636 double command = 1;
637 }
638
639 message MotorStatusBits {
640 bool amp_fault = 1;
641 bool amp_warning = 2;
642 bool feedback_fault = 3;
643 bool limit_position_error = 4;
644 bool limit_torque = 5;
645 bool limit_hardware_negative = 6;
646 bool limit_hardware_positive = 7;
647 bool limit_software_negative = 8;
648 bool limit_software_positive = 9;
649 }
650
651 message MotionStatusBits {
652 bool done = 1;
653 bool start = 2;
654 bool modify = 3;
655 bool at_velocity = 4;
656 bool out_of_frames = 5;
657 bool near_target = 6;
658 bool at_target = 7;
659 bool settled = 8;
660 }
661
662 message Ds402StatusBits {
663 bool ready_to_switch_on = 1;
664 bool switched_on = 2;
665 bool operation_enabled = 3;
666 bool fault = 4;
667 bool voltage_enabled = 5;
668 bool quick_stop = 6;
669 bool switch_on_disabled = 7;
670 bool warning = 8;
671 bool manufacturer_specific_8 = 9;
672 bool remote = 10;
673 bool target_reached = 11;
674 bool internal_limit_active = 12;
675 bool operation_mode_specific_12 = 13;
676 bool operation_mode_specific_13 = 14;
677 bool manufacturer_specific_14 = 15;
678 bool manufacturer_specific_15 = 16;
679 }
680
681 message DedicatedOutputBits {
682 bool amp_enable = 1;
683 bool brake_release = 2;
684 }
685
686 message DedicatedInputBits {
687 bool amp_fault = 1;
688 bool brake_applied = 2;
689 bool home = 3;
690 bool limit_hardware_positive = 4;
691 bool limit_hardware_negative = 5;
692 bool index = 6;
693 bool index_secondary = 7;
694 bool feedback_fault = 8;
695 bool captured = 9;
696 bool hall_a = 10;
697 bool hall_b = 11;
698 bool hall_c = 12;
699 bool amp_active = 13;
700 bool warning = 14;
701 bool drive_status_9 = 15;
702 bool drive_status_10 = 16;
703 bool feedback_fault_primary = 17;
704 bool feedback_fault_secondary = 18;
705 }
706}
708
710message AxisAction {
711 optional Abort abort = 1;
712 optional EStopAbort e_stop_abort = 2;
713 optional EStopModifyAbort e_stop_modify_abort = 3;
714 optional EStopModify e_stop_modify = 4;
715 optional EStop e_stop = 5;
716 optional TriggeredModify triggered_modify = 6;
717 optional Stop stop = 7;
718 optional Resume resume = 8;
719
720 optional ClearFaults clear_faults = 9;
721 optional AmpEnable amp_enable = 10;
722 optional AmpDisable amp_disable = 11;
723 optional HoldGateSet hold_gate_set = 12;
724 optional PositionSet position_set = 13;
725 optional Move move = 14;
726 optional GearEnable gear_enable = 15;
727 optional GearDisable gear_disable = 16;
728 optional Home home = 17;
729 optional HomeCancel home_cancel = 18;
730 optional OperationMode operation_mode_set = 19;
731 optional OperationMode operation_mode_get = 20;
732
733 message Abort {}
734 message EStopAbort {}
735 message EStopModifyAbort{}
736 message EStopModify{}
737 message EStop {}
738 message TriggeredModify {}
739 message Stop {}
740 message Resume {}
741
742 message ClearFaults {}
743
744 message AmpEnable {
745 optional int32 timeout_milliseconds = 1;
746 optional int32 duration = 2; // read-only how long did it take to enable? only set if you specify a timeout to wait for AMP_ACTIVE
747 optional bool override_restricted_state = 3; // if true, allows potentially dangerous enabling of an Amplifier even if it's in MOVING, STOPPING or STOPPED state
748 }
749 message AmpDisable {}
750 message HoldGateSet {
751 bool state = 1;
752 }
753 message PositionSet{
754 double position = 1;
755 }
756
757 message Move {
758 // Request one type of motion.
759 oneof move {
760 AxisMovePointToPoint point_to_point = 3;
761 AxisMoveVelocity velocity = 4;
762 MoveStreaming streaming = 5;
763 }
764
765 // Specify the MotionID for this move. (If you don't specify one, it will be auto-incremented after each move.)
766 optional uint32 motion_id = 6;
767
768 // Specify MotionHold criteria, if you want the motion to hold execution until conditions are met.
769 optional MotionHold motion_hold = 7;
770
771 // Wait for motion to complete? (See ConfigSet settling criteria.)
772 bool blocking = 8;
773 }
774
775 message GearEnable {
776 optional int32 master_axis_number = 2;
777 optional RSIAxisMasterType gearing_source = 3;
778 int32 numerator = 4;
779 int32 denominator = 5;
780 }
781 message GearDisable {}
782
783 message Home {
784 RSIHomeMethod method = 1;
785 double velocity = 2;
786 double slow_velocity = 3;
787 double acceleration = 4;
788 double deceleration = 5;
789 optional double jerk_percent = 6;
790 optional bool move_to_zero = 7;
791 optional double offset = 8;
792 optional RSIAction behavior = 9;
793 }
794
795 message HomeCancel {}
796
797 message OperationMode {
798 // For setting the operation mode in the request, or getting it from the response.
799 optional RSIOperationMode operation_mode = 1;
800 }
801}
802
803// Internal MoveRequest messages.
804 message AxisMovePointToPoint {
805 // Move to this position. Absolute, unless the relative boolean is true. (UserUnits)
806 double position = 1;
807
808 // Maximum velocity. (UserUnits/second).
809 optional double velocity = 2;
810
811 // Maximum acceleration. (UserUnits/second^2). If specified, velocity and deceleration must be specified.
812 optional double acceleration = 3;
813
814 // Maximum deceleration. (UserUnits/second^2). If specified, velocity and acceleration must be specified
815 optional double deceleration = 4;
816
817 // Percentage of acceleration that will be smoothed. (0-100)
818 // Acceleration time will not change so if Jerk Percent is 100, maximum acceleration will be 2x the specified maximum.
819 // If specified, velocity, acceleration, and deceleration must be specified.
820 // A non-zero value makes the PointToPoint MoveSCurve
821 optional double jerk_percent = 5;
822
823 // Final velocity. 0.0 is default. (UserUnits/second)
824 // If specified, velocity, acceleration, and deceleration must be specified.
825 optional double final_velocity = 6;
826
827 // Set true if you intend position to be a relative increment. If specified, jerk_percent must be specified.
828 bool relative = 7;
829}
830
831message AxisMoveVelocity {
832 // Move at this velocity. (UserUnits/second)
833 double velocity = 1;
834
835 // Maximum acceleration. (UserUnits/second^2)
836 double acceleration = 2;
837
838 // Percentage of acceleration that will be smoothed. (0-100)
839 // Acceleration time will not change so if Jerk Percent is 100, maximum acceleration will be 2x the specified maximum.
840 // A non-zero value uses MoveVelocitySCurve
841 double jerk_percent = 3;
842}
843
844message MoveStreaming {
845 repeated double positions = 1;
846 repeated double velocities = 2;
847 repeated double accelerations = 3;
848 repeated double jerks = 4;
849 repeated double times = 5;
850 int32 empty_count = 6;
851 bool retain = 7;
852 bool final = 8;
853
854 // Specify the interpolation algorithm to use when only providing positions and no velocities nor accelerations.
855 // Uses the RapidCode method RapidCodeMotion::MovePT()
856 // The three currently supported ones are:
857 // RSIMotionTypePT (no interpolation)
858 // RSIMotionTypeBSPLINE (default)
859 // RSIMotionTypePVT is used in the RapidCode method RapidCodeMotion::MovePVT(), i.e. when positions and velocities are given.
860 optional RSIMotionType pt_motion_type = 9;
861
862 // Feedforward values for PTF/PVTF motion. When present and matching positions size:
863 // - With velocities: uses MovePVTF()
864 // - Without velocities: uses MovePTF()
865 repeated double feedforwards = 10;
866}
868
869message MotionHoldGate{
870 int32 number = 1;
871}
872
873message MotionHoldAxis {
874 // If true, motion will hold for Actual Position. If false, it will hold for Command Position.
875 bool actual = 1;
876
877 // Greater than, less than, etc.
878 RSIUserLimitLogic logic = 2;
879
880 // The number of the Axis whose position we're waiting for.
881 int32 hold_axis_number = 3;
882
883 // The position of the hold axis which will trigger the hold to finish.
884 double hold_axis_position = 4;
885}
886
887message MotionHoldUser {
888 // The 64-bit host address on the server.
889 uint64 address = 1;
890
891 // The 32-bit mask that will be ANDed with the value stored at the User Address.
892 int32 mask = 2;
893
894 // The 32-bit mask that will compared for equality after the AND mask.
895 int32 pattern = 3;
896}
897
898message MotionHold {
899 // Choose the type of hold.
900 oneof type {
901 MotionHoldGate gate = 2;
902 MotionHoldAxis axis = 3;
903 MotionHoldUser user = 4;
904 }
905
906 // The motion will execute regardless of hold status after this amount of time.
907 optional double hold_timeout_seconds = 6;
908
909 // This optional delay will occur before motion starts.
910 optional double delay_seconds = 7;
911}
912
914message AxisConfig {
915 // The number of encoder counts to UserUnits.
916 optional double user_units = 1;
917
918 // The origin position, typically set when homing.
919 optional double origin_position = 2;
920
921 // Give the Axis a name, if you like.
922 optional string user_label = 3;
923
924 // Default trajectory values.
925 optional TrajectoryDefaults defaults = 4;
926 optional HardwareTrigger amp_fault = 5;
927 optional HardwareTrigger home_switch = 6;
928 optional ErrorLimit error_limit = 7;
929 optional HardwareTrigger hardware_negative_limit = 8;
930 optional HardwareTrigger hardware_positive_limit = 9;
931 optional SoftwareTrigger software_negative_limit = 10;
932 optional SoftwareTrigger software_positive_limit = 11;
933 optional Settling settling = 12;
934 optional MotionConfig motion = 13;
935 optional Homing homing = 14;
936 optional int32 frame_buffer_size = 15;
937 optional RSIMotorDisableAction amp_disable_action = 16;
938 optional double feed_rate = 17;
939
940 // Internal messages.
941 message TrajectoryDefaults
942 {
943 optional double velocity = 1;
944 optional double acceleration = 2;
945 optional double deceleration = 3;
946 optional double jerk_percent = 4;
947 optional double position1 = 5;
948 optional double position2 = 6;
949 optional double relative_increment = 7;
950 }
951
952 message HardwareTrigger {
953 optional RSIAction action = 1;
954 optional bool trigger_state = 2;
955 optional double duration = 3;
956 }
957
958 message SoftwareTrigger {
959 optional RSIAction action = 1;
960 optional double trigger_value = 2;
961 }
962
963 message ErrorLimit {
964 optional RSIAction action = 1;
965 optional double trigger_value = 2;
966 optional double duration = 3;
967 }
968
969 message Settling {
970 optional double position_tolerance_fine = 1;
971 optional double position_tolerance_coarse = 2;
972 optional double velocity_tolerance = 3;
973 optional double time_seconds = 4;
974 optional bool on_stop = 5;
975 optional bool on_estop = 6;
976 optional bool on_estop_cmd_equals_actual = 7;
977 }
978
979 message MotionConfig {
980 // Seconds.
981 optional double stop_time = 1;
982
983 // Seconds.
984 optional double estop_time = 2;
985
986 // UserUnits per second.
987 optional double triggered_modify_deceleration = 3;
988
989 // Jerk percent (0-100).
990 optional double triggered_modify_jerk_percent = 4;
991
992 // UserUnits per second.
993 optional double estop_modify_deceleration = 5;
994
995 // Jerk percent (0-100).
996 optional double estop_modify_jerk_percent = 6;
997 }
998 message Homing {
999 // placeholder for possible future homing configuration. see Action for Home configuration.
1000 }
1001}
1003
1005message AxisInfo {
1006 // Axis index.
1007 int32 index = 1;
1008
1009 // Host and firmware addresses
1010 repeated AddressInfo addresses = 2;
1011
1012 // NetworkNode information.
1013 NetworkNodeInfo node_info = 3;
1014
1015 // Constants from the Axis object
1016 Constants constants = 4;
1017
1018 // The internal motion supervisor index
1019 int32 motion_supervisor_index = 5;
1020
1021 message Constants {
1022 // The value returned by NetworkIndexGet() when the index is invalid or nonexistent for this Axis.
1023 uint32 network_index_invalid = 1;
1024
1025 // The default time an Axis waits before generating an AmpFault if the Axis does not enable after calling AmpEnableSet(true).
1026 double amp_enable_amp_fault_timeout_seconds_default = 2;
1027 }
1028
1029}
1031
1032
1034message MultiAxisRequest {
1035 // Common request header
1036 RSI.RapidServer.RequestHeader header = 1;
1037
1038 // MultiAxis index
1039 int32 index = 2;
1040
1041 optional MultiAxisConfig config = 3;
1042 optional MultiAxisAction action = 4;
1043}
1045
1047message MultiAxisResponse {
1048 // Common response header. Always check the response header for errors.
1049 RSI.RapidServer.ResponseHeader header = 1;
1050
1051 // MultiAxis index
1052 int32 index = 2;
1053
1054 optional MultiAxisConfig config = 3;
1055 optional MultiAxisAction action = 4;
1056 optional MultiAxisInfo info = 5;
1057 optional MultiAxisStatus status = 6;
1058}
1060
1062message MultiAxisBatchRequest {
1063 // Common request header
1064 RSI.RapidServer.RequestHeader header = 1;
1065
1066 repeated MultiAxisRequest requests = 2;
1067}
1068
1069message MultiAxisBatchResponse {
1070 // Common response header. Always check the response header for errors.
1071 RSI.RapidServer.ResponseHeader header = 1;
1072
1073 repeated MultiAxisResponse responses = 2;
1074}
1076
1077
1079message MultiAxisStatus {
1080 RSIState state = 1;
1081 RSISource source = 2;
1082 string source_name = 3;
1083 bool amp_enabled = 4;
1084 MotionStatusBits motion_status_bits = 5;
1085 repeated AxisStatus axis_statuses = 6;
1086 bool is_mapped = 7;
1087
1088 message MotionStatusBits {
1089 bool done = 1;
1090 bool start = 2;
1091 bool modify = 3;
1092 bool at_velocity = 4;
1093 bool out_of_frames = 5;
1094 }
1095}
1097
1099message MultiAxisAction {
1100 optional Abort abort = 1;
1101 optional EStopAbort e_stop_abort = 2;
1102 optional EStopModifyAbort e_stop_modify_abort = 3;
1103 optional EStopModify e_stop_modify = 4;
1104 optional EStop e_stop = 5;
1105 optional TriggeredModify triggered_modify = 6;
1106 optional Stop stop = 7;
1107 optional Resume resume = 8;
1108
1109 optional ClearFaults clear_faults = 9;
1110 optional AmpEnable amp_enable = 10;
1111 optional AmpDisable amp_disable = 11;
1112 optional Move move = 12;
1113 optional RemoveAxes remove_axes = 13;
1114 optional Unmap unmap = 14;
1115 optional Map map = 15;
1116 optional AxisAdd axis_add = 16;
1117
1118 message Abort {}
1119 message EStopAbort {}
1120 message EStopModifyAbort{}
1121 message EStopModify{}
1122 message EStop {}
1123 message TriggeredModify {}
1124 message Stop {}
1125 message Resume {}
1126
1127 message ClearFaults {}
1128
1129 message AmpEnable {
1130 optional int32 timeout_milliseconds = 1;
1131 optional int32 duration = 2; // read-only how long did it take to enable? only set if you specify a timeout to wait for AMP_ACTIVE
1132 optional bool override_restricted_state = 3; // if true, allows potentially dangerous enabling of an Amplifier even if it's in MOVING, STOPPING or STOPPED state
1133 }
1134 message AmpDisable {}
1135
1136 message Move {
1137 oneof move {
1138 MultiAxisMovePointToPoint point_to_point = 3;
1139 MultiAxisMoveVelocity velocity = 4;
1140 MoveStreaming streaming = 5;
1141 }
1142 optional uint32 motion_id = 6;
1143
1144 // Specify MotionHold criteria, if you want the motion to hold execution until conditions are met.
1145 optional MotionHold motion_hold = 7;
1146
1147 bool blocking = 8;
1148
1149 message MultiAxisMovePointToPoint {
1150 repeated AxisMovePointToPoint axis_move_point_to_points = 1;
1151 bool relative = 2;
1152 }
1153
1154 message MultiAxisMoveVelocity {
1155 repeated AxisMoveVelocity axis_move_velocities = 1;
1156 }
1157 }
1158 message RemoveAxes {}
1159 message Unmap {}
1160 message Map {}
1161 message AxisAdd {
1162 int32 axis_index = 1;
1163 }
1164}
1166
1168message MultiAxisConfig {
1169 repeated int32 axes_indices = 1;
1170 optional string user_label = 2;
1171 optional double feed_rate = 3;
1172 optional double stop_time = 4;
1173 optional double e_stop_time = 5;
1174}
1176
1178message MultiAxisInfo {
1179 // The zero-based index for this MultiAxis.
1180 int32 index = 1;
1181
1182 // The internal motion supervisor index.
1183 int32 motion_supervisor_index = 2;
1184
1185 // Host and firmware addresses
1186 repeated AddressInfo addresses = 3;
1187}
1189
1191message NetworkNodeInfo {
1192 // True if hardware exists.
1193 bool exists = 1;
1194
1195 // The node index.
1196 int32 index = 2;
1197
1198 // The number of Axis objects on this node.
1199 int32 axis_count = 3;
1200
1201 // True if this node has I/O.
1202 bool has_io = 4;
1203
1204 // The number of digital/analog inputs and outputs on this node.
1205 IOCounts io_counts = 5;
1206
1207 // The bit masks and 64-bit host addresses for this node's I/O.
1208 IOAddresses io_addresses = 6;
1209
1210 // The node type.
1211 RSINodeType type = 7;
1212
1213 // 32-bit vendor identifier.
1214 uint32 vendor_id = 8;
1215
1216 // 32-bit product code.
1217 uint32 product_code = 9;
1218
1219 // 32-bit hardware revision.
1220 uint32 hardware_revision = 10;
1221
1222 // Station alias.
1223 uint32 station_alias = 11;
1224
1225 // Serial number.
1226 string serial_number = 12;
1227
1228 // The node's name.
1229 string name = 13;
1230
1231 // Product name.
1232 string product_name = 14;
1233
1234 // Vendor name.
1235 string vendor_name = 15;
1236
1237 Constants constants = 16;
1238
1239
1240 // Internal messages.
1241
1242 // The number of digital/analog inputs and outputs.
1243 message IOCounts {
1244 // Number of digital inputs.
1245 int32 digital_inputs = 1;
1246
1247 // Number of digital outputs.
1248 int32 digital_outputs = 2;
1249
1250 // Number of analog inputs.
1251 int32 analog_inputs = 3;
1252
1253 // Number of analog outputs.
1254 int32 analog_outputs = 4;
1255 }
1256
1257 message IOAddresses {
1258 // Masks and 64-bit host addresses for each digital input.
1259 repeated AddressInfo digital_inputs = 1;
1260
1261 // Masks and 64-bit host addresses for each digital output.
1262 repeated AddressInfo digital_outputs = 2;
1263
1264 // Masks and 64-bit host addresses for each analog input.
1265 repeated AddressInfo analog_inputs = 3;
1266
1267 // Masks and 64-bit host addresses for each analog output.
1268 repeated AddressInfo analog_outputs = 4;
1269 }
1270
1271 message Constants {
1272 // Default time to wait when reading or writing an SDO with ServiceChannelRead() or ServiceChannelWrite()
1273 uint32 sdo_timeout_milliseconds_default = 1;
1274 }
1275}
1277
1279message NetworkNodeStatus {
1280 // All the digital input states.
1281 repeated bool digital_input_states = 2;
1282
1283 // All the digital output states.
1284 repeated bool digital_output_states = 3;
1285
1286 // All the analog input values.
1287 repeated int32 analog_input_values = 4;
1288
1289 // All the analog output values.
1290 repeated int32 analog_output_values = 5;
1291
1292 // EtherCAT AL Status register (0x0130). Bits 0-3: state (1=Init, 2=PreOp, 4=SafeOp, 8=Op).
1293 uint32 al_status = 6;
1294 // EtherCAT AL Status Code register. Non-zero indicates an error condition.
1295 uint32 al_status_code = 7;
1296 // CANopen over EtherCAT (CoE) emergency message (8 bytes per CiA 301).
1297 uint64 coe_emergency_message = 8;
1298 // Network counter when CoeEmergencyMessage was received.
1299 int32 coe_emergency_message_network_counter = 9;
1300}
1302
1303
1305// The state of the digital output at the specified bit number.
1306message DigitalOutput {
1307 // The bit number.
1308 int32 bit_number = 1;
1309
1310 // The state of the digital output. When this message is used as a request
1311 // to set a digital output, the digital output will be set to this value.
1312 // When this message is returned as an action response, this field holds the
1313 // new state.
1314 bool state = 2;
1315}
1316
1317// The value of the analog output at the specified channel.
1318message AnalogOutput {
1319 // The channel number.
1320 int32 channel = 1;
1321
1322 // The value of the analog output. When this message is used as a request
1323 // to set an analog output, the analog output will be set to this value.
1324 // When this message is returned as an action response, this field holds the
1325 // new value.
1326 int32 value = 2;
1327}
1328
1329// The location, size, and value of a Service Data Object (SDO).
1330// This message is used to read or write SDOs on a network node.
1331// See NetworkNodeAction sdo_writes and sdo_reads.
1332message SDO {
1333 // The SDO index.
1334 int32 index = 1;
1335
1336 // The SDO sub-index.
1337 int32 sub_index = 2;
1338
1339 // The number of bytes.
1340 int32 byte_count = 3;
1341
1342 // The types of data values we can read or write.
1343 enum ValueType {
1344 option allow_alias = true;
1345 UNKNOWN = 0;
1346 INTEGER = 0;
1347 STRING = 1;
1348 BYTES = 2;
1349 }
1350
1351 // When reading an SDO, specify the read type. Default is integer.
1352 optional ValueType read_type = 4;
1353
1354 // Wait this long for a response, otherwise it will throw a timeout error.
1355 optional uint32 timeout_milliseconds = 5;
1356
1357 // The SDO value.
1358 // SDO write: This field is used to set the value to write.
1359 // SDO read: This field is ignored when SDO read action request, but will contain the
1360 // value read from the SDO in the SDO read action response.
1361 oneof value {
1362 // Integer value used for all non-string types.
1363 int32 integer_value = 6;
1364
1365 // String value.
1366 string string_value = 7;
1367
1368 // Raw bytes value
1369 bytes bytes_value = 8;
1370 }
1371}
1372
1373// An ASCII command to execute on an AKD drive.
1374message AKDASCII {
1375 // The command as a string.
1376 string command = 1;
1377
1378 // The returned result of the command. This field is ignored when requesting
1379 // an AKDASCII command.
1380 optional string result = 2;
1381}
1382
1383// A set of actions to perform on a network node. This message is used to
1384// request a set of actions. A new instance of this message will be returned
1385// containing the results of the requested acitons.
1386message NetworkNodeAction {
1387
1388 // Any number of digital outputs to set. Add instances of the DigitalOutput
1389 // message to this field to set digital outputs. When this message is
1390 // returned in the action response, this field contains the new states of
1391 // the digital outputs.
1392 repeated DigitalOutput digital_output_sets = 1;
1393
1394 // Any number of analog outputs to set. Add instances of the AnalogOutput
1395 // message to this field to set analog outputs. When this message is
1396 // returned in the action response, this field contains the new values of
1397 // the analog outputs.
1398 repeated AnalogOutput analog_output_sets = 2;
1399
1400 // The requested SDO value(s) to write to the network. Add instances of the
1401 // SDO message to this field to write to SDOs. When this message is returned
1402 // in the action response, this field will be empty.
1403 repeated SDO sdo_writes = 3;
1404
1405 // The SDO(s) to be read from the network. Add instances of the SDO message
1406 // to this field to read SDO values. When this message is returned in the
1407 // action response, the SDO messages will contain the read values.
1408 repeated SDO sdo_reads = 4;
1409
1410 // AKD ASCII command(s). Only used for Kollmorgen AKD drives. Add instances
1411 // of the AKDASCII message to request an ASCII command. When this message
1412 // is returned in the action response, the AKDASCII messages will contain
1413 // both the command executed and the returned result as a string.
1414 repeated AKDASCII akd_asciis = 5;
1415}
1417
1419message NetworkNodeConfig {}
1421
1423message NetworkNodeRequest {
1424 // Common request header
1425 RSI.RapidServer.RequestHeader header = 1;
1426
1427 // Network Node index
1428 int32 index = 2;
1429
1430 optional NetworkNodeConfig config = 3;
1431 optional NetworkNodeAction action = 4;
1432}
1434
1436message NetworkNodeResponse {
1437 // Common response header. Always check the response header for errors.
1438 RSI.RapidServer.ResponseHeader header = 1;
1439
1440 // Network Node index
1441 int32 index = 2;
1442
1443 optional NetworkNodeConfig config = 3;
1444 optional NetworkNodeAction action = 4;
1445 optional NetworkNodeInfo info = 5;
1446 optional NetworkNodeStatus status = 6;
1447}
1449
1451message NetworkNodeBatchRequest {
1452 // Common request header
1453 RSI.RapidServer.RequestHeader header = 1;
1454
1455 repeated NetworkNodeRequest requests = 2;
1456}
1457
1458message NetworkNodeBatchResponse {
1459 // Common response header. Always check the response header for errors.
1460 RSI.RapidServer.ResponseHeader header = 1;
1461
1462 repeated NetworkNodeResponse responses = 2;
1463}
1465
1466
1468message RecorderRequest {
1469 // Common request header.
1470 RSI.RapidServer.RequestHeader header = 1;
1471
1472 // The Recorder index. (Check MotionController's Recorder count.)
1473 int32 index = 2;
1474
1475 optional RecorderConfig config = 3;
1476 optional RecorderAction action = 4;
1477}
1479
1480
1482message RecorderResponse {
1483 // Common response header. Always check the response header for errors.
1484 RSI.RapidServer.ResponseHeader header = 1;
1485
1486 // Recorder index
1487 int32 index = 2;
1488
1489 optional RecorderConfig config = 3;
1490 optional RecorderAction action = 4;
1491 optional RecorderInfo info = 5;
1492 optional RecorderStatus status = 6;
1493}
1495
1497message RecorderBatchRequest {
1498 // Common request header
1499 RSI.RapidServer.RequestHeader header = 1;
1500
1501 repeated RecorderRequest requests = 2;
1502}
1503
1504message RecorderBatchResponse {
1505 // Common response header. Always check the response header for errors.
1506 RSI.RapidServer.ResponseHeader header = 1;
1507
1508 repeated RecorderResponse responses = 2;
1509}
1511
1512
1514message RecorderInfo { }
1516
1518message RecorderStatus {
1519 // Is the Recorder recording?
1520 bool is_recording = 1;
1521
1522 // The number of records available for retrieval.
1523 int32 records_available = 2;
1524}
1526
1528message RecorderAction {
1529
1530 optional Reset reset = 1;
1531 optional Start start = 2;
1532 optional Stop stop = 3;
1533 optional RetrieveRecords retrieve_records = 4;
1534
1535 message Reset {}
1536 message Start {}
1537 message Stop {}
1538
1539 message RetrieveRecords {
1540 // New data records will be in the response, if any are available.
1541 repeated Record records = 1;
1542
1543 // A data record from the recorder.
1544 message Record {
1545 // The number of these will depend on the number of addresses to record in the recorder configuration.
1546 repeated FirmwareValue data = 1;
1547 }
1548 }
1549}
1551
1552
1554message RecorderConfig {
1555 // Recorder period, in samples.
1556 optional int32 period = 1;
1557
1558 // If true, the recorder will use a circular buffer, overwriting old data (be sure to read it out).
1559 optional bool circular_buffer = 2;
1560
1561 // The addresses to record. Get these from Controller/Axis/MultiAxis InfoGet rpcs.
1562 repeated AddressInfo addresses = 3;
1563
1564 // Use this to start and end recording with motion.
1565 optional RecorderTriggerOnMotion trigger_on_motion = 4;
1566
1567 // Configure the recorder to generate a RECORDER_HIGH interrupt when the buffer reaches this size.
1568 optional int32 buffer_high_count = 5;
1569
1570 // Read-only, this tells us how many records fit inside the recorder's buffer (see MotionController config's recorder buffer size).
1571 optional int32 record_max_count = 6;
1572
1573 // Internal messages.
1574
1575 message RecorderTriggerOnMotion {
1576 // Use an Axis or MutliAxis's motion supervisor index.
1577 optional int32 motion_supervisor_index = 1;
1578 // Set true if you want the recorder to start when motion starts and stop when motion is done.
1579 optional bool enable = 2;
1580 }
1581}
1582
1584
1586message UserLimitStatus {
1587 // The UserLimit's index.
1588 int32 index = 1;
1589
1590 // Is the UserLimit processing in the RMP firmware_version?
1591 bool enabled = 2;
1592
1593 // Is the UserLimit currently triggered?
1594 bool state = 3;
1595}
1597
1599message UserLimitAction {
1600
1601 optional Reset reset = 1;
1602 optional Enable enable = 2;
1603 optional Disable disable = 3;
1604
1605 message Reset {};
1606 message Enable {};
1607 message Disable {};
1608}
1610
1611
1613message UserLimitInfo {}
1615
1616
1618message UserLimitConfig {
1619
1620 // The type of trigger.
1621 optional RSIUserLimitTriggerType trigger_type = 1;
1622
1623 // The primary condition.
1624 optional UserLimitCondition condition_0 = 2;
1625
1626 // The second condition. Condition 1 will not be set if trigger type is SINGLE_CONDITION or invalid
1627 optional UserLimitCondition condition_1 = 3;
1628
1629 // Optionally set some output when the UserLimit triggers.
1630 optional UserLimitOutput output = 4;
1631
1632 // Optionally perform an action on an Axis when the UserLimit triggers.
1633 optional RSIAction action = 5;
1634
1635 // Perform the optional action on this Axis.
1636 optional int32 action_axis = 6;
1637
1638 // Duration the trigger state must be active before triggering. (Seconds)
1639 optional double duration = 7;
1640
1641 // True if the UserLimit should trigger once, then disable itself.
1642 optional bool is_single_shot = 8;
1643
1644 // Configurable interrupt data.
1645 repeated UserLimitInterruptUserData user_data = 9;
1646
1647 // Internal messages.
1648 message UserLimitCondition {
1649 // The data type to be evaluated.
1650 RSIDataType data_type = 1;
1651
1652 // The logic of the UserLimit.
1653 RSIUserLimitLogic logic = 2;
1654
1655 // A 64-bit host address, see InfoGet on MotionController, Axis, MultiAxis.
1656 uint64 address = 3;
1657
1658 // A 32-bit AND mask.
1659 optional uint32 mask = 4;
1660
1661 // The 32-bit trigger value. (for 32-bit data types)
1662 optional int32 integer_limit_value = 5;
1663
1664 // The 64-bit double trigger value (for 64-bit doubles data types only).
1665 optional double double_limit_value = 6;
1666 }
1667
1668 message UInt32Masks {
1669 // 32-bit AND mask.
1670 uint32 and_mask = 1;
1671
1672 // 32-bit OR mask.
1673 uint32 or_mask = 2;
1674 }
1675
1676 message UInt64Masks {
1677 // 64-bit AND mask.
1678 uint64 and_mask = 1;
1679
1680 // 64-bit OR mask;
1681 uint64 or_mask = 2;
1682 }
1683
1684 message UserLimitOutput {
1685 // True if enabled
1686 bool enabled = 2;
1687
1688 // The type of data to output.
1689 RSIDataType data_type = 3;
1690
1691 // A 64-bit host address, see InfoGet on MotionController, Axis, MultiAxis.
1692 uint64 address = 4;
1693
1694 // The type of output.
1695 oneof output {
1696 // Perform an AND and OR on a 64-bit value.
1697 UInt32Masks uint32_masks = 6;
1698
1699 // Output a 32-bit value.
1700 int32 int32_value = 7;
1701
1702 // Perform an AND and OR on a 64-bit value.
1703 UInt64Masks uint64_masks = 8;
1704
1705 // Output a 64-bit double.
1706 double double_value = 9;
1707
1708 // A 64-bit host address, see InfoGet on MotionController, Axis, MultiAxis.
1709 // Use this field when you want the UserLimit to copy data from the input address to the output address.
1710 uint64 input_address = 10;
1711 }
1712 }
1713
1714 message UserLimitInterruptUserData {
1715 // Interrupt data index (0-4).
1716 uint32 index = 1;
1717
1718 // A 64-bit host address, see InfoGet on MotionController, Axis, MultiAxis.
1719 optional uint64 address = 2;
1720 }
1721}
1723
1725message UserLimitRequest {
1726 // Common request header.
1727 RSI.RapidServer.RequestHeader header = 1;
1728
1729 // UserLimit index.
1730 int32 index = 2;
1731
1732 optional UserLimitConfig config = 3;
1733
1734 optional UserLimitAction action = 4;
1735}
1737
1739message UserLimitResponse {
1740 // Common response header. Always check the response header for errors.
1741 RSI.RapidServer.ResponseHeader header = 1;
1742
1743 // UserLimit index.
1744 int32 index = 2;
1745
1746 optional UserLimitConfig config = 3;
1747 optional UserLimitAction action = 4;
1748 optional UserLimitInfo info = 5;
1749 optional UserLimitStatus status = 6;
1750}
1752
1754message UserLimitBatchRequest {
1755 // Common request header.
1756 RSI.RapidServer.RequestHeader header = 1;
1757
1758 repeated UserLimitRequest requests = 2;
1759}
1760
1761message UserLimitBatchResponse {
1762 // Common response header. Always check the response header for errors.
1763 RSI.RapidServer.ResponseHeader header = 1;
1764
1765 repeated UserLimitResponse responses = 2;
1766}
1768
1770message RTOSConfig {}
1772
1774message RTOSInfo {
1775 // The RMP process catalog.
1776 string rmp_catalog = 1;
1777
1778 // The RMPNetwork process catalog.
1779 string rmp_network_catalog = 2;
1780
1781 // The number of INtime nodes.
1782 uint32 node_count = 3;
1783}
1785
1787message RTOSAction {
1788 optional Restart restart = 1;
1789 optional Stop stop = 2;
1790 optional Start start = 3;
1791
1792 message Restart {}
1793 message Stop {}
1794 message Start {}
1795}
1797
1799message RTOSStatus {
1800 // The status of the INtime node
1801 INtimeStatus status = 3;
1802}
1804
1806message RTOSRequest {
1807 // Common request header
1808 RSI.RapidServer.RequestHeader header = 1;
1809
1810 // Specify a specific INtime node by name.
1811 string name = 2;
1812
1813 optional RTOSConfig config = 3;
1814 optional RTOSAction action = 4;
1815}
1817
1819message RTOSResponse {
1820 // Common response header. Always check the response header for errors.
1821 RSI.RapidServer.ResponseHeader header = 1;
1822
1823 // Specify a specific INtime node by name.
1824 string name = 2;
1825
1826 optional RTOSConfig config = 3;
1827 optional RTOSAction action = 4;
1828 optional RTOSInfo info = 5;
1829 optional RTOSStatus status = 6;
1830}
1832
1834message RTOSBatchRequest {
1835 // Common request header
1836 RSI.RapidServer.RequestHeader header = 1;
1837
1838 repeated RTOSRequest requests = 2;
1839}
1840
1841message RTOSBatchResponse {
1842 // Common response header. Always check the response header for errors.
1843 RSI.RapidServer.ResponseHeader header = 1;
1844
1845 repeated RTOSResponse responses = 2;
1846}
1848
1850message RTTaskCreationParameters {
1851 // The name of the function to run in the task
1852 string function_name = 1;
1853
1854 // The task functions library directory and name.
1855 optional string library_name = 2;
1856 optional string library_directory = 3;
1857
1858 // The task's user defined label.
1859 optional string user_label = 4;
1860
1861 // The task's priority. 0 is the highest priority, 255 is the lowest.
1862 optional TaskPriority priority = 5;
1863
1864 // Number of times to repeat the task. -1 means infinite.
1865 optional int32 repeats = 6;
1866
1867 // How frequently to run the task in samples
1868 optional int32 period = 7;
1869
1870 // Offset in samples for when to run the task. For example, if the task is set
1871 // to run every 10 samples, and the phase is set to 3, the task will run at
1872 // 3, 13, 23, etc.
1873 optional int32 phase = 8;
1874
1875 // Whether to record execution time metrics for the task.
1876 optional bool enable_timing = 9;
1877}
1879
1881message RTTaskConfig {}
1882
1884
1886message RTTaskAction {
1887 // Stop the task.
1888 optional Stop stop = 1;
1889
1890 // Remove the current task from the task manager
1891 optional Remove remove = 2;
1892
1893 // Reset the timing metrics for the task. (ExecutionTimeMax, Min, Mean, Last)
1894 optional TimingReset timing_reset = 3;
1895
1896 // Wait until the task has executed this many times before returning.
1897 optional ExecutionCountAbsoluteWait execution_count_absolute_wait = 4;
1898
1899 // Wait until the task has executed this many more times before returning.
1900 optional ExecutionCountRelativeWait execution_count_relative_wait = 5;
1901
1902 message Stop {}
1903 message Remove {}
1904 message TimingReset {}
1905
1906 message ExecutionCountAbsoluteWait {
1907 // Wait until the task has executed this many times total.
1908 optional int64 count = 1;
1909
1910 // The maximum time to wait for the task to execute the specified number of times.
1911 optional int32 timeout_ms = 2;
1912 }
1913
1914 message ExecutionCountRelativeWait {
1915 // Wait until the task has executed this many more times from the current count.
1916 optional int64 count = 1;
1917
1918 // The maximum time to wait for the task to execute the specified number of times.
1919 optional int32 timeout_ms = 2;
1920 }
1921}
1923
1925message RTTaskInfo {
1926 // The unique id of the task (not unique across task managers).
1927 int32 id = 1;
1928
1929 // The id of the task manager that created this task.
1930 int32 manager_id = 2;
1931
1932 // Constants related to the RTTask class.
1933 Constants constants = 3;
1934
1935 // The parameters that were used to create the task.
1936 RTTaskCreationParameters creation_parameters = 4;
1937
1938 message Constants {
1939 // Constants related to the RTTask creation parameters.
1940 CreationParameterConstants creation_parameters = 1;
1941
1942 // Constants related to the RTTask status.
1943 StatusConstants status = 2;
1944
1945 message CreationParameterConstants {
1946 // The maximum length of the library directory path.
1947 int32 directory_length_maximum = 1;
1948
1949 // The maximum length of the library name and user label.
1950 int32 name_length_maximum = 2;
1951
1952 // The default library name to use if none is specified.
1953 string library_name_default = 3;
1954
1955 // The default task priority.
1956 int32 priority_default = 4;
1957
1958 // The special value for the repeats field to indicate infinite repeats.
1959 int32 repeat_forever = 5;
1960
1961 // The special value for the repeats field to indicate no repeats.
1962 int32 repeat_none = 6;
1963
1964 // The default period for the task.
1965 int32 period_default = 7;
1966
1967 // The default phase for the task.
1968 int32 phase_default = 8;
1969
1970 // The default value for the enable_timing field.
1971 int32 enable_timing_default = 9;
1972 }
1973
1974 message StatusConstants {
1975 // The special value for the execution count to indicate an invalid count.
1976 int64 invalid_execution_count = 1;
1977
1978 // The special value for the execution time to indicate an invalid time.
1979 uint64 invalid_execution_time = 2;
1980
1981 // The maximum size of the error message.
1982 uint64 error_message_size_maximum = 3;
1983 }
1984 }
1985}
1987
1989message RTTaskStatus {
1990 // The current state of the task (running, waiting, etc.)
1991 RTTaskState state = 1;
1992
1993 // The number of times the task has executed.
1994 optional int64 execution_count = 2;
1995
1996 // The maximum execution time of the task (in nanoseconds).
1997 optional uint64 execution_time_max = 3;
1998
1999 // The minimum execution time of the task (in nanoseconds).
2000 optional uint64 execution_time_min = 4;
2001
2002 // The mean execution time of the task (in nanoseconds).
2003 optional double execution_time_mean = 5;
2004
2005 // The most recent execution time for the task (in nanoseconds).
2006 optional uint64 execution_time_last = 6;
2007
2008 // The time since the task was last started (in nanoseconds).
2009 optional uint64 start_time_delta_last = 7;
2010
2011 // The maximum time difference between the start of one task execution and the next (in nanoseconds).
2012 optional uint64 start_time_delta_max = 8;
2013
2014 // The mean time difference between the start of one task execution and the next (in nanoseconds).
2015 optional double start_time_delta_mean = 9;
2016
2017 // If the task is in an error state, this will contain the error message.
2018 optional string error_message = 10;
2019}
2021
2023message RTTaskRequest {
2024 // Common request header.
2025 RSI.RapidServer.RequestHeader header = 1;
2026
2027 // The id of the task. This is the id assigned to the task when it was created.
2028 int32 id = 2;
2029
2030 // The id of the task manager that the task was submitted to.
2031 int32 manager_id = 3;
2032
2033 optional RTTaskConfig config = 4;
2034 optional RTTaskAction action = 5;
2035}
2037
2039message RTTaskResponse {
2040 // Common response header. Always check the response header for errors.
2041 RSI.RapidServer.ResponseHeader header = 1;
2042
2043 // The id of the task. This is the id assigned to the task when it was created.
2044 int32 id = 2;
2045
2046 // The id of the task manager that the task was submitted to.
2047 int32 manager_id = 3;
2048
2049 optional RTTaskConfig config = 4;
2050 optional RTTaskAction action = 5;
2051 optional RTTaskInfo info = 6;
2052 optional RTTaskStatus status = 7;
2053}
2055
2057message RTTaskBatchRequest {
2058 // Common request header.
2059 RSI.RapidServer.RequestHeader header = 1;
2060
2061 repeated RTTaskRequest requests = 2;
2062}
2063
2064message RTTaskBatchResponse {
2065 // Common response header. Always check the response header for errors.
2066 RSI.RapidServer.ResponseHeader header = 1;
2067
2068 repeated RTTaskResponse responses = 2;
2069}
2071
2073message RTTaskManagerCreationParameters {
2074 // Where the rttaskmanager executable is located (usually the RSI installation directory).
2075 optional string rt_task_directory = 1;
2076
2077 // The platform to run the task manager on. Not needed on Linux. On Windows/INtime,
2078 // use INTIME for real time performance. Only use WINDOWS for debugging.
2079 optional PlatformType platform = 2;
2080
2081 // For INtime managers, the name of the INtime node to run on (usually NodeA).
2082 optional string node_name = 3;
2083
2084 // On Linux, the CPU core to pin the task manager to.
2085 optional int32 cpu_core = 4;
2086
2087 // The task manager's user defined label.
2088 optional string user_label = 5;
2089
2090 // Disable the initialization of the RMP and RapidCode objects on task manager startup and their use in synchronizing task manager cycles.
2091 optional bool no_rmp = 6;
2092}
2094
2096message RTTaskManagerConfig {}
2097
2099
2101message RTTaskManagerAction {
2102 // Start a new task manager.
2103 optional Create create = 1;
2104
2105 // Discover the task managers that are currently running.
2106 optional Discover discover = 2;
2107
2108 // Shutdown the task manager.
2109 optional Shutdown shutdown = 3;
2110
2111 // Submit and start a new task.
2112 optional TaskSubmit task_submit = 4;
2113
2114 // Remove a task from the task manager.
2115 optional TaskRemove task_remove = 5;
2116
2117 // Set the values of global variables
2118 repeated GlobalValueSet global_value_sets = 6;
2119
2120 message Create {
2121 // The task manager's creation parameters.
2122 RTTaskManagerCreationParameters creation_parameters = 1;
2123
2124 // The id of the created task manager.
2125 int32 id = 2; // read-only
2126 }
2127
2128 message Discover {
2129 // The ids of all the task managers that were discoverd
2130 repeated int32 manager_ids = 1; // read-only
2131 }
2132
2133 message Shutdown {}
2134
2135 message TaskSubmit {
2136 // The parameters for the task to create.
2137 RTTaskCreationParameters task_creation_parameters = 1;
2138
2139 // The id of the created task
2140 optional int32 task_id = 2; // read-only
2141 }
2142
2143 message TaskRemove {
2144 // The id of the task to remove.
2145 int32 task_id = 1;
2146 }
2147
2148 message GlobalValueSet {
2149 // The value to set the global variable to. See FirmwareValue for details.
2150 FirmwareValue value = 1;
2151
2152 // The name of the global variable to set.
2153 string name = 2;
2154
2155 // The name and directory of the library that contains the global variable.
2156 // (The task functions library)
2157 optional string library_name = 3;
2158 optional string library_directory = 4;
2159 }
2160}
2162
2164message RTTaskManagerInfo {
2165 // The unique id of the task manager.
2166 int32 id = 1;
2167
2168 // Constants related to the RTTaskManager class.
2169 Constants constants = 2;
2170
2171 // The creation parameters that were used to create the task manager.
2172 RTTaskManagerCreationParameters creation_parameters = 3;
2173
2174 message Constants {
2175 // The maximum number of RTTaskManagers that can be created.
2176 int32 rt_task_manager_count_maximum = 1;
2177
2178 // The maximum number of RTTasks that can be created in a single RTTaskManager.
2179 int32 rt_task_count_maximum = 2;
2180
2181 // The name of the RTTaskManager executable.
2182 string rt_task_manager_executable_name = 3;
2183
2184 // Constants related to the RTTaskManager's creation parameters.
2185 CreationParameterConstants creation_parameters = 4;
2186
2187 message CreationParameterConstants {
2188 // The maximum length of the RTTaskManager's directory name.
2189 int32 directory_length_maximum = 1;
2190
2191 // The maximum length of the RTTaskManager's library name and user label.
2192 int32 name_length_maximum = 2;
2193
2194 // The default user label for the RTTaskManager if none is specified.
2195 string user_label_default = 3;
2196 }
2197 }
2198}
2200
2202message RTTaskManagerStatus {
2203 // The ids of the tasks that are currently registered with the task manager.
2204 // (Includes tasks that are not running.)
2205 repeated int32 task_ids = 1;
2206
2207 // The names and values of the global variables that the task manager has access to.
2208 map<string, FirmwareValue> global_values = 2;
2209
2210 // The state of the RTTaskManager (dead, running, etc.)
2211 optional RTTaskManagerState state = 3;
2212
2213 // The total number of tasks that have been submitted to the task manager (even if they are no longer running).
2214 optional uint64 task_submission_count = 4;
2215
2216 // The number of cycles (iterations) the task manager has run.
2217 optional int64 cycle_count = 5;
2218
2219 // The time it took for the longest cycle to complete (in nanoseconds).
2220 optional uint64 cycle_time_max = 6;
2221
2222 // The time it took for the shortest cycle to complete (in nanoseconds).
2223 optional uint64 cycle_time_min = 7;
2224
2225 // The mean of the cycle times (in nanoseconds).
2226 optional double cycle_time_mean = 8;
2227
2228 // The time it took for the last cycle to complete (in nanoseconds).
2229 optional uint64 cycle_time_last = 9;
2230
2231 // The time since the last cycle started (in nanoseconds).
2232 optional uint64 start_time_delta_last = 10;
2233
2234 // The maximum time difference between the start of one cycle and the next (in nanoseconds).
2235 optional uint64 start_time_delta_max = 11;
2236
2237 // The mean time difference between the start of one cycle and the next (in nanoseconds).
2238 optional double start_time_delta_mean = 12;
2239}
2241
2243message RTTaskManagerRequest {
2244 // Common request header.
2245 RSI.RapidServer.RequestHeader header = 1;
2246
2247 // RTTaskManager id.
2248 optional int32 id = 2; // Required for all actions except Create and Discover.
2249
2250 optional RTTaskManagerConfig config = 3;
2251 optional RTTaskManagerAction action = 4;
2252}
2254
2256message RTTaskManagerResponse {
2257 // Common response header. Always check the response header for errors.
2258 RSI.RapidServer.ResponseHeader header = 1;
2259
2260 // RTTaskManager id.
2261 optional int32 id = 2; // When creating a RTTaskManager, this will be the new RTTaskManager's id.
2262
2263 optional RTTaskManagerConfig config = 3;
2264 optional RTTaskManagerAction action = 4;
2265 optional RTTaskManagerInfo info = 5;
2266 optional RTTaskManagerStatus status = 6;
2267}
2269
2271message RTTaskManagerBatchRequest {
2272 // Common request header.
2273 RSI.RapidServer.RequestHeader header = 1;
2274
2275 repeated RTTaskManagerRequest requests = 2;
2276}
2277
2278message RTTaskManagerBatchResponse {
2279 // Common response header. Always check the response header for errors.
2280 RSI.RapidServer.ResponseHeader header = 1;
2281
2282 repeated RTTaskManagerResponse responses = 2;
2283}
TaskPriority
Enum representing the priority levels for a real-time task.
Definition rttask.h:102
RTTaskManagerState
Enum representing the possible states of an RTTaskManager.
Definition rttask.h:76
RTTaskState
Enum representing the possible states of a real-time task.
Definition rttask.h:64
PlatformType
Enum representing the platform type for an RTTaskManager.
Definition rttask.h:87
RSINetworkEniResult
NetworkEniGenerate return values.
Definition rsienums.h:1506
RSINetworkStartMode
Network start modes.
Definition rsienums.h:629
RSINetworkState
State of network.
Definition rsienums.h:609
RSIControllerAddressType
Used to get firmware address used in User Limits, Recorders, etc.
Definition rsienums.h:405
RSIMotorDisableAction
Action for when a motor is disabled.
Definition rsienums.h:1366
RSIMotionType
PT and PVT streaming motion types.
Definition rsienums.h:1085
RSIDataType
Data types for User Limits and other triggers.
Definition rsienums.h:703
RSIUserLimitLogic
Logic options for User Limits.
Definition rsienums.h:690
RSIAction
Action to perform on an Axis.
Definition rsienums.h:1162
RSIAxisAddressType
Used to get firmware address used in User Limits, Recorders, etc.
Definition rsienums.h:439
RSINetworkInterfaceType
Network host interface type used for EtherCAT frame I/O.
Definition rsienums.h:1404
RSINetworkStartError
Network start errors.
Definition rsienums.h:635
RSIMultiAxisAddressType
Used to get firmware address used in User Limits, Recorders, etc.
Definition rsienums.h:502
RSIUserLimitTriggerType
Trigger types for UserLimits.
Definition rsienums.h:677
INtimeStatus
INtime status values.
Definition rsienums.h:1412
RSIHomeStage
Predefined Homing Stage sections.
Definition rsienums.h:397
RSINetworkType
Type of Network topology.
Definition rsienums.h:670
RSINodeType
Valid Node types.
Definition rsienums.h:721
RSISource
Possible sources that have caused an Error state.
Definition rsienums.h:1061
RSIOperationMode
DS402 modes of operation.
Definition rsienums.h:1378
RSIAxisMasterType
Sources available to a slave Axis for electronic gearing & camming.
Definition rsienums.h:1265