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
849 // Feedforward values for PTF/PVTF motion. When present and matching positions size:
850 // - With velocities: uses MovePVTF()
851 // - Without velocities: uses MovePTF()
852 repeated double feedforwards = 10;
853}
855
856message MotionHoldGate{
857 int32 number = 1;
858}
859
860message MotionHoldAxis {
861 // If true, motion will hold for Actual Position. If false, it will hold for Command Position.
862 bool actual = 1;
863
864 // Greater than, less than, etc.
865 RSIUserLimitLogic logic = 2;
866
867 // The number of the Axis whose position we're waiting for.
868 int32 hold_axis_number = 3;
869
870 // The position of the hold axis which will trigger the hold to finish.
871 double hold_axis_position = 4;
872}
873
874message MotionHoldUser {
875 // The 64-bit host address on the server.
876 uint64 address = 1;
877
878 // The 32-bit mask that will be ANDed with the value stored at the User Address.
879 int32 mask = 2;
880
881 // The 32-bit mask that will compared for equality after the AND mask.
882 int32 pattern = 3;
883}
884
885message MotionHold {
886 // Choose the type of hold.
887 oneof type {
888 MotionHoldGate gate = 2;
889 MotionHoldAxis axis = 3;
890 MotionHoldUser user = 4;
891 }
892
893 // The motion will execute regardless of hold status after this amount of time.
894 optional double hold_timeout_seconds = 6;
895
896 // This optional delay will occur before motion starts.
897 optional double delay_seconds = 7;
898}
899
901message AxisConfig {
902 // The number of encoder counts to UserUnits.
903 optional double user_units = 1;
904
905 // The origin position, typically set when homing.
906 optional double origin_position = 2;
907
908 // Give the Axis a name, if you like.
909 optional string user_label = 3;
910
911 // Default trajectory values.
912 optional TrajectoryDefaults defaults = 4;
913 optional HardwareTrigger amp_fault = 5;
914 optional HardwareTrigger home_switch = 6;
915 optional ErrorLimit error_limit = 7;
916 optional HardwareTrigger hardware_negative_limit = 8;
917 optional HardwareTrigger hardware_positive_limit = 9;
918 optional SoftwareTrigger software_negative_limit = 10;
919 optional SoftwareTrigger software_positive_limit = 11;
920 optional Settling settling = 12;
921 optional MotionConfig motion = 13;
922 optional Homing homing = 14;
923 optional int32 frame_buffer_size = 15;
924 optional RSIMotorDisableAction amp_disable_action = 16;
925 optional double feed_rate = 17;
926
927 // Internal messages.
928 message TrajectoryDefaults
929 {
930 optional double velocity = 1;
931 optional double acceleration = 2;
932 optional double deceleration = 3;
933 optional double jerk_percent = 4;
934 optional double position1 = 5;
935 optional double position2 = 6;
936 optional double relative_increment = 7;
937 }
938
939 message HardwareTrigger {
940 optional RSIAction action = 1;
941 optional bool trigger_state = 2;
942 optional double duration = 3;
943 }
944
945 message SoftwareTrigger {
946 optional RSIAction action = 1;
947 optional double trigger_value = 2;
948 }
949
950 message ErrorLimit {
951 optional RSIAction action = 1;
952 optional double trigger_value = 2;
953 optional double duration = 3;
954 }
955
956 message Settling {
957 optional double position_tolerance_fine = 1;
958 optional double position_tolerance_coarse = 2;
959 optional double velocity_tolerance = 3;
960 optional double time_seconds = 4;
961 optional bool on_stop = 5;
962 optional bool on_estop = 6;
963 optional bool on_estop_cmd_equals_actual = 7;
964 }
965
966 message MotionConfig {
967 // Seconds.
968 optional double stop_time = 1;
969
970 // Seconds.
971 optional double estop_time = 2;
972
973 // UserUnits per second.
974 optional double triggered_modify_deceleration = 3;
975
976 // Jerk percent (0-100).
977 optional double triggered_modify_jerk_percent = 4;
978
979 // UserUnits per second.
980 optional double estop_modify_deceleration = 5;
981
982 // Jerk percent (0-100).
983 optional double estop_modify_jerk_percent = 6;
984 }
985 message Homing {
986 // placeholder for possible future homing configuration. see Action for Home configuration.
987 }
988}
990
992message AxisInfo {
993 // Axis index.
994 int32 index = 1;
995
996 // Host and firmware addresses
997 repeated AddressInfo addresses = 2;
998
999 // NetworkNode information.
1000 NetworkNodeInfo node_info = 3;
1001
1002 // Constants from the Axis object
1003 Constants constants = 4;
1004
1005 // The internal motion supervisor index
1006 int32 motion_supervisor_index = 5;
1007
1008 message Constants {
1009 // The value returned by NetworkIndexGet() when the index is invalid or nonexistent for this Axis.
1010 uint32 network_index_invalid = 1;
1011
1012 // The default time an Axis waits before generating an AmpFault if the Axis does not enable after calling AmpEnableSet(true).
1013 double amp_enable_amp_fault_timeout_seconds_default = 2;
1014 }
1015
1016}
1018
1019
1021message MultiAxisRequest {
1022 // Common request header
1023 RSI.RapidServer.RequestHeader header = 1;
1024
1025 // MultiAxis index
1026 int32 index = 2;
1027
1028 optional MultiAxisConfig config = 3;
1029 optional MultiAxisAction action = 4;
1030}
1032
1034message MultiAxisResponse {
1035 // Common response header. Always check the response header for errors.
1036 RSI.RapidServer.ResponseHeader header = 1;
1037
1038 // MultiAxis index
1039 int32 index = 2;
1040
1041 optional MultiAxisConfig config = 3;
1042 optional MultiAxisAction action = 4;
1043 optional MultiAxisInfo info = 5;
1044 optional MultiAxisStatus status = 6;
1045}
1047
1049message MultiAxisBatchRequest {
1050 // Common request header
1051 RSI.RapidServer.RequestHeader header = 1;
1052
1053 repeated MultiAxisRequest requests = 2;
1054}
1055
1056message MultiAxisBatchResponse {
1057 // Common response header. Always check the response header for errors.
1058 RSI.RapidServer.ResponseHeader header = 1;
1059
1060 repeated MultiAxisResponse responses = 2;
1061}
1063
1064
1066message MultiAxisStatus {
1067 RSIState state = 1;
1068 RSISource source = 2;
1069 string source_name = 3;
1070 bool amp_enabled = 4;
1071 MotionStatusBits motion_status_bits = 5;
1072 repeated AxisStatus axis_statuses = 6;
1073 bool is_mapped = 7;
1074
1075 message MotionStatusBits {
1076 bool done = 1;
1077 bool start = 2;
1078 bool modify = 3;
1079 bool at_velocity = 4;
1080 bool out_of_frames = 5;
1081 }
1082}
1084
1086message MultiAxisAction {
1087 optional Abort abort = 1;
1088 optional EStopAbort e_stop_abort = 2;
1089 optional EStopModifyAbort e_stop_modify_abort = 3;
1090 optional EStopModify e_stop_modify = 4;
1091 optional EStop e_stop = 5;
1092 optional TriggeredModify triggered_modify = 6;
1093 optional Stop stop = 7;
1094 optional Resume resume = 8;
1095
1096 optional ClearFaults clear_faults = 9;
1097 optional AmpEnable amp_enable = 10;
1098 optional AmpDisable amp_disable = 11;
1099 optional Move move = 12;
1100 optional RemoveAxes remove_axes = 13;
1101 optional Unmap unmap = 14;
1102 optional Map map = 15;
1103 optional AxisAdd axis_add = 16;
1104
1105 message Abort {}
1106 message EStopAbort {}
1107 message EStopModifyAbort{}
1108 message EStopModify{}
1109 message EStop {}
1110 message TriggeredModify {}
1111 message Stop {}
1112 message Resume {}
1113
1114 message ClearFaults {}
1115
1116 message AmpEnable {
1117 optional int32 timeout_milliseconds = 1;
1118 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
1119 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
1120 }
1121 message AmpDisable {}
1122
1123 message Move {
1124 oneof move {
1125 MultiAxisMovePointToPoint point_to_point = 3;
1126 MultiAxisMoveVelocity velocity = 4;
1127 MoveStreaming streaming = 5;
1128 }
1129 optional uint32 motion_id = 6;
1130
1131 // Specify MotionHold criteria, if you want the motion to hold execution until conditions are met.
1132 optional MotionHold motion_hold = 7;
1133
1134 bool blocking = 8;
1135
1136 message MultiAxisMovePointToPoint {
1137 repeated AxisMovePointToPoint axis_move_point_to_points = 1;
1138 bool relative = 2;
1139 }
1140
1141 message MultiAxisMoveVelocity {
1142 repeated AxisMoveVelocity axis_move_velocities = 1;
1143 }
1144 }
1145 message RemoveAxes {}
1146 message Unmap {}
1147 message Map {}
1148 message AxisAdd {
1149 int32 axis_index = 1;
1150 }
1151}
1153
1155message MultiAxisConfig {
1156 repeated int32 axes_indices = 1;
1157 optional string user_label = 2;
1158 optional double feed_rate = 3;
1159 optional double stop_time = 4;
1160 optional double e_stop_time = 5;
1161}
1163
1165message MultiAxisInfo {
1166 // The zero-based index for this MultiAxis.
1167 int32 index = 1;
1168
1169 // The internal motion supervisor index.
1170 int32 motion_supervisor_index = 2;
1171
1172 // Host and firmware addresses
1173 repeated AddressInfo addresses = 3;
1174}
1176
1178message NetworkNodeInfo {
1179 // True if hardware exists.
1180 bool exists = 1;
1181
1182 // The node index.
1183 int32 index = 2;
1184
1185 // The number of Axis objects on this node.
1186 int32 axis_count = 3;
1187
1188 // True if this node has I/O.
1189 bool has_io = 4;
1190
1191 // The number of digital/analog inputs and outputs on this node.
1192 IOCounts io_counts = 5;
1193
1194 // The bit masks and 64-bit host addresses for this node's I/O.
1195 IOAddresses io_addresses = 6;
1196
1197 // The node type.
1198 RSINodeType type = 7;
1199
1200 // 32-bit vendor identifier.
1201 uint32 vendor_id = 8;
1202
1203 // 32-bit product code.
1204 uint32 product_code = 9;
1205
1206 // 32-bit hardware revision.
1207 uint32 hardware_revision = 10;
1208
1209 // Station alias.
1210 uint32 station_alias = 11;
1211
1212 // Serial number.
1213 string serial_number = 12;
1214
1215 // The node's name.
1216 string name = 13;
1217
1218 // Product name.
1219 string product_name = 14;
1220
1221 // Vendor name.
1222 string vendor_name = 15;
1223
1224 Constants constants = 16;
1225
1226
1227 // Internal messages.
1228
1229 // The number of digital/analog inputs and outputs.
1230 message IOCounts {
1231 // Number of digital inputs.
1232 int32 digital_inputs = 1;
1233
1234 // Number of digital outputs.
1235 int32 digital_outputs = 2;
1236
1237 // Number of analog inputs.
1238 int32 analog_inputs = 3;
1239
1240 // Number of analog outputs.
1241 int32 analog_outputs = 4;
1242 }
1243
1244 message IOAddresses {
1245 // Masks and 64-bit host addresses for each digital input.
1246 repeated AddressInfo digital_inputs = 1;
1247
1248 // Masks and 64-bit host addresses for each digital output.
1249 repeated AddressInfo digital_outputs = 2;
1250
1251 // Masks and 64-bit host addresses for each analog input.
1252 repeated AddressInfo analog_inputs = 3;
1253
1254 // Masks and 64-bit host addresses for each analog output.
1255 repeated AddressInfo analog_outputs = 4;
1256 }
1257
1258 message Constants {
1259 // Default time to wait when reading or writing an SDO with ServiceChannelRead() or ServiceChannelWrite()
1260 uint32 sdo_timeout_milliseconds_default = 1;
1261 }
1262}
1264
1266message NetworkNodeStatus {
1267 // All the digital input states.
1268 repeated bool digital_input_states = 2;
1269
1270 // All the digital output states.
1271 repeated bool digital_output_states = 3;
1272
1273 // All the analog input values.
1274 repeated int32 analog_input_values = 4;
1275
1276 // All the analog output values.
1277 repeated int32 analog_output_values = 5;
1278}
1280
1281
1283// The state of the digital output at the specified bit number.
1284message DigitalOutput {
1285 // The bit number.
1286 int32 bit_number = 1;
1287
1288 // The state of the digital output. When this message is used as a request
1289 // to set a digital output, the digital output will be set to this value.
1290 // When this message is returned as an action response, this field holds the
1291 // new state.
1292 bool state = 2;
1293}
1294
1295// The value of the analog output at the specified channel.
1296message AnalogOutput {
1297 // The channel number.
1298 int32 channel = 1;
1299
1300 // The value of the analog output. When this message is used as a request
1301 // to set an analog output, the analog output will be set to this value.
1302 // When this message is returned as an action response, this field holds the
1303 // new value.
1304 int32 value = 2;
1305}
1306
1307// The location, size, and value of a Service Data Object (SDO).
1308// This message is used to read or write SDOs on a network node.
1309// See NetworkNodeAction sdo_writes and sdo_reads.
1310message SDO {
1311 // The SDO index.
1312 int32 index = 1;
1313
1314 // The SDO sub-index.
1315 int32 sub_index = 2;
1316
1317 // The number of bytes.
1318 int32 byte_count = 3;
1319
1320 // The types of data values we can read or write.
1321 enum ValueType {
1322 option allow_alias = true;
1323 UNKNOWN = 0;
1324 INTEGER = 0;
1325 STRING = 1;
1326 BYTES = 2;
1327 }
1328
1329 // When reading an SDO, specify the read type. Default is integer.
1330 optional ValueType read_type = 4;
1331
1332 // Wait this long for a response, otherwise it will throw a timeout error.
1333 optional uint32 timeout_milliseconds = 5;
1334
1335 // The SDO value.
1336 // SDO write: This field is used to set the value to write.
1337 // SDO read: This field is ignored when SDO read action request, but will contain the
1338 // value read from the SDO in the SDO read action response.
1339 oneof value {
1340 // Integer value used for all non-string types.
1341 int32 integer_value = 6;
1342
1343 // String value.
1344 string string_value = 7;
1345
1346 // Raw bytes value
1347 bytes bytes_value = 8;
1348 }
1349}
1350
1351// An ASCII command to execute on an AKD drive.
1352message AKDASCII {
1353 // The command as a string.
1354 string command = 1;
1355
1356 // The returned result of the command. This field is ignored when requesting
1357 // an AKDASCII command.
1358 optional string result = 2;
1359}
1360
1361// A set of actions to perform on a network node. This message is used to
1362// request a set of actions. A new instance of this message will be returned
1363// containing the results of the requested acitons.
1364message NetworkNodeAction {
1365
1366 // Any number of digital outputs to set. Add instances of the DigitalOutput
1367 // message to this field to set digital outputs. When this message is
1368 // returned in the action response, this field contains the new states of
1369 // the digital outputs.
1370 repeated DigitalOutput digital_output_sets = 1;
1371
1372 // Any number of analog outputs to set. Add instances of the AnalogOutput
1373 // message to this field to set analog outputs. When this message is
1374 // returned in the action response, this field contains the new values of
1375 // the analog outputs.
1376 repeated AnalogOutput analog_output_sets = 2;
1377
1378 // The requested SDO value(s) to write to the network. Add instances of the
1379 // SDO message to this field to write to SDOs. When this message is returned
1380 // in the action response, this field will be empty.
1381 repeated SDO sdo_writes = 3;
1382
1383 // The SDO(s) to be read from the network. Add instances of the SDO message
1384 // to this field to read SDO values. When this message is returned in the
1385 // action response, the SDO messages will contain the read values.
1386 repeated SDO sdo_reads = 4;
1387
1388 // AKD ASCII command(s). Only used for Kollmorgen AKD drives. Add instances
1389 // of the AKDASCII message to request an ASCII command. When this message
1390 // is returned in the action response, the AKDASCII messages will contain
1391 // both the command executed and the returned result as a string.
1392 repeated AKDASCII akd_asciis = 5;
1393}
1395
1397message NetworkNodeConfig {}
1399
1401message NetworkNodeRequest {
1402 // Common request header
1403 RSI.RapidServer.RequestHeader header = 1;
1404
1405 // Network Node index
1406 int32 index = 2;
1407
1408 optional NetworkNodeConfig config = 3;
1409 optional NetworkNodeAction action = 4;
1410}
1412
1414message NetworkNodeResponse {
1415 // Common response header. Always check the response header for errors.
1416 RSI.RapidServer.ResponseHeader header = 1;
1417
1418 // Network Node index
1419 int32 index = 2;
1420
1421 optional NetworkNodeConfig config = 3;
1422 optional NetworkNodeAction action = 4;
1423 optional NetworkNodeInfo info = 5;
1424 optional NetworkNodeStatus status = 6;
1425}
1427
1429message NetworkNodeBatchRequest {
1430 // Common request header
1431 RSI.RapidServer.RequestHeader header = 1;
1432
1433 repeated NetworkNodeRequest requests = 2;
1434}
1435
1436message NetworkNodeBatchResponse {
1437 // Common response header. Always check the response header for errors.
1438 RSI.RapidServer.ResponseHeader header = 1;
1439
1440 repeated NetworkNodeResponse responses = 2;
1441}
1443
1444
1446message RecorderRequest {
1447 // Common request header.
1448 RSI.RapidServer.RequestHeader header = 1;
1449
1450 // The Recorder index. (Check MotionController's Recorder count.)
1451 int32 index = 2;
1452
1453 optional RecorderConfig config = 3;
1454 optional RecorderAction action = 4;
1455}
1457
1458
1460message RecorderResponse {
1461 // Common response header. Always check the response header for errors.
1462 RSI.RapidServer.ResponseHeader header = 1;
1463
1464 // Recorder index
1465 int32 index = 2;
1466
1467 optional RecorderConfig config = 3;
1468 optional RecorderAction action = 4;
1469 optional RecorderInfo info = 5;
1470 optional RecorderStatus status = 6;
1471}
1473
1475message RecorderBatchRequest {
1476 // Common request header
1477 RSI.RapidServer.RequestHeader header = 1;
1478
1479 repeated RecorderRequest requests = 2;
1480}
1481
1482message RecorderBatchResponse {
1483 // Common response header. Always check the response header for errors.
1484 RSI.RapidServer.ResponseHeader header = 1;
1485
1486 repeated RecorderResponse responses = 2;
1487}
1489
1490
1492message RecorderInfo { }
1494
1496message RecorderStatus {
1497 // Is the Recorder recording?
1498 bool is_recording = 1;
1499
1500 // The number of records available for retrieval.
1501 int32 records_available = 2;
1502}
1504
1506message RecorderAction {
1507
1508 optional Reset reset = 1;
1509 optional Start start = 2;
1510 optional Stop stop = 3;
1511 optional RetrieveRecords retrieve_records = 4;
1512
1513 message Reset {}
1514 message Start {}
1515 message Stop {}
1516
1517 message RetrieveRecords {
1518 // New data records will be in the response, if any are available.
1519 repeated Record records = 1;
1520
1521 // A data record from the recorder.
1522 message Record {
1523 // The number of these will depend on the number of addresses to record in the recorder configuration.
1524 repeated Data data = 1;
1525
1526 // Type will depend on what is set in config for each address.
1527 message Data {
1528 // Keep the names short to keep packet sizes smaller.
1529 oneof data {
1530 double d = 1;
1531 int32 i32 = 2;
1532 }
1533 }
1534 }
1535 }
1536}
1538
1539
1541message RecorderConfig {
1542 // Recorder period, in samples.
1543 optional int32 period = 1;
1544
1545 // If true, the recorder will use a circular buffer, overwriting old data (be sure to read it out).
1546 optional bool circular_buffer = 2;
1547
1548 // The addresses to record. Get these from Controller/Axis/MultiAxis InfoGet rpcs.
1549 repeated AddressInfo addresses = 3;
1550
1551 // Use this to start and end recording with motion.
1552 optional RecorderTriggerOnMotion trigger_on_motion = 4;
1553
1554 // Configure the recorder to generate a RECORDER_HIGH interrupt when the buffer reaches this size.
1555 optional int32 buffer_high_count = 5;
1556
1557 // Read-only, this tells us how many records fit inside the recorder's buffer (see MotionController config's recorder buffer size).
1558 optional int32 record_max_count = 6;
1559
1560 // Internal messages.
1561
1562 message RecorderTriggerOnMotion {
1563 // Use an Axis or MutliAxis's motion supervisor index.
1564 optional int32 motion_supervisor_index = 1;
1565 // Set true if you want the recorder to start when motion starts and stop when motion is done.
1566 optional bool enable = 2;
1567 }
1568}
1569
1571
1573message UserLimitStatus {
1574 // The UserLimit's index.
1575 int32 index = 1;
1576
1577 // Is the UserLimit processing in the RMP firmware_version?
1578 bool enabled = 2;
1579
1580 // Is the UserLimit currently triggered?
1581 bool state = 3;
1582}
1584
1586message UserLimitAction {
1587
1588 optional Reset reset = 1;
1589 optional Enable enable = 2;
1590 optional Disable disable = 3;
1591
1592 message Reset {};
1593 message Enable {};
1594 message Disable {};
1595}
1597
1598
1600message UserLimitInfo {}
1602
1603
1605message UserLimitConfig {
1606
1607 // The type of trigger.
1608 optional RSIUserLimitTriggerType trigger_type = 1;
1609
1610 // The primary condition.
1611 optional UserLimitCondition condition_0 = 2;
1612
1613 // The second condition. Condition 1 will not be set if trigger type is SINGLE_CONDITION or invalid
1614 optional UserLimitCondition condition_1 = 3;
1615
1616 // Optionally set some output when the UserLimit triggers.
1617 optional UserLimitOutput output = 4;
1618
1619 // Optionally perform an action on an Axis when the UserLimit triggers.
1620 optional RSIAction action = 5;
1621
1622 // Perform the optional action on this Axis.
1623 optional int32 action_axis = 6;
1624
1625 // Duration the trigger state must be active before triggering. (Seconds)
1626 optional double duration = 7;
1627
1628 // True if the UserLimit should trigger once, then disable itself.
1629 optional bool is_single_shot = 8;
1630
1631 // Configurable interrupt data.
1632 repeated UserLimitInterruptUserData user_data = 9;
1633
1634 // Internal messages.
1635 message UserLimitCondition {
1636 // The data type to be evaluated.
1637 RSIDataType data_type = 1;
1638
1639 // The logic of the UserLimit.
1640 RSIUserLimitLogic logic = 2;
1641
1642 // A 64-bit host address, see InfoGet on MotionController, Axis, MultiAxis.
1643 uint64 address = 3;
1644
1645 // A 32-bit AND mask.
1646 optional uint32 mask = 4;
1647
1648 // The 32-bit trigger value. (for 32-bit data types)
1649 optional int32 integer_limit_value = 5;
1650
1651 // The 64-bit double trigger value (for 64-bit doubles data types only).
1652 optional double double_limit_value = 6;
1653 }
1654
1655 message UInt32Masks {
1656 // 32-bit AND mask.
1657 uint32 and_mask = 1;
1658
1659 // 32-bit OR mask.
1660 uint32 or_mask = 2;
1661 }
1662
1663 message UInt64Masks {
1664 // 64-bit AND mask.
1665 uint64 and_mask = 1;
1666
1667 // 64-bit OR mask;
1668 uint64 or_mask = 2;
1669 }
1670
1671 message UserLimitOutput {
1672 // True if enabled
1673 bool enabled = 2;
1674
1675 // The type of data to output.
1676 RSIDataType data_type = 3;
1677
1678 // A 64-bit host address, see InfoGet on MotionController, Axis, MultiAxis.
1679 uint64 address = 4;
1680
1681 // The type of output.
1682 oneof output {
1683 // Perform an AND and OR on a 64-bit value.
1684 UInt32Masks uint32_masks = 6;
1685
1686 // Output a 32-bit value.
1687 int32 int32_value = 7;
1688
1689 // Perform an AND and OR on a 64-bit value.
1690 UInt64Masks uint64_masks = 8;
1691
1692 // Output a 64-bit double.
1693 double double_value = 9;
1694
1695 // A 64-bit host address, see InfoGet on MotionController, Axis, MultiAxis.
1696 // Use this field when you want the UserLimit to copy data from the input address to the output address.
1697 uint64 input_address = 10;
1698 }
1699 }
1700
1701 message UserLimitInterruptUserData {
1702 // Interrupt data index (0-4).
1703 uint32 index = 1;
1704
1705 // A 64-bit host address, see InfoGet on MotionController, Axis, MultiAxis.
1706 optional uint64 address = 2;
1707 }
1708}
1710
1712message UserLimitRequest {
1713 // Common request header.
1714 RSI.RapidServer.RequestHeader header = 1;
1715
1716 // UserLimit index.
1717 int32 index = 2;
1718
1719 optional UserLimitConfig config = 3;
1720
1721 optional UserLimitAction action = 4;
1722}
1724
1726message UserLimitResponse {
1727 // Common response header. Always check the response header for errors.
1728 RSI.RapidServer.ResponseHeader header = 1;
1729
1730 // UserLimit index.
1731 int32 index = 2;
1732
1733 optional UserLimitConfig config = 3;
1734 optional UserLimitAction action = 4;
1735 optional UserLimitInfo info = 5;
1736 optional UserLimitStatus status = 6;
1737}
1739
1741message UserLimitBatchRequest {
1742 // Common request header.
1743 RSI.RapidServer.RequestHeader header = 1;
1744
1745 repeated UserLimitRequest requests = 2;
1746}
1747
1748message UserLimitBatchResponse {
1749 // Common response header. Always check the response header for errors.
1750 RSI.RapidServer.ResponseHeader header = 1;
1751
1752 repeated UserLimitResponse responses = 2;
1753}
1755
1757message RTOSConfig {}
1759
1761message RTOSInfo {
1762 // The RMP process catalog.
1763 string rmp_catalog = 1;
1764
1765 // The RMPNetwork process catalog.
1766 string rmp_network_catalog = 2;
1767
1768 // The number of INtime nodes.
1769 uint32 node_count = 3;
1770}
1772
1774message RTOSAction {
1775 optional Restart restart = 1;
1776 optional Stop stop = 2;
1777 optional Start start = 3;
1778
1779 message Restart {}
1780 message Stop {}
1781 message Start {}
1782}
1784
1786message RTOSStatus {
1787 // The status of the INtime node
1788 INtimeStatus status = 3;
1789}
1791
1793message RTOSRequest {
1794 // Common request header
1795 RSI.RapidServer.RequestHeader header = 1;
1796
1797 // Specify a specific INtime node by name.
1798 string name = 2;
1799
1800 optional RTOSConfig config = 3;
1801 optional RTOSAction action = 4;
1802}
1804
1806message RTOSResponse {
1807 // Common response header. Always check the response header for errors.
1808 RSI.RapidServer.ResponseHeader header = 1;
1809
1810 // Specify a specific INtime node by name.
1811 string name = 2;
1812
1813 optional RTOSConfig config = 3;
1814 optional RTOSAction action = 4;
1815 optional RTOSInfo info = 5;
1816 optional RTOSStatus status = 6;
1817}
1819
1821message RTOSBatchRequest {
1822 // Common request header
1823 RSI.RapidServer.RequestHeader header = 1;
1824
1825 repeated RTOSRequest requests = 2;
1826}
1827
1828message RTOSBatchResponse {
1829 // Common response header. Always check the response header for errors.
1830 RSI.RapidServer.ResponseHeader header = 1;
1831
1832 repeated RTOSResponse responses = 2;
1833}
1835
1837enum RTTaskState {
1838 RTTaskStateUNKNOWN = 0;
1839 RTTaskStateDEAD = 1;
1840 RTTaskStateDISABLED = 2;
1841 RTTaskStateWAITING = 3;
1842 RTTaskStateRUNNING = 4;
1843}
1845
1847enum RTTaskManagerState {
1848 RTTaskManagerStateUNKNOWN = 0;
1849 RTTaskManagerStateDEAD = 1;
1850 RTTaskManagerStateRUNNING = 2;
1851 RTTaskManagerStateSTOPPED = 3;
1852}
1854
1856enum PlatformType {
1857 PlatformTypeUNKNOWN = 0;
1858 PlatformTypeNATIVE = 1;
1859 PlatformTypeINTIME = 2;
1860 PlatformTypeLINUX = 3;
1861 PlatformTypeWINDOWS = 4;
1862}
1864
1866// TaskPriority enum for RTTaskManager/RTTask
1867// This is the ground truth for the RapidCodeRemote API.
1868enum TaskPriority {
1869 TaskPriorityNONREALTIME = 0;
1870 TaskPriorityLOWEST = 1;
1871 TaskPriorityLOW = 2;
1872 TaskPriorityMEDIUMLOW = 3;
1873 TaskPriorityMEDIUM = 4;
1874 TaskPriorityMEDIUMHIGH = 5;
1875 TaskPriorityHIGH = 6;
1876 TaskPriorityHIGHEST = 7;
1877}
1879
1881message RTTaskCreationParameters {
1882 // The name of the function to run in the task
1883 string function_name = 1;
1884
1885 // The task functions library directory and name.
1886 optional string library_name = 2;
1887 optional string library_directory = 3;
1888
1889 // The task's user defined label.
1890 optional string user_label = 4;
1891
1892 // The task's priority. 0 is the highest priority, 255 is the lowest.
1893 optional TaskPriority priority = 5;
1894
1895 // Number of times to repeat the task. -1 means infinite.
1896 optional int32 repeats = 6;
1897
1898 // How frequently to run the task in samples
1899 optional int32 period = 7;
1900
1901 // Offset in samples for when to run the task. For example, if the task is set
1902 // to run every 10 samples, and the phase is set to 3, the task will run at
1903 // 3, 13, 23, etc.
1904 optional int32 phase = 8;
1905
1906 // Whether to record execution time metrics for the task.
1907 optional bool enable_timing = 9;
1908}
1910
1912message RTTaskConfig {}
1913
1915
1917message RTTaskAction {
1918 // Stop the task.
1919 optional Stop stop = 1;
1920
1921 // Remove the current task from the task manager
1922 optional Remove remove = 2;
1923
1924 // Reset the timing metrics for the task. (ExecutionTimeMax, Min, Mean, Last)
1925 optional TimingReset timing_reset = 3;
1926
1927 // Wait until the task has executed this many times before returning.
1928 optional ExecutionCountAbsoluteWait execution_count_absolute_wait = 4;
1929
1930 // Wait until the task has executed this many more times before returning.
1931 optional ExecutionCountRelativeWait execution_count_relative_wait = 5;
1932
1933 message Stop {}
1934 message Remove {}
1935 message TimingReset {}
1936
1937 message ExecutionCountAbsoluteWait {
1938 // Wait until the task has executed this many times total.
1939 optional int64 count = 1;
1940
1941 // The maximum time to wait for the task to execute the specified number of times.
1942 optional int32 timeout_ms = 2;
1943 }
1944
1945 message ExecutionCountRelativeWait {
1946 // Wait until the task has executed this many more times from the current count.
1947 optional int64 count = 1;
1948
1949 // The maximum time to wait for the task to execute the specified number of times.
1950 optional int32 timeout_ms = 2;
1951 }
1952}
1954
1956message RTTaskInfo {
1957 // The unique id of the task (not unique across task managers).
1958 int32 id = 1;
1959
1960 // The id of the task manager that created this task.
1961 int32 manager_id = 2;
1962
1963 // Constants related to the RTTask class.
1964 Constants constants = 3;
1965
1966 // The parameters that were used to create the task.
1967 RTTaskCreationParameters creation_parameters = 4;
1968
1969 message Constants {
1970 // Constants related to the RTTask creation parameters.
1971 CreationParameterConstants creation_parameters = 1;
1972
1973 // Constants related to the RTTask status.
1974 StatusConstants status = 2;
1975
1976 message CreationParameterConstants {
1977 // The maximum length of the library directory path.
1978 int32 directory_length_maximum = 1;
1979
1980 // The maximum length of the library name and user label.
1981 int32 name_length_maximum = 2;
1982
1983 // The default library name to use if none is specified.
1984 string library_name_default = 3;
1985
1986 // The default task priority.
1987 int32 priority_default = 4;
1988
1989 // The special value for the repeats field to indicate infinite repeats.
1990 int32 repeat_forever = 5;
1991
1992 // The special value for the repeats field to indicate no repeats.
1993 int32 repeat_none = 6;
1994
1995 // The default period for the task.
1996 int32 period_default = 7;
1997
1998 // The default phase for the task.
1999 int32 phase_default = 8;
2000
2001 // The default value for the enable_timing field.
2002 int32 enable_timing_default = 9;
2003 }
2004
2005 message StatusConstants {
2006 // The special value for the execution count to indicate an invalid count.
2007 int64 invalid_execution_count = 1;
2008
2009 // The special value for the execution time to indicate an invalid time.
2010 uint64 invalid_execution_time = 2;
2011
2012 // The maximum size of the error message.
2013 uint64 error_message_size_maximum = 3;
2014 }
2015 }
2016}
2018
2020message RTTaskStatus {
2021 // The current state of the task (running, waiting, etc.)
2022 RTTaskState state = 1;
2023
2024 // The number of times the task has executed.
2025 optional int64 execution_count = 2;
2026
2027 // The maximum execution time of the task (in nanoseconds).
2028 optional uint64 execution_time_max = 3;
2029
2030 // The minimum execution time of the task (in nanoseconds).
2031 optional uint64 execution_time_min = 4;
2032
2033 // The mean execution time of the task (in nanoseconds).
2034 optional double execution_time_mean = 5;
2035
2036 // The most recent execution time for the task (in nanoseconds).
2037 optional uint64 execution_time_last = 6;
2038
2039 // The time since the task was last started (in nanoseconds).
2040 optional uint64 start_time_delta_last = 7;
2041
2042 // The maximum time difference between the start of one task execution and the next (in nanoseconds).
2043 optional uint64 start_time_delta_max = 8;
2044
2045 // The mean time difference between the start of one task execution and the next (in nanoseconds).
2046 optional double start_time_delta_mean = 9;
2047
2048 // If the task is in an error state, this will contain the error message.
2049 optional string error_message = 10;
2050}
2052
2054message RTTaskRequest {
2055 // Common request header.
2056 RSI.RapidServer.RequestHeader header = 1;
2057
2058 // The id of the task. This is the id assigned to the task when it was created.
2059 int32 id = 2;
2060
2061 // The id of the task manager that the task was submitted to.
2062 int32 manager_id = 3;
2063
2064 optional RTTaskConfig config = 4;
2065 optional RTTaskAction action = 5;
2066}
2068
2070message RTTaskResponse {
2071 // Common response header. Always check the response header for errors.
2072 RSI.RapidServer.ResponseHeader header = 1;
2073
2074 // The id of the task. This is the id assigned to the task when it was created.
2075 int32 id = 2;
2076
2077 // The id of the task manager that the task was submitted to.
2078 int32 manager_id = 3;
2079
2080 optional RTTaskConfig config = 4;
2081 optional RTTaskAction action = 5;
2082 optional RTTaskInfo info = 6;
2083 optional RTTaskStatus status = 7;
2084}
2086
2088message RTTaskBatchRequest {
2089 // Common request header.
2090 RSI.RapidServer.RequestHeader header = 1;
2091
2092 repeated RTTaskRequest requests = 2;
2093}
2094
2095message RTTaskBatchResponse {
2096 // Common response header. Always check the response header for errors.
2097 RSI.RapidServer.ResponseHeader header = 1;
2098
2099 repeated RTTaskResponse responses = 2;
2100}
2102
2104message RTTaskManagerCreationParameters {
2105 // Where the rttaskmanager executable is located (usually the RSI installation directory).
2106 optional string rt_task_directory = 1;
2107
2108 // The platform to run the task manager on. Not needed on Linux. On Windows/INtime,
2109 // use INTIME for real time performance. Only use WINDOWS for debugging.
2110 optional PlatformType platform = 2;
2111
2112 // For INtime managers, the name of the INtime node to run on (usually NodeA).
2113 optional string node_name = 3;
2114
2115 // On Linux, the CPU core to pin the task manager to.
2116 optional int32 cpu_core = 4;
2117
2118 // The task manager's user defined label.
2119 optional string user_label = 5;
2120
2121 // Disable the initialization of the RMP and RapidCode objects on task manager startup and their use in synchronizing task manager cycles.
2122 optional bool no_rmp = 6;
2123}
2125
2127message RTTaskManagerConfig {}
2128
2130
2132message RTTaskManagerAction {
2133 // Start a new task manager.
2134 optional Create create = 1;
2135
2136 // Discover the task managers that are currently running.
2137 optional Discover discover = 2;
2138
2139 // Shutdown the task manager.
2140 optional Shutdown shutdown = 3;
2141
2142 // Submit and start a new task.
2143 optional TaskSubmit task_submit = 4;
2144
2145 // Remove a task from the task manager.
2146 optional TaskRemove task_remove = 5;
2147
2148 // Set the values of global variables
2149 repeated GlobalValueSet global_value_sets = 6;
2150
2151 message Create {
2152 // The task manager's creation parameters.
2153 RTTaskManagerCreationParameters creation_parameters = 1;
2154
2155 // The id of the created task manager.
2156 int32 id = 2; // read-only
2157 }
2158
2159 message Discover {
2160 // The ids of all the task managers that were discoverd
2161 repeated int32 manager_ids = 1; // read-only
2162 }
2163
2164 message Shutdown {}
2165
2166 message TaskSubmit {
2167 // The parameters for the task to create.
2168 RTTaskCreationParameters task_creation_parameters = 1;
2169
2170 // The id of the created task
2171 optional int32 task_id = 2; // read-only
2172 }
2173
2174 message TaskRemove {
2175 // The id of the task to remove.
2176 int32 task_id = 1;
2177 }
2178
2179 message GlobalValueSet {
2180 // The value to set the global variable to. See FirmwareValue for details.
2181 FirmwareValue value = 1;
2182
2183 // The name of the global variable to set.
2184 string name = 2;
2185
2186 // The name and directory of the library that contains the global variable.
2187 // (The task functions library)
2188 optional string library_name = 3;
2189 optional string library_directory = 4;
2190 }
2191}
2193
2195message RTTaskManagerInfo {
2196 // The unique id of the task manager.
2197 int32 id = 1;
2198
2199 // Constants related to the RTTaskManager class.
2200 Constants constants = 2;
2201
2202 // The creation parameters that were used to create the task manager.
2203 RTTaskManagerCreationParameters creation_parameters = 3;
2204
2205 message Constants {
2206 // The maximum number of RTTaskManagers that can be created.
2207 int32 rt_task_manager_count_maximum = 1;
2208
2209 // The maximum number of RTTasks that can be created in a single RTTaskManager.
2210 int32 rt_task_count_maximum = 2;
2211
2212 // The name of the RTTaskManager executable.
2213 string rt_task_manager_executable_name = 3;
2214
2215 // Constants related to the RTTaskManager's creation parameters.
2216 CreationParameterConstants creation_parameters = 4;
2217
2218 message CreationParameterConstants {
2219 // The maximum length of the RTTaskManager's directory name.
2220 int32 directory_length_maximum = 1;
2221
2222 // The maximum length of the RTTaskManager's library name and user label.
2223 int32 name_length_maximum = 2;
2224
2225 // The default user label for the RTTaskManager if none is specified.
2226 string user_label_default = 3;
2227 }
2228 }
2229}
2231
2233message RTTaskManagerStatus {
2234 // The ids of the tasks that are currently registered with the task manager.
2235 // (Includes tasks that are not running.)
2236 repeated int32 task_ids = 1;
2237
2238 // The names and values of the global variables that the task manager has access to.
2239 map<string, FirmwareValue> global_values = 2;
2240
2241 // The state of the RTTaskManager (dead, running, etc.)
2242 optional RTTaskManagerState state = 3;
2243
2244 // The total number of tasks that have been submitted to the task manager (even if they are no longer running).
2245 optional uint64 task_submission_count = 4;
2246
2247 // The number of cycles (iterations) the task manager has run.
2248 optional int64 cycle_count = 5;
2249
2250 // The time it took for the longest cycle to complete (in nanoseconds).
2251 optional uint64 cycle_time_max = 6;
2252
2253 // The time it took for the shortest cycle to complete (in nanoseconds).
2254 optional uint64 cycle_time_min = 7;
2255
2256 // The mean of the cycle times (in nanoseconds).
2257 optional double cycle_time_mean = 8;
2258
2259 // The time it took for the last cycle to complete (in nanoseconds).
2260 optional uint64 cycle_time_last = 9;
2261
2262 // The time since the last cycle started (in nanoseconds).
2263 optional uint64 start_time_delta_last = 10;
2264
2265 // The maximum time difference between the start of one cycle and the next (in nanoseconds).
2266 optional uint64 start_time_delta_max = 11;
2267
2268 // The mean time difference between the start of one cycle and the next (in nanoseconds).
2269 optional double start_time_delta_mean = 12;
2270}
2272
2274message RTTaskManagerRequest {
2275 // Common request header.
2276 RSI.RapidServer.RequestHeader header = 1;
2277
2278 // RTTaskManager id.
2279 optional int32 id = 2; // Required for all actions except Create and Discover.
2280
2281 optional RTTaskManagerConfig config = 3;
2282 optional RTTaskManagerAction action = 4;
2283}
2285
2287message RTTaskManagerResponse {
2288 // Common response header. Always check the response header for errors.
2289 RSI.RapidServer.ResponseHeader header = 1;
2290
2291 // RTTaskManager id.
2292 optional int32 id = 2; // When creating a RTTaskManager, this will be the new RTTaskManager's id.
2293
2294 optional RTTaskManagerConfig config = 3;
2295 optional RTTaskManagerAction action = 4;
2296 optional RTTaskManagerInfo info = 5;
2297 optional RTTaskManagerStatus status = 6;
2298}
2300
2302message RTTaskManagerBatchRequest {
2303 // Common request header.
2304 RSI.RapidServer.RequestHeader header = 1;
2305
2306 repeated RTTaskManagerRequest requests = 2;
2307}
2308
2309message RTTaskManagerBatchResponse {
2310 // Common response header. Always check the response header for errors.
2311 RSI.RapidServer.ResponseHeader header = 1;
2312
2313 repeated RTTaskManagerResponse responses = 2;
2314}
TaskPriority
Enum representing the priority levels for a real-time task.
Definition rttask.h:102
RTTaskManagerState
Enum representing the possible states of an RTTaskManager.
Definition rttask.h:76
RTTaskState
Enum representing the possible states of a real-time task.
Definition rttask.h:64
PlatformType
Enum representing the platform type for an RTTaskManager.
Definition rttask.h:87
RSINetworkEniResult
NetworkEniGenerate return values.
Definition rsienums.h:1451
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:1319
RSIMotionType
PT and PVT streaming motion types.
Definition rsienums.h:1038
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:1115
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:1357
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:1014
RSIOperationMode
DS402 modes of operation.
Definition rsienums.h:1331
RSIAxisMasterType
Sources available to a slave Axis for electronic gearing & camming.
Definition rsienums.h:1218