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