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
441 message TimingMetricsStatus {
442 // Most recent value.
443 uint32 delta = 1;
444 // Lowest recorded since last clear.
445 uint32 min_recorded = 2;
446 // Highest recorded since last clear.
447 uint32 max_recorded = 3;
448 // Count below low_threshold since last clear.
449 uint32 low_count = 4;
450 // Count above high_threshold since last clear.
451 uint32 high_count = 5;
452 }
453
454 message PdoInputStatus {
455 // The index of this PDO in RMP firmware.
456 int32 index = 1;
457 // The raw 64-bit value of this PDO.
458 int64 value = 2;
459 }
460
461 message PdoOutputStatus {
462 // The index of this PDO in RMP firmware.
463 int32 index = 1;
464 // The raw 64-bit value that was sent on the network.
465 int64 sent_value = 2;
466 // The raw 64-bit override value that can be written by software.
467 int64 override_value = 3;
468 // The raw 64-bit value that the RMP is going to send, unless overridden.
469 int64 firmware_value = 4;
470 // Whether or not the override_value is being used.
471 bool override_enabled = 5;
472 }
473}
475
477message NetworkInfo {
478 RSINetworkType type = 1;
479 int32 pdo_input_count = 4;
480 int32 pdo_output_count = 5;
481
482 // Collection of all Network PDO Inputs.
483 repeated PdoInputInfo pdo_inputs = 6;
484
485 // Collection of all Network PDO Outputs.
486 repeated PdoOutputInfo pdo_outputs = 7;
487
488 message PdoInputInfo {
489 string name = 1;
490 AddressInfo address_info = 2;
491 int32 bit_size = 3;
492 int32 bit_offset = 4;
493 }
494
495 message PdoOutputInfo {
496 string name = 1;
497 AddressInfo sent_value_address = 2;
498 AddressInfo override_value_address = 3;
499 AddressInfo firmware_value_address = 4;
500 int32 bit_size = 5;
501 int32 bit_offset = 6;
502 }
503}
505
506
507
508
510message AxisRequest {
511 // Common request header
512 RSI.RapidServer.RequestHeader header = 1;
513
514 // Axis index
515 int32 index = 2;
516
517 optional AxisConfig config = 3;
518 optional AxisAction action = 4;
519}
521
523message AxisResponse {
524 // Common response header. Always check the response header for errors.
525 RSI.RapidServer.ResponseHeader header = 1;
526
527 // Axis index
528 int32 index = 2;
529
530 optional AxisConfig config = 3;
531 optional AxisAction action = 4;
532 optional AxisInfo info = 5;
533 optional AxisStatus status = 6;
534}
536
538message AxisBatchRequest {
539 // Common request header
540 RSI.RapidServer.RequestHeader header = 1;
541
542 repeated AxisRequest requests = 2;
543}
544
545message AxisBatchResponse {
546 // Common response header. Always check the response header for errors.
547 RSI.RapidServer.ResponseHeader header = 1;
548
549 repeated AxisResponse responses = 2;
550}
552
554message AxisStatus {
555 // Is the amp enabled?
556 bool amp_enabled = 1;
557
558 // The state (IDLE, MOVING, ERROR, etc.).
559 RSIState state = 2;
560
561 // The cause of the error (if in ERROR, STOPPED, STOPPING_ERROR state).
562 RSISource source = 3;
563
564 // Extra fault info from the drive
565 string source_name = 4;
566
567 // Positions.
568 PositionStatus position = 5;
569
570 // Command and actual velocity.
571 VelocityStatus velocity = 6;
572
573 // Command acceleration.
574 AccelerationStatus acceleration = 7;
575
576 // How many frames does the Axis have left to execute?
577 int32 frames_to_execute = 8;
578
579 // The motion id as stored in the Axis class (unsigned 16-bit integer).
580 uint32 motion_id = 9;
581
582 // The currently executing motion identifier (unsigned 16-bit integer).
583 uint32 motion_id_executing = 10;
584
585 // The currently exeucting motion element identifier (unsigned 16-bit integer).
586 int32 element_id_executing = 11;
587
588 // Is electronic gearing enabled?
589 bool gear_enabled = 12;
590
591 // Status bits related to the motor.
592 MotorStatusBits motor_status_bits = 13;
593
594 // Status bits related to motion.
595 MotionStatusBits motion_status_bits = 14;
596
597 // DS402 status bits, for drives that support DS402.
598 Ds402StatusBits ds402_status_bits = 15;
599
600 // Dedicated output bits.
601 DedicatedOutputBits dedicated_output_bits = 16;
602
603 // Dedicated input bits.
604 DedicatedInputBits dedicated_input_bits = 17;
605
606 // Homing status
607 bool home_state = 18;
608 RSIHomeStage home_stage = 19;
609
610 // The states of the general purpose input bits, DigitalInputsGet().
611 uint32 general_input_bits = 20;
612
613 // The states of the general purpose output bits, DigitalOutputsGet().
614 uint32 general_output_bits = 21;
615
616 message PositionStatus {
617 double command = 1;
618 double actual = 2;
619 double error = 3;
620 double target = 4;
621 double origin = 5;
622 double encoder_0 = 6;
623 double encoder_1 = 7;
624 double compensation = 8;
625 double backlash = 9;
626 }
627
628 message VelocityStatus {
629 double command = 1;
630 double actual = 2;
631 }
632
633 message AccelerationStatus {
634 double command = 1;
635 }
636
637 message MotorStatusBits {
638 bool amp_fault = 1;
639 bool amp_warning = 2;
640 bool feedback_fault = 3;
641 bool limit_position_error = 4;
642 bool limit_torque = 5;
643 bool limit_hardware_negative = 6;
644 bool limit_hardware_positive = 7;
645 bool limit_software_negative = 8;
646 bool limit_software_positive = 9;
647 }
648
649 message MotionStatusBits {
650 bool done = 1;
651 bool start = 2;
652 bool modify = 3;
653 bool at_velocity = 4;
654 bool out_of_frames = 5;
655 bool near_target = 6;
656 bool at_target = 7;
657 bool settled = 8;
658 }
659
660 message Ds402StatusBits {
661 bool ready_to_switch_on = 1;
662 bool switched_on = 2;
663 bool operation_enabled = 3;
664 bool fault = 4;
665 bool voltage_enabled = 5;
666 bool quick_stop = 6;
667 bool switch_on_disabled = 7;
668 bool warning = 8;
669 bool manufacturer_specific_8 = 9;
670 bool remote = 10;
671 bool target_reached = 11;
672 bool internal_limit_active = 12;
673 bool operation_mode_specific_12 = 13;
674 bool operation_mode_specific_13 = 14;
675 bool manufacturer_specific_14 = 15;
676 bool manufacturer_specific_15 = 16;
677 }
678
679 message DedicatedOutputBits {
680 bool amp_enable = 1;
681 bool brake_release = 2;
682 }
683
684 message DedicatedInputBits {
685 bool amp_fault = 1;
686 bool brake_applied = 2;
687 bool home = 3;
688 bool limit_hardware_positive = 4;
689 bool limit_hardware_negative = 5;
690 bool index = 6;
691 bool index_secondary = 7;
692 bool feedback_fault = 8;
693 bool captured = 9;
694 bool hall_a = 10;
695 bool hall_b = 11;
696 bool hall_c = 12;
697 bool amp_active = 13;
698 bool warning = 14;
699 bool drive_status_9 = 15;
700 bool drive_status_10 = 16;
701 bool feedback_fault_primary = 17;
702 bool feedback_fault_secondary = 18;
703 }
704}
706
708message AxisAction {
709 optional Abort abort = 1;
710 optional EStopAbort e_stop_abort = 2;
711 optional EStopModifyAbort e_stop_modify_abort = 3;
712 optional EStopModify e_stop_modify = 4;
713 optional EStop e_stop = 5;
714 optional TriggeredModify triggered_modify = 6;
715 optional Stop stop = 7;
716 optional Resume resume = 8;
717
718 optional ClearFaults clear_faults = 9;
719 optional AmpEnable amp_enable = 10;
720 optional AmpDisable amp_disable = 11;
721 optional HoldGateSet hold_gate_set = 12;
722 optional PositionSet position_set = 13;
723 optional Move move = 14;
724 optional GearEnable gear_enable = 15;
725 optional GearDisable gear_disable = 16;
726 optional Home home = 17;
727 optional HomeCancel home_cancel = 18;
728 optional OperationMode operation_mode_set = 19;
729 optional OperationMode operation_mode_get = 20;
730
731 message Abort {}
732 message EStopAbort {}
733 message EStopModifyAbort{}
734 message EStopModify{}
735 message EStop {}
736 message TriggeredModify {}
737 message Stop {}
738 message Resume {}
739
740 message ClearFaults {}
741
742 message AmpEnable {
743 optional int32 timeout_milliseconds = 1;
744 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
745 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
746 }
747 message AmpDisable {}
748 message HoldGateSet {
749 bool state = 1;
750 }
751 message PositionSet{
752 double position = 1;
753 }
754
755 message Move {
756 // Request one type of motion.
757 oneof move {
758 AxisMovePointToPoint point_to_point = 3;
759 AxisMoveVelocity velocity = 4;
760 MoveStreaming streaming = 5;
761 }
762
763 // Specify the MotionID for this move. (If you don't specify one, it will be auto-incremented after each move.)
764 optional uint32 motion_id = 6;
765
766 // Specify MotionHold criteria, if you want the motion to hold execution until conditions are met.
767 optional MotionHold motion_hold = 7;
768
769 // Wait for motion to complete? (See ConfigSet settling criteria.)
770 bool blocking = 8;
771 }
772
773 message GearEnable {
774 optional int32 master_axis_number = 2;
775 optional RSIAxisMasterType gearing_source = 3;
776 int32 numerator = 4;
777 int32 denominator = 5;
778 }
779 message GearDisable {}
780
781 message Home {
782 RSIHomeMethod method = 1;
783 double velocity = 2;
784 double slow_velocity = 3;
785 double acceleration = 4;
786 double deceleration = 5;
787 optional double jerk_percent = 6;
788 optional bool move_to_zero = 7;
789 optional double offset = 8;
790 optional RSIAction behavior = 9;
791 }
792
793 message HomeCancel {}
794
795 message OperationMode {
796 // For setting the operation mode in the request, or getting it from the response.
797 optional RSIOperationMode operation_mode = 1;
798 }
799}
800
801// Internal MoveRequest messages.
802 message AxisMovePointToPoint {
803 // Move to this position. Absolute, unless the relative boolean is true. (UserUnits)
804 double position = 1;
805
806 // Maximum velocity. (UserUnits/second).
807 optional double velocity = 2;
808
809 // Maximum acceleration. (UserUnits/second^2). If specified, velocity and deceleration must be specified.
810 optional double acceleration = 3;
811
812 // Maximum deceleration. (UserUnits/second^2). If specified, velocity and acceleration must be specified
813 optional double deceleration = 4;
814
815 // Percentage of acceleration that will be smoothed. (0-100)
816 // Acceleration time will not change so if Jerk Percent is 100, maximum acceleration will be 2x the specified maximum.
817 // If specified, velocity, acceleration, and deceleration must be specified.
818 // A non-zero value makes the PointToPoint MoveSCurve
819 optional double jerk_percent = 5;
820
821 // Final velocity. 0.0 is default. (UserUnits/second)
822 // If specified, velocity, acceleration, and deceleration must be specified.
823 optional double final_velocity = 6;
824
825 // Set true if you intend position to be a relative increment. If specified, jerk_percent must be specified.
826 bool relative = 7;
827}
828
829message AxisMoveVelocity {
830 // Move at this velocity. (UserUnits/second)
831 double velocity = 1;
832
833 // Maximum acceleration. (UserUnits/second^2)
834 double acceleration = 2;
835
836 // Percentage of acceleration that will be smoothed. (0-100)
837 // Acceleration time will not change so if Jerk Percent is 100, maximum acceleration will be 2x the specified maximum.
838 // A non-zero value uses MoveVelocitySCurve
839 double jerk_percent = 3;
840}
841
842message MoveStreaming {
843 repeated double positions = 1;
844 repeated double velocities = 2;
845 repeated double accelerations = 3;
846 repeated double jerks = 4;
847 repeated double times = 5;
848 int32 empty_count = 6;
849 bool retain = 7;
850 bool final = 8;
851
852 // Specify the interpolation algorithm to use when only providing positions and no velocities nor accelerations.
853 // Uses the RapidCode method RapidCodeMotion::MovePT()
854 // The three currently supported ones are:
855 // RSIMotionTypePT (no interpolation)
856 // RSIMotionTypeBSPLINE (default)
857 // RSIMotionTypePVT is used in the RapidCode method RapidCodeMotion::MovePVT(), i.e. when positions and velocities are given.
858 optional RSIMotionType pt_motion_type = 9;
859
860 // Feedforward values for PTF/PVTF motion. When present and matching positions size:
861 // - With velocities: uses MovePVTF()
862 // - Without velocities: uses MovePTF()
863 repeated double feedforwards = 10;
864}
866
867message MotionHoldGate{
868 int32 number = 1;
869}
870
871message MotionHoldAxis {
872 // If true, motion will hold for Actual Position. If false, it will hold for Command Position.
873 bool actual = 1;
874
875 // Greater than, less than, etc.
876 RSIUserLimitLogic logic = 2;
877
878 // The number of the Axis whose position we're waiting for.
879 int32 hold_axis_number = 3;
880
881 // The position of the hold axis which will trigger the hold to finish.
882 double hold_axis_position = 4;
883}
884
885message MotionHoldUser {
886 // The 64-bit host address on the server.
887 uint64 address = 1;
888
889 // The 32-bit mask that will be ANDed with the value stored at the User Address.
890 int32 mask = 2;
891
892 // The 32-bit mask that will compared for equality after the AND mask.
893 int32 pattern = 3;
894}
895
896message MotionHold {
897 // Choose the type of hold.
898 oneof type {
899 MotionHoldGate gate = 2;
900 MotionHoldAxis axis = 3;
901 MotionHoldUser user = 4;
902 }
903
904 // The motion will execute regardless of hold status after this amount of time.
905 optional double hold_timeout_seconds = 6;
906
907 // This optional delay will occur before motion starts.
908 optional double delay_seconds = 7;
909}
910
912message AxisConfig {
913 // The number of encoder counts to UserUnits.
914 optional double user_units = 1;
915
916 // The origin position, typically set when homing.
917 optional double origin_position = 2;
918
919 // Give the Axis a name, if you like.
920 optional string user_label = 3;
921
922 // Default trajectory values.
923 optional TrajectoryDefaults defaults = 4;
924 optional HardwareTrigger amp_fault = 5;
925 optional HardwareTrigger home_switch = 6;
926 optional ErrorLimit error_limit = 7;
927 optional HardwareTrigger hardware_negative_limit = 8;
928 optional HardwareTrigger hardware_positive_limit = 9;
929 optional SoftwareTrigger software_negative_limit = 10;
930 optional SoftwareTrigger software_positive_limit = 11;
931 optional Settling settling = 12;
932 optional MotionConfig motion = 13;
933 optional Homing homing = 14;
934 optional int32 frame_buffer_size = 15;
935 optional RSIMotorDisableAction amp_disable_action = 16;
936 optional double feed_rate = 17;
937
938 // Internal messages.
939 message TrajectoryDefaults
940 {
941 optional double velocity = 1;
942 optional double acceleration = 2;
943 optional double deceleration = 3;
944 optional double jerk_percent = 4;
945 optional double position1 = 5;
946 optional double position2 = 6;
947 optional double relative_increment = 7;
948 }
949
950 message HardwareTrigger {
951 optional RSIAction action = 1;
952 optional bool trigger_state = 2;
953 optional double duration = 3;
954 }
955
956 message SoftwareTrigger {
957 optional RSIAction action = 1;
958 optional double trigger_value = 2;
959 }
960
961 message ErrorLimit {
962 optional RSIAction action = 1;
963 optional double trigger_value = 2;
964 optional double duration = 3;
965 }
966
967 message Settling {
968 optional double position_tolerance_fine = 1;
969 optional double position_tolerance_coarse = 2;
970 optional double velocity_tolerance = 3;
971 optional double time_seconds = 4;
972 optional bool on_stop = 5;
973 optional bool on_estop = 6;
974 optional bool on_estop_cmd_equals_actual = 7;
975 }
976
977 message MotionConfig {
978 // Seconds.
979 optional double stop_time = 1;
980
981 // Seconds.
982 optional double estop_time = 2;
983
984 // UserUnits per second.
985 optional double triggered_modify_deceleration = 3;
986
987 // Jerk percent (0-100).
988 optional double triggered_modify_jerk_percent = 4;
989
990 // UserUnits per second.
991 optional double estop_modify_deceleration = 5;
992
993 // Jerk percent (0-100).
994 optional double estop_modify_jerk_percent = 6;
995 }
996 message Homing {
997 // placeholder for possible future homing configuration. see Action for Home configuration.
998 }
999}
1001
1003message AxisInfo {
1004 // Axis index.
1005 int32 index = 1;
1006
1007 // Host and firmware addresses
1008 repeated AddressInfo addresses = 2;
1009
1010 // NetworkNode information.
1011 NetworkNodeInfo node_info = 3;
1012
1013 // Constants from the Axis object
1014 Constants constants = 4;
1015
1016 // The internal motion supervisor index
1017 int32 motion_supervisor_index = 5;
1018
1019 message Constants {
1020 // The value returned by NetworkIndexGet() when the index is invalid or nonexistent for this Axis.
1021 uint32 network_index_invalid = 1;
1022
1023 // The default time an Axis waits before generating an AmpFault if the Axis does not enable after calling AmpEnableSet(true).
1024 double amp_enable_amp_fault_timeout_seconds_default = 2;
1025 }
1026
1027}
1029
1030
1032message MultiAxisRequest {
1033 // Common request header
1034 RSI.RapidServer.RequestHeader header = 1;
1035
1036 // MultiAxis index
1037 int32 index = 2;
1038
1039 optional MultiAxisConfig config = 3;
1040 optional MultiAxisAction action = 4;
1041}
1043
1045message MultiAxisResponse {
1046 // Common response header. Always check the response header for errors.
1047 RSI.RapidServer.ResponseHeader header = 1;
1048
1049 // MultiAxis index
1050 int32 index = 2;
1051
1052 optional MultiAxisConfig config = 3;
1053 optional MultiAxisAction action = 4;
1054 optional MultiAxisInfo info = 5;
1055 optional MultiAxisStatus status = 6;
1056}
1058
1060message MultiAxisBatchRequest {
1061 // Common request header
1062 RSI.RapidServer.RequestHeader header = 1;
1063
1064 repeated MultiAxisRequest requests = 2;
1065}
1066
1067message MultiAxisBatchResponse {
1068 // Common response header. Always check the response header for errors.
1069 RSI.RapidServer.ResponseHeader header = 1;
1070
1071 repeated MultiAxisResponse responses = 2;
1072}
1074
1075
1077message MultiAxisStatus {
1078 RSIState state = 1;
1079 RSISource source = 2;
1080 string source_name = 3;
1081 bool amp_enabled = 4;
1082 MotionStatusBits motion_status_bits = 5;
1083 repeated AxisStatus axis_statuses = 6;
1084 bool is_mapped = 7;
1085
1086 message MotionStatusBits {
1087 bool done = 1;
1088 bool start = 2;
1089 bool modify = 3;
1090 bool at_velocity = 4;
1091 bool out_of_frames = 5;
1092 }
1093}
1095
1097message MultiAxisAction {
1098 optional Abort abort = 1;
1099 optional EStopAbort e_stop_abort = 2;
1100 optional EStopModifyAbort e_stop_modify_abort = 3;
1101 optional EStopModify e_stop_modify = 4;
1102 optional EStop e_stop = 5;
1103 optional TriggeredModify triggered_modify = 6;
1104 optional Stop stop = 7;
1105 optional Resume resume = 8;
1106
1107 optional ClearFaults clear_faults = 9;
1108 optional AmpEnable amp_enable = 10;
1109 optional AmpDisable amp_disable = 11;
1110 optional Move move = 12;
1111 optional RemoveAxes remove_axes = 13;
1112 optional Unmap unmap = 14;
1113 optional Map map = 15;
1114 optional AxisAdd axis_add = 16;
1115
1116 message Abort {}
1117 message EStopAbort {}
1118 message EStopModifyAbort{}
1119 message EStopModify{}
1120 message EStop {}
1121 message TriggeredModify {}
1122 message Stop {}
1123 message Resume {}
1124
1125 message ClearFaults {}
1126
1127 message AmpEnable {
1128 optional int32 timeout_milliseconds = 1;
1129 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
1130 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
1131 }
1132 message AmpDisable {}
1133
1134 message Move {
1135 oneof move {
1136 MultiAxisMovePointToPoint point_to_point = 3;
1137 MultiAxisMoveVelocity velocity = 4;
1138 MoveStreaming streaming = 5;
1139 }
1140 optional uint32 motion_id = 6;
1141
1142 // Specify MotionHold criteria, if you want the motion to hold execution until conditions are met.
1143 optional MotionHold motion_hold = 7;
1144
1145 bool blocking = 8;
1146
1147 message MultiAxisMovePointToPoint {
1148 repeated AxisMovePointToPoint axis_move_point_to_points = 1;
1149 bool relative = 2;
1150 }
1151
1152 message MultiAxisMoveVelocity {
1153 repeated AxisMoveVelocity axis_move_velocities = 1;
1154 }
1155 }
1156 message RemoveAxes {}
1157 message Unmap {}
1158 message Map {}
1159 message AxisAdd {
1160 int32 axis_index = 1;
1161 }
1162}
1164
1166message MultiAxisConfig {
1167 repeated int32 axes_indices = 1;
1168 optional string user_label = 2;
1169 optional double feed_rate = 3;
1170 optional double stop_time = 4;
1171 optional double e_stop_time = 5;
1172}
1174
1176message MultiAxisInfo {
1177 // The zero-based index for this MultiAxis.
1178 int32 index = 1;
1179
1180 // The internal motion supervisor index.
1181 int32 motion_supervisor_index = 2;
1182
1183 // Host and firmware addresses
1184 repeated AddressInfo addresses = 3;
1185}
1187
1189message NetworkNodeInfo {
1190 // True if hardware exists.
1191 bool exists = 1;
1192
1193 // The node index.
1194 int32 index = 2;
1195
1196 // The number of Axis objects on this node.
1197 int32 axis_count = 3;
1198
1199 // True if this node has I/O.
1200 bool has_io = 4;
1201
1202 // The number of digital/analog inputs and outputs on this node.
1203 IOCounts io_counts = 5;
1204
1205 // The bit masks and 64-bit host addresses for this node's I/O.
1206 IOAddresses io_addresses = 6;
1207
1208 // The node type.
1209 RSINodeType type = 7;
1210
1211 // 32-bit vendor identifier.
1212 uint32 vendor_id = 8;
1213
1214 // 32-bit product code.
1215 uint32 product_code = 9;
1216
1217 // 32-bit hardware revision.
1218 uint32 hardware_revision = 10;
1219
1220 // Station alias.
1221 uint32 station_alias = 11;
1222
1223 // Serial number.
1224 string serial_number = 12;
1225
1226 // The node's name.
1227 string name = 13;
1228
1229 // Product name.
1230 string product_name = 14;
1231
1232 // Vendor name.
1233 string vendor_name = 15;
1234
1235 Constants constants = 16;
1236
1237
1238 // Internal messages.
1239
1240 // The number of digital/analog inputs and outputs.
1241 message IOCounts {
1242 // Number of digital inputs.
1243 int32 digital_inputs = 1;
1244
1245 // Number of digital outputs.
1246 int32 digital_outputs = 2;
1247
1248 // Number of analog inputs.
1249 int32 analog_inputs = 3;
1250
1251 // Number of analog outputs.
1252 int32 analog_outputs = 4;
1253 }
1254
1255 message IOAddresses {
1256 // Masks and 64-bit host addresses for each digital input.
1257 repeated AddressInfo digital_inputs = 1;
1258
1259 // Masks and 64-bit host addresses for each digital output.
1260 repeated AddressInfo digital_outputs = 2;
1261
1262 // Masks and 64-bit host addresses for each analog input.
1263 repeated AddressInfo analog_inputs = 3;
1264
1265 // Masks and 64-bit host addresses for each analog output.
1266 repeated AddressInfo analog_outputs = 4;
1267 }
1268
1269 message Constants {
1270 // Default time to wait when reading or writing an SDO with ServiceChannelRead() or ServiceChannelWrite()
1271 uint32 sdo_timeout_milliseconds_default = 1;
1272 }
1273}
1275
1277message NetworkNodeStatus {
1278 // All the digital input states.
1279 repeated bool digital_input_states = 2;
1280
1281 // All the digital output states.
1282 repeated bool digital_output_states = 3;
1283
1284 // All the analog input values.
1285 repeated int32 analog_input_values = 4;
1286
1287 // All the analog output values.
1288 repeated int32 analog_output_values = 5;
1289
1290 // EtherCAT AL Status register (0x0130). Bits 0-3: state (1=Init, 2=PreOp, 4=SafeOp, 8=Op).
1291 uint32 al_status = 6;
1292 // EtherCAT AL Status Code register. Non-zero indicates an error condition.
1293 uint32 al_status_code = 7;
1294 // CANopen over EtherCAT (CoE) emergency message (8 bytes per CiA 301).
1295 uint64 coe_emergency_message = 8;
1296 // Network counter when CoeEmergencyMessage was received.
1297 int32 coe_emergency_message_network_counter = 9;
1298}
1300
1301
1303// The state of the digital output at the specified bit number.
1304message DigitalOutput {
1305 // The bit number.
1306 int32 bit_number = 1;
1307
1308 // The state of the digital output. When this message is used as a request
1309 // to set a digital output, the digital output will be set to this value.
1310 // When this message is returned as an action response, this field holds the
1311 // new state.
1312 bool state = 2;
1313}
1314
1315// The value of the analog output at the specified channel.
1316message AnalogOutput {
1317 // The channel number.
1318 int32 channel = 1;
1319
1320 // The value of the analog output. When this message is used as a request
1321 // to set an analog output, the analog output will be set to this value.
1322 // When this message is returned as an action response, this field holds the
1323 // new value.
1324 int32 value = 2;
1325}
1326
1327// The location, size, and value of a Service Data Object (SDO).
1328// This message is used to read or write SDOs on a network node.
1329// See NetworkNodeAction sdo_writes and sdo_reads.
1330message SDO {
1331 // The SDO index.
1332 int32 index = 1;
1333
1334 // The SDO sub-index.
1335 int32 sub_index = 2;
1336
1337 // The number of bytes.
1338 int32 byte_count = 3;
1339
1340 // The types of data values we can read or write.
1341 enum ValueType {
1342 option allow_alias = true;
1343 UNKNOWN = 0;
1344 INTEGER = 0;
1345 STRING = 1;
1346 BYTES = 2;
1347 }
1348
1349 // When reading an SDO, specify the read type. Default is integer.
1350 optional ValueType read_type = 4;
1351
1352 // Wait this long for a response, otherwise it will throw a timeout error.
1353 optional uint32 timeout_milliseconds = 5;
1354
1355 // The SDO value.
1356 // SDO write: This field is used to set the value to write.
1357 // SDO read: This field is ignored when SDO read action request, but will contain the
1358 // value read from the SDO in the SDO read action response.
1359 oneof value {
1360 // Integer value used for all non-string types.
1361 int32 integer_value = 6;
1362
1363 // String value.
1364 string string_value = 7;
1365
1366 // Raw bytes value
1367 bytes bytes_value = 8;
1368 }
1369}
1370
1371// An ASCII command to execute on an AKD drive.
1372message AKDASCII {
1373 // The command as a string.
1374 string command = 1;
1375
1376 // The returned result of the command. This field is ignored when requesting
1377 // an AKDASCII command.
1378 optional string result = 2;
1379}
1380
1381// A set of actions to perform on a network node. This message is used to
1382// request a set of actions. A new instance of this message will be returned
1383// containing the results of the requested acitons.
1384message NetworkNodeAction {
1385
1386 // Any number of digital outputs to set. Add instances of the DigitalOutput
1387 // message to this field to set digital outputs. When this message is
1388 // returned in the action response, this field contains the new states of
1389 // the digital outputs.
1390 repeated DigitalOutput digital_output_sets = 1;
1391
1392 // Any number of analog outputs to set. Add instances of the AnalogOutput
1393 // message to this field to set analog outputs. When this message is
1394 // returned in the action response, this field contains the new values of
1395 // the analog outputs.
1396 repeated AnalogOutput analog_output_sets = 2;
1397
1398 // The requested SDO value(s) to write to the network. Add instances of the
1399 // SDO message to this field to write to SDOs. When this message is returned
1400 // in the action response, this field will be empty.
1401 repeated SDO sdo_writes = 3;
1402
1403 // The SDO(s) to be read from the network. Add instances of the SDO message
1404 // to this field to read SDO values. When this message is returned in the
1405 // action response, the SDO messages will contain the read values.
1406 repeated SDO sdo_reads = 4;
1407
1408 // AKD ASCII command(s). Only used for Kollmorgen AKD drives. Add instances
1409 // of the AKDASCII message to request an ASCII command. When this message
1410 // is returned in the action response, the AKDASCII messages will contain
1411 // both the command executed and the returned result as a string.
1412 repeated AKDASCII akd_asciis = 5;
1413}
1415
1417message NetworkNodeConfig {}
1419
1421message NetworkNodeRequest {
1422 // Common request header
1423 RSI.RapidServer.RequestHeader header = 1;
1424
1425 // Network Node index
1426 int32 index = 2;
1427
1428 optional NetworkNodeConfig config = 3;
1429 optional NetworkNodeAction action = 4;
1430}
1432
1434message NetworkNodeResponse {
1435 // Common response header. Always check the response header for errors.
1436 RSI.RapidServer.ResponseHeader header = 1;
1437
1438 // Network Node index
1439 int32 index = 2;
1440
1441 optional NetworkNodeConfig config = 3;
1442 optional NetworkNodeAction action = 4;
1443 optional NetworkNodeInfo info = 5;
1444 optional NetworkNodeStatus status = 6;
1445}
1447
1449message NetworkNodeBatchRequest {
1450 // Common request header
1451 RSI.RapidServer.RequestHeader header = 1;
1452
1453 repeated NetworkNodeRequest requests = 2;
1454}
1455
1456message NetworkNodeBatchResponse {
1457 // Common response header. Always check the response header for errors.
1458 RSI.RapidServer.ResponseHeader header = 1;
1459
1460 repeated NetworkNodeResponse responses = 2;
1461}
1463
1464
1466message RecorderRequest {
1467 // Common request header.
1468 RSI.RapidServer.RequestHeader header = 1;
1469
1470 // The Recorder index. (Check MotionController's Recorder count.)
1471 int32 index = 2;
1472
1473 optional RecorderConfig config = 3;
1474 optional RecorderAction action = 4;
1475}
1477
1478
1480message RecorderResponse {
1481 // Common response header. Always check the response header for errors.
1482 RSI.RapidServer.ResponseHeader header = 1;
1483
1484 // Recorder index
1485 int32 index = 2;
1486
1487 optional RecorderConfig config = 3;
1488 optional RecorderAction action = 4;
1489 optional RecorderInfo info = 5;
1490 optional RecorderStatus status = 6;
1491}
1493
1495message RecorderBatchRequest {
1496 // Common request header
1497 RSI.RapidServer.RequestHeader header = 1;
1498
1499 repeated RecorderRequest requests = 2;
1500}
1501
1502message RecorderBatchResponse {
1503 // Common response header. Always check the response header for errors.
1504 RSI.RapidServer.ResponseHeader header = 1;
1505
1506 repeated RecorderResponse responses = 2;
1507}
1509
1510
1512message RecorderInfo { }
1514
1516message RecorderStatus {
1517 // Is the Recorder recording?
1518 bool is_recording = 1;
1519
1520 // The number of records available for retrieval.
1521 int32 records_available = 2;
1522}
1524
1526message RecorderAction {
1527
1528 optional Reset reset = 1;
1529 optional Start start = 2;
1530 optional Stop stop = 3;
1531 optional RetrieveRecords retrieve_records = 4;
1532
1533 message Reset {}
1534 message Start {}
1535 message Stop {}
1536
1537 message RetrieveRecords {
1538 // New data records will be in the response, if any are available.
1539 repeated Record records = 1;
1540
1541 // A data record from the recorder.
1542 message Record {
1543 // The number of these will depend on the number of addresses to record in the recorder configuration.
1544 repeated FirmwareValue data = 1;
1545 }
1546 }
1547}
1549
1550
1552message RecorderConfig {
1553 // Recorder period, in samples.
1554 optional int32 period = 1;
1555
1556 // If true, the recorder will use a circular buffer, overwriting old data (be sure to read it out).
1557 optional bool circular_buffer = 2;
1558
1559 // The addresses to record. Get these from Controller/Axis/MultiAxis InfoGet rpcs.
1560 repeated AddressInfo addresses = 3;
1561
1562 // Use this to start and end recording with motion.
1563 optional RecorderTriggerOnMotion trigger_on_motion = 4;
1564
1565 // Configure the recorder to generate a RECORDER_HIGH interrupt when the buffer reaches this size.
1566 optional int32 buffer_high_count = 5;
1567
1568 // Read-only, this tells us how many records fit inside the recorder's buffer (see MotionController config's recorder buffer size).
1569 optional int32 record_max_count = 6;
1570
1571 // Internal messages.
1572
1573 message RecorderTriggerOnMotion {
1574 // Use an Axis or MutliAxis's motion supervisor index.
1575 optional int32 motion_supervisor_index = 1;
1576 // Set true if you want the recorder to start when motion starts and stop when motion is done.
1577 optional bool enable = 2;
1578 }
1579}
1580
1582
1584message UserLimitStatus {
1585 // The UserLimit's index.
1586 int32 index = 1;
1587
1588 // Is the UserLimit processing in the RMP firmware_version?
1589 bool enabled = 2;
1590
1591 // Is the UserLimit currently triggered?
1592 bool state = 3;
1593}
1595
1597message UserLimitAction {
1598
1599 optional Reset reset = 1;
1600 optional Enable enable = 2;
1601 optional Disable disable = 3;
1602
1603 message Reset {};
1604 message Enable {};
1605 message Disable {};
1606}
1608
1609
1611message UserLimitInfo {}
1613
1614
1616message UserLimitConfig {
1617
1618 // The type of trigger.
1619 optional RSIUserLimitTriggerType trigger_type = 1;
1620
1621 // The primary condition.
1622 optional UserLimitCondition condition_0 = 2;
1623
1624 // The second condition. Condition 1 will not be set if trigger type is SINGLE_CONDITION or invalid
1625 optional UserLimitCondition condition_1 = 3;
1626
1627 // Optionally set some output when the UserLimit triggers.
1628 optional UserLimitOutput output = 4;
1629
1630 // Optionally perform an action on an Axis when the UserLimit triggers.
1631 optional RSIAction action = 5;
1632
1633 // Perform the optional action on this Axis.
1634 optional int32 action_axis = 6;
1635
1636 // Duration the trigger state must be active before triggering. (Seconds)
1637 optional double duration = 7;
1638
1639 // True if the UserLimit should trigger once, then disable itself.
1640 optional bool is_single_shot = 8;
1641
1642 // Configurable interrupt data.
1643 repeated UserLimitInterruptUserData user_data = 9;
1644
1645 // Internal messages.
1646 message UserLimitCondition {
1647 // The data type to be evaluated.
1648 RSIDataType data_type = 1;
1649
1650 // The logic of the UserLimit.
1651 RSIUserLimitLogic logic = 2;
1652
1653 // A 64-bit host address, see InfoGet on MotionController, Axis, MultiAxis.
1654 uint64 address = 3;
1655
1656 // A 32-bit AND mask.
1657 optional uint32 mask = 4;
1658
1659 // The 32-bit trigger value. (for 32-bit data types)
1660 optional int32 integer_limit_value = 5;
1661
1662 // The 64-bit double trigger value (for 64-bit doubles data types only).
1663 optional double double_limit_value = 6;
1664 }
1665
1666 message UInt32Masks {
1667 // 32-bit AND mask.
1668 uint32 and_mask = 1;
1669
1670 // 32-bit OR mask.
1671 uint32 or_mask = 2;
1672 }
1673
1674 message UInt64Masks {
1675 // 64-bit AND mask.
1676 uint64 and_mask = 1;
1677
1678 // 64-bit OR mask;
1679 uint64 or_mask = 2;
1680 }
1681
1682 message UserLimitOutput {
1683 // True if enabled
1684 bool enabled = 2;
1685
1686 // The type of data to output.
1687 RSIDataType data_type = 3;
1688
1689 // A 64-bit host address, see InfoGet on MotionController, Axis, MultiAxis.
1690 uint64 address = 4;
1691
1692 // The type of output.
1693 oneof output {
1694 // Perform an AND and OR on a 64-bit value.
1695 UInt32Masks uint32_masks = 6;
1696
1697 // Output a 32-bit value.
1698 int32 int32_value = 7;
1699
1700 // Perform an AND and OR on a 64-bit value.
1701 UInt64Masks uint64_masks = 8;
1702
1703 // Output a 64-bit double.
1704 double double_value = 9;
1705
1706 // A 64-bit host address, see InfoGet on MotionController, Axis, MultiAxis.
1707 // Use this field when you want the UserLimit to copy data from the input address to the output address.
1708 uint64 input_address = 10;
1709 }
1710 }
1711
1712 message UserLimitInterruptUserData {
1713 // Interrupt data index (0-4).
1714 uint32 index = 1;
1715
1716 // A 64-bit host address, see InfoGet on MotionController, Axis, MultiAxis.
1717 optional uint64 address = 2;
1718 }
1719}
1721
1723message UserLimitRequest {
1724 // Common request header.
1725 RSI.RapidServer.RequestHeader header = 1;
1726
1727 // UserLimit index.
1728 int32 index = 2;
1729
1730 optional UserLimitConfig config = 3;
1731
1732 optional UserLimitAction action = 4;
1733}
1735
1737message UserLimitResponse {
1738 // Common response header. Always check the response header for errors.
1739 RSI.RapidServer.ResponseHeader header = 1;
1740
1741 // UserLimit index.
1742 int32 index = 2;
1743
1744 optional UserLimitConfig config = 3;
1745 optional UserLimitAction action = 4;
1746 optional UserLimitInfo info = 5;
1747 optional UserLimitStatus status = 6;
1748}
1750
1752message UserLimitBatchRequest {
1753 // Common request header.
1754 RSI.RapidServer.RequestHeader header = 1;
1755
1756 repeated UserLimitRequest requests = 2;
1757}
1758
1759message UserLimitBatchResponse {
1760 // Common response header. Always check the response header for errors.
1761 RSI.RapidServer.ResponseHeader header = 1;
1762
1763 repeated UserLimitResponse responses = 2;
1764}
1766
1768message RTOSConfig {}
1770
1772message RTOSInfo {
1773 // The RMP process catalog.
1774 string rmp_catalog = 1;
1775
1776 // The RMPNetwork process catalog.
1777 string rmp_network_catalog = 2;
1778
1779 // The number of INtime nodes.
1780 uint32 node_count = 3;
1781}
1783
1785message RTOSAction {
1786 optional Restart restart = 1;
1787 optional Stop stop = 2;
1788 optional Start start = 3;
1789
1790 message Restart {}
1791 message Stop {}
1792 message Start {}
1793}
1795
1797message RTOSStatus {
1798 // The status of the INtime node
1799 INtimeStatus status = 3;
1800}
1802
1804message RTOSRequest {
1805 // Common request header
1806 RSI.RapidServer.RequestHeader header = 1;
1807
1808 // Specify a specific INtime node by name.
1809 string name = 2;
1810
1811 optional RTOSConfig config = 3;
1812 optional RTOSAction action = 4;
1813}
1815
1817message RTOSResponse {
1818 // Common response header. Always check the response header for errors.
1819 RSI.RapidServer.ResponseHeader header = 1;
1820
1821 // Specify a specific INtime node by name.
1822 string name = 2;
1823
1824 optional RTOSConfig config = 3;
1825 optional RTOSAction action = 4;
1826 optional RTOSInfo info = 5;
1827 optional RTOSStatus status = 6;
1828}
1830
1832message RTOSBatchRequest {
1833 // Common request header
1834 RSI.RapidServer.RequestHeader header = 1;
1835
1836 repeated RTOSRequest requests = 2;
1837}
1838
1839message RTOSBatchResponse {
1840 // Common response header. Always check the response header for errors.
1841 RSI.RapidServer.ResponseHeader header = 1;
1842
1843 repeated RTOSResponse responses = 2;
1844}
1846
1848enum RTTaskState {
1849 RTTaskStateUNKNOWN = 0;
1850 RTTaskStateDEAD = 1;
1851 RTTaskStateDISABLED = 2;
1852 RTTaskStateWAITING = 3;
1853 RTTaskStateRUNNING = 4;
1854}
1856
1858enum RTTaskManagerState {
1859 RTTaskManagerStateUNKNOWN = 0;
1860 RTTaskManagerStateDEAD = 1;
1861 RTTaskManagerStateRUNNING = 2;
1862 RTTaskManagerStateSTOPPED = 3;
1863}
1865
1867enum PlatformType {
1868 PlatformTypeUNKNOWN = 0;
1869 PlatformTypeNATIVE = 1;
1870 PlatformTypeINTIME = 2;
1871 PlatformTypeLINUX = 3;
1872 PlatformTypeWINDOWS = 4;
1873}
1875
1877// TaskPriority enum for RTTaskManager/RTTask
1878// This is the ground truth for the RapidCodeRemote API.
1879enum TaskPriority {
1880 TaskPriorityNONREALTIME = 0;
1881 TaskPriorityLOWEST = 1;
1882 TaskPriorityLOW = 2;
1883 TaskPriorityMEDIUMLOW = 3;
1884 TaskPriorityMEDIUM = 4;
1885 TaskPriorityMEDIUMHIGH = 5;
1886 TaskPriorityHIGH = 6;
1887 TaskPriorityHIGHEST = 7;
1888}
1890
1892message RTTaskCreationParameters {
1893 // The name of the function to run in the task
1894 string function_name = 1;
1895
1896 // The task functions library directory and name.
1897 optional string library_name = 2;
1898 optional string library_directory = 3;
1899
1900 // The task's user defined label.
1901 optional string user_label = 4;
1902
1903 // The task's priority. 0 is the highest priority, 255 is the lowest.
1904 optional TaskPriority priority = 5;
1905
1906 // Number of times to repeat the task. -1 means infinite.
1907 optional int32 repeats = 6;
1908
1909 // How frequently to run the task in samples
1910 optional int32 period = 7;
1911
1912 // Offset in samples for when to run the task. For example, if the task is set
1913 // to run every 10 samples, and the phase is set to 3, the task will run at
1914 // 3, 13, 23, etc.
1915 optional int32 phase = 8;
1916
1917 // Whether to record execution time metrics for the task.
1918 optional bool enable_timing = 9;
1919}
1921
1923message RTTaskConfig {}
1924
1926
1928message RTTaskAction {
1929 // Stop the task.
1930 optional Stop stop = 1;
1931
1932 // Remove the current task from the task manager
1933 optional Remove remove = 2;
1934
1935 // Reset the timing metrics for the task. (ExecutionTimeMax, Min, Mean, Last)
1936 optional TimingReset timing_reset = 3;
1937
1938 // Wait until the task has executed this many times before returning.
1939 optional ExecutionCountAbsoluteWait execution_count_absolute_wait = 4;
1940
1941 // Wait until the task has executed this many more times before returning.
1942 optional ExecutionCountRelativeWait execution_count_relative_wait = 5;
1943
1944 message Stop {}
1945 message Remove {}
1946 message TimingReset {}
1947
1948 message ExecutionCountAbsoluteWait {
1949 // Wait until the task has executed this many times total.
1950 optional int64 count = 1;
1951
1952 // The maximum time to wait for the task to execute the specified number of times.
1953 optional int32 timeout_ms = 2;
1954 }
1955
1956 message ExecutionCountRelativeWait {
1957 // Wait until the task has executed this many more times from the current count.
1958 optional int64 count = 1;
1959
1960 // The maximum time to wait for the task to execute the specified number of times.
1961 optional int32 timeout_ms = 2;
1962 }
1963}
1965
1967message RTTaskInfo {
1968 // The unique id of the task (not unique across task managers).
1969 int32 id = 1;
1970
1971 // The id of the task manager that created this task.
1972 int32 manager_id = 2;
1973
1974 // Constants related to the RTTask class.
1975 Constants constants = 3;
1976
1977 // The parameters that were used to create the task.
1978 RTTaskCreationParameters creation_parameters = 4;
1979
1980 message Constants {
1981 // Constants related to the RTTask creation parameters.
1982 CreationParameterConstants creation_parameters = 1;
1983
1984 // Constants related to the RTTask status.
1985 StatusConstants status = 2;
1986
1987 message CreationParameterConstants {
1988 // The maximum length of the library directory path.
1989 int32 directory_length_maximum = 1;
1990
1991 // The maximum length of the library name and user label.
1992 int32 name_length_maximum = 2;
1993
1994 // The default library name to use if none is specified.
1995 string library_name_default = 3;
1996
1997 // The default task priority.
1998 int32 priority_default = 4;
1999
2000 // The special value for the repeats field to indicate infinite repeats.
2001 int32 repeat_forever = 5;
2002
2003 // The special value for the repeats field to indicate no repeats.
2004 int32 repeat_none = 6;
2005
2006 // The default period for the task.
2007 int32 period_default = 7;
2008
2009 // The default phase for the task.
2010 int32 phase_default = 8;
2011
2012 // The default value for the enable_timing field.
2013 int32 enable_timing_default = 9;
2014 }
2015
2016 message StatusConstants {
2017 // The special value for the execution count to indicate an invalid count.
2018 int64 invalid_execution_count = 1;
2019
2020 // The special value for the execution time to indicate an invalid time.
2021 uint64 invalid_execution_time = 2;
2022
2023 // The maximum size of the error message.
2024 uint64 error_message_size_maximum = 3;
2025 }
2026 }
2027}
2029
2031message RTTaskStatus {
2032 // The current state of the task (running, waiting, etc.)
2033 RTTaskState state = 1;
2034
2035 // The number of times the task has executed.
2036 optional int64 execution_count = 2;
2037
2038 // The maximum execution time of the task (in nanoseconds).
2039 optional uint64 execution_time_max = 3;
2040
2041 // The minimum execution time of the task (in nanoseconds).
2042 optional uint64 execution_time_min = 4;
2043
2044 // The mean execution time of the task (in nanoseconds).
2045 optional double execution_time_mean = 5;
2046
2047 // The most recent execution time for the task (in nanoseconds).
2048 optional uint64 execution_time_last = 6;
2049
2050 // The time since the task was last started (in nanoseconds).
2051 optional uint64 start_time_delta_last = 7;
2052
2053 // The maximum time difference between the start of one task execution and the next (in nanoseconds).
2054 optional uint64 start_time_delta_max = 8;
2055
2056 // The mean time difference between the start of one task execution and the next (in nanoseconds).
2057 optional double start_time_delta_mean = 9;
2058
2059 // If the task is in an error state, this will contain the error message.
2060 optional string error_message = 10;
2061}
2063
2065message RTTaskRequest {
2066 // Common request header.
2067 RSI.RapidServer.RequestHeader header = 1;
2068
2069 // The id of the task. This is the id assigned to the task when it was created.
2070 int32 id = 2;
2071
2072 // The id of the task manager that the task was submitted to.
2073 int32 manager_id = 3;
2074
2075 optional RTTaskConfig config = 4;
2076 optional RTTaskAction action = 5;
2077}
2079
2081message RTTaskResponse {
2082 // Common response header. Always check the response header for errors.
2083 RSI.RapidServer.ResponseHeader header = 1;
2084
2085 // The id of the task. This is the id assigned to the task when it was created.
2086 int32 id = 2;
2087
2088 // The id of the task manager that the task was submitted to.
2089 int32 manager_id = 3;
2090
2091 optional RTTaskConfig config = 4;
2092 optional RTTaskAction action = 5;
2093 optional RTTaskInfo info = 6;
2094 optional RTTaskStatus status = 7;
2095}
2097
2099message RTTaskBatchRequest {
2100 // Common request header.
2101 RSI.RapidServer.RequestHeader header = 1;
2102
2103 repeated RTTaskRequest requests = 2;
2104}
2105
2106message RTTaskBatchResponse {
2107 // Common response header. Always check the response header for errors.
2108 RSI.RapidServer.ResponseHeader header = 1;
2109
2110 repeated RTTaskResponse responses = 2;
2111}
2113
2115message RTTaskManagerCreationParameters {
2116 // Where the rttaskmanager executable is located (usually the RSI installation directory).
2117 optional string rt_task_directory = 1;
2118
2119 // The platform to run the task manager on. Not needed on Linux. On Windows/INtime,
2120 // use INTIME for real time performance. Only use WINDOWS for debugging.
2121 optional PlatformType platform = 2;
2122
2123 // For INtime managers, the name of the INtime node to run on (usually NodeA).
2124 optional string node_name = 3;
2125
2126 // On Linux, the CPU core to pin the task manager to.
2127 optional int32 cpu_core = 4;
2128
2129 // The task manager's user defined label.
2130 optional string user_label = 5;
2131
2132 // Disable the initialization of the RMP and RapidCode objects on task manager startup and their use in synchronizing task manager cycles.
2133 optional bool no_rmp = 6;
2134}
2136
2138message RTTaskManagerConfig {}
2139
2141
2143message RTTaskManagerAction {
2144 // Start a new task manager.
2145 optional Create create = 1;
2146
2147 // Discover the task managers that are currently running.
2148 optional Discover discover = 2;
2149
2150 // Shutdown the task manager.
2151 optional Shutdown shutdown = 3;
2152
2153 // Submit and start a new task.
2154 optional TaskSubmit task_submit = 4;
2155
2156 // Remove a task from the task manager.
2157 optional TaskRemove task_remove = 5;
2158
2159 // Set the values of global variables
2160 repeated GlobalValueSet global_value_sets = 6;
2161
2162 message Create {
2163 // The task manager's creation parameters.
2164 RTTaskManagerCreationParameters creation_parameters = 1;
2165
2166 // The id of the created task manager.
2167 int32 id = 2; // read-only
2168 }
2169
2170 message Discover {
2171 // The ids of all the task managers that were discoverd
2172 repeated int32 manager_ids = 1; // read-only
2173 }
2174
2175 message Shutdown {}
2176
2177 message TaskSubmit {
2178 // The parameters for the task to create.
2179 RTTaskCreationParameters task_creation_parameters = 1;
2180
2181 // The id of the created task
2182 optional int32 task_id = 2; // read-only
2183 }
2184
2185 message TaskRemove {
2186 // The id of the task to remove.
2187 int32 task_id = 1;
2188 }
2189
2190 message GlobalValueSet {
2191 // The value to set the global variable to. See FirmwareValue for details.
2192 FirmwareValue value = 1;
2193
2194 // The name of the global variable to set.
2195 string name = 2;
2196
2197 // The name and directory of the library that contains the global variable.
2198 // (The task functions library)
2199 optional string library_name = 3;
2200 optional string library_directory = 4;
2201 }
2202}
2204
2206message RTTaskManagerInfo {
2207 // The unique id of the task manager.
2208 int32 id = 1;
2209
2210 // Constants related to the RTTaskManager class.
2211 Constants constants = 2;
2212
2213 // The creation parameters that were used to create the task manager.
2214 RTTaskManagerCreationParameters creation_parameters = 3;
2215
2216 message Constants {
2217 // The maximum number of RTTaskManagers that can be created.
2218 int32 rt_task_manager_count_maximum = 1;
2219
2220 // The maximum number of RTTasks that can be created in a single RTTaskManager.
2221 int32 rt_task_count_maximum = 2;
2222
2223 // The name of the RTTaskManager executable.
2224 string rt_task_manager_executable_name = 3;
2225
2226 // Constants related to the RTTaskManager's creation parameters.
2227 CreationParameterConstants creation_parameters = 4;
2228
2229 message CreationParameterConstants {
2230 // The maximum length of the RTTaskManager's directory name.
2231 int32 directory_length_maximum = 1;
2232
2233 // The maximum length of the RTTaskManager's library name and user label.
2234 int32 name_length_maximum = 2;
2235
2236 // The default user label for the RTTaskManager if none is specified.
2237 string user_label_default = 3;
2238 }
2239 }
2240}
2242
2244message RTTaskManagerStatus {
2245 // The ids of the tasks that are currently registered with the task manager.
2246 // (Includes tasks that are not running.)
2247 repeated int32 task_ids = 1;
2248
2249 // The names and values of the global variables that the task manager has access to.
2250 map<string, FirmwareValue> global_values = 2;
2251
2252 // The state of the RTTaskManager (dead, running, etc.)
2253 optional RTTaskManagerState state = 3;
2254
2255 // The total number of tasks that have been submitted to the task manager (even if they are no longer running).
2256 optional uint64 task_submission_count = 4;
2257
2258 // The number of cycles (iterations) the task manager has run.
2259 optional int64 cycle_count = 5;
2260
2261 // The time it took for the longest cycle to complete (in nanoseconds).
2262 optional uint64 cycle_time_max = 6;
2263
2264 // The time it took for the shortest cycle to complete (in nanoseconds).
2265 optional uint64 cycle_time_min = 7;
2266
2267 // The mean of the cycle times (in nanoseconds).
2268 optional double cycle_time_mean = 8;
2269
2270 // The time it took for the last cycle to complete (in nanoseconds).
2271 optional uint64 cycle_time_last = 9;
2272
2273 // The time since the last cycle started (in nanoseconds).
2274 optional uint64 start_time_delta_last = 10;
2275
2276 // The maximum time difference between the start of one cycle and the next (in nanoseconds).
2277 optional uint64 start_time_delta_max = 11;
2278
2279 // The mean time difference between the start of one cycle and the next (in nanoseconds).
2280 optional double start_time_delta_mean = 12;
2281}
2283
2285message RTTaskManagerRequest {
2286 // Common request header.
2287 RSI.RapidServer.RequestHeader header = 1;
2288
2289 // RTTaskManager id.
2290 optional int32 id = 2; // Required for all actions except Create and Discover.
2291
2292 optional RTTaskManagerConfig config = 3;
2293 optional RTTaskManagerAction action = 4;
2294}
2296
2298message RTTaskManagerResponse {
2299 // Common response header. Always check the response header for errors.
2300 RSI.RapidServer.ResponseHeader header = 1;
2301
2302 // RTTaskManager id.
2303 optional int32 id = 2; // When creating a RTTaskManager, this will be the new RTTaskManager's id.
2304
2305 optional RTTaskManagerConfig config = 3;
2306 optional RTTaskManagerAction action = 4;
2307 optional RTTaskManagerInfo info = 5;
2308 optional RTTaskManagerStatus status = 6;
2309}
2311
2313message RTTaskManagerBatchRequest {
2314 // Common request header.
2315 RSI.RapidServer.RequestHeader header = 1;
2316
2317 repeated RTTaskManagerRequest requests = 2;
2318}
2319
2320message RTTaskManagerBatchResponse {
2321 // Common response header. Always check the response header for errors.
2322 RSI.RapidServer.ResponseHeader header = 1;
2323
2324 repeated RTTaskManagerResponse responses = 2;
2325}
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:1458
RSINetworkStartMode
Network start modes.
Definition rsienums.h:593
RSINetworkState
State of network.
Definition rsienums.h:573
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:1326
RSIMotionType
PT and PVT streaming motion types.
Definition rsienums.h:1045
RSIDataType
Data types for User Limits and other triggers.
Definition rsienums.h:664
RSIUserLimitLogic
Logic options for User Limits.
Definition rsienums.h:651
RSIAction
Action to perform on an Axis.
Definition rsienums.h:1122
RSIAxisAddressType
Used to get firmware address used in User Limits, Recorders, etc.
Definition rsienums.h:439
RSINetworkStartError
Network start errors.
Definition rsienums.h:599
RSIMultiAxisAddressType
Used to get firmware address used in User Limits, Recorders, etc.
Definition rsienums.h:502
RSIUserLimitTriggerType
Trigger types for UserLimits.
Definition rsienums.h:638
INtimeStatus
INtime status values.
Definition rsienums.h:1364
RSIHomeStage
Predefined Homing Stage sections.
Definition rsienums.h:397
RSINetworkType
Type of Network topology.
Definition rsienums.h:631
RSINodeType
Valid Node types.
Definition rsienums.h:682
RSISource
Possible sources that have caused an Error state.
Definition rsienums.h:1021
RSIOperationMode
DS402 modes of operation.
Definition rsienums.h:1338
RSIAxisMasterType
Sources available to a slave Axis for electronic gearing & camming.
Definition rsienums.h:1225