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