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