APIs, concepts, guides, and more
rsi.h
1#ifndef _RSI_H
2#define _RSI_H
3
4#include <stdlib.h>
5#include <vector>
6#include <stdio.h>
7#include <string.h>
8#include <math.h>
9#include <exception>
10#include <cstdint>
11#include <cstring>
12
13#include "rsienums.h"
14
15#if defined(_WIN32)
16# if !defined(__INTIME__)
17# define HAS_CARTESIAN_ROBOT 1
18# endif
19# if !defined(RSI_API)
20# if defined(RSIDLL)
21# define RSI_API __declspec(dllexport)
22# else
23# define RSI_API __declspec(dllimport)
24# endif
25# endif
26#elif defined(__linux__)
27# define HAS_CARTESIAN_ROBOT 1
28# if !defined(RSI_API)
29# define RSI_API __attribute__ ((visibility ("default")))
30# endif
31#endif
32
33// Macro for pure virtual definitions
34#define PURE_VIRTUAL = 0
35
37namespace RSI
38{
39
41namespace RapidCode
42{
43
44 // Forward declaration of the implementation class for RapidVector.
45 template<typename Type>
46 class RapidVector;
47
48#if defined(__cplusplus)
49extern "C"
50{
51#endif
52
53
55class Axis;
56class MultiAxis;
57class IO;
58class RapidCodeNetworkNode;
59class IOPoint;
60class RTOS;
61
63class StaticInstanceMediator
64{
65private:
66 bool isValid;
67public:
68
69 bool IsValid() { return isValid; }
70
71 void OnDelete() { isValid = false; }
72
73 void OnCreate() { isValid = true; }
74};
75
78
110class RsiError : public std::exception
111{
112public:
116 int32_t lineNumber;
118 int32_t objectIndex;
122 static inline constexpr uint32_t RSI_ERROR_TEXT_SIZE = 512U;
123 char text[RSI_ERROR_TEXT_SIZE];
130
131 RsiError() : text{}, functionName{}, shortText{}, fileName{}
132 {
134 lineNumber = -1;
135 isWarning = false;
136 objectIndex = -1;
137 }
146 RsiError(const RsiError& copyFrom)
147 {
148#if defined(_WIN32)
149 strncpy_s(text, RSI_ERROR_TEXT_SIZE, copyFrom.text, RSI_ERROR_TEXT_SIZE);
153#elif defined(__linux__)
154 strncpy(text, copyFrom.text, RSI_ERROR_TEXT_SIZE);
156 strncpy(shortText, copyFrom.shortText, RSI_ERROR_TEXT_SIZE);
157 strncpy(fileName, copyFrom.fileName, RSI_ERROR_TEXT_SIZE);
158#endif
159 number = copyFrom.number;
160 lineNumber = copyFrom.lineNumber;
161 isWarning = copyFrom.isWarning;
162 objectIndex = copyFrom.objectIndex;
163 }
164 ~RsiError()
165 {
166 }
167
169 virtual const char* what() const noexcept { return text; }
170};
171
180class RSI_API RapidCodeObject {
181public:
186
187
188
201 virtual const char* const VersionGet() PURE_VIRTUAL;
202
204 virtual int32_t MpiVersionMajor() PURE_VIRTUAL;
206 virtual int32_t MpiVersionMinor() PURE_VIRTUAL;
208 virtual int32_t MpiVersionRelease() PURE_VIRTUAL;
210 virtual int32_t RSIVersionMajor() PURE_VIRTUAL;
212 virtual int32_t RSIVersionMinor() PURE_VIRTUAL;
214 virtual int32_t RSIVersionMicro() PURE_VIRTUAL;
216 virtual int32_t RSIVersionPatch() PURE_VIRTUAL;
217
220 virtual int32_t NumberGet() PURE_VIRTUAL;
222
227
228
229
230
256 virtual int32_t ErrorLogCountGet() PURE_VIRTUAL;
257
271 virtual const RsiError* const ErrorLogGet() PURE_VIRTUAL;
272
285 virtual void ErrorLogClear() PURE_VIRTUAL;
286
305 virtual void ThrowExceptions(bool state) PURE_VIRTUAL;
306
308 virtual const char* const RsiErrorMessageGet(RSIErrorMessage msg) PURE_VIRTUAL;
309
311 virtual const char* const ErrorMessageGet(RSIErrorMessage msg) PURE_VIRTUAL;
312
314 virtual bool WarningMsgCheck(RSIErrorMessage msg) PURE_VIRTUAL;
316
321
322
337 virtual void Trace(bool state) PURE_VIRTUAL;
338
353 virtual void TraceMaskOnSet(RSITrace maskOn) PURE_VIRTUAL;
354
355
376 virtual bool TraceMaskOnGet(RSITrace maskOn) PURE_VIRTUAL;
377
393 virtual void TraceMaskOffSet(RSITrace maskOff) PURE_VIRTUAL;
394
408 virtual void TraceMaskClear() PURE_VIRTUAL;
409
424 virtual void TraceFileSet(const char* const fileName) PURE_VIRTUAL;
425
438 virtual void TraceFileClose() PURE_VIRTUAL;
439
454 virtual void TraceInjectMessage(RSITrace traceLevel, const char* const message) PURE_VIRTUAL;
455
456
457
458
460};
461
463typedef union
464{
465 bool Bool;
466 int8_t Int8;
467 uint8_t UInt8;
468 int16_t Int16;
469 uint16_t UInt16;
470 int32_t Int32;
471 uint32_t UInt32;
472 float Float;
473 double Double;
474 int64_t Int64;
475 uint64_t UInt64;
477
479
493class RSI_API RapidCodeOS {
494public:
495
500
513 virtual void Sleep(int32_t milliseconds) PURE_VIRTUAL;
514
533 virtual int32_t KeyGet(int32_t milliseconds) PURE_VIRTUAL;
534
544 virtual int32_t TimerCountGet() PURE_VIRTUAL;
545
554 virtual int32_t TimerFrequencyGet() PURE_VIRTUAL;
555
556
568 virtual int32_t PerformanceTimerCountGet() PURE_VIRTUAL;
569
581 virtual int32_t PerformanceTimerFrequencyGet() PURE_VIRTUAL;
582
584};
585
587
590class RSI_API RapidCodeInterrupt : public virtual RapidCodeObject {
591public:
595
597 virtual void InterruptEnableSet(bool enable) PURE_VIRTUAL;
598
599
621 virtual RSIEventType InterruptWait(int32_t milliseconds) PURE_VIRTUAL;
622
642 virtual const char* const InterruptNameGet() PURE_VIRTUAL;
643
664 virtual int32_t InterruptSampleTimeGet() PURE_VIRTUAL;
665
666
687 virtual int32_t InterruptSourceNumberGet() PURE_VIRTUAL;
688
690 virtual uint16_t InterruptMotionIdGet() PURE_VIRTUAL;
691
693 virtual void InterruptWake() PURE_VIRTUAL;
694
696 virtual void InterruptMaskClear() PURE_VIRTUAL;
697
699 virtual void InterruptMaskAllSet() PURE_VIRTUAL;
700
702 virtual void InterruptMaskOnSet(RSIEventType eventType) PURE_VIRTUAL;
703
705 virtual void InterruptMaskOffSet(RSIEventType eventType) PURE_VIRTUAL;
706
708 virtual bool InterruptMaskOnGet(RSIEventType eventType) PURE_VIRTUAL;
709
710
723 virtual uint64_t InterruptUserDataGet(uint32_t userDataIndex) PURE_VIRTUAL;
724
725
737 virtual double InterruptUserDataDoubleGet(uint32_t userDataIndex) PURE_VIRTUAL;
738
744 virtual FirmwareValue InterruptUserDataValueGet(uint32_t userDataIndex) PURE_VIRTUAL;
745
781
783 virtual void InterruptUserDataAddressSet(uint32_t userDataIndex, uint64_t hostAddress) PURE_VIRTUAL;
784
790 virtual uint64_t InterruptUserDataAddressGet(uint32_t userDataIndex) PURE_VIRTUAL;
791};
792
796class RSI_API MotionController : public virtual RapidCodeInterrupt {
797protected:
798 MotionController();
799 StaticInstanceMediator* _mediator;
800
801public:
802
803 // Static functions or attributes should be grouped together.
808
810 static inline constexpr uint32_t NetworkStartTimeoutMillisecondsDefault = 30000;
811
813 static inline constexpr uint32_t NetworkSyncGroupRecoverTimeoutMillisecondsDefault = 5000;
814
816 static inline constexpr uint32_t AxisCountMaximum = 128;
817
819 static inline constexpr uint32_t MotionControllerCountMaximum = 2;
820
822 static inline constexpr uint32_t MotionCountMaximum = 128;
823
825 static inline constexpr uint32_t NetworkNodeCountMaximum = 128;
826
828 // Must equal MAX_SYNC_GROUPS in RMPNetwork.h (static-asserted in motioncontroller.cpp).
829 static inline constexpr uint32_t NetworkSyncGroupCountMaximum = 8;
830
832 static inline constexpr uint32_t RecorderCountMaximum = 128;
833
835 static inline constexpr uint32_t CompensatorCountMaximum = 128;
836
838 static inline constexpr uint32_t MathBlockCountMaximum = 128;
839
841 static inline constexpr uint32_t UserBufferDataCountMaximum = 1024;
842
849 static inline constexpr double SampleRateDefault = 1000.0;
850
860 static inline constexpr int32_t AxisFrameBufferSizeDefault = 1024;
861
863
864 // Static functions or attributes should be grouped together.
869
872 {
877
882 static inline constexpr int32_t ControllerIndexDefault = 0;
883
888 static inline constexpr uint32_t PathLengthMaximum = 256;
889
895 static inline constexpr int32_t CpuAffinityDefault = -1;
896
902 static inline constexpr char NodeNameDefault[] = "NodeA";
903
908 static inline constexpr int32_t RmpThreadPriorityMaximumDefault = 45;
909
914 static inline constexpr int32_t RmpThreadPriorityRange = 8;
915
920 static inline constexpr int32_t RmpThreadPriorityMinimum = RmpThreadPriorityRange + 1;
921
926 static inline constexpr int32_t RmpThreadPriorityMaximum = 99;
927
932 static inline constexpr int32_t RmpThreadPriorityNoRealTime = 0;
934
935
940
946 {
948 std::memset(RmpPath, '\0', PathLengthMaximum);
949 std::memset(NicPrimary, '\0', PathLengthMaximum);
950 std::memset(NicSecondary, '\0', PathLengthMaximum);
951#if defined(_WIN32)
952 std::memset(NodeName, '\0', PathLengthMaximum);
953 std::memcpy(NodeName, NodeNameDefault, sizeof(NodeNameDefault));
954#elif defined(__linux__)
957#endif
958 }
959
960
965
973
979
1020
1027
1028 // Control which platform specific parameters are available
1029#if defined(_WIN32) && defined(__linux__)
1030 static_assert(false, "_WIN32 and __linux__ defined. Double check preprocessor definitions");
1031#elif !defined(_WIN32) && !defined(__linux__) && !defined(DOXYGEN)
1032 static_assert(false, "Neither _WIN32 nor __linux__ are defined AND this is not a documentation build. Double check preprocessor definitions");
1033#endif //defined(_WIN32) && defined(__linux__)
1034#if defined(_WIN32) || defined(DOXYGEN)
1035
1040
1046
1048#endif //defined(_WIN32)
1049#if defined(__linux__) || defined(DOXYGEN)
1050
1055
1066
1078
1080# endif // defined(__linux__)
1081 };
1082
1093 static MotionController* Create(CreationParameters* creationParameters);
1094
1110 static MotionController* Get(int32_t controllerIndex = CreationParameters::ControllerIndexDefault);
1111
1112#if defined(_WIN32)
1127 static MotionController* Get(const char* const nodeName);
1128
1155 static MotionController* CreateFromSoftware();
1156
1161 static MotionController* CreateFromSoftware(const char* const RtaPath);
1162
1168 static MotionController* CreateFromSoftware(const char* const RtaPath, const char* const NodeName);
1169
1196 static MotionController* Create();
1197#endif // defined(_WIN32)
1198
1203 static MotionController* CreateFromFile(const char* const fileName);
1205
1210
1226 virtual Axis* AxisGet(int32_t axisNumber) PURE_VIRTUAL;
1227
1242 virtual MultiAxis* MultiAxisGet(int32_t motionSupervisorNumber) PURE_VIRTUAL;
1243
1261 virtual MultiAxis* LoadExistingMultiAxis(int32_t motionSupervisorNumber) PURE_VIRTUAL;
1262
1277 virtual RapidCodeNetworkNode* NetworkNodeGet(int32_t nodeNumber) PURE_VIRTUAL;
1278
1294 virtual IO* IOGet(int32_t nodeNumber) PURE_VIRTUAL;
1295
1318 virtual void Delete(void) PURE_VIRTUAL;
1320
1325
1333 virtual void Reset() PURE_VIRTUAL;
1334
1345 virtual void Refresh() PURE_VIRTUAL;
1346
1354 virtual void Shutdown() PURE_VIRTUAL;
1355
1364 virtual void MemoryToFile(const char* const fileName) PURE_VIRTUAL;
1366
1371
1394 virtual int32_t SampleCounterGet() PURE_VIRTUAL;
1395
1410 virtual double ProcessorUsageGet() PURE_VIRTUAL;
1411
1422 virtual void ProcessorUsageClear() PURE_VIRTUAL;
1423
1427 virtual uint32_t FirmwareTimingDeltaGet() PURE_VIRTUAL;
1428
1429
1431
1436
1437
1449
1472 virtual uint32_t SerialNumberGet(void) PURE_VIRTUAL;
1473
1492 virtual void SampleWait(uint32_t samples) PURE_VIRTUAL;
1493
1494
1496 virtual RSIControllerType ControllerTypeGet() PURE_VIRTUAL;
1497
1499 virtual const char* const ServerNameGet() PURE_VIRTUAL;
1500
1502 virtual int32_t ServerPortGet() PURE_VIRTUAL;
1503
1504
1505
1506
1528 virtual RSIProcessorType ProcessorTypeGet() PURE_VIRTUAL;
1529
1555 virtual void SampleRateSet(double sampleRate) PURE_VIRTUAL;
1556
1560 virtual double SampleRateGet() PURE_VIRTUAL;
1561
1579 virtual int32_t AxisCountGet() PURE_VIRTUAL;
1580
1598 virtual void AxisCountSet(int32_t axisCount) PURE_VIRTUAL;
1599
1606 virtual void AxisCountSet(int32_t axisCount, bool setMotorFilterSupervisor) PURE_VIRTUAL;
1607
1610 virtual bool IsLicensed() PURE_VIRTUAL;
1611
1613 virtual int32_t PackageVariantGet() PURE_VIRTUAL;
1614
1616 virtual int32_t AxisLicenseCountGet() PURE_VIRTUAL;
1617
1619 virtual bool MechaWareLicenseGet() PURE_VIRTUAL;
1620
1622 virtual int32_t UnsupportedOptionSet(int32_t option) PURE_VIRTUAL;
1623
1648 virtual int32_t MotionCountGet() PURE_VIRTUAL;
1649
1666 virtual void MotionCountSet(int32_t motionCount) PURE_VIRTUAL;
1667
1693 virtual int32_t UserVersionGet() PURE_VIRTUAL;
1694
1718 virtual void UserVersionSet(int32_t version) PURE_VIRTUAL;
1719
1722 virtual int32_t ExternalMemorySizeGet() PURE_VIRTUAL;
1723
1740 virtual void AxisFrameBufferSizeSet(int32_t axisNumber, int32_t frameBufferSize) PURE_VIRTUAL;
1741
1756 virtual int32_t AxisFrameBufferSizeGet(int32_t axisNumber) PURE_VIRTUAL;
1758
1763
1781 virtual const char* const FirmwareVersionGet() PURE_VIRTUAL;
1782
1800 virtual int32_t FirmwareOptionGet() PURE_VIRTUAL;
1801
1803 virtual bool HasMechaWare() PURE_VIRTUAL;
1804
1828 virtual int32_t MemoryGet(uint64_t address) PURE_VIRTUAL;
1829
1830
1848 virtual double MemoryDoubleGet(uint64_t address) PURE_VIRTUAL;
1849
1875 virtual void MemoryBlockGet(uint64_t address, void* dataStart, int32_t size) PURE_VIRTUAL;
1876
1891 virtual void MemorySet(uint64_t address, int32_t data) PURE_VIRTUAL;
1892
1893
1894
1911 virtual void MemoryDoubleSet(uint64_t address, double dataDouble) PURE_VIRTUAL;
1912
1938 virtual void MemoryBlockSet(uint64_t address, const void* const dataStart, int32_t size) PURE_VIRTUAL;
1939
1958 virtual uint64_t FirmwareAddressGet(uint64_t hostAddress) PURE_VIRTUAL;
1959
1960
1961
1962
1985 virtual uint64_t HostAddressGet(uint64_t firmwareAddress) PURE_VIRTUAL;
1986
1987
1988
2011 virtual int32_t BackgroundCycleCounterGet() PURE_VIRTUAL;
2012
2013
2014
2015
2024 virtual uint64_t AddressFromStringGet(const char* const addressName) PURE_VIRTUAL;
2025
2026
2027
2036 virtual const char* const StringFromAddressGet(uint64_t hostAddress) PURE_VIRTUAL;
2037
2052 virtual uint64_t AddressGet(RSIControllerAddressType type) PURE_VIRTUAL;
2053
2071 virtual uint64_t AddressGet(RSIControllerAddressType type, int32_t objectIndex) PURE_VIRTUAL;
2072
2073
2087
2092 virtual RSIDataType AddressDataTypeGet(RSIControllerAddressType type, int32_t objectIndex) PURE_VIRTUAL;
2093
2107 virtual bool MotionHoldGateGet(int32_t gateNumber) PURE_VIRTUAL;
2108
2109
2110
2126 virtual void MotionHoldGateSet(int32_t gateNumber, bool hold) PURE_VIRTUAL;
2128
2133
2136
2138 virtual RSINetworkType NetworkTypeGet() PURE_VIRTUAL;
2139
2154 virtual int32_t NetworkNodeCountGet() PURE_VIRTUAL;
2155
2204
2225 virtual const char* const NetworkEniGenerateOutputGet() PURE_VIRTUAL;
2226
2233 virtual void NetworkStart() PURE_VIRTUAL;
2234
2239 virtual void NetworkStart(RSINetworkStartupMethod startupMethod) PURE_VIRTUAL;
2240
2247 virtual void NetworkStart(RSINetworkStartMode startMode, RSINetworkStartupMethod startupMethod) PURE_VIRTUAL;
2248
2253 virtual void NetworkStart(RSINetworkStartMode startMode, RSINetworkStartupMethod startupMethod, uint32_t timeoutMilliseconds) PURE_VIRTUAL;
2254
2265 virtual void NetworkShutdown() PURE_VIRTUAL;
2266
2269 virtual RSINetworkState NetworkStateGet() PURE_VIRTUAL;
2270
2290
2301 virtual NetworkStatus NetworkStatusGet() PURE_VIRTUAL;
2302
2334
2354 virtual int32_t NetworkSyncGroupCountGet() PURE_VIRTUAL;
2355
2373 virtual NetworkSyncGroupStatus NetworkSyncGroupStatusGet(int32_t groupId) PURE_VIRTUAL;
2374
2418 virtual void NetworkSyncGroupRecover(int32_t groupId, uint32_t timeoutMilliseconds = NetworkSyncGroupRecoverTimeoutMillisecondsDefault) PURE_VIRTUAL;
2419
2421 virtual int32_t NetworkCounterGet() PURE_VIRTUAL;
2422
2424 virtual int32_t NetworkInputCountGet() PURE_VIRTUAL;
2425
2427 virtual int32_t NetworkInputBitSizeGet(int32_t index) PURE_VIRTUAL;
2428
2495 virtual const char* const NetworkInputDataTypeNameGet(int32_t index) PURE_VIRTUAL;
2496
2522 virtual RSIDataType NetworkInputDataTypeGet(int32_t index) PURE_VIRTUAL;
2523
2526 virtual int32_t NetworkInputBitOffsetGet(int32_t index) PURE_VIRTUAL;
2527
2530 virtual const char* const NetworkInputNameGet(int32_t index) PURE_VIRTUAL;
2531
2535 virtual uint64_t NetworkInputValueGet(int32_t index) PURE_VIRTUAL;
2536
2561 virtual FirmwareValue NetworkInputFirmwareValueGet(int32_t index) PURE_VIRTUAL;
2562
2563
2564
2572 virtual uint64_t NetworkInputAddressGet(int32_t index) PURE_VIRTUAL;
2573
2577 virtual int32_t NetworkOutputCountGet() PURE_VIRTUAL;
2578
2581 virtual int32_t NetworkOutputBitSizeGet(int32_t index) PURE_VIRTUAL;
2582
2583
2627 virtual const char* const NetworkOutputDataTypeNameGet(int32_t index) PURE_VIRTUAL;
2628
2652 virtual RSIDataType NetworkOutputDataTypeGet(int32_t index) PURE_VIRTUAL;
2653
2655 virtual int32_t NetworkOutputBitOffsetGet(int32_t index) PURE_VIRTUAL;
2656
2658 virtual const char* const NetworkOutputNameGet(int32_t index) PURE_VIRTUAL;
2659
2675 virtual uint64_t NetworkOutputValueGet(int32_t index) PURE_VIRTUAL;
2676
2693 virtual void NetworkOutputValueSet(int32_t index, uint64_t outputValue) PURE_VIRTUAL;
2694
2713 virtual uint64_t NetworkOutputAddressGet(int32_t index) PURE_VIRTUAL;
2714
2720 virtual uint64_t NetworkOutputAddressGet(int32_t index, RSINetworkOutputAddressType type) PURE_VIRTUAL;
2721
2732 virtual uint64_t NetworkOutputIntendedValueGet(int32_t index) PURE_VIRTUAL;
2733
2749 virtual FirmwareValue NetworkOutputIntendedFirmwareValueGet(int32_t index) PURE_VIRTUAL;
2750
2762 virtual void NetworkOutputOverrideSet(int32_t index, bool outputOverride) PURE_VIRTUAL;
2763
2774 virtual bool NetworkOutputOverrideGet(int32_t index) PURE_VIRTUAL;
2775
2776
2777
2778
2795 virtual void NetworkOutputOverrideValueSet(int32_t index, uint64_t outputValue) PURE_VIRTUAL;
2796
2823 virtual void NetworkOutputOverrideFirmwareValueSet(int32_t index, FirmwareValue value) PURE_VIRTUAL;
2824
2837 virtual uint64_t NetworkOutputOverrideValueGet(int32_t index) PURE_VIRTUAL;
2838
2853 virtual FirmwareValue NetworkOutputOverrideFirmwareValueGet(int32_t index) PURE_VIRTUAL;
2854
2869 virtual uint64_t NetworkOutputSentValueGet(int32_t index) PURE_VIRTUAL;
2870
2889 virtual FirmwareValue NetworkOutputSentFirmwareValueGet(int32_t index) PURE_VIRTUAL;
2890
2894 virtual int32_t NetworkLogMessageCountGet() PURE_VIRTUAL;
2895
2898
2903 virtual const char* const NetworkLogMessageGet(int32_t messageIndex) PURE_VIRTUAL;
2904
2906 virtual void NetworkTimingEnableSet(bool enable) PURE_VIRTUAL;
2907
2909 virtual bool NetworkTimingEnableGet() PURE_VIRTUAL;
2910
2912 virtual void NetworkTimingClear() PURE_VIRTUAL;
2913
2915 virtual uint32_t NetworkTimingDeltaGet() PURE_VIRTUAL;
2916
2918 virtual uint32_t NetworkTimingMinGet() PURE_VIRTUAL;
2919
2921 virtual uint32_t NetworkTimingMaxGet() PURE_VIRTUAL;
2922
2924 virtual void NetworkTimingThresholdLowSet(uint32_t microseconds) PURE_VIRTUAL;
2925
2927 virtual void NetworkTimingThresholdHighSet(uint32_t microseconds) PURE_VIRTUAL;
2928
2930 virtual uint32_t NetworkTimingThresholdLowCountGet() PURE_VIRTUAL;
2931
2933 virtual uint32_t NetworkTimingThresholdHighCountGet() PURE_VIRTUAL;
2934
2936 virtual bool NetworkSynchronizedGet() PURE_VIRTUAL;
2938
2943
2960 virtual void InterruptEnableSet(bool enable) PURE_VIRTUAL;
2961
2980 virtual void InterruptWake() PURE_VIRTUAL;
2981
3009 virtual void SyncInterruptEnableSet(bool enable) PURE_VIRTUAL;
3010
3036 virtual void SyncInterruptPeriodSet(uint32_t samples) PURE_VIRTUAL;
3037
3057 virtual int32_t SyncInterruptWait() PURE_VIRTUAL;
3058
3060 virtual bool ServiceThreadStateGet() PURE_VIRTUAL;
3061
3072 virtual int32_t SyncInterruptHostProcessTimeGet() PURE_VIRTUAL;
3073
3075 virtual int32_t SyncInterruptHostProcessFlagGet() PURE_VIRTUAL;
3076
3089 virtual void SyncInterruptHostProcessFlagSet(bool hostProcessFlag) PURE_VIRTUAL;
3090
3101 virtual bool SyncInterruptHostProcessStatusBitGet() PURE_VIRTUAL;
3102
3112 virtual void SyncInterruptHostProcessStatusClear() PURE_VIRTUAL;
3113
3140
3141 virtual void ServiceThreadEnableSet(bool enable) PURE_VIRTUAL;
3143
3148
3149
3150
3169 virtual int32_t RecorderCountGet() PURE_VIRTUAL;
3170
3188 virtual void RecorderCountSet(int32_t recorderCount) PURE_VIRTUAL;
3189
3206 virtual void RecorderPeriodSet(uint32_t samples) PURE_VIRTUAL;
3207
3209 virtual void RecorderPeriodSet(int32_t recorderNumber, uint32_t samples) PURE_VIRTUAL;
3210
3227 virtual void RecorderCircularBufferSet(bool enable) PURE_VIRTUAL;
3228
3230 virtual void RecorderCircularBufferSet(int32_t recorderNumber, bool enable) PURE_VIRTUAL;
3231
3247 virtual void RecorderDataCountSet(int32_t count) PURE_VIRTUAL;
3248
3250 virtual void RecorderDataCountSet(int32_t recorderNumber,int32_t count) PURE_VIRTUAL;
3251
3268 virtual void RecorderDataAddressSet(int32_t index, uint64_t address) PURE_VIRTUAL;
3269
3271 virtual void RecorderDataAddressSet(int32_t recorderNumber,int32_t index, uint64_t address) PURE_VIRTUAL;
3272
3273
3279 virtual void RecorderDataAddressesSet(int32_t recorderNumber, const uint64_t* const addresses, int32_t addressCount) PURE_VIRTUAL;
3280
3294
3300 virtual void RecorderConfigureToTriggerOnMotion(Axis *axis, bool triggerOnMotion) PURE_VIRTUAL;
3301
3308 virtual void RecorderConfigureToTriggerOnMotion(int32_t recorderNumber, Axis *axis, bool triggerOnMotion) PURE_VIRTUAL;
3309
3315 virtual void RecorderConfigureToTriggerOnMotion(MultiAxis *multiAxis, bool triggerOnMotion) PURE_VIRTUAL;
3316
3323 virtual void RecorderConfigureToTriggerOnMotion(int32_t recorderNumber, MultiAxis *multiAxis, bool triggerOnMotion) PURE_VIRTUAL;
3324
3331 virtual void RecorderConfigureToTriggerOnMotion(int32_t recorderNumber, int32_t motionNumber, bool triggerOnMotion) PURE_VIRTUAL;
3332
3341 virtual bool RecorderTriggerOnMotionGet(int32_t recorderNumber) PURE_VIRTUAL;
3342
3358 virtual bool RecorderEnabledGet() PURE_VIRTUAL;
3359
3361 virtual bool RecorderEnabledGet(int32_t recorderNumber ) PURE_VIRTUAL;
3362
3379 virtual int32_t RecorderRecordCountGet() PURE_VIRTUAL;
3380
3382 virtual int32_t RecorderRecordCountGet(int32_t recorderNumber ) PURE_VIRTUAL;
3383
3397 virtual int32_t RecorderRecordMaxCountGet() PURE_VIRTUAL;
3398
3400 virtual int32_t RecorderRecordMaxCountGet(int32_t recorderNumber) PURE_VIRTUAL;
3401
3416 virtual void RecorderStart() PURE_VIRTUAL;
3417
3419 virtual void RecorderStart(int32_t recorderNumber) PURE_VIRTUAL;
3420
3437 virtual void RecorderStop() PURE_VIRTUAL;
3438
3440 virtual void RecorderStop(int32_t recorderNumber) PURE_VIRTUAL;
3441
3442
3443
3459 virtual const int32_t* const RecorderRecordDataGet() PURE_VIRTUAL;
3460
3462 virtual const int32_t* const RecorderRecordDataGet(int32_t recorderNumber) PURE_VIRTUAL;
3463
3478 virtual void RecorderRecordDataRetrieve() PURE_VIRTUAL;
3479
3499 virtual int32_t RecorderRecordDataRetrieveBulk(int32_t recorderNumber, int32_t recordCount) PURE_VIRTUAL;
3500
3502 virtual void RecorderRecordDataRetrieve(int32_t recorderNumber) PURE_VIRTUAL;
3503
3520 virtual int32_t RecorderRecordDataValueGet(int32_t index) PURE_VIRTUAL;
3521
3523 virtual int32_t RecorderRecordDataValueGet(int32_t recorderNumber, int32_t index) PURE_VIRTUAL;
3524
3543 virtual int32_t RecorderRecordDataValueGet(int32_t recorderNumber, int32_t recordIndex, int32_t dataIndex) PURE_VIRTUAL;
3544
3546 virtual double RecorderRecordDataDoubleGet(int32_t index) PURE_VIRTUAL;
3547
3549 virtual double RecorderRecordDataDoubleGet(int32_t recorderNumber, int32_t index) PURE_VIRTUAL;
3550
3569 virtual double RecorderRecordDataDoubleGet(int32_t recorderNumber, int32_t recordIndex, int32_t dataIndex) PURE_VIRTUAL;
3570
3572 virtual FirmwareValue RecorderRecordDataFirmwareValueGet(int32_t index) PURE_VIRTUAL;
3573
3575 virtual FirmwareValue RecorderRecordDataFirmwareValueGet(int32_t recorderNumber, int32_t index) PURE_VIRTUAL;
3576
3597 virtual FirmwareValue RecorderRecordDataFirmwareValueGet(int32_t recorderNumber, int32_t recordIndex, int32_t dataIndex) PURE_VIRTUAL;
3598
3616 virtual void RecorderBufferHighCountSet(int32_t bufferHighCount) PURE_VIRTUAL;
3617
3619 virtual void RecorderBufferHighCountSet(int32_t recorderNumber, int32_t bufferHighCount) PURE_VIRTUAL;
3620
3635 virtual void RecorderReset() PURE_VIRTUAL;
3636
3638 virtual void RecorderReset(int32_t recorderNumber) PURE_VIRTUAL;
3639
3651 virtual int32_t RecorderBufferSizeGet(int32_t recorderNumber) PURE_VIRTUAL;
3652
3669 virtual void RecorderBufferSizeSet(int32_t recorderNumber, int32_t bufferSize) PURE_VIRTUAL;
3671
3676
3677
3678
3679
3704 virtual int32_t CompensatorCountGet() PURE_VIRTUAL;
3705
3725 virtual void CompensatorCountSet(int32_t compensatorCount) PURE_VIRTUAL;
3726
3737 virtual int32_t CompensatorPointCountGet(int32_t compensatorNumber) PURE_VIRTUAL;
3738
3758 virtual void CompensatorPointCountSet(int32_t compensatorNumber, int32_t pointCount) PURE_VIRTUAL;
3759
3773 virtual int32_t CompensatorDimensionGet(int32_t compensatorNumber) PURE_VIRTUAL;
3774
3800 virtual void CompensatorConfigSet(int32_t compensatorNumber, int32_t firstInputAxisNumber, RSIAxisMasterType firstInputAxisType, double firstInputAxisMinimum, double firstInputAxisMaximum, double firstInputAxisDelta, int32_t secondInputAxisNumber, RSIAxisMasterType secondInputAxisType, double secondInputAxisMinimum, double secondInputAxisMaximum, double secondInputAxisDelta, int32_t outputAxisNumber, RSICompensatorOutputType outputType, const double* const table) PURE_VIRTUAL;
3801
3831 virtual void CompensatorConfigSet(int32_t compensatorNumber, Axis* firstInputAxis, RSIAxisMasterType firstInputAxisType, double firstInputAxisMinimum, double firstInputAxisMaximum, double firstInputAxisDelta, Axis* secondInputAxis, RSIAxisMasterType secondInputAxisType, double secondInputAxisMinimum, double secondInputAxisMaximum, double secondInputAxisDelta, Axis* outputAxis, RSICompensatorOutputType outputType, const double* const table) PURE_VIRTUAL;
3832
3853 virtual void CompensatorConfigSet(int32_t compensatorNumber, int32_t inputAxisNumber, RSIAxisMasterType inputAxisType, double inputAxisMinimum, double inputAxisMaximum, double inputAxisDelta, int32_t outputAxisNumber, RSICompensatorOutputType outputType, const double* const table) PURE_VIRTUAL;
3854
3875 virtual void CompensatorConfigSet(int32_t compensatorNumber, Axis* inputAxis, RSIAxisMasterType inputAxisType, double inputAxisMinimum, double inputAxisMaximum, double inputAxisDelta, Axis* outputAxis, RSICompensatorOutputType outputType, const double* const table) PURE_VIRTUAL;
3876
3888 virtual void CompensatorTableSet(int32_t compensatorNumber, const double* const table) PURE_VIRTUAL;
3889
3901 virtual void CompensatorTableGet(int32_t compensatorNumber, double* table) PURE_VIRTUAL;
3902
3922 virtual double CompensatorPositionGet(int32_t compensatorNumber) PURE_VIRTUAL;
3923
3924
3925
3926
3927
3928
3940
3941 virtual void CompensatorTableClear(int32_t compensatorNumber) PURE_VIRTUAL;
3942
3952 virtual void CompensatorDisable(int32_t compensatorNumber, bool force = false) PURE_VIRTUAL;
3953
3960 virtual void CompensatorEnable(int32_t compensatorNumber) PURE_VIRTUAL;
3961
3963
3968
3988 virtual int32_t UserLimitCountGet() PURE_VIRTUAL;
3989
4009 virtual void UserLimitCountSet(int32_t userLimitCount) PURE_VIRTUAL;
4010
4030 virtual void UserLimitConfigSet(int32_t number, RSIUserLimitTriggerType triggerType, RSIAction action, int32_t actionAxis, double duration, bool singleShot) PURE_VIRTUAL;
4031
4034 virtual void UserLimitConfigSet(int32_t number, RSIUserLimitTriggerType triggerType, RSIAction action, int32_t actionAxis, double duration) PURE_VIRTUAL;
4035
4037 virtual RSIUserLimitTriggerType UserLimitTriggerTypeGet(int32_t number) PURE_VIRTUAL;
4038
4040 virtual RSIAction UserLimitActionGet(int32_t number) PURE_VIRTUAL;
4041
4043 virtual int32_t UserLimitAxisNumberGet(int32_t number) PURE_VIRTUAL;
4044
4046 virtual double UserLimitDurationGet(int32_t number) PURE_VIRTUAL;
4047
4049 virtual bool UserLimitSingleShotGet(int32_t number) PURE_VIRTUAL;
4050
4075 virtual void UserLimitConditionSet(int32_t number, int32_t conditionNumber, RSIUserLimitLogic logic, uint64_t addressOfUInt32, uint32_t userLimitMask, uint32_t limitValueUInt32) PURE_VIRTUAL;
4076
4098 virtual void UserLimitConditionSet(int32_t number, int32_t conditionNumber, RSIUserLimitLogic logic, uint64_t addressOfDouble, double limitValueDouble) PURE_VIRTUAL;
4099
4101 virtual RSIDataType UserLimitConditionDataTypeGet(int32_t number, int32_t conditionNumber) PURE_VIRTUAL;
4102
4104 virtual RSIUserLimitLogic UserLimitConditionLogicGet(int32_t number, int32_t conditionNumber) PURE_VIRTUAL;
4105
4107 virtual uint64_t UserLimitConditionAddressGet(int32_t number, int32_t conditionNumber) PURE_VIRTUAL;
4108
4110 virtual uint32_t UserLimitConditionMaskGet(int32_t number, int32_t conditionNumber) PURE_VIRTUAL;
4111
4113 virtual int32_t UserLimitConditionLimitValueGet(int32_t number, int32_t conditionNumber) PURE_VIRTUAL;
4114
4116 virtual double UserLimitConditionLimitValueDoubleGet(int32_t number, int32_t conditionNumber) PURE_VIRTUAL;
4117
4144 virtual void UserLimitOutputSet(int32_t number, uint32_t andMask, uint32_t orMask, uint64_t outputPtr, bool enabled) PURE_VIRTUAL;
4145
4148 virtual void UserLimitOutputSet(int32_t number, int32_t valueSet, uint64_t outputPtr, bool enabled) PURE_VIRTUAL;
4149
4152 virtual void UserLimitOutputSet(int32_t number, uint64_t andMask, uint64_t orMask, uint64_t outputPtr, bool enabled) PURE_VIRTUAL;
4153
4156 virtual void UserLimitOutputSet(int32_t number, double limitValueDouble, uint64_t outputPtr, bool enabled) PURE_VIRTUAL;
4157
4173 virtual void UserLimitOutputSet(int32_t number, RSIDataType dataType, uint64_t inputPtr, uint64_t outputPtr, bool enabled) PURE_VIRTUAL;
4174
4176 virtual bool UserLimitOutputEnableGet(int32_t number) PURE_VIRTUAL;
4177
4179 virtual RSIDataType UserLimitOutputDataTypeGet(int32_t number) PURE_VIRTUAL;
4180
4182 virtual uint64_t UserLimitOutputAddressGet(int32_t number) PURE_VIRTUAL;
4183
4185 virtual uint64_t UserLimitOutputInputAddressGet(int32_t number) PURE_VIRTUAL;
4186
4188 virtual uint32_t UserLimitOutputAndMaskGet(int32_t number) PURE_VIRTUAL;
4189
4191 virtual uint32_t UserLimitOutputOrMaskGet(int32_t number) PURE_VIRTUAL;
4192
4194 virtual int32_t UserLimitOutputValueGet(int32_t number) PURE_VIRTUAL;
4195
4197 virtual uint64_t UserLimitOutputAndMask64Get(int32_t number) PURE_VIRTUAL;
4198
4200 virtual uint64_t UserLimitOutputOrMask64Get(int32_t number) PURE_VIRTUAL;
4201
4202
4204 virtual double UserLimitOutputDoubleGet(int32_t number) PURE_VIRTUAL;
4205
4226 virtual bool UserLimitStateGet(int32_t number) PURE_VIRTUAL;
4227
4248 virtual bool UserLimitEnableGet(int32_t number) PURE_VIRTUAL;
4249
4251 virtual void UserLimitEnableSet(int32_t number, bool enable) PURE_VIRTUAL;
4252
4267 virtual void UserLimitDisable(int32_t number) PURE_VIRTUAL;
4268
4280 virtual void UserLimitReset(int32_t number) PURE_VIRTUAL;
4281
4290
4291 virtual int32_t UserLimitCountMax() PURE_VIRTUAL;
4292
4310 virtual void UserLimitInterruptUserDataAddressSet(int32_t number, uint32_t userDataIndex, uint64_t address) PURE_VIRTUAL;
4311
4313 virtual uint64_t UserLimitInterruptUserDataAddressGet(int32_t number, uint32_t userDataIndex) PURE_VIRTUAL;
4315
4316
4321
4331 virtual int32_t MathBlockCountGet() PURE_VIRTUAL;
4332
4343 virtual void MathBlockCountSet(int32_t mathBlockCount) PURE_VIRTUAL;
4344
4363
4365 virtual MathBlockConfig MathBlockConfigGet(int32_t mathBlockNumber) PURE_VIRTUAL;
4366
4368 virtual void MathBlockConfigSet(int32_t mathBlockNumber, MathBlockConfig& config) PURE_VIRTUAL;
4369
4371 virtual FirmwareValue MathBlockProcessValueGet(int32_t mathBlockNumber) PURE_VIRTUAL;
4372
4374
4375
4380
4383
4385};
4386
4390class RSI_API RapidCodeNetworkNode : public virtual RapidCodeObject {
4391public:
4392
4397
4399 static inline constexpr uint32_t SDOTimeoutMillisecondsDefault = 100;
4400
4402
4403
4408
4410 virtual bool Exists() PURE_VIRTUAL;
4411
4413 virtual RSINodeType TypeGet() PURE_VIRTUAL;
4414
4416 virtual bool IsEtherCAT() PURE_VIRTUAL;
4417
4427 virtual bool IsAKDASCIICommandSupported() PURE_VIRTUAL;
4428
4430 virtual bool IsSynqNet() PURE_VIRTUAL;
4431
4433
4438
4446 virtual bool HasIO() PURE_VIRTUAL;
4447
4457 virtual bool DigitalInGet(int32_t digitalInNumber) PURE_VIRTUAL;
4458
4468 virtual bool DigitalOutGet(int32_t digitalOutNumber) PURE_VIRTUAL;
4469
4478 virtual void DigitalOutSet(int32_t digitalOutNumber, bool state) PURE_VIRTUAL;
4479
4489 virtual int32_t AnalogInGet(int32_t analogChannel) PURE_VIRTUAL;
4490
4500 virtual int32_t AnalogOutGet(int32_t analogChannel) PURE_VIRTUAL;
4501
4510 virtual void AnalogOutSet(int32_t analogChannel, int32_t analogValue) PURE_VIRTUAL;
4511
4513
4517
4525 virtual int32_t DigitalInCountGet() PURE_VIRTUAL;
4526
4534 virtual int32_t DigitalOutCountGet() PURE_VIRTUAL;
4535
4543 virtual int32_t AnalogInCountGet() PURE_VIRTUAL;
4544
4552 virtual int32_t AnalogOutCountGet() PURE_VIRTUAL;
4553
4554
4556 virtual int32_t SegmentCountGet() PURE_VIRTUAL;
4557
4559 virtual int32_t SegmentDigitalInCountGet(int32_t segmentNumber) PURE_VIRTUAL;
4560
4562 virtual int32_t SegmentDigitalOutCountGet(int32_t segmentNumber) PURE_VIRTUAL;
4563
4565 virtual int32_t SegmentAnalogInCountGet(int32_t segmentNumber) PURE_VIRTUAL;
4566
4568 virtual int32_t SegmentAnalogOutCountGet(int32_t segmentNumber) PURE_VIRTUAL;
4569
4571 virtual int32_t SegmentIDGet(int32_t segmentNumber) PURE_VIRTUAL;
4572
4585 virtual uint64_t DigitalInAddressGet(int32_t bitNumber) PURE_VIRTUAL;
4586
4599 virtual int32_t DigitalInMaskGet(int32_t bitNumber) PURE_VIRTUAL;
4600
4613 virtual uint64_t DigitalOutAddressGet(int32_t bitNumber) PURE_VIRTUAL;
4614
4627 virtual int32_t DigitalOutMaskGet(int32_t bitNumber) PURE_VIRTUAL;
4628
4640 virtual uint64_t AnalogInAddressGet(int32_t channel) PURE_VIRTUAL;
4641
4653 virtual int32_t AnalogInMaskGet(int32_t channel) PURE_VIRTUAL;
4654
4666 virtual uint64_t AnalogOutAddressGet(int32_t channel) PURE_VIRTUAL;
4667
4679 virtual int32_t AnalogOutMaskGet(int32_t channel) PURE_VIRTUAL;
4680
4684 virtual int32_t DigitalInNetworkIndexGet(int32_t digitalInNumber) PURE_VIRTUAL;
4685
4689 virtual int32_t DigitalOutNetworkIndexGet(int32_t digitalOutNumber) PURE_VIRTUAL;
4690
4694 virtual int32_t AnalogInNetworkIndexGet(int32_t analogChannel) PURE_VIRTUAL;
4695
4699 virtual int32_t AnalogOutNetworkIndexGet(int32_t analogChannel) PURE_VIRTUAL;
4700
4719 virtual int32_t ServiceChannelRead(int32_t index, int32_t subIndex, int32_t byteCount, uint32_t timeoutMilliseconds = SDOTimeoutMillisecondsDefault) PURE_VIRTUAL;
4720
4736 virtual const char* const ServiceChannelReadString(int32_t index, int32_t subIndex, int32_t byteCount, uint32_t timeoutMilliseconds = SDOTimeoutMillisecondsDefault) PURE_VIRTUAL;
4737
4751 virtual RapidVector<uint8_t> ServiceChannelReadBytes(int32_t index, int32_t subIndex, int32_t byteCount, uint32_t timeoutMilliseconds) PURE_VIRTUAL;
4752
4771 virtual void ServiceChannelWrite(int32_t index, int32_t subIndex, int32_t byteCount, int32_t sdoValue, uint32_t timeoutMilliseconds = SDOTimeoutMillisecondsDefault) PURE_VIRTUAL;
4772
4788 virtual void ServiceChannelWrite(int32_t index, int32_t subIndex, int32_t byteCount, const char* const stringValue, uint32_t timeoutMilliseconds = SDOTimeoutMillisecondsDefault) PURE_VIRTUAL;
4789
4801 virtual void ServiceChannelWrite(int32_t index, int32_t subIndex, int32_t byteCount, RapidVector<uint8_t> bytes, uint32_t timeoutMilliseconds) PURE_VIRTUAL;
4802
4817 virtual char* AKDASCIICommand(const char* const command) PURE_VIRTUAL;
4818
4820 virtual void ClearFaults(int32_t axisNumber) PURE_VIRTUAL;
4821
4823 virtual uint32_t VendorIdGet() PURE_VIRTUAL;
4824
4837 virtual const char* const NameGet() PURE_VIRTUAL;
4838
4856 virtual const char* const ProductNameGet() PURE_VIRTUAL;
4857
4875 virtual const char* const VendorNameGet() PURE_VIRTUAL;
4876
4878 virtual uint32_t ProductCodeGet() PURE_VIRTUAL;
4879
4881 virtual uint32_t RevisionGet() PURE_VIRTUAL;
4882
4884 virtual uint32_t StationAliasGet() PURE_VIRTUAL;
4885
4887 virtual const char* const SerialNumberGet() PURE_VIRTUAL;
4888
4890 virtual uint32_t AxisCountGet() PURE_VIRTUAL;
4891
4893 virtual uint16_t StatusWordGet(int32_t axisIndex) PURE_VIRTUAL;
4894
4921
4932 virtual Status StatusGet() PURE_VIRTUAL;
4933
4947 virtual void StatusClear() PURE_VIRTUAL;
4948
4961 virtual uint64_t AddressGet(RSINetworkNodeAddressType addressType) PURE_VIRTUAL;
4962
4975
4983 struct Config {
4984 uint32_t SyncGroup;
4985 };
4986
4998 virtual Config ConfigGet() PURE_VIRTUAL;
4999
5026 virtual void ConfigSet(const Config& config) PURE_VIRTUAL;
5027
5032
5033 // The four pages defined below are the single source for the rules that every user label method
5034 // shares. Each method pulls one in with copydoc, so the rendered documentation for every label
5035 // method is complete on its own and the wording only has to be corrected in one place.
5036 // SWIG does not understand a page definition and would staple these paragraphs onto whatever
5037 // declaration comes next, so it is kept out of the generated C# and Python wrappers.
5038#ifndef SWIG
5039
5051
5062
5072
5079
5080#endif // SWIG
5081
5085 static inline constexpr int32_t UserLabelCharacterCountMaximum = 64;
5086
5090 static inline constexpr int32_t IoUserLabelBufferBytes = 65536;
5091
5122 virtual const char* const UserLabelGet() PURE_VIRTUAL;
5123
5157 virtual void UserLabelSet(const char* const userLabel) PURE_VIRTUAL;
5158
5196 virtual const char* const DigitalInUserLabelGet(int32_t digitalInNumber) PURE_VIRTUAL;
5197
5235 virtual void DigitalInUserLabelSet(int32_t digitalInNumber, const char* const userLabel) PURE_VIRTUAL;
5236
5271 virtual const char* const DigitalOutUserLabelGet(int32_t digitalOutNumber) PURE_VIRTUAL;
5272
5309 virtual void DigitalOutUserLabelSet(int32_t digitalOutNumber, const char* const userLabel) PURE_VIRTUAL;
5310
5345 virtual const char* const AnalogInUserLabelGet(int32_t analogChannel) PURE_VIRTUAL;
5346
5383 virtual void AnalogInUserLabelSet(int32_t analogChannel, const char* const userLabel) PURE_VIRTUAL;
5384
5419 virtual const char* const AnalogOutUserLabelGet(int32_t analogChannel) PURE_VIRTUAL;
5420
5458 virtual void AnalogOutUserLabelSet(int32_t analogChannel, const char* const userLabel) PURE_VIRTUAL;
5459
5496 virtual uint64_t IoUserLabelGenerationGet() PURE_VIRTUAL;
5497
5499};
5500
5502
5505class RSI_API RapidCodeMotion : public virtual RapidCodeInterrupt{
5506public:
5507
5509 static inline constexpr int32_t AmpEnableTimeoutMillisecondsDefault = 500;
5510
5512 static inline constexpr int32_t WaitForever = -1;
5513
5519
5522
5524
5525
5529
5547 virtual int32_t NumberGet() PURE_VIRTUAL;
5548
5565 virtual int32_t AxisCountGet() PURE_VIRTUAL;
5566
5570
5595 virtual void TriggeredModify() PURE_VIRTUAL;
5596
5623 virtual void Stop() PURE_VIRTUAL;
5624
5649 virtual void Resume() PURE_VIRTUAL;
5650
5675 virtual void EStop() PURE_VIRTUAL;
5676
5697 virtual void EStopAbort() PURE_VIRTUAL;
5698
5715 virtual void EStopModify() PURE_VIRTUAL;
5716
5719 virtual void EStopModifyAbort() PURE_VIRTUAL;
5720
5742 virtual void Abort() PURE_VIRTUAL;
5743
5770 virtual void ClearFaults() PURE_VIRTUAL;
5771
5810 virtual int32_t AmpEnableSet(bool enable, int32_t ampActiveTimeoutMilliseconds = AmpEnableTimeoutMillisecondsDefault, bool overrideRestrictedState = false) PURE_VIRTUAL;
5811
5822 virtual bool AmpEnableGet() PURE_VIRTUAL;
5823
5843
5844 virtual void Map() PURE_VIRTUAL;
5845
5863 virtual void Unmap() PURE_VIRTUAL;
5864
5869 virtual bool IsMapped() PURE_VIRTUAL;
5870
5887 virtual void FeedRateSet(double rate) PURE_VIRTUAL;
5888
5907 virtual double FeedRateGet() PURE_VIRTUAL;
5908
5912
5913
5914
5915
5935 virtual RSIState StateGet() PURE_VIRTUAL;
5936
5964 virtual RSISource SourceGet() PURE_VIRTUAL;
5965
5990 virtual const char* const SourceNameGet(RSISource source) PURE_VIRTUAL;
5991
6020 virtual int32_t MotionDoneWait(int32_t waitTimeoutMilliseconds = WaitForever) PURE_VIRTUAL;
6021
6042 virtual bool MotionDoneGet() PURE_VIRTUAL;
6043
6066 virtual bool StatusBitGet(RSIEventType bitMask) PURE_VIRTUAL;
6067
6082 virtual uint64_t StatusBitsGet() PURE_VIRTUAL;
6083
6087
6116 virtual void InterruptEnableSet(bool enable) PURE_VIRTUAL;
6117
6131 virtual void InterruptWake() PURE_VIRTUAL;
6132
6136
6152 virtual double StopTimeGet() PURE_VIRTUAL;
6153
6169 virtual void StopTimeSet(double seconds) PURE_VIRTUAL;
6170
6186 virtual double EStopTimeGet() PURE_VIRTUAL;
6187
6203 virtual void EStopTimeSet(double seconds) PURE_VIRTUAL;
6204
6221 virtual double MotionDelayGet() PURE_VIRTUAL;
6222
6243 virtual void MotionDelaySet(double seconds) PURE_VIRTUAL;
6244
6265 virtual uint16_t MotionIdGet() PURE_VIRTUAL;
6266
6284 virtual void MotionIdSet(uint16_t id) PURE_VIRTUAL;
6285
6287 virtual uint16_t MotionIdExecutingGet() PURE_VIRTUAL;
6288
6290 virtual uint16_t MotionElementIdExecutingGet() PURE_VIRTUAL;
6291
6306 virtual double MotionFinalVelocityGet() PURE_VIRTUAL;
6307
6315 virtual void MotionFinalVelocitySet(double finalVelocity) PURE_VIRTUAL;
6316
6336 virtual RSIMotionHoldType MotionHoldTypeGet() PURE_VIRTUAL;
6337
6370 virtual void MotionHoldTypeSet(RSIMotionHoldType type) PURE_VIRTUAL;
6371
6383 virtual int32_t MotionHoldGateNumberGet() PURE_VIRTUAL;
6384
6403
6404 virtual void MotionHoldGateNumberSet(int32_t gateNumber) PURE_VIRTUAL;
6405
6422 virtual double MotionHoldTimeoutGet() PURE_VIRTUAL;
6423
6442 virtual void MotionHoldTimeoutSet(double seconds) PURE_VIRTUAL;
6443
6467 virtual bool MotionHoldGateGet() PURE_VIRTUAL;
6468
6491 virtual void MotionHoldGateSet(bool hold) PURE_VIRTUAL;
6492
6509 virtual int32_t MotionHoldAxisNumberGet() PURE_VIRTUAL;
6510
6527 virtual void MotionHoldAxisNumberSet(int32_t number) PURE_VIRTUAL;
6528
6545
6546 virtual double MotionHoldAxisPositionGet() PURE_VIRTUAL;
6547
6564 virtual void MotionHoldAxisPositionSet(double position) PURE_VIRTUAL;
6565
6568
6570 virtual void MotionHoldAxisLogicSet(RSIUserLimitLogic logic) PURE_VIRTUAL;
6571
6588 virtual uint64_t MotionHoldUserAddressGet() PURE_VIRTUAL;
6589
6606 virtual void MotionHoldUserAddressSet(uint64_t address) PURE_VIRTUAL;
6607
6623 virtual int32_t MotionHoldUserMaskGet() PURE_VIRTUAL;
6624
6640 virtual void MotionHoldUserMaskSet(int32_t holdMask) PURE_VIRTUAL;
6641
6657 virtual int32_t MotionHoldUserPatternGet() PURE_VIRTUAL;
6658
6674 virtual void MotionHoldUserPatternSet(int32_t pattern) PURE_VIRTUAL;
6675
6677 virtual void MotionAttributeMaskDefaultSet() PURE_VIRTUAL;
6678
6703
6704 virtual bool MotionAttributeMaskOnGet(RSIMotionAttrMask maskOn) PURE_VIRTUAL;
6705
6724 virtual void MotionAttributeMaskOnSet(RSIMotionAttrMask maskOn) PURE_VIRTUAL;
6725
6742
6743 virtual void MotionAttributeMaskOffSet(RSIMotionAttrMask maskOff) PURE_VIRTUAL;
6744
6748
6749
6750
6786 virtual void MovePT(RSIMotionType type, const double* const position, const double* const time, int32_t pointCount, int32_t emptyCount, bool retain, bool final) PURE_VIRTUAL;
6787
6825 virtual void MovePVT(const double* const position, const double* const velocity, const double* const time, int32_t pointCount, int32_t emptyCount, bool retain, bool final) PURE_VIRTUAL;
6826
6856 virtual void MovePVAJT(const double* const position, const double* const velocity, const double* const acceleration, const double* const jerk, const double* const time, int32_t pointCount, int32_t emptyCount, bool retain, bool final) PURE_VIRTUAL;
6857
6894 virtual void MovePTF(const double* const position, const double* const time, const double* const feedforward, int32_t pointCount, int32_t emptyCount, bool retain, bool final) PURE_VIRTUAL;
6895
6936 virtual void MovePVTF(const double* const position, const double* const velocity, const double* const time, const double* const feedforward, int32_t pointCount, int32_t emptyCount, bool retain, bool final) PURE_VIRTUAL;
6937
6942 virtual void StreamingOutputAdd(int32_t onMask, int32_t offMask, uint64_t address) PURE_VIRTUAL;
6943
6971 virtual void StreamingOutputAdd(int32_t onMask, int32_t offMask, uint64_t address, int32_t ptPointIndex) PURE_VIRTUAL;
6972
6977 virtual void StreamingOutputAdd(RapidCode::IOPoint* point, bool on) PURE_VIRTUAL;
6978
6996 virtual void StreamingOutputAdd(RapidCode::IOPoint* point, bool on, int32_t ptPointIndex) PURE_VIRTUAL;
6997
7016 virtual void StreamingOutputsClear() PURE_VIRTUAL;
7017
7039 virtual void StreamingOutputsEnableSet(bool enable) PURE_VIRTUAL;
7040};
7041
7042
7047class RSI_API Axis : public virtual RapidCodeMotion{
7048public:
7049
7050 friend class MotionController;
7051 friend class MultiAxis;
7052
7053
7058
7060 static inline constexpr uint32_t NetworkIndexInvalid = 65535;
7061
7063 static inline constexpr double AmpEnableAmpFaultTimeoutSecondsDefault = 1.0;
7064
7066
7067
7072
7077 RapidCodeNetworkNode* NetworkNode;
7078
7079
7081
7086
7124 virtual void MoveTrapezoidal(double position, double vel, double accel, double decel) PURE_VIRTUAL;
7125
7147 virtual void MoveTrapezoidal(double position, double vel, double accel, double decel, double finalVel) PURE_VIRTUAL;
7148
7171 virtual void MoveTrapezoidal(double position) PURE_VIRTUAL; // use defaults Overload
7172
7180
7181 virtual void MoveSCurve(double position, double vel, double accel, double decel, double jerkPct) PURE_VIRTUAL;
7182
7192 virtual void MoveSCurve(double position) PURE_VIRTUAL;
7193
7197 virtual void MoveSCurve(double position, double vel, double accel, double decel, double jerkPct, double finalVel) PURE_VIRTUAL;
7198
7202 virtual void MoveVelocity(double velocity) PURE_VIRTUAL;
7203
7238 virtual void MoveVelocity(double velocity, double accel) PURE_VIRTUAL;
7239
7277 virtual void MoveVelocitySCurve(double velocity, double accel, double jerkPct) PURE_VIRTUAL;
7278
7320 virtual void MoveRelative(double relativePosition, double vel, double accel, double decel, double jerkPct) PURE_VIRTUAL;
7321
7328 virtual void MoveRelative(double relativePosition) PURE_VIRTUAL;
7329
7335 virtual void MoveRelative(double relativePosition, double vel, double accel, double decel, double jerkPct, double finalVel) PURE_VIRTUAL;
7337
7342
7367 virtual void PositionSet(double position) PURE_VIRTUAL;
7368
7387 virtual double ActualPositionGet() PURE_VIRTUAL;
7388
7410 virtual void ActualPositionSet(double position) PURE_VIRTUAL;
7411
7428 virtual double CompensationPositionGet() PURE_VIRTUAL;
7429
7442 virtual void CompensationPositionSet(double position) PURE_VIRTUAL;
7443
7455 virtual double TargetPositionGet() PURE_VIRTUAL;
7456
7476 virtual double CommandPositionGet() PURE_VIRTUAL;
7477
7509 virtual void CommandPositionSet(double position) PURE_VIRTUAL;
7510
7535 virtual void CommandPositionDirectSet(double position) PURE_VIRTUAL;
7536
7553 virtual double OriginPositionGet() PURE_VIRTUAL;
7554
7577 virtual void OriginPositionSet(double position) PURE_VIRTUAL;
7578
7599 virtual double PositionErrorGet() PURE_VIRTUAL;
7600
7622 virtual double CommandVelocityGet() PURE_VIRTUAL;
7623
7646 virtual double ActualVelocityGet() PURE_VIRTUAL;
7647
7668 virtual double CommandAccelGet() PURE_VIRTUAL;
7669
7671 virtual double CommandJerkGet() PURE_VIRTUAL;
7672
7693 virtual double EncoderPositionGet(RSIMotorFeedback encoder) PURE_VIRTUAL;
7694
7716 virtual double UserUnitsGet() PURE_VIRTUAL;
7717
7740 virtual void UserUnitsSet(double countsPerUserUnit) PURE_VIRTUAL;
7741
7743 virtual double UserUnitsToCounts(double userUnits) PURE_VIRTUAL;
7744
7746 virtual double CountsToUserUnits(double counts) PURE_VIRTUAL;
7747
7767 virtual int32_t FramesToExecuteGet() PURE_VIRTUAL;
7769
7774
7795 virtual void Home(bool moveToZero = true) PURE_VIRTUAL;
7796
7815
7816 virtual RSIHomeMethod HomeMethodGet() PURE_VIRTUAL;
7817
7836
7837 virtual void HomeMethodSet(RSIHomeMethod method) PURE_VIRTUAL;
7838
7859
7860 virtual double HomeOffsetGet() PURE_VIRTUAL;
7861
7906 virtual void HomeOffsetSet(double offset) PURE_VIRTUAL;
7907
7926 virtual double HomeVelocityGet(RSIHomeStage homeStage = RSIHomeStage::RSIHomeStageSTAGE_ONE) PURE_VIRTUAL;
7927
7948 virtual void HomeVelocitySet(double velocity) PURE_VIRTUAL;
7949
7954 virtual void HomeVelocitySet(RSIHomeStage homeStage, double velocity) PURE_VIRTUAL;
7955
7971 virtual double HomeSlowVelocityGet() PURE_VIRTUAL;
7972
7988 virtual void HomeSlowVelocitySet(double velocity) PURE_VIRTUAL;
7989
8008 virtual double HomeAccelerationGet(RSIHomeStage homeStage = RSIHomeStage::RSIHomeStageSTAGE_ONE) PURE_VIRTUAL;
8009
8029
8030 virtual void HomeAccelerationSet(double accel) PURE_VIRTUAL;
8031
8035 virtual void HomeAccelerationSet(RSIHomeStage homeStage, double accel) PURE_VIRTUAL;
8036
8054 virtual double HomeDecelerationGet(RSIHomeStage homeStage = RSIHomeStage::RSIHomeStageSTAGE_ONE) PURE_VIRTUAL;
8055
8074
8075 virtual void HomeDecelerationSet(double decel) PURE_VIRTUAL;
8076
8080 virtual void HomeDecelerationSet(RSIHomeStage homeStage, double decel) PURE_VIRTUAL;
8081
8100 virtual double HomeJerkPercentGet(RSIHomeStage homeStage = RSIHomeStage::RSIHomeStageSTAGE_ONE) PURE_VIRTUAL;
8101
8121 virtual void HomeJerkPercentSet(double percent) PURE_VIRTUAL;
8122
8127 virtual void HomeJerkPercentSet(RSIHomeStage homeStage, double percent) PURE_VIRTUAL;
8128
8148 virtual void HomeCancelSet(bool cancel) PURE_VIRTUAL;
8149
8168 virtual bool HomeStateGet() PURE_VIRTUAL;
8169
8182 virtual void HomeStateSet(bool homed) PURE_VIRTUAL;
8183
8188 virtual void HomeLimitCustomConfigSet(uint64_t address, int32_t bitIndex) PURE_VIRTUAL;
8189
8191 virtual void HomeLimitCustomConfigReset() PURE_VIRTUAL;
8192
8194 virtual uint64_t HomeLimitCustomConfigAddressGet() PURE_VIRTUAL;
8195
8198 virtual int32_t HomeLimitCustomConfigBitIndexGet() PURE_VIRTUAL;
8199
8221
8222 virtual void HomeTravelDistanceSet(RSIHomeStage stage, double distanceToTravel) PURE_VIRTUAL;
8223
8243 virtual RSIHomeStage HomeStageGet() PURE_VIRTUAL;
8244
8258 virtual void HomeBehaviorSet(RSIAction behavior) PURE_VIRTUAL;
8259
8271 virtual RSIAction HomeBehaviorGet() PURE_VIRTUAL;
8273
8279
8281 virtual bool FaultMaskBitGet(RSIMotorFaultMask bitMask) PURE_VIRTUAL;
8282
8284 virtual uint16_t StatusWordGet() PURE_VIRTUAL;
8286
8291 // reads active configuration to report state
8292
8316
8317 virtual bool NegativeLimitGet() PURE_VIRTUAL;
8318
8342 virtual bool PositiveLimitGet() PURE_VIRTUAL;
8343
8372 virtual bool HomeLimitGet() PURE_VIRTUAL;
8373
8401 virtual bool HomeSwitchGet() PURE_VIRTUAL;
8402
8423 virtual bool AmpFaultGet() PURE_VIRTUAL;
8424
8448 virtual bool AmpEnableGet() PURE_VIRTUAL;
8449
8474 virtual bool DedicatedInExists(RSIMotorDedicatedIn motorDedicatedInNumber) PURE_VIRTUAL;
8475
8500 virtual bool DedicatedOutExists(RSIMotorDedicatedOut motorDedicatedOutNumber) PURE_VIRTUAL;
8501
8524 virtual bool DedicatedInGet(RSIMotorDedicatedIn motorDedicatedInNumber) PURE_VIRTUAL;
8525
8547 virtual uint32_t DedicatedInputsGet() PURE_VIRTUAL;
8548
8571 virtual bool DedicatedOutGet(RSIMotorDedicatedOut motorDedicatedOutNumber) PURE_VIRTUAL;
8572
8594 virtual uint32_t DedicatedOutputsGet() PURE_VIRTUAL;
8596
8601
8622 virtual bool DigitalInGet(RSIMotorGeneralIo motorGeneralIoNumber) PURE_VIRTUAL;
8623
8641 virtual uint32_t DigitalInputsGet() PURE_VIRTUAL;
8642
8663 virtual bool DigitalOutGet(RSIMotorGeneralIo motorGeneralIoNumber) PURE_VIRTUAL;
8664
8682 virtual uint32_t DigitalOutputsGet() PURE_VIRTUAL;
8683
8704
8705 virtual void DigitalOutSet(RSIMotorGeneralIo motorGeneralIoNumber, bool outValue) PURE_VIRTUAL;
8706
8725 virtual bool DigitalIoExists(RSIMotorGeneralIo motorGeneralIoNumber) PURE_VIRTUAL;
8726
8745 virtual const char* const DigitalIoNameGet(RSIMotorGeneralIo motorGeneralIoNumber) PURE_VIRTUAL;
8746
8769 virtual RSIMotorIoTypeMask DigitalIoValidTypesMaskGet(RSIMotorGeneralIo motorGeneralIoNumber) PURE_VIRTUAL;
8770
8789 virtual void DigitalIoTypeSet(RSIMotorGeneralIo motorGeneralIoNumber, RSIMotorIoType type) PURE_VIRTUAL;
8790
8807 virtual double AnalogInGet(int32_t channel) PURE_VIRTUAL;
8809
8814
8828 virtual double EStopDecelerationGet() PURE_VIRTUAL;
8829
8844 virtual void EStopDecelerationSet(double decel) PURE_VIRTUAL;
8845
8856 virtual double EStopJerkPercentGet() PURE_VIRTUAL;
8857
8875 virtual void EStopJerkPercentSet(double jerkPct) PURE_VIRTUAL;
8876
8886 virtual double TriggeredModifyDecelerationGet() PURE_VIRTUAL;
8887
8905 virtual void TriggeredModifyDecelerationSet(double decel) PURE_VIRTUAL;
8906
8917 virtual double TriggeredModifyJerkPercentGet() PURE_VIRTUAL;
8918
8936 virtual void TriggeredModifyJerkPercentSet(double jerkPct) PURE_VIRTUAL;
8937
8939 virtual int32_t FrameBufferSizeGet() PURE_VIRTUAL;
8940
8942 virtual void FrameBufferSizeSet(int32_t frameSize) PURE_VIRTUAL;
8943
8963 virtual uint16_t MotionIdExecutingGet() PURE_VIRTUAL;
8964
8985 virtual uint16_t MotionElementIdExecutingGet() PURE_VIRTUAL;
8987
8992
8994 virtual double MotionFinalVelocityGet() PURE_VIRTUAL;
8995
8997 virtual void MotionFinalVelocitySet(double finalVelocity) PURE_VIRTUAL;
8998
9000 virtual double DefaultVelocityGet() PURE_VIRTUAL;
9001
9003 virtual void DefaultVelocitySet(double velocity) PURE_VIRTUAL;
9004
9006 virtual double DefaultAccelerationGet() PURE_VIRTUAL;
9007
9009 virtual void DefaultAccelerationSet(double acceleration) PURE_VIRTUAL;
9010
9012 virtual double DefaultDecelerationGet() PURE_VIRTUAL;
9013
9015 virtual void DefaultDecelerationSet(double deceleration) PURE_VIRTUAL;
9016
9018 virtual double DefaultJerkPercentGet() PURE_VIRTUAL;
9019
9021 virtual void DefaultJerkPercentSet(double jerkPercent) PURE_VIRTUAL;
9022
9024 virtual double DefaultPosition1Get() PURE_VIRTUAL;
9025
9027 virtual void DefaultPosition1Set(double position1) PURE_VIRTUAL;
9028
9030 virtual double DefaultPosition2Get() PURE_VIRTUAL;
9031
9033 virtual void DefaultPosition2Set(double position2) PURE_VIRTUAL;
9034
9036 virtual double DefaultRelativeIncrementGet() PURE_VIRTUAL;
9037
9039 virtual void DefaultRelativeIncrementSet(double relativeIncrement) PURE_VIRTUAL;
9041
9045 // /@{
9046
9069 virtual RSIAction AmpFaultActionGet() PURE_VIRTUAL;
9070
9093 virtual void AmpFaultActionSet(RSIAction action) PURE_VIRTUAL;
9094
9116 virtual bool AmpFaultTriggerStateGet() PURE_VIRTUAL;
9117
9139 virtual void AmpFaultTriggerStateSet(bool state) PURE_VIRTUAL;
9140
9161 virtual double AmpFaultDurationGet() PURE_VIRTUAL;
9162
9183 virtual void AmpFaultDurationSet(double seconds) PURE_VIRTUAL;
9184
9209 virtual RSIAction HomeActionGet() PURE_VIRTUAL;
9210
9234 virtual void HomeActionSet(RSIAction action) PURE_VIRTUAL;
9235
9261 virtual bool HomeTriggerStateGet() PURE_VIRTUAL;
9262
9283 virtual void HomeTriggerStateSet(bool state) PURE_VIRTUAL;
9284
9306 virtual double HomeDurationGet() PURE_VIRTUAL;
9307
9330 virtual void HomeDurationSet(double seconds) PURE_VIRTUAL;
9331
9360 virtual RSIAction ErrorLimitActionGet() PURE_VIRTUAL;
9361
9388 virtual void ErrorLimitActionSet(RSIAction action) PURE_VIRTUAL;
9389
9412 virtual double ErrorLimitTriggerValueGet() PURE_VIRTUAL;
9413
9435 virtual void ErrorLimitTriggerValueSet(double triggerValue) PURE_VIRTUAL;
9436
9458 virtual double ErrorLimitDurationGet() PURE_VIRTUAL;
9459
9482 virtual void ErrorLimitDurationSet(double seconds) PURE_VIRTUAL;
9483
9508 virtual RSIAction HardwareNegLimitActionGet() PURE_VIRTUAL;
9509
9534 virtual void HardwareNegLimitActionSet(RSIAction action) PURE_VIRTUAL;
9535
9559 virtual bool HardwareNegLimitTriggerStateGet() PURE_VIRTUAL;
9560
9584 virtual void HardwareNegLimitTriggerStateSet(bool state) PURE_VIRTUAL;
9585
9608 virtual double HardwareNegLimitDurationGet() PURE_VIRTUAL;
9609
9633 virtual void HardwareNegLimitDurationSet(double seconds) PURE_VIRTUAL;
9634
9659 virtual RSIAction HardwarePosLimitActionGet() PURE_VIRTUAL;
9660
9685 virtual void HardwarePosLimitActionSet(RSIAction action) PURE_VIRTUAL;
9686
9707 virtual bool HardwarePosLimitTriggerStateGet() PURE_VIRTUAL;
9708
9732 virtual void HardwarePosLimitTriggerStateSet(bool state) PURE_VIRTUAL;
9733
9756 virtual double HardwarePosLimitDurationGet() PURE_VIRTUAL;
9757
9780 virtual void HardwarePosLimitDurationSet(double seconds) PURE_VIRTUAL;
9781
9807 virtual RSIAction SoftwareNegLimitActionGet() PURE_VIRTUAL;
9808
9832 virtual void SoftwareNegLimitActionSet(RSIAction action) PURE_VIRTUAL;
9833
9856 virtual double SoftwareNegLimitTriggerValueGet() PURE_VIRTUAL;
9857
9880 virtual void SoftwareNegLimitTriggerValueSet(double triggerValue) PURE_VIRTUAL;
9881
9905 virtual RSIAction SoftwarePosLimitActionGet() PURE_VIRTUAL;
9906
9930 virtual void SoftwarePosLimitActionSet(RSIAction action) PURE_VIRTUAL;
9931
9954 virtual double SoftwarePosLimitTriggerValueGet() PURE_VIRTUAL;
9955
9978 virtual void SoftwarePosLimitTriggerValueSet(double triggerValue) PURE_VIRTUAL;
9979
10005 virtual RSIAction EncoderFaultActionGet() PURE_VIRTUAL;
10006
10031 virtual void EncoderFaultActionSet(RSIAction action) PURE_VIRTUAL;
10032
10056 virtual RSIMotorFeedbackFault EncoderFaultTriggerGet() PURE_VIRTUAL;
10057
10079 virtual void EncoderFaultTriggerSet(RSIMotorFeedbackFault encoder) PURE_VIRTUAL;
10080
10102 virtual double EncoderFaultDurationGet() PURE_VIRTUAL;
10103
10125 virtual void EncoderFaultDurationSet(double seconds) PURE_VIRTUAL;
10126
10128 virtual RSIAction NodeFailureActionGet() PURE_VIRTUAL;
10129
10131 virtual void NodeFailureActionSet(RSIAction action) PURE_VIRTUAL;
10132
10143 virtual RSIAction SyncGroupFaultActionGet() PURE_VIRTUAL;
10144
10180 virtual void SyncGroupFaultActionSet(RSIAction action) PURE_VIRTUAL;
10181
10197 virtual uint64_t AddressGet( RSIAxisAddressType addressType) PURE_VIRTUAL;
10198
10212 virtual RSIDataType AddressDataTypeGet(RSIAxisAddressType type) PURE_VIRTUAL;
10213
10214 // common limit methods
10215
10217 virtual RSIAction LimitActionGet(RSIEventType limit) PURE_VIRTUAL;
10218
10220 virtual void LimitActionSet(RSIEventType limit, RSIAction action) PURE_VIRTUAL;
10221
10223 virtual bool LimitTriggerStateGet(RSIEventType limit) PURE_VIRTUAL;
10224
10226 virtual void LimitTriggerStateSet(RSIEventType limit, bool triggerState) PURE_VIRTUAL;
10227
10229 virtual double LimitTriggerValueGet(RSIEventType limit) PURE_VIRTUAL;
10230
10232 virtual void LimitTriggerValueSet(RSIEventType limit, double triggerValue) PURE_VIRTUAL;
10233
10235 virtual double LimitDurationGet(RSIEventType limit) PURE_VIRTUAL;
10236
10238 virtual void LimitDurationSet(RSIEventType limit, double seconds) PURE_VIRTUAL;
10240
10245
10259 virtual double PositionToleranceFineGet() PURE_VIRTUAL;
10260
10274 virtual void PositionToleranceFineSet(double tolerance) PURE_VIRTUAL;
10275
10289 virtual double PositionToleranceCoarseGet() PURE_VIRTUAL;
10290
10307 virtual void PositionToleranceCoarseSet(double tolerance) PURE_VIRTUAL;
10308
10322 virtual double VelocityToleranceGet() PURE_VIRTUAL;
10323
10337 virtual void VelocityToleranceSet(double tolerance) PURE_VIRTUAL;
10338
10353 virtual double SettlingTimeGet() PURE_VIRTUAL;
10354
10369 virtual void SettlingTimeSet(double time) PURE_VIRTUAL;
10370
10387 virtual bool SettleOnStopGet() PURE_VIRTUAL;
10388
10405
10406 virtual void SettleOnStopSet(bool state) PURE_VIRTUAL;
10407
10424 virtual bool SettleOnEStopGet() PURE_VIRTUAL;
10425
10441 virtual void SettleOnEStopSet(bool state) PURE_VIRTUAL;
10442
10459 virtual bool SettleOnEStopCmdEqActGet() PURE_VIRTUAL;
10460
10476 virtual void SettleOnEStopCmdEqActSet(bool state) PURE_VIRTUAL;
10478
10483
10500 virtual RSIMotorType MotorTypeGet() PURE_VIRTUAL;
10501
10517 virtual void MotorTypeSet(RSIMotorType type) PURE_VIRTUAL;
10518
10535 virtual RSIMotorDisableAction AmpDisableActionGet() PURE_VIRTUAL;
10536
10554 virtual void AmpDisableActionSet(RSIMotorDisableAction action) PURE_VIRTUAL;
10555
10573
10574 virtual RSIMotorBrakeMode BrakeModeGet() PURE_VIRTUAL;
10575
10591 virtual void BrakeModeSet(RSIMotorBrakeMode mode) PURE_VIRTUAL;
10592
10608 virtual double BrakeApplyDelayGet() PURE_VIRTUAL;
10609
10610
10627 virtual void BrakeApplyDelaySet(double seconds) PURE_VIRTUAL;
10628
10644 virtual double BrakeReleaseDelayGet() PURE_VIRTUAL;
10645
10663 virtual void BrakeReleaseDelaySet(double seconds) PURE_VIRTUAL;
10664
10666 virtual void ClosedLoopStepperSet(bool enable) PURE_VIRTUAL;
10667
10669 virtual int32_t ClosedLoopStepperVersionGet() PURE_VIRTUAL;
10670
10672 virtual uint64_t EncoderPointerGet(RSIMotorFeedback encoder) PURE_VIRTUAL;
10673
10675 virtual void EncoderPointerSet(RSIMotorFeedback encoder, uint64_t address) PURE_VIRTUAL;
10676
10678 virtual uint64_t FeedbackDeltaPointerGet(RSIAxisPositionInput input) PURE_VIRTUAL;
10679
10680
10682 virtual void FeedbackDeltaPointerSet(RSIAxisPositionInput input, uint64_t address) PURE_VIRTUAL;
10683
10685 virtual uint64_t FeedbackPointerGet(RSIAxisPositionInput input) PURE_VIRTUAL;
10686
10704 virtual void FeedbackPointerSet(RSIAxisPositionInput input, uint64_t address) PURE_VIRTUAL;
10705
10707 virtual int32_t EncoderRatioNumeratorGet(RSIMotorFeedback encoder) PURE_VIRTUAL;
10708
10710 virtual int32_t EncoderRatioDenominatorGet(RSIMotorFeedback encoder) PURE_VIRTUAL;
10711
10733 virtual void EncoderRatioSet(RSIMotorFeedback encoder, int32_t numerator, int32_t denominator) PURE_VIRTUAL;
10734
10736 virtual const char* const EncoderRatioPrimaryGet() PURE_VIRTUAL;
10737
10739 virtual void EncoderRatioPrimarySet(char* numeratorCommaDenominator) PURE_VIRTUAL;
10740
10742 virtual const char* const EncoderRatioSecondaryGet() PURE_VIRTUAL;
10743
10745 virtual void EncoderRatioSecondarySet(char* numeratorCommaDenominator) PURE_VIRTUAL;
10746
10748 virtual int32_t EncoderCountGet() PURE_VIRTUAL;
10749
10752 virtual void EncoderCountSet(int32_t count) PURE_VIRTUAL;
10753
10755 virtual RSIAxisGantryType GantryTypeGet() PURE_VIRTUAL;
10756
10758 virtual void GantryTypeSet(RSIAxisGantryType type) PURE_VIRTUAL;
10759
10778 virtual RSIOperationMode OperationModeGet() PURE_VIRTUAL;
10779
10799 virtual void OperationModeSet(RSIOperationMode mode) PURE_VIRTUAL;
10800
10820 virtual int32_t MotorFaultMaskGet() PURE_VIRTUAL;
10821
10847 virtual void MotorFaultMaskSet(int32_t faultMask) PURE_VIRTUAL;
10849
10854
10875 virtual void GearingEnable(int32_t masterAxisNumber, RSIAxisMasterType masterFeedbackSource, int32_t numerator, int32_t denominator) PURE_VIRTUAL;
10880 virtual void GearingEnable(Axis* masterAxis, RSIAxisMasterType masterFeedbackSource, int32_t numerator, int32_t denominator) PURE_VIRTUAL;
10881
10900 virtual void GearingRatioChange(int32_t numerator, int32_t denominator) PURE_VIRTUAL;
10901
10918 virtual void GearingDisable() PURE_VIRTUAL;
10919
10921 virtual int32_t GearingNumeratorGet() PURE_VIRTUAL;
10922
10924 virtual int32_t GearingDenominatorGet() PURE_VIRTUAL;
10925
10927 virtual bool GearingEnableGet() PURE_VIRTUAL;
10928
10946 virtual int32_t GearingMasterAxisNumberGet() PURE_VIRTUAL;
10947
10960 virtual RSIAxisMasterType GearingSourceGet() PURE_VIRTUAL;
10962
10967
10984 virtual double MotionCamMasterStartGet(Axis* master) PURE_VIRTUAL;
10985
11000 virtual void MotionCamMasterStartSet(Axis* master, double startPosition) PURE_VIRTUAL;
11001
11018 virtual int32_t MotionCamRepeatFromGet() PURE_VIRTUAL;
11019
11037 virtual void MotionCamRepeatFromSet(int32_t repeatFrom) PURE_VIRTUAL;
11038
11056 virtual void MotionCamRepeatStop() PURE_VIRTUAL;
11057
11079 virtual void MoveCamLinear(int32_t masterAxisNumber, RSIAxisMasterType masterFeedbackSource, const double* const masterDistances, const double* const slavePositions, int32_t pointCount) PURE_VIRTUAL;
11080
11110 virtual void MoveCamCubic(int32_t masterAxisNumber, RSIAxisMasterType masterFeedbackSource, const double* const masterDistances, const double* const slavePositions, const double* const gearRatios, int32_t pointCount) PURE_VIRTUAL;
11111
11128
11129 virtual int32_t DriveIndexGet() PURE_VIRTUAL;
11131
11136
11149 virtual double BacklashWidthGet() PURE_VIRTUAL;
11150
11163 virtual void BacklashWidthSet(double width) PURE_VIRTUAL;
11164
11177 virtual double BacklashRateGet() PURE_VIRTUAL;
11178
11191 virtual void BacklashRateSet(double rate) PURE_VIRTUAL;
11192
11193
11204 virtual double BacklashValueGet() PURE_VIRTUAL;
11206
11211
11239 virtual RSIFilterAlgorithm FilterAlgorithmGet() PURE_VIRTUAL;
11240
11265 virtual void FilterAlgorithmSet(RSIFilterAlgorithm algorithm) PURE_VIRTUAL;
11266
11292 virtual double FilterCoeffGet(RSIFilterGainPIDCoeff coeff, int32_t gainTable) PURE_VIRTUAL;
11293
11316 virtual void FilterCoeffSet(RSIFilterGainPIDCoeff coeff, int32_t gainTable, double coeffValue) PURE_VIRTUAL;
11317
11320 virtual double FilterCoeffGet(RSIFilterGainPIVCoeff coeff, int32_t gainTable) PURE_VIRTUAL;
11325 virtual void FilterCoeffSet(RSIFilterGainPIVCoeff coeff, int32_t gainTable, double coeffValue) PURE_VIRTUAL;
11326
11361 virtual int32_t FilterGainTableGet() PURE_VIRTUAL;
11362
11391 virtual void FilterGainTableSet(int32_t gainTable) PURE_VIRTUAL;
11392
11409 virtual int32_t FilterGainTableSizeGet() PURE_VIRTUAL;
11410
11412 virtual double FilterOutputGet(void) PURE_VIRTUAL;
11413
11426 virtual double FilterLowPassGet() PURE_VIRTUAL;
11427
11443 virtual void FilterLowPassSet(double frequency) PURE_VIRTUAL;
11444
11463 virtual void FilterDualLoopSet(Axis* velocityAxis, RSIMotorFeedback velocityEncoder, bool enable) PURE_VIRTUAL;
11464
11465
11467 virtual bool FilterGainSchedulingGet() PURE_VIRTUAL;
11468
11469
11471 virtual void FilterGainSchedulingSet(bool enable) PURE_VIRTUAL;
11472
11474 virtual bool IsTuneable() PURE_VIRTUAL;
11475
11492 virtual void PostFilterLowPassSet(int32_t sectionNumber, double frequency) PURE_VIRTUAL;
11493
11509 virtual void PostFilterUnityGainSet(int32_t sectionNumber) PURE_VIRTUAL;
11510
11529 virtual void PostFilterSingleOrderSet(int32_t sectionNumber, double aOne, double bZero, double bOne) PURE_VIRTUAL;
11530
11546 virtual void PostFilterHighPassSet(int32_t sectionNumber, double cornerFreq) PURE_VIRTUAL;
11547
11565 virtual void PostFilterNotchSet(int32_t sectionNumber, double centerFreq, double bandwidth) PURE_VIRTUAL;
11566
11585 virtual void PostFilterResonatorSet(int32_t sectionNumber, double centerFreq, double bandwidth, double gain) PURE_VIRTUAL;
11586
11605 virtual void PostFilterLeadLagSet(int32_t sectionNumber, double lowGain, double highGain, double centerFreq) PURE_VIRTUAL;
11606
11622 virtual void PostFilterClear(int32_t sectionNumber) PURE_VIRTUAL;
11623
11644 virtual void PostFilterBiquadSet(int32_t sectionNumber, double aOne, double aTwo, double bZero, double bOne, double bTwo) PURE_VIRTUAL;
11645
11647 virtual const char* const PostFilterInfoGet() PURE_VIRTUAL;
11648 //virtual RSIFilterPostFilterSection PostFilterSection;
11650
11655
11675 virtual const char* const UserLabelGet() PURE_VIRTUAL;
11676
11697 virtual void UserLabelSet(const char* const userLabel) PURE_VIRTUAL;
11699
11704
11726 virtual void PostTrajectoryGearingEnableSet(bool enable) PURE_VIRTUAL;
11727
11746 virtual bool PostTrajectoryGearingEnableGet() PURE_VIRTUAL;
11747
11767 virtual void PostTrajectoryGearingMasterAxisSet(int32_t masterAxisNumber) PURE_VIRTUAL;
11768
11787 virtual int32_t PostTrajectoryGearingMasterAxisGet() PURE_VIRTUAL;
11788
11808 virtual void PostTrajectoryGearingMultiplierSet(double multiplier) PURE_VIRTUAL;
11809
11828 virtual double PostTrajectoryGearingMultiplierGet() PURE_VIRTUAL;
11829
11850 virtual double PostTrajectoryGearingScaledOffsetGet() PURE_VIRTUAL;
11852
11853
11878 virtual uint32_t NetworkIndexGet(RSINetworkIndexType indexType) PURE_VIRTUAL;
11879
11914 virtual void NetworkIndexSet(RSINetworkIndexType indexType, uint32_t newIndex) PURE_VIRTUAL;
11915
11923 virtual double BacklashHysteresisLimitGet() PURE_VIRTUAL;
11924
11931 virtual void BacklashHysteresisLimitSet(double hysteresisLimit) PURE_VIRTUAL;
11932
11956 virtual bool StepperMotorLoopbackGet() PURE_VIRTUAL;
11957
11981 virtual void StepperMotorLoopbackSet(bool loopback) PURE_VIRTUAL;
11982
11992
12002 virtual void StepperMotorPulseTypeSet(RSIMotorStepperPulse pulse, RSIMotorStepperPulseType type) PURE_VIRTUAL;
12003
12010 virtual uint64_t GearingMasterAddressGet() PURE_VIRTUAL;
12011
12013};
12014
12018class RSI_API MultiAxis : public virtual RapidCodeMotion {
12019public:
12020
12024
12038 virtual void AxisAdd(Axis *axis) PURE_VIRTUAL;
12039
12042 virtual void AxesAdd(Axis* *axes, int32_t axisCount) PURE_VIRTUAL;
12043
12056 virtual void AxisRemoveAll() PURE_VIRTUAL;
12057
12061
12077 virtual Axis* AxisGet(int32_t index) PURE_VIRTUAL;
12078
12098 virtual const char* const UserLabelGet() PURE_VIRTUAL;
12099
12120 virtual void UserLabelSet(const char* const userLabel) PURE_VIRTUAL;
12121
12125
12140 virtual double VectorVelocityGet() PURE_VIRTUAL;
12141
12157 virtual void VectorVelocitySet(double velocity) PURE_VIRTUAL;
12158
12173 virtual double VectorAccelerationGet() PURE_VIRTUAL;
12174
12197 virtual void VectorAccelerationSet(double acceleration) PURE_VIRTUAL;
12198
12213 virtual double VectorDecelerationGet() PURE_VIRTUAL;
12214
12237 virtual void VectorDecelerationSet(double deceleration) PURE_VIRTUAL;
12238
12253 virtual double VectorJerkPercentGet() PURE_VIRTUAL;
12254
12277 virtual void VectorJerkPercentSet(double jerkPercent) PURE_VIRTUAL;
12278
12302 virtual void MoveVector(const double* const position) PURE_VIRTUAL;
12303
12306 virtual void MoveVectorRelative(const double* const relativePosition) PURE_VIRTUAL;
12307
12311
12331
12332 virtual double PathTimeSliceGet() PURE_VIRTUAL;
12333
12354
12355 virtual void PathTimeSliceSet(double seconds) PURE_VIRTUAL;
12356
12381 virtual void PathRatioSet(const double* const ratio) PURE_VIRTUAL;
12382
12385 virtual double PathRatioGet(int32_t index) PURE_VIRTUAL;
12386
12403 virtual void PathBlendSet(bool blend) PURE_VIRTUAL;
12404
12413
12414 virtual void PathPlanTypeSet(RSIPathPlanType type) PURE_VIRTUAL;
12415
12424
12425 virtual RSIPathPlanType PathPlanTypeGet() PURE_VIRTUAL;
12426
12445 virtual void PathListStart(const double* const startPosition) PURE_VIRTUAL;
12446
12467 virtual void PathLineAdd(const double* const position) PURE_VIRTUAL;
12468
12488 virtual void PathArcAdd(const double* const center, double angle) PURE_VIRTUAL;
12489
12508 virtual void PathListEnd() PURE_VIRTUAL;
12509
12526 virtual void PathMotionStart() PURE_VIRTUAL;
12527
12531
12549 virtual void MoveTrapezoidal(const double* const position, const double* const vel, const double* const accel, const double* const decel) PURE_VIRTUAL;
12550
12553 virtual void MoveTrapezoidal(const double* const position) PURE_VIRTUAL;
12554
12584 virtual void MoveSCurve(const double* const position, const double* const vel, const double* const accel, const double* const decel, const double* const jerkPct) PURE_VIRTUAL;
12585
12596 virtual void MoveSCurve(const double* const position) PURE_VIRTUAL;
12597
12602 virtual void MoveSCurve(const double* const position, const double* const vel, const double* const accel, const double* const decel, const double* const jerkPct, const double* const finalVel) PURE_VIRTUAL;
12603
12618 virtual void MoveVelocity(const double* const velocity, const double* const accel) PURE_VIRTUAL;
12619
12623 virtual void MoveVelocity(const double* const velocity) PURE_VIRTUAL;
12624
12646 virtual void MoveRelative(const double* const relativePosition, const double* const vel, const double* const accel, const double* const decel, const double* const jerkPct) PURE_VIRTUAL;
12647
12658 virtual void MoveRelative(const double* const relativePosition) PURE_VIRTUAL;
12659
12664 virtual void MoveRelative(const double* const relativePosition, const double* const vel, const double* const accel, const double* const decel, const double* const jerkPct, const double* const finalVel) PURE_VIRTUAL;
12665
12682 virtual void MoveVelocitySCurve(const double* const velocity, const double* const accel, const double* const jerkPct) PURE_VIRTUAL;
12683
12700 virtual uint16_t MotionIdExecutingGet() PURE_VIRTUAL;
12701
12719 virtual uint16_t MotionElementIdExecutingGet() PURE_VIRTUAL;
12720
12722 virtual int32_t AxisMapCountGet() PURE_VIRTUAL;
12723
12737 virtual uint64_t AddressGet(RSIMultiAxisAddressType addressType) PURE_VIRTUAL;
12738
12753
12763 virtual bool AmpEnableGet() PURE_VIRTUAL;
12764
12765
12766};
12767
12773class RSI_API IOPoint : public virtual RapidCodeObject {
12774public:
12779
12796 static IOPoint* CreateDigitalInput(Axis* axis, RSIMotorDedicatedIn motorDedicatedInNumber);
12797
12814 static IOPoint* CreateDigitalInput(Axis* axis, RSIMotorGeneralIo motorGeneralIoNumber);
12815
12831 static IOPoint* CreateDigitalInput(RapidCodeNetworkNode* networkNode, int32_t bitNumber);
12832 // use NetworkNode*
12833 static IOPoint* CreateDigitalInput(IO* io, int32_t bitNumber);
12834
12845 static IOPoint* CreateDigitalInput(MotionController* controller, int32_t pdoIndex, int32_t bitNumber, RSIPDOType type);
12846
12860 static IOPoint* CreateDigitalInput(MotionController* controller, uint64_t memoryAddress, int32_t bitNumber);
12861
12879 static IOPoint* CreateDigitalOutput(Axis* axis, RSIMotorDedicatedOut motorDedicatedOutNumber);
12880
12897 static IOPoint* CreateDigitalOutput(Axis* axis, RSIMotorGeneralIo motorGeneralIoNumber);
12898
12914 static IOPoint* CreateDigitalOutput(RapidCodeNetworkNode* networkNode, int32_t bitNumber);
12915 // use NetworkNode*
12916 static IOPoint* CreateDigitalOutput(IO* io, int32_t bitNumber);
12917
12918
12931 static IOPoint* CreateDigitalOutput(MotionController* controller, int32_t pdoIndex, int32_t bitNumber, RSIPDOType type);
12932
12946 static IOPoint* CreateDigitalOutput(MotionController* controller, uint64_t memoryAddress, int32_t bitNumber);
12947
12962 static IOPoint* CreateAnalogInput(RapidCodeNetworkNode* networkNode, int32_t analogChannel);
12963 // use RapidCodeNetworkNode*
12964 static IOPoint* CreateAnalogInput(IO* io, int32_t analogChannel);
12965
12980 static IOPoint* CreateAnalogOutput(RapidCodeNetworkNode* networkNode, int32_t analogChannel);
12981 // use RapidCodeNetworkNode*
12982 static IOPoint* CreateAnalogOutput(IO* io, int32_t analogChannel);
12983
12985
12989
12992 virtual uint64_t AddressGet() PURE_VIRTUAL;
12993
12996 virtual int32_t MaskGet() PURE_VIRTUAL;
12997
13000 virtual bool IsDigital() PURE_VIRTUAL;
13001
13002
13005 virtual bool IsOutput() PURE_VIRTUAL;
13006
13010
13014 virtual bool Get() PURE_VIRTUAL;
13015
13022 virtual void Set(bool state) PURE_VIRTUAL;
13023
13027
13031 virtual double ValueGet() PURE_VIRTUAL;
13032
13036 virtual void ValueSet(double valueDouble) PURE_VIRTUAL;
13037};
13038
13042class RSI_API RTOS {
13043
13044public:
13045#if defined(_WIN32)
13050
13054
13059 static INtimeStatus INtimeStatusGet(const char* const nodeName);
13060
13064
13069 static INtimeStatus INtimeStart(const char* const nodeName);
13070
13074
13079 static INtimeStatus INtimeStop(const char* const nodeName);
13080
13084
13089 static INtimeStatus INtimeRestart(const char* const nodeName);
13090
13093 static const char* const INtimeCatalogRMPGet();
13094
13097 static const char* const INtimeCatalogRMPNetworkGet();
13098
13101 static uint32_t INtimeNodeCountGet();
13102
13106 static const char* const INtimeNodeNameGet(uint32_t nodeNumber);
13107
13111 static bool INtimeNodeIsLocal(uint32_t nodeNumber);
13113#endif // _WIN32
13114};
13115
13117class RSI_API Trace
13118{
13119public:
13124
13137 static void MaskSet(RSITrace mask);
13138
13154 static void MaskOnSet(RSITrace maskOn);
13155
13156
13176 static bool MaskOnGet(RSITrace maskOn);
13177
13193 static void MaskOffSet(RSITrace maskOff);
13194
13207 static void MaskClear();
13208
13223 static int32_t FileSet(const char* const fileName);
13224
13237 static void FileClose();
13238
13253 static void InjectMessage(RSITrace traceLevel, const char* const message);
13254
13256};
13257
13259
13261
13265class RSI_API IO : public virtual RapidCodeObject {
13266public:
13267
13268 friend class MotionController;
13269
13274
13276 RapidCodeNetworkNode* NetworkNode;
13278 MotionController* rsiControl;
13279
13281
13286
13287
13320 virtual bool IOExists() PURE_VIRTUAL;
13321
13338 virtual int32_t NumberGet() PURE_VIRTUAL;
13340
13345
13346
13347
13377 virtual bool DigitalInGet(int32_t digitalInNumber) PURE_VIRTUAL;
13378
13411 virtual bool DigitalOutGet(int32_t digitalOutNumber) PURE_VIRTUAL;
13412
13443 virtual void DigitalOutSet(int32_t digitalOutNumber, bool outValue) PURE_VIRTUAL;
13444
13467 virtual int32_t AnalogInGet(int32_t analogChannel) PURE_VIRTUAL;
13468
13500 virtual int32_t AnalogOutGet(int32_t analogChannel) PURE_VIRTUAL;
13501
13533 virtual void AnalogOutSet(int32_t analogChannel, int32_t analogValue) PURE_VIRTUAL;
13535
13545 virtual const char* const UserLabelGet() PURE_VIRTUAL;
13546
13553 virtual void UserLabelSet(const char* const userLabel) PURE_VIRTUAL;
13554};
13555
13556#if defined(__cplusplus)
13557}
13558#endif
13559
13560template<typename ContainerClass>
13561class RSI_API RapidVectorIterator
13562{
13563public:
13565 typedef typename ContainerClass::ValueType ValueType;
13566
13568 typedef typename ContainerClass::PointerType PointerType;
13569
13572 ValueType& operator*();
13573
13576 const ValueType& operator*() const;
13577
13580 RapidVectorIterator& operator++();
13581
13584 RapidVectorIterator operator++(int);
13585
13588 bool operator==(const RapidVectorIterator&) const;
13589
13592 bool operator!=(const RapidVectorIterator&) const;
13593
13595 RapidVectorIterator(PointerType pointerArgument, PointerType startArgument, const size_t containerSize);
13596
13598 RapidVectorIterator(const RapidVectorIterator&) = default;
13599
13601 RapidVectorIterator& operator=(const RapidVectorIterator&) = default;
13602
13604 RapidVectorIterator(RapidVectorIterator&&) noexcept = default;
13605
13607 RapidVectorIterator& operator=(RapidVectorIterator&&) noexcept = default;
13608private:
13609 PointerType pointer;
13610 PointerType start, end;
13611 void VerifyPointer() const;
13612};
13613
13614// Forward declaration of the RapidVectorImplementation class.
13615template<typename Type>
13616class RapidVectorImplementation;
13617
13620
13633template<typename Type>
13634class RSI_API RapidVector
13635{
13636private:
13637 // The pointer to the implementation.
13638 RapidVectorImplementation<Type>* pImpl;
13639public:
13643 Type& operator[](const size_t index);
13644
13648 const Type& operator[](const size_t index) const;
13649
13653 Type& At(const size_t index);
13654
13658 const Type& At(const size_t index) const;
13659
13662 void PushBack(const Type& element);
13663
13666 void PushBack(Type&& element);
13667
13670 const size_t Size() const;
13671
13673 void Clear();
13674
13676 void PopBack();
13677
13680 Type& Front();
13681
13684 const Type& Front() const;
13685
13688 Type& Back();
13689
13692 const Type& Back() const;
13693
13696 void Reserve(const size_t capacity);
13697
13700
13702#if defined(SWIG) && defined(__linux__)
13703 // SWIG 4.3.0 on Linux cannot parse the complex SFINAE template syntax
13704 // This constructor is ignored via %ignore in the .i files anyway
13705 explicit RapidVector(const size_t size);
13706#elif defined(_WIN32)
13707 template<typename = typename std::enable_if_t<std::is_default_constructible_v<Type>>>
13708 explicit RapidVector(const size_t size);
13709#else
13710 template<typename UType = Type, typename Enable = typename std::enable_if<std::is_default_constructible<UType>::value>::type>
13711 explicit RapidVector(const size_t size);
13712#endif
13713
13715 RapidVector(RapidVectorImplementation<Type>*);
13716
13719
13722
13725
13727 RapidVector(RapidVector&& other) noexcept;
13728
13731
13732 typedef Type* PointerType;
13733 typedef Type ValueType;
13734
13736 typedef RapidVectorIterator<RapidVector> Iterator;
13737
13740 Iterator begin() noexcept;
13741
13744 Iterator begin() const noexcept;
13745
13749 Iterator end() const noexcept;
13750};
13751
13753
13754} // namespace RapidCode
13755
13756} // namespace RSI
13757
13758#endif // _RSI_H
uint32_t NetworkIndexGet(RSINetworkIndexType indexType)
Get the PDO array index for an axis signal mapping.
void FilterCoeffSet(RSIFilterGainPIDCoeff coeff, int32_t gainTable, double coeffValue)
Set a filter coefficient (ex: Kp, Ki, Kd).
void HardwareNegLimitActionSet(RSIAction action)
Set the action that will occur when the Hardware Negative Limit Event triggers.
void ErrorLimitDurationSet(double seconds)
Sets the duration required before the Position Error Limit event triggers.
double PositionErrorGet()
Get the current position error.
void HomeTravelDistanceSet(RSIHomeStage stage, double distanceToTravel)
Set the max travel used in a specific Homing Stage.
bool HomeLimitGet()
Get the current state of the Home limit.
uint64_t AddressGet(RSIAxisAddressType addressType)
Get the an address for some location on the Axis.
RSIMotorFeedbackFault EncoderFaultTriggerGet()
Get the encoders which are used to generate encoder faults.
RSIAction AmpFaultActionGet()
Get the Amp Fault action.
int32_t FrameBufferSizeGet()
double SettlingTimeGet()
Get the Settling time.
void TriggeredModifyDecelerationSet(double decel)
Set the deceleration rate for an Triggered Modify Event.
void HomeSlowVelocitySet(double velocity)
Set the slow home velocity.
double CommandPositionGet()
Get the current command position.
double BrakeApplyDelayGet()
Get the delay time for the brake to be applied.
uint32_t DigitalOutputsGet()
Get all 32 digital output bits at once for this axis.
void HardwareNegLimitDurationSet(double seconds)
Set the duration required before the Hardware Negative Limit event triggers.
RSIMotorStepperPulseType StepperMotorPulseTypeGet(RSIMotorStepperPulse pulse)
Determine how the stepper pulse outputs are configured.
void MoveSCurve(double position)
MoveSCurve with the Axis defaults trajectory values from DefaultVelocitySet, DefaultAccelerationSet,...
bool DigitalIoExists(RSIMotorGeneralIo motorGeneralIoNumber)
Determine if a particular General I/O bit exists for a motor.
void SoftwarePosLimitTriggerValueSet(double triggerValue)
Set the Software Positive Position limit.
double AnalogInGet(int32_t channel)
Get the value of an analog input.
RSIAxisMasterType GearingSourceGet()
Get the Source used to slave to the Master Axis.
void CommandPositionSet(double position)
Sets the value of the command and actual positions of an axis.
void HardwarePosLimitActionSet(RSIAction action)
Set the action that will occur when the Hardware Positive Limit Event triggers.
const char *const DigitalIoNameGet(RSIMotorGeneralIo motorGeneralIoNumber)
Get the name of a Motor I/O bit.
RSIAction HomeBehaviorGet()
Get the Action used during Master based Homing.
void FeedbackPointerSet(RSIAxisPositionInput input, uint64_t address)
Configure an axis for dual loop feedback.
RSIMotorType MotorTypeGet()
Get the motor type.
void AmpDisableActionSet(RSIMotorDisableAction action)
Set the Amp Disable action.
double SoftwareNegLimitTriggerValueGet()
Get the Software Negative Position limit.
void PositionToleranceCoarseSet(double tolerance)
Set the Coarse Position Tolerance for Axis settling.
void OriginPositionSet(double position)
Set the origin position.
double UserUnitsGet()
Get the number of counts per User Unit.
void BacklashRateSet(double rate)
Sets the rate at which Backlash is applied.
bool AmpEnableGet()
Get the state of the Amp Enable Output.
void SettleOnStopSet(bool state)
Set the Stop Event settling configuration.
int32_t DriveIndexGet()
Get the drive index, relative to the Network Node (multi-axis drives).
void HomeBehaviorSet(RSIAction behavior)
Set the Action used for Master based homing.
bool HomeSwitchGet()
Get the current state of the Home switch input.
void MoveRelative(double relativePosition)
double PositionToleranceFineGet()
Get the Fine Position Tolerance for axis settling.
double EncoderFaultDurationGet()
Get the duration required before the Encoder Fault Limit event triggers.
bool SettleOnEStopCmdEqActGet()
Get the E-Stop Event settling configuration when E-Stop is configured for (Command = Actual).
void Home(bool moveToZero=true)
Execute the homing routine.
RSIMotorIoTypeMask DigitalIoValidTypesMaskGet(RSIMotorGeneralIo motorGeneralIoNumber)
Get the type mask for a Motor I/O bit.
RSIAction HardwarePosLimitActionGet()
Get the action that will occur when the Hardware Positive Limit Event triggers.
int32_t FilterGainTableSizeGet()
Gets the size of gain tables.
void OperationModeSet(RSIOperationMode mode)
Set the axis operation mode.
void CommandPositionDirectSet(double position)
directly sets the value of the command position of an axis
RSIHomeMethod HomeMethodGet()
Get the method to be used for homing.
int32_t MotorFaultMaskGet()
Get the Motor Fault Mask.
void MoveCamLinear(int32_t masterAxisNumber, RSIAxisMasterType masterFeedbackSource, const double *const masterDistances, const double *const slavePositions, int32_t pointCount)
Enable this Axis to be linear follower (slave) using an electronic cam.
void BrakeModeSet(RSIMotorBrakeMode mode)
Set the brake mode.
void HomeVelocitySet(double velocity)
Set the home velocity.
bool DigitalInGet(RSIMotorGeneralIo motorGeneralIoNumber)
Read a digital input.
double CompensationPositionGet()
Get the compensator position.
double TriggeredModifyDecelerationGet()
Get the deceleration rate for an Triggered Modify Event.
void BacklashHysteresisLimitSet(double hysteresisLimit)
Brief.
void MoveVelocitySCurve(double velocity, double accel, double jerkPct)
Command a constant velocity move (jog) with non-constant acceleration.
void FilterAlgorithmSet(RSIFilterAlgorithm algorithm)
Set the algorithm type for an axis.
int32_t HomeLimitCustomConfigBitIndexGet()
void HardwarePosLimitTriggerStateSet(bool state)
sets the trigger state.
const char *const UserLabelGet()
Get the axis User defined Label.
void PostTrajectoryGearingMasterAxisSet(int32_t masterAxisNumber)
Set the master axis for post-trajectory gearing.
NetworkNode * NetworkNode
Gets the associated NetworkNode object.
Definition rsi.h:7077
int32_t FilterGainTableGet()
Gets which gain table is currently in use by the axis.
void SoftwareNegLimitActionSet(RSIAction action)
Set the action that will occur when the Software Negative Limit Event triggers.
double BacklashHysteresisLimitGet()
Get the backlash hysteresis limit.
double ActualVelocityGet()
Get the current actual velocity.
double HomeAccelerationGet(RSIHomeStage homeStage=RSIHomeStage::RSIHomeStageSTAGE_ONE)
Get the deceleration used for homing.
bool PositiveLimitGet()
Get the state of the Hardware Positive Limit input.
void PostFilterHighPassSet(int32_t sectionNumber, double cornerFreq)
Use a High Pass Post Filter.
void UserUnitsSet(double countsPerUserUnit)
Sets the number of counts per User Unit.
double OriginPositionGet()
Get the origin position.
void EStopJerkPercentSet(double jerkPct)
Set the jerk percent for an E-Stop, Modify Event.
void AmpFaultActionSet(RSIAction action)
Set the Amp Fault action.
void EncoderFaultActionSet(RSIAction action)
Set the action that will occur when the Encoder Fault Limit Event triggers.
void UserLabelSet(const char *const userLabel)
Set the axis User defined Label.
void AmpFaultTriggerStateSet(bool state)
Set the trigger state of the Amp Fault input.
void FilterGainTableSet(int32_t gainTable)
Set the gain table to be used by an axis.
void DigitalOutSet(RSIMotorGeneralIo motorGeneralIoNumber, bool outValue)
Set a digital output bit.
void MoveTrapezoidal(double position)
Point-to-point trapezoidal move.
void HomeActionSet(RSIAction action)
Set the action that will occur when the Home Event triggers.
bool DedicatedOutExists(RSIMotorDedicatedOut motorDedicatedOutNumber)
Determine if a particular Dedicated output bit exists for a motor.
void ErrorLimitTriggerValueSet(double triggerValue)
Set the Position Error Limit trigger value.
bool StepperMotorLoopbackGet()
Determine if the stepper is open or closed loop.
void BrakeApplyDelaySet(double seconds)
Set the brake apply delay.
void MotionCamRepeatFromSet(int32_t repeatFrom)
Set the segment at which camming repeats.
RSIAction HomeActionGet()
Get the action that will occur when the Home LIMIT triggers.
void PostFilterBiquadSet(int32_t sectionNumber, double aOne, double aTwo, double bZero, double bOne, double bTwo)
Use a Digital Biquad Post Filter.
void PositionToleranceFineSet(double tolerance)
Set the Fine Position Tolerance for Axis settling.
void DigitalIoTypeSet(RSIMotorGeneralIo motorGeneralIoNumber, RSIMotorIoType type)
Set the type for a Motor I/O bit.
double HomeJerkPercentGet(RSIHomeStage homeStage=RSIHomeStage::RSIHomeStageSTAGE_ONE)
Get the Jerk Percent used for homing.
void HomeTriggerStateSet(bool state)
Set the trigger state for the Home input.
uint32_t DedicatedOutputsGet()
Get all 32 dedicated output bits at once for this axis.
RSIAction SyncGroupFaultActionGet()
Get the action taken when this Axis's node's EtherCAT sync group faults.
void EncoderRatioSet(RSIMotorFeedback encoder, int32_t numerator, int32_t denominator)
Sets the ratio to scale Encoder counts.
void ErrorLimitActionSet(RSIAction action)
Set the action that will occur when the Error Limit Event triggers.
void GearingRatioChange(int32_t numerator, int32_t denominator)
Change the electronic gearing ratio.
bool DigitalOutGet(RSIMotorGeneralIo motorGeneralIoNumber)
Get the state of digital output bit.
RSIHomeStage HomeStageGet()
Get the current Homing Stage.
static constexpr double AmpEnableAmpFaultTimeoutSecondsDefault
Default time an Axis waits before generating an AmpFault if the Axis does not enable after calling Am...
Definition rsi.h:7063
RSIMotorDisableAction AmpDisableActionGet()
Get the Amp Disable action.
void MoveSCurve(double position, double vel, double accel, double decel, double jerkPct, double finalVel)
void MoveVelocity(double velocity)
double TargetPositionGet()
Get the target position.
double BacklashRateGet()
Gets the Backlash Rate which was set by the user.
double AmpFaultDurationGet()
Get the duration required before the Amp Fault event triggers.
double FilterCoeffGet(RSIFilterGainPIDCoeff coeff, int32_t gainTable)
Get value for a filter coefficient (ex: Kp, Ki, Kd, etc).
double HardwareNegLimitDurationGet()
Get the duration required before the Hardware Negative Limit event triggers.
bool HardwarePosLimitTriggerStateGet()
trigger state return.
bool SettleOnStopGet()
Get the Stop Event settling configuration.
double SoftwarePosLimitTriggerValueGet()
Get the Software Positive Position limit.
void EncoderFaultDurationSet(double seconds)
Set the duration required before the Encoder Fault Limit event triggers.
double ErrorLimitTriggerValueGet()
Get the Position Error Limit trigger value.
void HomeDecelerationSet(double decel)
Set the decleration to be used for homing when using the switch is not detected before the HomeTravel...
void PostFilterLowPassSet(int32_t sectionNumber, double frequency)
Use a Low-Pass filter.
RSIAction SoftwareNegLimitActionGet()
Get the action that will occur when the Software Negative Limit Event triggers.
void HomeCancelSet(bool cancel)
Cancel Homing.
void PostTrajectoryGearingMultiplierSet(double multiplier)
Set the multiplier for post-trajectory gearing.
void MoveRelative(double relativePosition, double vel, double accel, double decel, double jerkPct, double finalVel)
double EStopJerkPercentGet()
Get the jerk percent for an E-Stop, Modify Event.
int32_t PostTrajectoryGearingMasterAxisGet()
Get the master axis number used for post-trajectory gearing.
void TriggeredModifyJerkPercentSet(double jerkPct)
Set the jerk percent for an Triggered Modify Event.
double CommandAccelGet()
Get the current commanded acceleration.
double HomeVelocityGet(RSIHomeStage homeStage=RSIHomeStage::RSIHomeStageSTAGE_ONE)
Get the home velocity.
void PostFilterSingleOrderSet(int32_t sectionNumber, double aOne, double bZero, double bOne)
Use a Single Order Post Filter.
void PostFilterLeadLagSet(int32_t sectionNumber, double lowGain, double highGain, double centerFreq)
Use a Lead Lag Post Filter.
void HardwarePosLimitDurationSet(double seconds)
Set the duration required before the Hardware Positive Limit event triggers.
void HomeStateSet(bool homed)
Set the home state.
bool DedicatedInExists(RSIMotorDedicatedIn motorDedicatedInNumber)
Determine if a particular Dedicated input bit exists for a motor.
void BacklashWidthSet(double width)
Sets the total range of the give in a system with Backlash.
double BacklashWidthGet()
Gets the Backlash Width which was set by the user.
RSIOperationMode OperationModeGet()
Get the operation mode.
void MotionCamMasterStartSet(Axis *master, double startPosition)
Set the position at which camming starts.
void FilterDualLoopSet(Axis *velocityAxis, RSIMotorFeedback velocityEncoder, bool enable)
Configure an axis for dual loop feedback.
void MoveTrapezoidal(double position, double vel, double accel, double decel, double finalVel)
Point-to-point trapezoidal move.
bool SettleOnEStopGet()
Get the E-Stop Event settling configuration.
uint16_t MotionIdExecutingGet()
RSIAction EncoderFaultActionGet()
Get the action that will occur when the Encoder Fault Limit Event triggers.
void EncoderFaultTriggerSet(RSIMotorFeedbackFault encoder)
Set the encoders which are used to generate encoder faults.
void MoveTrapezoidal(double position, double vel, double accel, double decel)
Point-to-point trapezoidal move.
RSIFilterAlgorithm FilterAlgorithmGet()
Get the control algorithm type for an axis.
double CommandVelocityGet()
Get the current commanded velocity.
int32_t FramesToExecuteGet()
bool HomeTriggerStateGet()
Get the trigger state for the Home input.
uint64_t GearingMasterAddressGet()
Get the address of the gearing master.
void HomeAccelerationSet(double accel)
Set the deceleration used for homing.
RSIDataType AddressDataTypeGet(RSIAxisAddressType type)
Get the data type for an address the Axis.
void StepperMotorPulseTypeSet(RSIMotorStepperPulse pulse, RSIMotorStepperPulseType type)
Set how the stepper pulse outputs are configured.
void VelocityToleranceSet(double tolerance)
Set the Velocity Tolerance used for settling.
void EncoderCountSet(int32_t count)
void StepperMotorLoopbackSet(bool loopback)
Configure the stepper to be open or closed loop.
void CompensationPositionSet(double position)
Set the compensator position.
double BacklashValueGet()
Gets the current backlash compensation value.
double PostTrajectoryGearingScaledOffsetGet()
Get the current scaled position offset from post-trajectory gearing.
double PositionToleranceCoarseGet()
Get the Coarse Position Tolerance for axis settling.
double HomeDecelerationGet(RSIHomeStage homeStage=RSIHomeStage::RSIHomeStageSTAGE_ONE)
Get the decleration to be used for homing when using the switch is not detected before the HomeTravel...
double EStopDecelerationGet()
Get the deceleration rate for an E-Stop, Modify Event.
bool AmpFaultTriggerStateGet()
Get the Amp Fault trigger state.
double EncoderPositionGet(RSIMotorFeedback encoder)
Get the raw encoder position.
void MotorFaultMaskSet(int32_t faultMask)
Set the Motor Fault Mask.
double VelocityToleranceGet()
Get the velocity tolerance used for settling.
void HomeDurationSet(double seconds)
Set the duration required before the Home event triggers.
void HomeMethodSet(RSIHomeMethod method)
Set the method to be used for homing.
void EStopDecelerationSet(double decel)
Set the deceleration rate for an E-Stop, Modify Event.
double TriggeredModifyJerkPercentGet()
Get the jerk percent for an Triggered Modify Event.
void MoveCamCubic(int32_t masterAxisNumber, RSIAxisMasterType masterFeedbackSource, const double *const masterDistances, const double *const slavePositions, const double *const gearRatios, int32_t pointCount)
Enable this Axis to be cubic follower (slave) using an electronic cam.
void PostFilterClear(int32_t sectionNumber)
Remove any Post Filters in section Number.
double HomeDurationGet()
Get the duration required before the Home event triggers.
bool NegativeLimitGet()
Get the state of the Hardware Negative Limit input.
bool HomeStateGet()
Get the home state.
void SettleOnEStopSet(bool state)
Set the E-Stop Event settling configuration.
void MotorTypeSet(RSIMotorType type)
Set the motor type.
void SoftwareNegLimitTriggerValueSet(double triggerValue)
Set the Software Negative Position limit.
void GearingDisable()
Disable the electronic gearing.
void HomeLimitCustomConfigSet(uint64_t address, int32_t bitIndex)
void PositionSet(double position)
Set the Command and Actual positions.
double BrakeReleaseDelayGet()
Get the brake release delay time.
uint32_t DedicatedInputsGet()
Get all 32 dedicated input bits at once for this axis.
bool AmpFaultGet()
Get the current state of the Amp Fault input.
void NetworkIndexSet(RSINetworkIndexType indexType, uint32_t newIndex)
Override the PDO array index for an axis signal mapping.
int32_t GearingMasterAxisNumberGet()
Get a Slave's Master Axis Number.
void SyncGroupFaultActionSet(RSIAction action)
Set the action taken when this Axis's node's EtherCAT sync group faults.
void MoveRelative(double relativePosition, double vel, double accel, double decel, double jerkPct)
Command a relative point-to-point S-Curve motion.
bool DedicatedInGet(RSIMotorDedicatedIn motorDedicatedInNumber)
Read a digital input.
RSIMotorBrakeMode BrakeModeGet()
Get the brake mode.
bool HardwareNegLimitTriggerStateGet()
Trigger state return.
void PostFilterNotchSet(int32_t sectionNumber, double centerFreq, double bandwidth)
Use a Notch Post Filter.
double ActualPositionGet()
Get the current actual position.
uint16_t MotionElementIdExecutingGet()
void FrameBufferSizeSet(int32_t frameSize)
void FilterLowPassSet(double frequency)
Use a Low-Pass filter.
double MotionCamMasterStartGet(Axis *master)
Gets the position on the master that will start the cam when exceeded.
RSIAction ErrorLimitActionGet()
Get the action that will occur when the Position Error Limit Event triggers.
void GearingEnable(int32_t masterAxisNumber, RSIAxisMasterType masterFeedbackSource, int32_t numerator, int32_t denominator)
Enable this Axis to be follower (slave) using electronic gearing.
void HomeOffsetSet(double offset)
Sets the user coordinate value assigned to the detected homing reference point.
double HardwarePosLimitDurationGet()
Get the duration required before the Hardware Positive Limit event triggers.
void AmpFaultDurationSet(double seconds)
Set the duration required before the Amp Fault event triggers.
double HomeSlowVelocityGet()
Get the slow home velocity.
void HomeJerkPercentSet(double percent)
Set the Jerk Percent used for homing.
RSIAction SoftwarePosLimitActionGet()
Get the action that will occur when the Software Positive Limit Event triggers.
void PostFilterUnityGainSet(int32_t sectionNumber)
Use a Unity Gain Post Filter.
double HomeOffsetGet()
Get the home offset.
void MotionCamRepeatStop()
Stops a Repeating Cam.
double ErrorLimitDurationGet()
Get the duration required before the Position Error Limit event triggers.
double PostTrajectoryGearingMultiplierGet()
Get the multiplier for post-trajectory gearing.
void PostTrajectoryGearingEnableSet(bool enable)
Enable or disable post-trajectory gearing for this axis.
void MoveVelocity(double velocity, double accel)
Command a constant velocity move (jog).
void ActualPositionSet(double position)
Set the actual position.
void PostFilterResonatorSet(int32_t sectionNumber, double centerFreq, double bandwidth, double gain)
Use a Resonator Post Filter.
bool DedicatedOutGet(RSIMotorDedicatedOut motorDedicatedOutNumber)
Get the state of dedicated output bit.
bool PostTrajectoryGearingEnableGet()
Get the enable state of post-trajectory gearing.
double FilterLowPassGet()
Get the value of the Low-Pass filter.
RSIAction HardwareNegLimitActionGet()
Get the action that will occur when the Hardware Negative Limit Event triggers.
void SettleOnEStopCmdEqActSet(bool state)
Set the settling configuration for E-Stop events (when configured for Command = Actual).
void BrakeReleaseDelaySet(double seconds)
Set the Brake Release Delay.
void HardwareNegLimitTriggerStateSet(bool state)
Sets the trigger state.
uint32_t DigitalInputsGet()
Get all 32 digital input bits at once for this axis.
int32_t MotionCamRepeatFromGet()
Get the segment at which camming repeats.
void SettlingTimeSet(double time)
Set the settling time.
void MoveSCurve(double position, double vel, double accel, double decel, double jerkPct)
void SoftwarePosLimitActionSet(RSIAction action)
Set the action that will occur when the Software Positive Limit Event triggers.
Represents a single axis of motion control. This class provides an interface for commanding motion,...
Definition rsi.h:7047
void DefaultVelocitySet(double velocity)
Set the default velocity in UserUnits.
void EncoderRatioPrimarySet(char *numeratorCommaDenominator)
Set the primary feedback encoder ratio as text. "1.0 ,2.0".
bool LimitTriggerStateGet(RSIEventType limit)
Get the trigger state for any type of limit.
void NodeFailureActionSet(RSIAction action)
Set the action for a node failure.
double DefaultDecelerationGet()
Get the default deceleration in UserUnits.
uint64_t HomeLimitCustomConfigAddressGet()
Get the host address of the custom home input configuration.
static constexpr uint32_t NetworkIndexInvalid
Returned by NetworkIndexGet() when the index is invalid or nonexistent for this Axis.
Definition rsi.h:7060
void EncoderRatioSecondarySet(char *numeratorCommaDenominator)
Set the secondary feedback encoder ratio as text. "1.0 ,2.0".
double CommandJerkGet()
Get the current commanded jerk value (custom firmware required).
double FilterOutputGet(void)
Get the output of a demand filter, range is +/- 100.0.
void EncoderPointerSet(RSIMotorFeedback encoder, uint64_t address)
Set the pointer (host address) for the motor feedback.
void DefaultAccelerationSet(double acceleration)
Set the default acceleration in UserUnits.
bool IsTuneable()
Is an Axis tunable? Returns false if Axis is in position mode, otherwise true.
double DefaultPosition2Get()
Get the default Position 2 value in UserUnits (used by RapidSetup).
void LimitTriggerStateSet(RSIEventType limit, bool triggerState)
Set the trigger state for any type of limit.
double DefaultJerkPercentGet()
Get the default jerk percent.
double DefaultAccelerationGet()
Get the default acceleration in UserUnits.
const char *const EncoderRatioSecondaryGet()
Get the secondary feedback encoder ratio as text.
double DefaultVelocityGet()
Get the default velocity in UserUnits.
int32_t GearingDenominatorGet()
Get the denominator of the gearing ratio.
void FilterGainSchedulingSet(bool enable)
Enable or disable automatic gain scheduling.
double UserUnitsToCounts(double userUnits)
Convert from UserUnits to raw feedback counts.
const char *const PostFilterInfoGet()
Get a text description of the current post filters.
void GantryTypeSet(RSIAxisGantryType type)
Set the gantry type.
uint16_t StatusWordGet()
Get the DS402 status word.
double LimitTriggerValueGet(RSIEventType limit)
Get the trigger value for any type of limit.
double DefaultPosition1Get()
Get the default Position 1 value in UserUnits (used by RapidSetup).
int32_t ClosedLoopStepperVersionGet()
Unsupported.
int32_t GearingNumeratorGet()
Get the numerator of the gearing ratio.
uint64_t EncoderPointerGet(RSIMotorFeedback encoder)
Get the pointer (host address) for the motor feedback.
const char *const EncoderRatioPrimaryGet()
Get the primary feedback encoder ratio as text.
double LimitDurationGet(RSIEventType limit)
Get the duration for any type of limit.
void MotionFinalVelocitySet(double finalVelocity)
Set the final velocity of a motion, when FINAL_VEL motion attribute is used.
uint64_t FeedbackDeltaPointerGet(RSIAxisPositionInput input)
Get the pointer (host address) for the axis feedback.
bool FaultMaskBitGet(RSIMotorFaultMask bitMask)
Unsupported Function. Likely to be removed in the future.
void HomeLimitCustomConfigReset()
Remove any custom home input configuration and reset to use the Axis' dedicated home input bit.
void DefaultPosition1Set(double position1)
Set the default Position 1 value in UserUnits (used by RapidSetup).
void DefaultDecelerationSet(double deceleration)
Set the default deceleration in UserUnits.
double DefaultRelativeIncrementGet()
Get the default relative increment value in UserUnits (used by RapidSetup).
int32_t EncoderRatioDenominatorGet(RSIMotorFeedback encoder)
Get the encoder ration denominator.
void DefaultRelativeIncrementSet(double relativeIncrement)
Set the default relative value in UserUnits (used by RapidSetup).
double CountsToUserUnits(double counts)
Convert from raw feedback counts to UserUnits.
void DefaultPosition2Set(double position2)
Set the default Position 2 value in UserUnits (used by RapidSetup).
int32_t EncoderRatioNumeratorGet(RSIMotorFeedback encoder)
Get the encoder ratio numerator.
void ClosedLoopStepperSet(bool enable)
Unsupported.
RSIAction LimitActionGet(RSIEventType limit)
Get the action for any type of limit.
void LimitDurationSet(RSIEventType limit, double seconds)
Set the duration for any type of limit.
void FeedbackDeltaPointerSet(RSIAxisPositionInput input, uint64_t address)
Set the pointer (host address) for the axis feedback.
double MotionFinalVelocityGet()
Get final velocity of a motion, when FINAL_VEL motion attribute is used.
RSIAxisGantryType GantryTypeGet()
Get the gantry type.
uint64_t FeedbackPointerGet(RSIAxisPositionInput input)
Get the pointer (host address) for the axis feedback.
void LimitActionSet(RSIEventType limit, RSIAction action)
Set the action for any type of limit.
RSIAction NodeFailureActionGet()
Get the action for a node failure.
bool GearingEnableGet()
Get the state of gearing feature. If true, this Axis is a geared slave.
void DefaultJerkPercentSet(double jerkPercent)
Set the default jerk percent.
void LimitTriggerValueSet(RSIEventType limit, double triggerValue)
Set the trigger value for any type of limit.
int32_t EncoderCountGet()
Get the number of encoders processed in firmware by the motor object. Valid values: 0,...
bool FilterGainSchedulingGet()
Get the status of automatic gain scheduling.
bool IOExists()
IOExists validates your IO object is an IO Node.
bool DigitalInGet(int32_t digitalInNumber)
Get the state of a digital input bit.
const char *const UserLabelGet()
Get the IO User defined Label.
void UserLabelSet(const char *const userLabel)
Set the IO User defined Label.
int32_t AnalogInGet(int32_t analogChannel)
Get the value of an analog input.
bool DigitalOutGet(int32_t digitalOutNumber)
Get the state of a Digital Output bit.
int32_t NumberGet()
Get the zero-based IO number.
int32_t AnalogOutGet(int32_t analogChannel)
Get the value of an analog output.
void DigitalOutSet(int32_t digitalOutNumber, bool outValue)
Set the state of a digital output bit.
void AnalogOutSet(int32_t analogChannel, int32_t analogValue)
Set the value of an analog output.
The IO object provides an interface to the inputs and outputs of a network node.
Definition rsi.h:13265
NetworkNode * NetworkNode
Gets the parent NetworkNode object.
Definition rsi.h:13276
MotionController * rsiControl
Gets the parent MotionController object.
Definition rsi.h:13278
uint64_t AddressGet()
Get the Host Address for the I/O point.
static IOPoint * CreateDigitalInput(Axis *axis, RSIMotorGeneralIo motorGeneralIoNumber)
Create a Digital Input from an Axis' general purpose inputs.
void ValueSet(double valueDouble)
Set the value for an Analog Output.
double ValueGet()
Get the value of an Analog Input or Output.
bool IsOutput()
Determine if an I/O point is an output.
static IOPoint * CreateDigitalInput(NetworkNode *networkNode, int32_t bitNumber)
Create a Digital Input from a RapidCodeNetworkNode.
static IOPoint * CreateDigitalOutput(MotionController *controller, uint64_t memoryAddress, int32_t bitNumber)
Create a Digital Output from a network PDO.
void Set(bool state)
Set the state of a Digital Output.
static IOPoint * CreateDigitalOutput(Axis *axis, RSIMotorGeneralIo motorGeneralIoNumber)
Create a Digital Output from an Axis' general purpose inputs.
static IOPoint * CreateAnalogInput(NetworkNode *networkNode, int32_t analogChannel)
Create an Analog Input from a RapidCodeNetworkNode.
static IOPoint * CreateAnalogOutput(NetworkNode *networkNode, int32_t analogChannel)
Create an Analog Output from a RapidCodeNetworkNode.
static IOPoint * CreateDigitalInput(Axis *axis, RSIMotorDedicatedIn motorDedicatedInNumber)
Create a Digital Input from an Axis' Dedicated Input bits.
static IOPoint * CreateDigitalOutput(MotionController *controller, int32_t pdoIndex, int32_t bitNumber, RSIPDOType type)
Create a Digital Output from a network PDO.
bool IsDigital()
Determine if an I/O point is Digital or Analog.
static IOPoint * CreateDigitalInput(MotionController *controller, uint64_t memoryAddress, int32_t bitNumber)
Create a Digital Output from a network PDO.
static IOPoint * CreateDigitalInput(MotionController *controller, int32_t pdoIndex, int32_t bitNumber, RSIPDOType type)
Create a Digital Output from a network PDO.
static IOPoint * CreateDigitalOutput(Axis *axis, RSIMotorDedicatedOut motorDedicatedOutNumber)
Create a Digital Output from an Axis' Dedicated Output bits.
static IOPoint * CreateDigitalOutput(NetworkNode *networkNode, int32_t bitNumber)
Create a Digital Output from a RapidCodeNetworkNode.
bool Get()
Get the state of Digital Input or Output.
int32_t MaskGet()
Get the bit mask for the I/O point.
Represents one specific point: Digital Output, Digital Input, Analog Output, or Analog Input....
Definition rsi.h:12773
Axis * AxisGet(int32_t axisNumber)
AxisGet returns a pointer to an Axis object and initializes its internals.
NetworkNode * NetworkNodeGet(int32_t nodeNumber)
NetworkNodeGet returns a pointer to a RapidCodeNetworkNode object using its node number and initializ...
void UserLimitDisable(int32_t number)
Disable the processing of a User Limit.
void InterruptWake()
Wake all threads waiting for a controller interrupt.
static MotionController * Get(const char *const nodeName)
[Windows] Get an already running RMP EtherCAT controller by its INtime node name.
int32_t RecorderRecordCountGet()
Get the number of records that are stored and ready for reading on Recorder 0.
int32_t NetworkSyncGroupCountGet()
Get the number of sync groups present on the network.
void UserLimitReset(int32_t number)
Clear the latched status of a User Limit.
int32_t UserLimitCountGet()
Get the number of UserLimits processing in the firmware.
uint64_t NetworkOutputValueGet(int32_t index)
Gets the value sent out over EtherCAT.
void RecorderStart()
Start recording data.
void RecorderCircularBufferSet(bool enable)
Configure recorder as circular buffer (or not) on Recorder 0.
int32_t RecorderBufferSizeGet(int32_t recorderNumber)
Get Frame buffer size for the Recorder.
void UserVersionSet(int32_t version)
Sets a customer designed Version for the application.
void NetworkOutputOverrideValueSet(int32_t index, uint64_t outputValue)
Sets a PDO output directly.
RSINetworkState NetworkStateGet()
void RecorderBufferSizeSet(int32_t recorderNumber, int32_t bufferSize)
Set buffer size for the Recorder.
static constexpr int32_t AxisFrameBufferSizeDefault
The default value of the AxisFrameBufferSize, also the minimum allowable value.
Definition rsi.h:860
void MathBlockCountSet(int32_t mathBlockCount)
Set the number of processed MathBlocks in the MotionController.
bool RecorderTriggerOnMotionGet(int32_t recorderNumber)
Check to see if the Recorder is set to trigger on motion.
FirmwareValue NetworkOutputIntendedFirmwareValueGet(int32_t index)
Gets the typed value set by the cyclic RMP processes.
void RecorderRecordDataRetrieve()
Retrieve one record of recorded data on Recorder 0.
RSINetworkEniResult NetworkEniGenerate()
Generate the network ENI file, EtherCAT.xml.
void SampleRateSet(double sampleRate)
Configure the RMP firmware control loop frequency.
const char *const FirmwareVersionGet()
Get the firmware version.
void RecorderDataCountSet(int32_t count)
Set the number of data values to be recorded on Recorder 0.
void Reset()
Reset the controller which stops and restarts the RMP firmware.
uint64_t FirmwareAddressGet(uint64_t hostAddress)
Convert a host controller address to a firmware address.
int32_t NetworkInputBitOffsetGet(int32_t index)
void RecorderConfigureToTriggerOnMotion(Axis *axis, bool triggerOnMotion)
Configure the Recorder 0 to trigger on Axis motion.
void UserLimitConditionSet(int32_t number, int32_t conditionNumber, RSIUserLimitLogic logic, uint64_t addressOfUInt32, uint32_t userLimitMask, uint32_t limitValueUInt32)
Set the conditions for a User Limit with a 32-bit integer trigger value.
void SyncInterruptHostProcessStatusClear()
Clear the Host Process status bit.
void MotionCountSet(int32_t motionCount)
Set the number of processed Motion Supervisors in the controller.
void MemorySet(uint64_t address, int32_t data)
Write a value to controller memory.
uint64_t NetworkOutputOverrideValueGet(int32_t index)
Sets a PDO output directly.
static MotionController * Create(CreationParameters *creationParameters)
Initialize and start the RMP EtherCAT controller.
int32_t CompensatorCountGet()
Get the number of Compensators available in the firmware.
void NetworkOutputOverrideSet(int32_t index, bool outputOverride)
Set NetworkOutputValue to override RMP cyclic value.
const char *const NetworkOutputDataTypeNameGet(int32_t index)
Get the data type name (as a string) of a PDO network output.
void MemoryDoubleSet(uint64_t address, double dataDouble)
Write a 64-bit double value to controller memory.
const int32_t *const RecorderRecordDataGet()
Get one record of recorded data on Recorder 0.
void ServiceThreadEnableSet(bool enable)
Enable or disable the service thread.
RSIDataType AddressDataTypeGet(RSIControllerAddressType type)
Get the data type for an address on the MotionController.
RSIDataType NetworkInputDataTypeGet(int32_t index)
Get the RSIDataType for a PDO input.
uint64_t AddressGet(RSIControllerAddressType type)
Get the an address for some location on the MotionController.
void UserLimitOutputSet(int32_t number, uint32_t andMask, uint32_t orMask, uint64_t outputPtr, bool enabled)
Configure a User Limit Output block.
int32_t RecorderRecordMaxCountGet()
Get the maximum number of records the recorder can store on Recorder 0.
int32_t CompensatorPointCountGet(int32_t compensatorNumber)
Get the number of points for use with a Compensator.
int32_t NetworkNodeCountGet()
Get the number of nodes discovered on the EtherCAT network.
void CompensatorEnable(int32_t compensatorNumber)
Enables the compensator only if it will cause no errors.
void NetworkSyncGroupRecover(int32_t groupId, uint32_t timeoutMilliseconds=NetworkSyncGroupRecoverTimeoutMillisecondsDefault)
Recover a degraded (non-zero) sync group back to Operational without restarting the network.
bool UserLimitEnableGet(int32_t number)
Get the enabled state of a User Limit.
FirmwareValue NetworkOutputSentFirmwareValueGet(int32_t index)
Gets the typed value sent out over EtherCAT.
void SyncInterruptEnableSet(bool enable)
Configure Sync (periodic) interrupts for the controller.
void CompensatorPointCountSet(int32_t compensatorNumber, int32_t pointCount)
Set the number of points for use with a Compensator.
NetworkSyncGroupStatus NetworkSyncGroupStatusGet(int32_t groupId)
Get the status of a single sync group.
uint64_t NetworkInputValueGet(int32_t index)
static MotionController * Create()
Initialize and start the RMP EtherCAT controller.
RSIProcessorType ProcessorTypeGet()
Get the processor type.
uint64_t AddressFromStringGet(const char *const addressName)
Get a controller memory address from string.
void CompensatorTableGet(int32_t compensatorNumber, double *table)
Read the table for a configured compensator.
bool IsLicensed()
Check to see if this MotionController is licensed.
uint64_t NetworkOutputIntendedValueGet(int32_t index)
Gets the value set by the cyclic RMP processes.
uint64_t NetworkOutputSentValueGet(int32_t index)
Gets the value sent out over EtherCAT.
static MotionController * CreateFromFile(const char *const fileName)
Create a MotionController from a memory-dumped file.
void RecorderDataAddressesSet(int32_t recorderNumber, const uint64_t *const addresses, int32_t addressCount)
Setup multiple addresses to record at once.
void SyncInterruptHostProcessFlagSet(bool hostProcessFlag)
Set the Host Process flag.
double CompensatorPositionGet(int32_t compensatorNumber)
Get the compensator position.
void NetworkShutdown()
Shutdown the EtherCAT network.
int32_t MemoryGet(uint64_t address)
Read controller memory.
uint64_t NetworkOutputAddressGet(int32_t index)
Get the host address for a Network Output.
void SampleWait(uint32_t samples)
Wait for controller firmware to execute samples.
void SyncInterruptPeriodSet(uint32_t samples)
Configure the period for the Sync Interrupt on the controller.
void UserLimitInterruptUserDataAddressSet(int32_t number, uint32_t userDataIndex, uint64_t address)
Set the User Data address based on a User Limit trigger.
void MemoryToFile(const char *const fileName)
Saves an RMP firmware memory dump which can be compared with others.
int32_t BackgroundCycleCounterGet()
Get the current value of the controller's processor's background cycle counter.
int32_t RecorderRecordDataValueGet(int32_t index)
Get one value from a retrieved record on Recorder 0.
void NetworkStart()
Start the network, doing both a discovery followed by starting to OPERATIONAL state.
static MotionController * Get(int32_t controllerIndex=CreationParameters::ControllerIndexDefault)
Get an already running RMP EtherCAT controller.
void NetworkOutputValueSet(int32_t index, uint64_t outputValue)
Sets a PDO output directly.
void MotionHoldGateSet(int32_t gateNumber, bool hold)
Set the Motion Hold Gate.
void UserLimitConfigSet(int32_t number, RSIUserLimitTriggerType triggerType, RSIAction action, int32_t actionAxis, double duration, bool singleShot)
Configure a User Limit.
const char *const NetworkEniGenerateOutputGet()
Retrieve the text output from the previous NetworkEniGenerate() call.
void CompensatorTableSet(int32_t compensatorNumber, const double *const table)
Override the table for a configured compensator.
static constexpr double SampleRateDefault
Default RMP sample rate in hertz.
Definition rsi.h:849
void MemoryBlockSet(uint64_t address, const void *const dataStart, int32_t size)
Set controller memory.
uint64_t HostAddressGet(uint64_t firmwareAddress)
Convert a firmware address to a host controller address.
uint64_t NetworkInputAddressGet(int32_t index)
Get the host address for a PDO input.
void RecorderStop()
Stop recording data on Recorder 0.
const char *const NetworkLogMessageGet(int32_t messageIndex)
static MotionController * CreateFromSoftware(const char *const RtaPath, const char *const NodeName)
Initialize and start the RMP EtherCAT controller.
int32_t MathBlockCountGet()
Get the number of MathBlocks processing in the firmware.
static MotionController * CreateFromSoftware()
Initialize and start the RMP EtherCAT controller.
int32_t SyncInterruptHostProcessTimeGet()
Get the total number of microseconds availble for host processing.
void Delete(void)
Delete the MotionController and all its objects.
int32_t FirmwareOptionGet()
Get the firmware option number.
int32_t SampleCounterGet()
Get the current value of the controller's processor's sample counter.
void NetworkOutputOverrideFirmwareValueSet(int32_t index, FirmwareValue value)
Sets a typed PDO override value.
double ProcessorUsageGet()
Get the processor usage percent.
int32_t AxisFrameBufferSizeGet(int32_t axisNumber)
Get Frame buffer size for the axis.
int32_t UserVersionGet()
Get a customer designated Version for the application.
void CompensatorDisable(int32_t compensatorNumber, bool force=false)
Disable a compensator with the option to force the action.
static MotionController * CreateFromSoftware(const char *const RtaPath)
Initialize and start the RMP EtherCAT controller.
bool SyncInterruptHostProcessStatusBitGet()
See if the host was processing too int32_t on previous Sync Interrupt.
IO * IOGet(int32_t nodeNumber)
IOGet returns a pointer to an IO object using its node number and initializes its internals.
void RecorderReset()
Reset the recorder on Recorder 0.
uint32_t FirmwareTimingDeltaGet()
Get the most recent time (in microseconds) between samples.
int32_t RecorderCountGet()
Get the number of Recorder available in the firmware.
FirmwareValue NetworkInputFirmwareValueGet(int32_t index)
Get the typed value for a PDO input.
FirmwareValue NetworkOutputOverrideFirmwareValueGet(int32_t index)
Gets the typed PDO override value.
CreationParameters CreationParametersGet()
Get the CreationParameters identifying this controller's firmware.
void RecorderDataAddressSet(int32_t index, uint64_t address)
Setup the addresses to be recorded on Recorder 0.
RSIDataType NetworkOutputDataTypeGet(int32_t index)
Get the RSIDataType for a PDO output.
void AxisFrameBufferSizeSet(int32_t axisNumber, int32_t frameBufferSize)
Set Frame buffer size for the axis.
int32_t UserLimitCountMax()
Get the total number of User Limits available.
void Refresh()
Refresh / reinitialize the motion controller. Required after changing dynamic memory object counts.
void Shutdown()
Shutdown the controller.
bool UserLimitStateGet(int32_t number)
Get the state of a User Limit.
int32_t CompensatorDimensionGet(int32_t compensatorNumber)
Get the dimension of the compensator.
void MemoryBlockGet(uint64_t address, void *dataStart, int32_t size)
Read controller memory.
MultiAxis * MultiAxisGet(int32_t motionSupervisorNumber)
MultiAxisGet returns a pointer to a MultiAxis object and initializes its internals.
int32_t AxisCountGet()
Get the number of axes processing.
void RecorderPeriodSet(uint32_t samples)
Set the number of samples between records on Recorder 0.
int32_t MotionCountGet()
Get the number of Motion Supervisors available in the firmware.
void RecorderCountSet(int32_t recorderCount)
Set the number of processed Recorders in the controller.
NetworkStatus NetworkStatusGet()
Get the EtherCAT network status.
MultiAxis * LoadExistingMultiAxis(int32_t motionSupervisorNumber)
Get/Create a MultiAxis object from one that already exists (previously setup) on the RMP motion contr...
double MemoryDoubleGet(uint64_t address)
Read a 64-bit double value from controller memory.
void CompensatorCountSet(int32_t compensatorCount)
Set the number of Compensators available in the firmware.
bool MotionHoldGateGet(int32_t gateNumber)
Get the state of the hold gate.
bool RecorderEnabledGet()
Determine if the recorder is recording on Recorder 0.
int32_t SyncInterruptWait()
Suspend the current thread until an interrupt arrives from the controller.
bool NetworkOutputOverrideGet(int32_t index)
Gets if the NetworkOutputValue or the RMP cyclic value is exchanged over EtherCAT.
void ProcessorUsageClear()
Clear the processor usage percent.
int32_t RecorderRecordDataRetrieveBulk(int32_t recorderNumber, int32_t recordCount)
Retrieve a group of records of recorded data.
void CompensatorConfigSet(int32_t compensatorNumber, int32_t firstInputAxisNumber, RSIAxisMasterType firstInputAxisType, double firstInputAxisMinimum, double firstInputAxisMaximum, double firstInputAxisDelta, int32_t secondInputAxisNumber, RSIAxisMasterType secondInputAxisType, double secondInputAxisMinimum, double secondInputAxisMaximum, double secondInputAxisDelta, int32_t outputAxisNumber, RSICompensatorOutputType outputType, const double *const table)
Configure a 2D compensator.
void UserLimitCountSet(int32_t userLimitCount)
Set the number of processed UserLimits in the MotionController.
void RecorderBufferHighCountSet(int32_t bufferHighCount)
Set the high count for the recording buffer on Recorder 0.
void CompensatorTableClear(int32_t compensatorNumber)
Sets all values in the compensator table to 0.
uint32_t SerialNumberGet(void)
Get the controller's serial number.
const char *const StringFromAddressGet(uint64_t hostAddress)
Get a human-readable string from a memory address.
void InterruptEnableSet(bool enable)
Control interrupts for this class.
void AxisCountSet(int32_t axisCount)
Set the number of allocated and processed axes in the controller.
const char *const NetworkInputDataTypeNameGet(int32_t index)
Get the data type name (as a string) of a PDO network input.
Represents the RMP soft motion controller. This class provides an interface to general controller con...
Definition rsi.h:796
int32_t UnsupportedOptionSet(int32_t option)
deprecated
RSIControllerType ControllerTypeGet()
Get the type of motion controller.
int32_t UserLimitOutputValueGet(int32_t number)
Get the user limit output value.
uint32_t NetworkTimingThresholdHighCountGet()
Get the number of network packets that were sent to slowly (above the high threshold).
bool HasMechaWare()
Returns true if this RMP firmware supports MechaWare.
uint64_t UserLimitOutputAddressGet(int32_t number)
Get the user limit output address. The output will write its value to this address.
uint32_t UserLimitConditionMaskGet(int32_t number, int32_t conditionNumber)
Get the user limit condition mask.
int32_t SyncInterruptHostProcessFlagGet()
Get the host process flag.
bool NetworkSynchronizedGet()
Returns true if the network is synchronized with distributed clocks.
static constexpr uint32_t MotionControllerCountMaximum
Maximum number of MotionController objects supported in a single process.
Definition rsi.h:819
uint32_t NetworkTimingMinGet()
Get the minimum microseconds recorded between network packets.
uint64_t UserLimitConditionAddressGet(int32_t number, int32_t conditionNumber)
Get the user limit condition address.
const char *const NetworkOutputNameGet(int32_t index)
Get the name of a PDO output.
int32_t ServerPortGet()
Get the TCP port of the server. (Valid if controller type is CLIENT.).
uint32_t NetworkTimingThresholdLowCountGet()
Get the number of network packets that were sent to quickly (below the low threshold).
uint32_t NetworkTimingMaxGet()
Get the maximum microseconds recorded between consecutive network packets.
int32_t NetworkOutputBitSizeGet(int32_t index)
Get the size (in bits) of a PDO output.
uint64_t UserLimitOutputAndMask64Get(int32_t number)
Get the user limit output 64-bit AND mask.
RSIAction UserLimitActionGet(int32_t number)
Get the user limit action.
static constexpr uint32_t NetworkSyncGroupRecoverTimeoutMillisecondsDefault
Default per-node AL-transition time to wait when calling NetworkSyncGroupRecover().
Definition rsi.h:813
uint32_t UserLimitOutputOrMaskGet(int32_t number)
Get the user limit output OR mask.
MathBlockConfig MathBlockConfigGet(int32_t mathBlockNumber)
Get a MathBlock configuration.
int32_t NetworkOutputBitOffsetGet(int32_t index)
Get the raw PDO offset for an output.
int32_t AxisLicenseCountGet()
Get the number of licensed Axis objects on this motion controller. If you need more,...
RapidCodeOS * OS
Provides access to operating system (Windows) features.
Definition rsi.h:4382
bool ServiceThreadStateGet()
Returns true if the service thread was started.
static constexpr uint32_t RecorderCountMaximum
Maximum number of Recorder objects supported.
Definition rsi.h:832
uint32_t UserLimitOutputAndMaskGet(int32_t number)
Get the user limit output AND mask.
bool UserLimitSingleShotGet(int32_t number)
Returns true if the user limit is configured for single-shot.
bool UserLimitOutputEnableGet(int32_t number)
Returns true if the user limit output is enabled.
const char *const ServerNameGet()
Get the name of the server. (Valid if controller type is CLIENT.).
bool MechaWareLicenseGet()
Returns true if this motion controller is licensed to run MechaWare.
int32_t PackageVariantGet()
Get the motion controller package.
RSIUserLimitLogic UserLimitConditionLogicGet(int32_t number, int32_t conditionNumber)
Get the user limit condition logic.
static constexpr uint32_t AxisCountMaximum
Maximum number of Axis objects supported.
Definition rsi.h:816
void UserLimitEnableSet(int32_t number, bool enable)
Enable or disable a user limit to be processed by the RMP firmware.
double UserLimitOutputDoubleGet(int32_t number)
Get the user limit output 64-bit double value.
static constexpr uint32_t NetworkStartTimeoutMillisecondsDefault
Default time to wait when calling NetworkStart().
Definition rsi.h:810
FirmwareValue MathBlockProcessValueGet(int32_t mathBlockNumber)
Get a MathBlock process value.
void NetworkTimingEnableSet(bool enable)
Enable or disable the firmware to start timing the network packets.
RSINetworkStartError LastNetworkStartErrorGet()
Get the last (most recent) network start error.
void MathBlockConfigSet(int32_t mathBlockNumber, MathBlockConfig &config)
Set a MathBlock configuration.
int32_t NetworkInputCountGet()
Get the number of PDO inputs found on the network.
void NetworkTimingThresholdHighSet(uint32_t microseconds)
Set a high threshold. The RMP will count the number of network packets sent above this threshold (too...
uint64_t UserLimitInterruptUserDataAddressGet(int32_t number, uint32_t userDataIndex)
Get the user limit interrupt user data address.
int32_t NetworkInputBitSizeGet(int32_t index)
Get the size (in bits) of a network input.
static constexpr uint32_t CompensatorCountMaximum
Maximum number of position Compensator objects supported.
Definition rsi.h:835
RSINetworkType NetworkTypeGet()
Returns network type. (Currently only STRING type is supported.).
int32_t NetworkCounterGet()
Read the network counter. This increments by one for each cycle of the network.
uint64_t UserLimitOutputInputAddressGet(int32_t number)
Get the user limit output address. The user limit will output the value stored at this address when t...
RSINetworkTechnologyType NetworkTechnologyTypeGet()
Get the network technology type EtherCAT.
double RecorderRecordDataDoubleGet(int32_t index)
This is an overloaded member function, provided for convenience. It differs from the above function o...
static constexpr uint32_t UserBufferDataCountMaximum
Maximum number of 64-bit values that can be stored in the UserBuffer.
Definition rsi.h:841
uint32_t NetworkTimingDeltaGet()
Get the number of microseconds since the previous network packet was sent.
RSIDataType UserLimitConditionDataTypeGet(int32_t number, int32_t conditionNumber)
Get the user limit condition data type.
double UserLimitConditionLimitValueDoubleGet(int32_t number, int32_t conditionNumber)
Get the user limit condition limit value (as 64-bit double).
static constexpr uint32_t NetworkSyncGroupCountMaximum
Maximum number of EtherCAT sync groups supported, including the mandatory default group 0....
Definition rsi.h:829
int32_t UserLimitConditionLimitValueGet(int32_t number, int32_t conditionNumber)
Get the user limit condition value.
RSIDataType UserLimitOutputDataTypeGet(int32_t number)
Get the user limit output data type.
int32_t UserLimitAxisNumberGet(int32_t number)
Get the user limit axis number.
static constexpr uint32_t MathBlockCountMaximum
Maximum number of MathBlock objects supported.
Definition rsi.h:838
double UserLimitDurationGet(int32_t number)
Get the user limit duration (seconds).
static constexpr uint32_t NetworkNodeCountMaximum
Maximum number of nodes allowed on the network.
Definition rsi.h:825
static constexpr uint32_t MotionCountMaximum
Maximum number of Motion objects supported. (One required for each Axis and MultiAxis).
Definition rsi.h:822
bool NetworkTimingEnableGet()
Returns true if firmware network packet timing metrics are enabled.
void NetworkTimingThresholdLowSet(uint32_t microseconds)
Set a low threshold. The RMP will count the number of network packets sent below this threshold (too ...
FirmwareValue RecorderRecordDataFirmwareValueGet(int32_t index)
This is an overloaded member function, provided for convenience. It differs from the above function o...
RSIUserLimitTriggerType UserLimitTriggerTypeGet(int32_t number)
Get the user limit trigger type.
uint64_t UserLimitOutputOrMask64Get(int32_t number)
Get the user limit output 64-bit OR mask.
void NetworkTimingClear()
Clear all the network timing values.
const char *const NetworkInputNameGet(int32_t index)
Get the name of a PDO network input.
void MoveVelocitySCurve(const double *const velocity, const double *const accel, const double *const jerkPct)
Velocity move with non-constant acceleration.
void PathListStart(const double *const startPosition)
Start a line and arc point list for path motion.
void MoveTrapezoidal(const double *const position, const double *const vel, const double *const accel, const double *const decel)
Point-to-point trapezoidal move.
void PathMotionStart()
Start the path motion.
void PathArcAdd(const double *const center, double angle)
Add an arc segment to the path.
Axis * AxisGet(int32_t index)
Get the Axis class used in this MultiAxis class.
bool AmpEnableGet()
Get the enabled/disabled state of the multi axis.
void PathRatioSet(const double *const ratio)
Set the scale factor ratios for each axis.
double VectorJerkPercentGet()
Get the vector jerk percent.
uint64_t AddressGet(RSIMultiAxisAddressType addressType)
Get the host address for some location on the MultiAxis.
double VectorAccelerationGet()
Get the vector acceleration.
RSIPathPlanType PathPlanTypeGet()
Get the path motion planning type.
const char *const UserLabelGet()
Get the MultiAxis User defined Label.
void UserLabelSet(const char *const userLabel)
Set the MultiAxis User defined Label.
double VectorVelocityGet()
Get the vector velocity.
double VectorDecelerationGet()
Get the vector deceleration.
void AxisRemoveAll()
Remove all axes from a MultiAxis group.s.
RSIDataType AddressDataTypeGet(RSIMultiAxisAddressType type)
Get the data type for an address of the MultiAxis.
void MoveRelative(const double *const relativePosition, const double *const vel, const double *const accel, const double *const decel, const double *const jerkPct)
Command a relative point-to-point S-Curve motion.
void VectorDecelerationSet(double deceleration)
Set the vector deceleration.
void MoveVector(const double *const position)
Point-to-point vector move.
void PathPlanTypeSet(RSIPathPlanType type)
Set the path motion planning type.
void MoveVectorRelative(const double *const relativePosition)
void MoveSCurve(const double *const position, const double *const vel, const double *const accel, const double *const decel, const double *const jerkPct)
Point-to-point S-Curve Move.
void PathLineAdd(const double *const position)
Add a line segment to the path.
void AxesAdd(Axis **axes, int32_t axisCount)
void PathTimeSliceSet(double seconds)
Set the time slice for the Path.
void PathBlendSet(bool blend)
Set the blending attribute.
void VectorAccelerationSet(double acceleration)
Set the vector acceleration.
void MoveVelocity(const double *const velocity, const double *const accel)
Velocity move.
uint16_t MotionElementIdExecutingGet()
void VectorJerkPercentSet(double jerkPercent)
Set the jerk percent for a vector move.
double PathRatioGet(int32_t index)
void PathListEnd()
End a line and arc point list for path motion.
void AxisAdd(Axis *axis)
Add an Axis to a MultiAxis group.
double PathTimeSliceGet()
Set the time slice for the Path.
void VectorVelocitySet(double velocity)
Set the vector velocity.
Represents multiple axes of motion control, allows you to map two or more Axis objects together for e...
Definition rsi.h:12018
int32_t AxisMapCountGet()
Get the number of Axis objects in the Axis map.
Status StatusGet()
Get the node's status details.
void DigitalOutSet(int32_t digitalOutNumber, bool state)
Set the state of a digital output.
void ServiceChannelWrite(int32_t index, int32_t subIndex, int32_t byteCount, int32_t sdoValue, uint32_t timeoutMilliseconds=SDOTimeoutMillisecondsDefault)
Write a number in the SDO.
const char *const DigitalOutUserLabelGet(int32_t digitalOutNumber)
Get the user defined label of one of this node's digital outputs.
bool DigitalInGet(int32_t digitalInNumber)
Get the state of a digital input.
static constexpr int32_t IoUserLabelBufferBytes
Definition rsi.h:5090
void AnalogOutUserLabelSet(int32_t analogChannel, const char *const userLabel)
Set the user defined label of one of this node's analog outputs.
uint64_t DigitalOutAddressGet(int32_t bitNumber)
Get the host address for a Node's digital output.
const char *const ServiceChannelReadString(int32_t index, int32_t subIndex, int32_t byteCount, uint32_t timeoutMilliseconds=SDOTimeoutMillisecondsDefault)
Read a string from the SDO.
RapidVector< uint8_t > ServiceChannelReadBytes(int32_t index, int32_t subIndex, int32_t byteCount, uint32_t timeoutMilliseconds)
Read a number of bytes from the SDO.
uint64_t AnalogInAddressGet(int32_t channel)
Get the host address for a Node's analog input.
int32_t DigitalInCountGet()
Get the number of digital inputs on this node.
const char *const AnalogInUserLabelGet(int32_t analogChannel)
Get the user defined label of one of this node's analog inputs.
const char *const UserLabelGet()
Get this node's user defined label.
bool HasIO()
Check if the node has any analog or digital inputs or outputs.
void UserLabelSet(const char *const userLabel)
Set this node's user defined label.
RSIDataType AddressDataTypeGet(RSINetworkNodeAddressType addressType)
Get the data type for one of this node's status addresses.
const char *const VendorNameGet()
Get the node's vendor name from NodeInfo.xml or CustomNodeInfo.xml.
int32_t AnalogInMaskGet(int32_t channel)
Get the bitwise mask for a Node's analog input.
void ConfigSet(const Config &config)
Set the node's configuration.
int32_t AnalogOutNetworkIndexGet(int32_t analogChannel)
Get the global network output index for a node's analog output channel.
const char *const DigitalInUserLabelGet(int32_t digitalInNumber)
Get the user defined label of one of this node's digital inputs.
int32_t DigitalInMaskGet(int32_t bitNumber)
Get the bitwise mask for a Node's digital input.
int32_t DigitalOutNetworkIndexGet(int32_t digitalOutNumber)
Get the global network output index for a node's digital output channel.
int32_t AnalogInGet(int32_t analogChannel)
Get the value of an analog input.
uint64_t AddressGet(RSINetworkNodeAddressType addressType)
Get the host address for one of this node's status values.
int32_t DigitalOutMaskGet(int32_t bitNumber)
Get the bitwise mask for a Node's digital output.
int32_t ServiceChannelRead(int32_t index, int32_t subIndex, int32_t byteCount, uint32_t timeoutMilliseconds=SDOTimeoutMillisecondsDefault)
Read a 32-bit integer value from the SDO.
uint64_t DigitalInAddressGet(int32_t bitNumber)
Get the host address for a Node's digital input.
bool DigitalOutGet(int32_t digitalOutNumber)
Get the state of a digital output.
char * AKDASCIICommand(const char *const command)
Send an ASCII command to a supported Kollmorgen drive.
const char *const AnalogOutUserLabelGet(int32_t analogChannel)
Get the user defined label of one of this node's analog outputs.
const char *const NameGet()
Get the Node's Short Name that appears on NodeInfo.xml.
void DigitalInUserLabelSet(int32_t digitalInNumber, const char *const userLabel)
Set the user defined label of one of this node's digital inputs.
static constexpr int32_t UserLabelCharacterCountMaximum
Definition rsi.h:5085
void DigitalOutUserLabelSet(int32_t digitalOutNumber, const char *const userLabel)
Set the user defined label of one of this node's digital outputs.
uint64_t IoUserLabelGenerationGet()
Get the change counter that says whether any I/O point user label on this controller changed.
const char *const ProductNameGet()
Get the node's product name from NodeInfo.xml or CustomNodeInfo.xml.
int32_t AnalogOutGet(int32_t analogChannel)
Get the value of an analog output.
int32_t AnalogInCountGet()
Get the number of analog inputs on this node.
int32_t DigitalOutCountGet()
Get the number of digital outputs on this node.
int32_t DigitalInNetworkIndexGet(int32_t digitalInNumber)
Get the global network input index for a node's digital input channel.
bool IsAKDASCIICommandSupported()
Check whether this node accepts Kollmorgen ASCII commands through AKDASCIICommand().
Config ConfigGet()
Get the node's configuration.
int32_t AnalogInNetworkIndexGet(int32_t analogChannel)
Get the global network input index for a node's analog input channel.
int32_t AnalogOutCountGet()
Get the number of analog outputs on this node.
void StatusClear()
Clear the node's status values.
void AnalogInUserLabelSet(int32_t analogChannel, const char *const userLabel)
Set the user defined label of one of this node's analog inputs.
void AnalogOutSet(int32_t analogChannel, int32_t analogValue)
Set the value of an analog output.
uint64_t AnalogOutAddressGet(int32_t channel)
Get the host address for a Node's analog output.
int32_t AnalogOutMaskGet(int32_t channel)
Get the bitwise mask for a Node's analog output.
uint32_t RevisionGet()
Get the EtherCAT hardware revision.
uint32_t AxisCountGet()
Get the number of Axis objects associated with this NetworkNode.
int32_t SegmentDigitalOutCountGet(int32_t segmentNumber)
Get the number of digital outputs on a segment.
int32_t SegmentIDGet(int32_t segmentNumber)
Get the ID number of a segment.
uint32_t ProductCodeGet()
Get the EtherCAT product code.
uint16_t StatusWordGet(int32_t axisIndex)
Get the DS402 status word.
int32_t SegmentCountGet()
Get the number of segments on this node.
int32_t SegmentAnalogOutCountGet(int32_t segmentNumber)
Get the number of analog outputs on a segment.
bool IsEtherCAT()
Check if the node is EtherCAT.
int32_t SegmentAnalogInCountGet(int32_t segmentNumber)
Get the number of analog inputs on a segment.
static constexpr uint32_t SDOTimeoutMillisecondsDefault
Default time to wait when reading or writing an SDO with ServiceChannelRead() or ServiceChannelWrite(...
Definition rsi.h:4399
uint32_t VendorIdGet()
Get the EtherCAT vendor ID.
bool IsSynqNet()
Check if the node is SynqNet.
void ClearFaults(int32_t axisNumber)
Clear the faults for a specific axis number on this node.
bool Exists()
Returns true if this NetworkNode exists on a physical network.
int32_t SegmentDigitalInCountGet(int32_t segmentNumber)
Get the number of digital inputs on a segment.
RSINodeType TypeGet()
Get the node type, as determined by the Vendor ID and Product Code.
uint32_t StationAliasGet()
Get the EtherCAT station alias.
const char *const SerialNumberGet()
Get the serial number as text.
static const char *const INtimeCatalogRMPNetworkGet()
Get the RMPNetwork catalog.
static INtimeStatus INtimeStatusGet(const char *const nodeName)
Get the status of INtime.
static INtimeStatus INtimeStart()
Start INtime.
static INtimeStatus INtimeRestart(const char *const nodeName)
Restart INtime (reboot INtime).
static uint32_t INtimeNodeCountGet()
Get the number of INtime nodes on this PC.
static const char *const INtimeCatalogRMPGet()
Get the RMP catalog.
static INtimeStatus INtimeStart(const char *const nodeName)
Start INtime.
static INtimeStatus INtimeStatusGet()
Get the status of INtime.
static bool INtimeNodeIsLocal(uint32_t nodeNumber)
Determine if an INtime node is local (on this PC) or distributed (on another PC).
static INtimeStatus INtimeStop(const char *const nodeName)
Stop INtime.
static const char *const INtimeNodeNameGet(uint32_t nodeNumber)
Get the name of an INtime node.
static INtimeStatus INtimeRestart()
Restart INtime (reboot INtime).
static INtimeStatus INtimeStop()
Stop INtime.
Represents the real-time operating system (INtime) when using RMP for Windows. This class provides st...
Definition rsi.h:13042
double InterruptUserDataDoubleGet(uint32_t userDataIndex)
Get the user data associated with the interrupt, as a 64-bit double.
uint64_t InterruptUserDataAddressGet(uint32_t userDataIndex)
Get the 64-bit host address from the interrupt's UserData.
int32_t InterruptSourceNumberGet()
Get the number (or index) of the object (Axis, Motor, etc) that generated the interrupt.
int32_t InterruptSampleTimeGet()
Get the sample timer value when the last interrupt was generated.
const char *const InterruptNameGet()
Get the text name of an interrupt type.
FirmwareValue InterruptUserDataValueGet(uint32_t userDataIndex)
Read the user data associated with the interrupt as a FirmwareValue.
void InterruptUserDataAddressSet(uint32_t userDataIndex, uint64_t hostAddress)
Set the interrupt's UserData address.
uint64_t InterruptUserDataGet(uint32_t userDataIndex)
Get the user data associated with the interrupt, as a 64-bit unsigned integer.
RSIEventType InterruptWait(int32_t milliseconds)
Suspend the current thread until an interrupt arrives from the controller.
Interface for objects which can use interrupts.
Definition rsi.h:590
void InterruptWake()
Wake any and all threads waiting for interrupts.
void InterruptMaskClear()
Clear the interrupt mask so no interrupts will be generated.
uint16_t InterruptMotionIdGet()
Get the 16-bit MotionId - only valid if RSIEventType == MOTION_DONE.
void InterruptMaskOnSet(RSIEventType eventType)
Set a bit in the interrupt mask so you will get interrupts for the given RSIEventType.
void InterruptMaskOffSet(RSIEventType eventType)
Clear a bit in the interrupt mask so you won't get interrupts for the given RSIEventType.
void InterruptMaskAllSet()
Set all the bits of the interrupt mask to get interrupts for ALL sources.
bool InterruptMaskOnGet(RSIEventType eventType)
Get the status of the interrupt mask for the given RSIEventType.
void InterruptEnableSet(bool enable)
Enable or disable interrupts.
void ClearFaults()
Clear all faults for an Axis or MultiAxis.
void MotionHoldAxisPositionSet(double position)
Sets the Axis position.
void InterruptWake()
Wake all threads waiting for an interrupt on this Axis.
bool MotionHoldGateGet()
Get the state of the hold gate.
double MotionHoldAxisPositionGet()
Gets the Axis position.
double MotionDelayGet()
Get the delay (seconds) that will occur before motion starts.
void Abort()
Abort an axis.
int32_t MotionHoldAxisNumberGet()
Gets the Axis number.
void StopTimeSet(double seconds)
Set the deceleration time for a Stop Event.
void MotionDelaySet(double seconds)
Set the time (seconds) that a motion will wait before starting.
void EStop()
E-Stop an axis.
void MotionHoldUserMaskSet(int32_t holdMask)
Sets the Motion Hold User bit mask.
double EStopTimeGet()
Get E-Stop Event deceleration time.
bool MotionAttributeMaskOnGet(RSIMotionAttrMask maskOn)
Check to see if a particular motion attribute mask is turned on.
void Map()
Writes the axis mapping relationship to the Controller.
void StreamingOutputAdd(int32_t onMask, int32_t offMask, uint64_t address)
bool AmpEnableGet()
Get the enabled state of all amplifiers.
void MovePVTF(const double *const position, const double *const velocity, const double *const time, const double *const feedforward, int32_t pointCount, int32_t emptyCount, bool retain, bool final)
Move commanded by list of positions, velocities, times, and feedforward values.
double FeedRateGet()
Get the axis feed rate.
void MotionHoldUserPatternSet(int32_t pattern)
Sets the Motion Hold User pattern bit mask.
void MotionAttributeMaskOffSet(RSIMotionAttrMask maskOff)
Turn off a particular motion attribute mask.
uint64_t MotionHoldUserAddressGet()
Gets the Motion Hold User Address.
void MotionHoldTypeSet(RSIMotionHoldType type)
Set the motion hold type.
int32_t MotionHoldGateNumberGet()
Returns the Motion Hold Gate number that the axis or multiaxis is set to.
void TriggeredModify()
Modify the currently executing motion to decelerate the Axis or MultiAxis to a zero velocity IDLE sta...
void MotionHoldAxisNumberSet(int32_t number)
Sets the Axis number for Motion Hold.
const char *const SourceNameGet(RSISource source)
Get the name (string) of the source of an error for an Axis or MultiAxis.
void MotionIdSet(uint16_t id)
Set the Motion identifier.
bool StatusBitGet(RSIEventType bitMask)
Return the state of a status bit.
int32_t MotionHoldUserMaskGet()
Gets the Motion Hold User Mask.
void EStopTimeSet(double seconds)
Set the deceleration time for an E-Stop Event.
int32_t MotionHoldUserPatternGet()
Gets the Motion Hold user bit pattern.
void MotionHoldGateNumberSet(int32_t gateNumber)
Assigns the axis or multiaxis Motion Hold Gate number to the specified controller gate.
RSIMotionHoldType MotionHoldTypeGet()
Get the motion hold attribute type.
int32_t MotionDoneWait(int32_t waitTimeoutMilliseconds=WaitForever)
Waits for a move to complete.
RSIState StateGet()
Get the Axis or MultiAxis state.
void MotionHoldUserAddressSet(uint64_t address)
Sets the Motion Hold User Address.
void Resume()
Resume an axis.
void StreamingOutputsClear()
Clear the contents of the Streaming Output List.
uint64_t StatusBitsGet()
Return all the RMP firmware status bits as a 64-bit unsigned bitmask.
void MotionHoldGateSet(bool hold)
Set the Motion Hold Gate.
void StreamingOutputsEnableSet(bool enable)
Sets whether Streaming Output is enabled (true) or disabled (false).
int32_t AmpEnableSet(bool enable, int32_t ampActiveTimeoutMilliseconds=AmpEnableTimeoutMillisecondsDefault, bool overrideRestrictedState=false)
Enable all amplifiers.
void FeedRateSet(double rate)
Set the feed rate for an Axis.
double MotionHoldTimeoutGet()
Get the motion hold timeout value.
void MotionHoldTimeoutSet(double seconds)
Set the motion hold timeout value.
void MotionFinalVelocitySet(double finalVelocity)
Sets final velocity value in UserUnits (!!! only used if FINAL_VEL motion attribute is used !...
int32_t NumberGet()
Get the axis number.
RSISource SourceGet()
Get the source of an error state for an Axis or MultiAxis.
uint16_t MotionIdGet()
Get the motion identifier.
void EStopModify()
E-Stop with a deceleration rate.
void MovePVT(const double *const position, const double *const velocity, const double *const time, int32_t pointCount, int32_t emptyCount, bool retain, bool final)
Move commanded by list of positions, velocities, and times.
void Unmap()
Removes the axis mapping relationship of the MultiAxis.
void MovePT(RSIMotionType type, const double *const position, const double *const time, int32_t pointCount, int32_t emptyCount, bool retain, bool final)
A move commanded by a list of position and time points.
void MovePTF(const double *const position, const double *const time, const double *const feedforward, int32_t pointCount, int32_t emptyCount, bool retain, bool final)
A move commanded by a list of position, time, and feedforward points.
bool IsMapped()
Check to see if the axis mapping is active on the firmware.
bool MotionDoneGet()
Check to see if motion is done and settled.
double StopTimeGet()
Get Stop Event deceleration time.
int32_t AxisCountGet()
Get the axis count.
void EStopAbort()
E-Stop, then abort an axis.
void MotionAttributeMaskOnSet(RSIMotionAttrMask maskOn)
Turn on a particular motion attribute mask.
double MotionFinalVelocityGet()
Gets final velocity value (!!! only used if FINAL_VEL motion attribute is used !!!...
void MovePVAJT(const double *const position, const double *const velocity, const double *const acceleration, const double *const jerk, const double *const time, int32_t pointCount, int32_t emptyCount, bool retain, bool final)
void InterruptEnableSet(bool enable)
Control interrupts for this class.
The RapidCodeMotion interface is implemented by Axis and MultiAxis .
Definition rsi.h:5505
static constexpr int32_t AmpEnableTimeoutMillisecondsDefault
Default timeout in milliseconds for AmpEnableSet() to wait for AMP_ACTIVE / OPERATION_ENABLED to go h...
Definition rsi.h:5509
RSIUserLimitLogic MotionHoldAxisLogicGet()
Get the logic when holding for Axis ActualPosition.
uint16_t MotionIdExecutingGet()
Get the currently executing motion ID.
MotionController * rsiControl
Gets the parent MotionController object.
Definition rsi.h:5521
void MotionHoldAxisLogicSet(RSIUserLimitLogic logic)
Set the logic when holding for Axis ActualPosition.
static constexpr int32_t WaitForever
Use this value to wait indefinitely in methods which accept a waitTimeoutMilliseconds parameter.
Definition rsi.h:5512
void MotionAttributeMaskDefaultSet()
Restore the motion attribute mask to the RapidCode default.
uint16_t MotionElementIdExecutingGet()
Get the currently executing element ID (streaming motion).
void Sleep(int32_t milliseconds)
Put the current thread to sleep.
int32_t KeyGet(int32_t milliseconds)
Wait for a key to be pressed and return its value.
int32_t PerformanceTimerFrequencyGet()
Gets the frequency of the performance counter.
int32_t PerformanceTimerCountGet()
Gets the current high performance counter value.
int32_t TimerFrequencyGet()
Get the number milliseconds per second.
int32_t TimerCountGet()
Gets the time since startup.
The RapidCodeOS object provides access to operating system (Windows) features. Accessible via MotionC...
Definition rsi.h:493
void Trace(bool state)
Enables/Disables trace output.
void TraceInjectMessage(RSITrace traceLevel, const char *const message)
Add a message to the Trace Log.
bool TraceMaskOnGet(RSITrace maskOn)
Check to see if a particular trace output mask is turned on.
void TraceMaskOnSet(RSITrace maskOn)
Turn on a particular trace output mask.
void TraceMaskClear()
Clear the trace output mask.
void ThrowExceptions(bool state)
Configure a class to throw exceptions.
void ErrorLogClear()
Clear the error log.
const RsiError *const ErrorLogGet()
Get the next RsiError in the log.
void TraceFileSet(const char *const fileName)
Channels Tracing messages to specified file.
void TraceMaskOffSet(RSITrace maskOff)
Turn off a particular trace output mask.
const char *const VersionGet()
Get the RSI RapidCode version.
int32_t NumberGet()
Get the zero-based index of this object.
void TraceFileClose()
Stops Logging to the file.
int32_t ErrorLogCountGet()
Get the number of software errors in the error log.
The RapidCode base class. All non-error objects are derived from this class.
Definition rsi.h:180
int32_t RSIVersionPatch()
Get the patch RSI version.
int32_t MpiVersionRelease()
Get the release MPI version.
int32_t MpiVersionMinor()
Get the minor MPI version.
const char *const ErrorMessageGet(RSIErrorMessage msg)
Get the detailed text message for an RSIErrorMessage.
int32_t RSIVersionMicro()
Get the micro RSI version.
const char *const RsiErrorMessageGet(RSIErrorMessage msg)
Get the RSI-specific error message text for a specific RSIErrorMessage.
int32_t RSIVersionMinor()
Get the minor RSI version.
int32_t RSIVersionMajor()
Get the major RSI version.
int32_t MpiVersionMajor()
Get the major MPI version.
bool WarningMsgCheck(RSIErrorMessage msg)
Check to see if an RSIErrorMessage is a warning (true) or not (false).
void Reserve(const size_t capacity)
Increases the size of the allocated storage of the vector to at least the specified size.
const size_t Size() const
Returns the number of elements in the vector.
const Type & operator[](const size_t index) const
Returns a const reference to the element at the location specified by the index.
const Type & Back() const
Returns a const reference to the last element in the vector.
void PushBack(Type &&element)
Appends the given element to the end of the vector.
Iterator begin() noexcept
Returns a RapidVectorIterator to the first element of the vector. The naming convention follows STL c...
Type & Front()
Returns a reference to the first element in the vector.
Iterator end() const noexcept
Returns a RapidVectorIterator to the element following the last element of the vector....
const Type & Front() const
Returns a const reference to the first element in the vector.
const Type & At(const size_t index) const
Returns a const reference to the element at the location specified by the index.
void PushBack(const Type &element)
Appends the given element to the end of the vector.
Type & Back()
Returns a reference to the last element in the vector.
Type & operator[](const size_t index)
Returns a reference to the element at the location specified by the index.
Type & At(const size_t index)
Returns a reference to the element at the location specified by the index.
A wrapper class for the C++ STL vector class that aims to maintain application binary interface....
Definition rsi.h:13635
RapidVector(RapidVector &&other) noexcept
Move constructor. Replaces contents with those of the other RapidVector.
RapidVectorIterator< RapidVector > Iterator
The iterator type for this RapidVector.
Definition rsi.h:13736
~RapidVector()
Destructs the vector and deallocates used storage.
RapidVector & operator=(const RapidVector &other)
Copy assignment operator. Replaces contents with the contents of the other RapidVector.
RapidVector(const RapidVector &other)
Copy constructor. Constructs a RapidVector as a deep-copy.
RapidVector(RapidVectorImplementation< Type > *)
Constructs a RapidVector with the given implementation. Intended for RSI internal use only.
void Clear()
Erases all elements from the vector.
void PopBack()
Removes the last element from the container. Calling PopBack() on an empty container results in undef...
RapidVector(const size_t size)
Constructs a vector with the specified size.
RapidVector & operator=(RapidVector &&other) noexcept
Move assignment operator. Replaces contents with those of the other RapidVector. The original content...
RapidVector()
Default constructor that constructs an empty vector.
RsiError(const RsiError &copyFrom)
Copy constructor for RsiError.
Definition rsi.h:146
Represents the error details thrown as an exception by all RapidCode classes. This class contains an ...
Definition rsi.h:111
char fileName[RSI_ERROR_TEXT_SIZE]
source file name
Definition rsi.h:129
bool isWarning
Whether the error is or is not a warning.
Definition rsi.h:120
static constexpr uint32_t RSI_ERROR_TEXT_SIZE
Error message text.
Definition rsi.h:122
const char * what() const noexcept
Returns a null terminated character sequence that may be used to identify the exception.
Definition rsi.h:169
char shortText[RSI_ERROR_TEXT_SIZE]
Error short text.
Definition rsi.h:127
int32_t lineNumber
Source code line number.
Definition rsi.h:116
char functionName[RSI_ERROR_TEXT_SIZE]
Function name of the raised the error.
Definition rsi.h:125
RSIErrorMessage number
Error number.
Definition rsi.h:114
int32_t objectIndex
Object index (0-based index of the object that has the error).
Definition rsi.h:118
static void MaskSet(RSITrace mask)
Sets the specified trace mask.
static void MaskOnSet(RSITrace maskOn)
Turn on a particular trace output mask.
static void InjectMessage(RSITrace traceLevel, const char *const message)
Add a message to the Trace Log.
static bool MaskOnGet(RSITrace maskOn)
Check to see if a particular trace output mask is turned on.
static void MaskOffSet(RSITrace maskOff)
Turn off a particular trace output mask.
static void FileClose()
Stops Logging to the file.
static int32_t FileSet(const char *const fileName)
Channels Tracing messages to specified file.
static void MaskClear()
Clear the trace output mask.
Tracing allows for low level logs to be generated.
Definition rsi.h:13118
RSIFilterAlgorithm
Filter algorithms.
Definition rsienums.h:1300
RSINetworkEniResult
NetworkEniGenerate return values.
Definition rsienums.h:1634
RSIPDOType
Compensator output types.
Definition rsienums.h:1608
RSIMathBlockOperation
MathBlock operations.
Definition rsienums.h:1614
RSICompensatorOutputType
Compensator output types.
Definition rsienums.h:1602
RSINetworkStartMode
Network start modes.
Definition rsienums.h:709
RSIMotorFeedbackFault
Feedbacks to use for Feedback Fault action.
Definition rsienums.h:1287
RSITrace
Trace masks.
Definition rsienums.h:593
RSIMotorStepperPulse
Pulse A or B.
Definition rsienums.h:1390
RSINetworkNodeInitializationState
How far an EtherCAT node has progressed through network startup.
Definition rsienums.h:645
RSIAxisGantryType
How to combine Axis Feedback Positions.
Definition rsienums.h:1280
RSINetworkState
State of network.
Definition rsienums.h:621
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:1460
RSIEventType
Event Types or Status Bits.
Definition rsienums.h:1102
RSIMotionType
PT and PVT streaming motion types.
Definition rsienums.h:1179
RSINetworkSyncGroupState
State of an EtherCAT sync group (a set of nodes sharing one WKC-tolerant cyclic datagram).
Definition rsienums.h:692
RSIDataType
Data types for User Limits and other triggers.
Definition rsienums.h:784
RSIUserLimitLogic
Logic options for User Limits.
Definition rsienums.h:771
RSIMotorIoTypeMask
Possible mask bits for Motor I/O types.
Definition rsienums.h:1406
RSIAction
Action to perform on an Axis.
Definition rsienums.h:1256
RSIAxisAddressType
Used to get firmware address used in User Limits, Recorders, etc.
Definition rsienums.h:451
RSIProcessorType
Controller's processor type.
Definition rsienums.h:295
RSIMotorStepperPulseType
Stepper pulse type.
Definition rsienums.h:1396
RSIMotorType
Motor Type.
Definition rsienums.h:1452
RSINetworkInterfaceType
Network host interface type used for EtherCAT frame I/O.
Definition rsienums.h:1526
RSINetworkStartError
Network start errors.
Definition rsienums.h:715
RSIMotorGeneralIo
Motor I/O bit numbers.
Definition rsienums.h:1053
RSIMotionAttrMask
Attribute masks for motion. You cannot mix RSIMotionAttrMaskDELAY and RSIMotionAttrMaskAPPEND.
Definition rsienums.h:1201
RSIMultiAxisAddressType
Used to get firmware address used in User Limits, Recorders, etc.
Definition rsienums.h:514
RSIFilterGainPIDCoeff
PID gain coefficients.
Definition rsienums.h:1309
RSIUserLimitTriggerType
Trigger types for UserLimits.
Definition rsienums.h:758
RSINetworkOutputAddressType
Network output address types.
Definition rsienums.h:1595
INtimeStatus
INtime status values.
Definition rsienums.h:1540
RSIMotionHoldType
Types for MotionHold attribute.
Definition rsienums.h:1236
RSIControllerType
Controller type.
Definition rsienums.h:284
RSIMotorFaultMask
Mask values for several motor faults.
Definition rsienums.h:1440
RSIHomeStage
Predefined Homing Stage sections.
Definition rsienums.h:397
RSIMotorBrakeMode
Brake modes.
Definition rsienums.h:1466
RSIErrorMessage
All possible RSI Error Messages.
Definition rsienums.h:17
RSINetworkType
Type of Network topology.
Definition rsienums.h:751
RSIMotorIoType
Possible configurations for Motor I/O.
Definition rsienums.h:1369
RSIAxisPositionInput
Feedback Positions for each Axis.
Definition rsienums.h:1274
RSINodeType
Valid Node types.
Definition rsienums.h:804
RSISource
Possible sources that have caused an Error state.
Definition rsienums.h:1151
RSIMotorDedicatedIn
Dedicated Input bits per motor.
Definition rsienums.h:1025
RSIMotorFeedback
Encoders per motor.
Definition rsienums.h:1294
RSIMotorDedicatedOut
Dedicated Output bits per motor.
Definition rsienums.h:1047
RSIOperationMode
DS402 modes of operation.
Definition rsienums.h:1472
RSIPathPlanType
Path motion planning types.
Definition rsienums.h:1195
RSINetworkTechnologyType
Network technology type.
Definition rsienums.h:1493
RSINetworkIndexType
Network PDO index types for configuring axis input/output mappings.
Definition rsienums.h:1573
RSINetworkStartupMethod
Network startup methods.
Definition rsienums.h:701
RSINetworkNodeAddressType
Address types for the dynamic status values of an EtherCAT node, for use with RapidCodeNetworkNode::A...
Definition rsienums.h:665
RSIFilterGainPIVCoeff
PIV gain coefficients.
Definition rsienums.h:1330
RSIAxisMasterType
Sources available to a slave Axis for electronic gearing & camming.
Definition rsienums.h:1359
This namespace provides static methods and constants for user configuration in RMP applications....
Definition config.h:25
int32_t ControllerIndex
The index of the controller to create.
Definition rsi.h:972
static constexpr int32_t RmpThreadPriorityMaximum
The maximum thread priority for the real-time system.
Definition rsi.h:926
static constexpr int32_t CpuAffinityDefault
The default value for CpuAffinity specifying no particular CPU core to run on.
Definition rsi.h:895
char NodeName[PathLengthMaximum]
[Windows/INtime] Indicate the INtime node on which the RMP and RMPNetwork processes run.
Definition rsi.h:1045
char RmpPath[PathLengthMaximum]
Location of the RMP firmware executable, license, and associated binaries and resources.
Definition rsi.h:978
static constexpr int32_t ControllerIndexDefault
The default value for ControllerIndex.
Definition rsi.h:882
static constexpr char NodeNameDefault[]
The default INtime node name for NodeName (Windows only).
Definition rsi.h:902
static constexpr int32_t RmpThreadPriorityNoRealTime
The thread priority where real time properties (scheduler and relative priorities) are not set.
Definition rsi.h:932
static constexpr int32_t RmpThreadPriorityMinimum
The minimum thread priority for the real-time system.
Definition rsi.h:920
static constexpr int32_t RmpThreadPriorityMaximumDefault
The default value for RmpThreadPriorityMax.
Definition rsi.h:908
static constexpr int32_t RmpThreadPriorityRange
The priority range required for RMP and RMPNetwork threads. Minimum thread priority is this +1.
Definition rsi.h:914
int32_t CpuAffinity
[Linux] Indicate the CPU core on which the RMP and RMPNetwork processes run.
Definition rsi.h:1065
char NicPrimary[PathLengthMaximum]
Primary EtherCAT Network Interface (NIC) name.
Definition rsi.h:1019
int32_t RmpThreadPriorityMax
[Linux] The maximum thread priority. All threads of the RMP and RMPNetwork will be based off of this....
Definition rsi.h:1077
static constexpr uint32_t PathLengthMaximum
MotionController::CreationParameters Maximum string buffer length.
Definition rsi.h:888
CreationParameters()
Instantiate with every field set to its documented default value.
Definition rsi.h:945
char NicSecondary[PathLengthMaximum]
Secondary EtherCAT Network Interface (NIC) name. Reserved for future use.
Definition rsi.h:1025
CreationParameters for MotionController::Create.
Definition rsi.h:872
RSIDataType ProcessDataType
Data type for processing.
Definition rsi.h:4360
MathBlock configuration structure.
Definition rsi.h:4353
RSIDataType OutputDataType
Data type for Output. (optional).
Definition rsi.h:4358
uint64_t OutputAddress
Host memory address for Output. The MathBlock will write its result to this address....
Definition rsi.h:4359
uint64_t InputAddress0
Host memory address for Input0. Represents the left-hand side operand in math operations.
Definition rsi.h:4354
RSIDataType InputDataType0
Data type for Input0. This is the data type of the left-hand side operand in math operations.
Definition rsi.h:4355
uint64_t InputAddress1
Host memory address for Input1. Represents the right-hand side operand in math operations.
Definition rsi.h:4356
RSIDataType InputDataType1
Data type for Input1. This is the data type of the right-hand side operand in math operations.
Definition rsi.h:4357
RSIMathBlockOperation Operation
Math operation to be performed. (+, -, *, /, etc) use RSIMathBlockOperationNONE to disable a MathBloc...
Definition rsi.h:4361
NetworkStatus structure for EtherCAT network health monitoring.
Definition rsi.h:2280
uint32_t MissedCyclicFrameCount
Cumulative count of missed cyclic EtherCAT frames since network startup. Indicates communication reli...
Definition rsi.h:2283
RSINetworkInterfaceType InterfaceType
Host-side packet interface mechanism used for EtherCAT frame I/O (for example, INtime HPE2 or Linux A...
Definition rsi.h:2286
uint64_t EoeNodeToHostFrameCount
Cumulative count of EoE (Ethernet over EtherCAT) frames received from nodes by the host since network...
Definition rsi.h:2288
uint32_t AlStatus
Logical OR of AL Status registers (0x0130) from all nodes. A value of 8 indicates all nodes are Opera...
Definition rsi.h:2282
uint64_t EoeHostToNodeFrameCount
Cumulative count of EoE (Ethernet over EtherCAT) frames sent from the host toward nodes since network...
Definition rsi.h:2287
uint32_t CyclicFramePeriodUs
Most recent cyclic frame period in microseconds. Should match the configured sample rate.
Definition rsi.h:2284
int32_t SynchronizationErrorNs
Distributed Clock synchronization error in nanoseconds. Updated approximately every 16 samples....
Definition rsi.h:2285
uint32_t ActiveNodeCount
Number of nodes actively responding on the network. Compare against expected node count to detect dro...
Definition rsi.h:2281
Status of a single EtherCAT sync group.
Definition rsi.h:2323
RSINetworkSyncGroupState State
Current group state – see RSINetworkSyncGroupState for the meaning of each value.
Definition rsi.h:2325
bool DataValid
true when the group's cyclic data is trustworthy (WKC matches). The master clears this on a tolerated...
Definition rsi.h:2329
uint32_t Id
Sync group id (0 = default group).
Definition rsi.h:2324
uint64_t NonOperationalNodeMask
Bitmask (by node index, up to 64 nodes) of this group's member nodes NOT in OP. Bit i set means node ...
Definition rsi.h:2332
uint32_t NodeCount
Number of nodes assigned to this group.
Definition rsi.h:2328
uint32_t ToleratedWkcCount
Cumulative count of WKC mismatches tolerated for this group since network start. Increments while a W...
Definition rsi.h:2330
uint32_t ActualWkc
Most recent actual Working Counter. Less than ExpectedWkc while a group node is out of OP.
Definition rsi.h:2327
uint32_t ExpectedWkc
Expected Working Counter for this group's cyclic datagram.
Definition rsi.h:2326
uint32_t OperationalNodeCount
Number of this group's member nodes currently in the OP state. Equals NodeCount when healthy; drops b...
Definition rsi.h:2331
uint32_t SyncGroup
Sync group for this node. A non-zero group gives the node its own cyclic datagram and expected Workin...
Definition rsi.h:4984
Status structure for individual EtherCAT node diagnostics.
Definition rsi.h:4904
uint64_t SdoWriteCount
Cumulative count of every ServiceChannelWrite the network firmware serviced for this node since netwo...
Definition rsi.h:4916
uint64_t SdoWriteFailCount
Cumulative count of service channel writes for this node that finished unsuccessfully since network s...
Definition rsi.h:4917
uint64_t SdoReadFailCount
Cumulative count of service channel reads for this node (SDO uploads and register reads) that finishe...
Definition rsi.h:4915
uint64_t EoeNodeToHostFrameCount
Cumulative count of EoE (Ethernet over EtherCAT) frames received from this node by the host since net...
Definition rsi.h:4910
uint32_t SyncGroupId
Sync group this node belongs to, populated by the master from the ENI at startup. 0 = default group....
Definition rsi.h:4911
uint32_t AlStatus
EtherCAT AL Status register (0x0130) value. This is a snapshot value primarily useful for detecting u...
Definition rsi.h:4905
uint64_t EoeHostToNodeFrameCount
Cumulative count of EoE (Ethernet over EtherCAT) frames sent from the host to this node since network...
Definition rsi.h:4909
uint64_t SdoReadCount
Cumulative count of every ServiceChannelRead the network firmware serviced for this node since networ...
Definition rsi.h:4914
uint64_t AkdAsciiCount
Cumulative count of Kollmorgen AKD ASCII commands the network firmware serviced for this node since n...
Definition rsi.h:4918
RSINetworkNodeInitializationState InitializationState
How far this node has progressed through network startup. UNINITIALIZED means the node record is empt...
Definition rsi.h:4913
int32_t CoeEmergencyMessageNetworkCounter
Network counter value when the current CoeEmergencyMessage was received. Use to determine if the emer...
Definition rsi.h:4908
uint64_t CoeEmergencyMessage
CANopen over EtherCAT (CoE) emergency message. 8-byte value containing error code and additional data...
Definition rsi.h:4907
uint32_t AlStatusCode
EtherCAT AL Status Code register value. This is a snapshot value captured when the node reports an er...
Definition rsi.h:4906
bool Present
true if the node responded to the master's most recent AL-status read; false if it did not respond (p...
Definition rsi.h:4912
uint64_t AkdAsciiFailCount
Cumulative count of AKD ASCII commands for this node that failed since network start....
Definition rsi.h:4919
Union representing a generic RMP firmware value with multiple data types, stored in 64-bits.
Definition rsi.h:464
float Float
Single precision (32-bit) floating-point.
Definition rsi.h:472
int64_t Int64
64-bit signed integer.
Definition rsi.h:474
uint8_t UInt8
8-bit unsigned integer.
Definition rsi.h:467
int8_t Int8
8-bit signed integer.
Definition rsi.h:466
double Double
Double precision (64-bit) floating-point.
Definition rsi.h:473
int32_t Int32
32-bit signed integer.
Definition rsi.h:470
uint16_t UInt16
16-bit unsigned integer.
Definition rsi.h:469
int16_t Int16
16-bit signed integer.
Definition rsi.h:468
bool Bool
Boolean value.
Definition rsi.h:465
uint32_t UInt32
32-bit unsigned integer.
Definition rsi.h:471
uint64_t UInt64
64-bit unsigned integer.
Definition rsi.h:475