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