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
54class MotionController;
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()
132 {
133 text[0] = '\0';
134 functionName[0] = '\0';
135 shortText[0] = '\0';
136 fileName[0] = '\0';
138 lineNumber = -1;
139 isWarning = false;
140 objectIndex = -1;
141 }
150 RsiError(const RsiError& copyFrom)
151 {
152#if defined(_WIN32)
153 strncpy_s(text, RSI_ERROR_TEXT_SIZE, copyFrom.text, RSI_ERROR_TEXT_SIZE);
157#elif defined(__linux__)
158 strncpy(text, copyFrom.text, RSI_ERROR_TEXT_SIZE);
160 strncpy(shortText, copyFrom.shortText, RSI_ERROR_TEXT_SIZE);
161 strncpy(fileName, copyFrom.fileName, RSI_ERROR_TEXT_SIZE);
162#endif
163 number = copyFrom.number;
164 lineNumber = copyFrom.lineNumber;
165 isWarning = copyFrom.isWarning;
166 objectIndex = copyFrom.objectIndex;
167 }
168 ~RsiError()
169 {
170 }
171
173 virtual const char* what() const noexcept { return text; }
174};
175
184class RSI_API RapidCodeObject {
185public:
190
191
192
205 virtual const char* const VersionGet() PURE_VIRTUAL;
206
208 virtual int32_t MpiVersionMajor() PURE_VIRTUAL;
210 virtual int32_t MpiVersionMinor() PURE_VIRTUAL;
212 virtual int32_t MpiVersionRelease() PURE_VIRTUAL;
214 virtual int32_t RSIVersionMajor() PURE_VIRTUAL;
216 virtual int32_t RSIVersionMinor() PURE_VIRTUAL;
218 virtual int32_t RSIVersionMicro() PURE_VIRTUAL;
220 virtual int32_t RSIVersionPatch() PURE_VIRTUAL;
221
224 virtual int32_t NumberGet() PURE_VIRTUAL;
226
231
232
233
234
260 virtual int32_t ErrorLogCountGet() PURE_VIRTUAL;
261
275 virtual const RsiError* const ErrorLogGet() PURE_VIRTUAL;
276
289 virtual void ErrorLogClear() PURE_VIRTUAL;
290
309 virtual void ThrowExceptions(bool state) PURE_VIRTUAL;
310
312 virtual const char* const RsiErrorMessageGet(RSIErrorMessage msg) PURE_VIRTUAL;
313
315 virtual const char* const ErrorMessageGet(RSIErrorMessage msg) PURE_VIRTUAL;
316
318 virtual bool WarningMsgCheck(RSIErrorMessage msg) PURE_VIRTUAL;
320
325
326
341 virtual void Trace(bool state) PURE_VIRTUAL;
342
357 virtual void TraceMaskOnSet(RSITrace maskOn) PURE_VIRTUAL;
358
359
380 virtual bool TraceMaskOnGet(RSITrace maskOn) PURE_VIRTUAL;
381
397 virtual void TraceMaskOffSet(RSITrace maskOff) PURE_VIRTUAL;
398
412 virtual void TraceMaskClear() PURE_VIRTUAL;
413
428 virtual void TraceFileSet(const char* const fileName) PURE_VIRTUAL;
429
442 virtual void TraceFileClose() PURE_VIRTUAL;
443
458 virtual void TraceInjectMessage(RSITrace traceLevel, const char* const message) PURE_VIRTUAL;
459
460
461
462
464};
465
467typedef union
468{
469 bool Bool;
470 int8_t Int8;
471 uint8_t UInt8;
472 int16_t Int16;
473 uint16_t UInt16;
474 int32_t Int32;
475 uint32_t UInt32;
476 float Float;
477 double Double;
478 int64_t Int64;
479 uint64_t UInt64;
481
483
497class RSI_API RapidCodeOS {
498public:
499
504
517 virtual void Sleep(int32_t milliseconds) PURE_VIRTUAL;
518
537 virtual int32_t KeyGet(int32_t milliseconds) PURE_VIRTUAL;
538
548 virtual int32_t TimerCountGet() PURE_VIRTUAL;
549
558 virtual int32_t TimerFrequencyGet() PURE_VIRTUAL;
559
560
572 virtual int32_t PerformanceTimerCountGet() PURE_VIRTUAL;
573
585 virtual int32_t PerformanceTimerFrequencyGet() PURE_VIRTUAL;
586
588};
589
591
594class RSI_API RapidCodeInterrupt : public virtual RapidCodeObject {
595public:
599
601 virtual void InterruptEnableSet(bool enable) PURE_VIRTUAL;
602
603
625 virtual RSIEventType InterruptWait(int32_t milliseconds) PURE_VIRTUAL;
626
646 virtual const char* const InterruptNameGet() PURE_VIRTUAL;
647
668 virtual int32_t InterruptSampleTimeGet() PURE_VIRTUAL;
669
670
691 virtual int32_t InterruptSourceNumberGet() PURE_VIRTUAL;
692
694 virtual uint16_t InterruptMotionIdGet() PURE_VIRTUAL;
695
697 virtual void InterruptWake() PURE_VIRTUAL;
698
700 virtual void InterruptMaskClear() PURE_VIRTUAL;
701
703 virtual void InterruptMaskAllSet() PURE_VIRTUAL;
704
706 virtual void InterruptMaskOnSet(RSIEventType eventType) PURE_VIRTUAL;
707
709 virtual void InterruptMaskOffSet(RSIEventType eventType) PURE_VIRTUAL;
710
712 virtual bool InterruptMaskOnGet(RSIEventType eventType) PURE_VIRTUAL;
713
714
727 virtual uint64_t InterruptUserDataGet(uint32_t userDataIndex) PURE_VIRTUAL;
728
729
741 virtual double InterruptUserDataDoubleGet(uint32_t userDataIndex) PURE_VIRTUAL;
742
748 virtual FirmwareValue InterruptUserDataValueGet(uint32_t userDataIndex) PURE_VIRTUAL;
749
785
787 virtual void InterruptUserDataAddressSet(uint32_t userDataIndex, uint64_t hostAddress) PURE_VIRTUAL;
788
794 virtual uint64_t InterruptUserDataAddressGet(uint32_t userDataIndex) PURE_VIRTUAL;
795};
796
800class RSI_API MotionController : public virtual RapidCodeInterrupt {
801protected:
803 StaticInstanceMediator* _mediator;
804
805public:
806
807 // Static functions or attributes should be grouped together.
812
814 static inline constexpr uint32_t NetworkStartTimeoutMillisecondsDefault = 30000;
815
817 static inline constexpr uint32_t AxisCountMaximum = 64;
818
820 static inline constexpr uint32_t MotionCountMaximum = 64;
821
823 static inline constexpr uint32_t NetworkNodeCountMaximum = 64;
824
826 static inline constexpr uint32_t RecorderCountMaximum = 64;
827
829 static inline constexpr uint32_t CompensatorCountMaximum = 64;
830
832 static inline constexpr uint32_t MathBlockCountMaximum = 64;
833
835 static inline constexpr uint32_t UserBufferDataCountMaximum = 1024;
836
843 static inline constexpr double SampleRateDefault = 1000.0;
844
854 static inline constexpr int32_t AxisFrameBufferSizeDefault = 1024;
855
857
858 // Static functions or attributes should be grouped together.
863
866 {
871
876 static inline constexpr int32_t ControllerIndexDefault = 0;
877
882 static inline constexpr uint32_t PathLengthMaximum = 256;
883
889 static inline constexpr int32_t CpuAffinityDefault = -1;
890
895 static inline constexpr int32_t RmpThreadPriorityMaximumDefault = 45;
896
901 static inline constexpr int32_t RmpThreadPriorityRange = 8;
902
907 static inline constexpr int32_t RmpThreadPriorityMinimum = RmpThreadPriorityRange + 1;
908
913 static inline constexpr int32_t RmpThreadPriorityMaximum = 99;
914
919 static inline constexpr int32_t RmpThreadPriorityNoRealTime = 0;
921
922
927
933 {
934 ControllerIndex = ControllerIndexDefault;
935 std::memset(RmpPath, '\0', PathLengthMaximum);
936 std::memset(NicPrimary, '\0', PathLengthMaximum);
937 std::memset(NicSecondary, '\0', PathLengthMaximum);
938#if defined(_WIN32)
939 std::memset(NodeName, '\0', PathLengthMaximum);
940#elif defined(__linux__)
941 CpuAffinity = CpuAffinityDefault;
942 RmpThreadPriorityMax = RmpThreadPriorityMaximumDefault;
943#endif
944 }
946
951
957
962 char RmpPath[PathLengthMaximum];
963
968 char NicPrimary[PathLengthMaximum];
969
974 char NicSecondary[PathLengthMaximum];
976
977 // Control which platform specific parameters are available
978#if defined(_WIN32) && defined(__linux__)
979 static_assert(false, "_WIN32 and __linux__ defined. Double check preprocessor definitions");
980#elif !defined(_WIN32) && !defined(__linux__) && !defined(DOXYGEN)
981 static_assert(false, "Neither _WIN32 nor __linux__ are defined AND this is not a documentation build. Double check preprocessor definitions");
982#endif //defined(_WIN32) && defined(__linux__)
983#if defined(_WIN32) || defined(DOXYGEN)
984
989
994 char NodeName[PathLengthMaximum];
995
997#endif //defined(_WIN32)
998#if defined(__linux__) || defined(DOXYGEN)
999
1004
1015
1027
1029# endif // defined(__linux__)
1030 };
1031
1042 static MotionController* Create(CreationParameters* creationParameters);
1043
1049
1055 static MotionController* Get(int32_t controllerIndex);
1056
1057#if defined(_WIN32)
1085
1090 static MotionController* CreateFromSoftware(const char* const RtaPath);
1091
1097 static MotionController* CreateFromSoftware(const char* const RtaPath, const char* const NodeName);
1098
1126#endif // defined(_WIN32)
1127
1132 static MotionController* CreateFromFile(const char* const fileName);
1134
1139
1158 virtual Axis* AxisGet(int32_t axisNumber) PURE_VIRTUAL;
1159
1176 virtual MultiAxis* MultiAxisGet(int32_t motionSupervisorNumber) PURE_VIRTUAL;
1177
1191 virtual MultiAxis* LoadExistingMultiAxis(int32_t motionSupervisorNumber) PURE_VIRTUAL;
1192
1207 virtual RapidCodeNetworkNode* NetworkNodeGet(int32_t nodeNumber) PURE_VIRTUAL;
1208
1224 virtual IO* IOGet(int32_t nodeNumber) PURE_VIRTUAL;
1225
1248 virtual void Delete(void) PURE_VIRTUAL;
1250
1255
1265 virtual void Reset() PURE_VIRTUAL;
1266
1276 virtual void Refresh() PURE_VIRTUAL;
1277
1285 virtual void Shutdown() PURE_VIRTUAL;
1286
1295 virtual void MemoryToFile(const char* const fileName) PURE_VIRTUAL;
1297
1302
1325 virtual int32_t SampleCounterGet() PURE_VIRTUAL;
1326
1341 virtual double ProcessorUsageGet() PURE_VIRTUAL;
1342
1353 virtual void ProcessorUsageClear() PURE_VIRTUAL;
1354
1358 virtual uint32_t FirmwareTimingDeltaGet() PURE_VIRTUAL;
1359
1360
1362
1367
1368
1372 virtual CreationParameters CreationParametersGet() PURE_VIRTUAL;
1373
1396 virtual uint32_t SerialNumberGet(void) PURE_VIRTUAL;
1397
1416 virtual void SampleWait(uint32_t samples) PURE_VIRTUAL;
1417
1418
1420 virtual RSIControllerType ControllerTypeGet() PURE_VIRTUAL;
1421
1423 virtual const char* const ServerNameGet() PURE_VIRTUAL;
1424
1426 virtual int32_t ServerPortGet() PURE_VIRTUAL;
1427
1428
1429
1430
1452 virtual RSIProcessorType ProcessorTypeGet() PURE_VIRTUAL;
1453
1478 virtual void SampleRateSet(double sampleRate) PURE_VIRTUAL;
1479
1483 virtual double SampleRateGet() PURE_VIRTUAL;
1484
1502 virtual int32_t AxisCountGet() PURE_VIRTUAL;
1503
1522 virtual void AxisCountSet(int32_t axisCount) PURE_VIRTUAL;
1523
1526 virtual void AxisCountSet(int32_t axisCount, bool setMotorFilterSupervisor) PURE_VIRTUAL;
1527
1530 virtual bool IsLicensed() PURE_VIRTUAL;
1531
1533 virtual int32_t PackageVariantGet() PURE_VIRTUAL;
1534
1536 virtual int32_t AxisLicenseCountGet() PURE_VIRTUAL;
1537
1539 virtual bool MechaWareLicenseGet() PURE_VIRTUAL;
1540
1542 virtual int32_t UnsupportedOptionSet(int32_t option) PURE_VIRTUAL;
1543
1568 virtual int32_t MotionCountGet() PURE_VIRTUAL;
1569
1586 virtual void MotionCountSet(int32_t motionCount) PURE_VIRTUAL;
1587
1613 virtual int32_t UserVersionGet() PURE_VIRTUAL;
1614
1638 virtual void UserVersionSet(int32_t version) PURE_VIRTUAL;
1639
1642 virtual int32_t ExternalMemorySizeGet() PURE_VIRTUAL;
1643
1660 virtual void AxisFrameBufferSizeSet(int32_t axisNumber, int32_t frameBufferSize) PURE_VIRTUAL;
1661
1676 virtual int32_t AxisFrameBufferSizeGet(int32_t axisNumber) PURE_VIRTUAL;
1678
1683
1701 virtual const char* const FirmwareVersionGet() PURE_VIRTUAL;
1702
1720 virtual int32_t FirmwareOptionGet() PURE_VIRTUAL;
1721
1723 virtual bool HasMechaWare() PURE_VIRTUAL;
1724
1748 virtual int32_t MemoryGet(uint64_t address) PURE_VIRTUAL;
1749
1750
1768 virtual double MemoryDoubleGet(uint64_t address) PURE_VIRTUAL;
1769
1795 virtual void MemoryBlockGet(uint64_t address, void* dataStart, int32_t size) PURE_VIRTUAL;
1796
1811 virtual void MemorySet(uint64_t address, int32_t data) PURE_VIRTUAL;
1812
1813
1814
1831 virtual void MemoryDoubleSet(uint64_t address, double dataDouble) PURE_VIRTUAL;
1832
1858 virtual void MemoryBlockSet(uint64_t address, const void* const dataStart, int32_t size) PURE_VIRTUAL;
1859
1878 virtual uint32_t FirmwareAddressGet(uint64_t hostAddress) PURE_VIRTUAL;
1879
1880
1881
1882
1905 virtual uint64_t HostAddressGet(uint32_t firmwareAddress) PURE_VIRTUAL;
1906
1907
1908
1931 virtual int32_t BackgroundCycleCounterGet() PURE_VIRTUAL;
1932
1933
1934
1935
1944 virtual uint64_t AddressFromStringGet(const char* const addressName) PURE_VIRTUAL;
1945
1946
1947
1956 virtual const char* const StringFromAddressGet(uint64_t hostAddress) PURE_VIRTUAL;
1957
1972 virtual uint64_t AddressGet(RSIControllerAddressType type) PURE_VIRTUAL;
1973
1991 virtual uint64_t AddressGet(RSIControllerAddressType type, int32_t objectIndex) PURE_VIRTUAL;
1992
1993
2006 virtual RSIDataType AddressDataTypeGet(RSIControllerAddressType type) PURE_VIRTUAL;
2007
2012 virtual RSIDataType AddressDataTypeGet(RSIControllerAddressType type, int32_t objectIndex) PURE_VIRTUAL;
2013
2027 virtual bool MotionHoldGateGet(int32_t gateNumber) PURE_VIRTUAL;
2028
2029
2030
2046 virtual void MotionHoldGateSet(int32_t gateNumber, bool hold) PURE_VIRTUAL;
2048
2053
2055 virtual RSINetworkTechnologyType NetworkTechnologyTypeGet() PURE_VIRTUAL;
2056
2058 virtual RSINetworkType NetworkTypeGet() PURE_VIRTUAL;
2059
2062 virtual int32_t NetworkNodeCountGet() PURE_VIRTUAL;
2063
2109 virtual RSINetworkEniResult NetworkEniGenerate() PURE_VIRTUAL;
2110
2131 virtual const char* const NetworkEniGenerateOutputGet() PURE_VIRTUAL;
2132
2139 virtual void NetworkStart() PURE_VIRTUAL;
2140
2145 virtual void NetworkStart(RSINetworkStartupMethod startupMethod) PURE_VIRTUAL;
2146
2153 virtual void NetworkStart(RSINetworkStartMode startMode, RSINetworkStartupMethod startupMethod) PURE_VIRTUAL;
2154
2159 virtual void NetworkStart(RSINetworkStartMode startMode, RSINetworkStartupMethod startupMethod, uint32_t timeoutMilliseconds) PURE_VIRTUAL;
2160
2171 virtual void NetworkShutdown() PURE_VIRTUAL;
2172
2175 virtual RSINetworkState NetworkStateGet() PURE_VIRTUAL;
2176
2178 virtual int32_t NetworkCounterGet() PURE_VIRTUAL;
2179
2181 virtual int32_t NetworkInputCountGet() PURE_VIRTUAL;
2182
2184 virtual int32_t NetworkInputBitSizeGet(int32_t index) PURE_VIRTUAL;
2185
2189 virtual const char* const NetworkInputDataTypeNameGet(int32_t index) PURE_VIRTUAL;
2190
2193 virtual int32_t NetworkInputBitOffsetGet(int32_t index) PURE_VIRTUAL;
2194
2197 virtual const char* const NetworkInputNameGet(int32_t index) PURE_VIRTUAL;
2198
2202 virtual uint64_t NetworkInputValueGet(int32_t index) PURE_VIRTUAL;
2203
2204
2205
2209 virtual uint64_t NetworkInputAddressGet(int32_t index) PURE_VIRTUAL;
2210
2214 virtual int32_t NetworkOutputCountGet() PURE_VIRTUAL;
2215
2218 virtual int32_t NetworkOutputBitSizeGet(int32_t index) PURE_VIRTUAL;
2219
2220
2224 virtual const char* const NetworkOutputDataTypeNameGet(int32_t index) PURE_VIRTUAL;
2225
2227 virtual int32_t NetworkOutputBitOffsetGet(int32_t index) PURE_VIRTUAL;
2228
2230 virtual const char* const NetworkOutputNameGet(int32_t index) PURE_VIRTUAL;
2231
2247 virtual uint64_t NetworkOutputValueGet(int32_t index) PURE_VIRTUAL;
2248
2265 virtual void NetworkOutputValueSet(int32_t index, uint64_t outputValue) PURE_VIRTUAL;
2266
2285 virtual uint64_t NetworkOutputAddressGet(int32_t index) PURE_VIRTUAL;
2286
2291 virtual uint64_t NetworkOutputAddressGet(int32_t index, RSINetworkOutputAddressType type) PURE_VIRTUAL;
2292
2303 virtual uint64_t NetworkOutputIntendedValueGet(int32_t index) PURE_VIRTUAL;
2304
2316 virtual void NetworkOutputOverrideSet(int32_t index, bool outputOverride) PURE_VIRTUAL;
2317
2328 virtual bool NetworkOutputOverrideGet(int32_t index) PURE_VIRTUAL;
2329
2330
2331
2332
2349 virtual void NetworkOutputOverrideValueSet(int32_t index, uint64_t outputValue) PURE_VIRTUAL;
2350
2363 virtual uint64_t NetworkOutputOverrideValueGet(int32_t index) PURE_VIRTUAL;
2364
2379 virtual uint64_t NetworkOutputSentValueGet(int32_t index) PURE_VIRTUAL;
2380
2384 virtual int32_t NetworkLogMessageCountGet() PURE_VIRTUAL;
2385
2387 virtual RSINetworkStartError LastNetworkStartErrorGet() PURE_VIRTUAL;
2388
2393 virtual const char* const NetworkLogMessageGet(int32_t messageIndex) PURE_VIRTUAL;
2394
2396 virtual void NetworkTimingEnableSet(bool enable) PURE_VIRTUAL;
2397
2399 virtual void NetworkTimingClear() PURE_VIRTUAL;
2400
2402 virtual uint32_t NetworkTimingDeltaGet() PURE_VIRTUAL;
2403
2405 virtual uint32_t NetworkTimingMinGet() PURE_VIRTUAL;
2406
2408 virtual uint32_t NetworkTimingMaxGet() PURE_VIRTUAL;
2409
2411 virtual void NetworkTimingThresholdLowSet(uint32_t microseconds) PURE_VIRTUAL;
2412
2414 virtual void NetworkTimingThresholdHighSet(uint32_t microseconds) PURE_VIRTUAL;
2415
2417 virtual uint32_t NetworkTimingThresholdLowCountGet() PURE_VIRTUAL;
2418
2420 virtual uint32_t NetworkTimingThresholdHighCountGet() PURE_VIRTUAL;
2421
2423 virtual bool NetworkSynchronizedGet() PURE_VIRTUAL;
2425
2430
2447 virtual void InterruptEnableSet(bool enable) PURE_VIRTUAL;
2448
2467 virtual void InterruptWake() PURE_VIRTUAL;
2468
2496 virtual void SyncInterruptEnableSet(bool enable) PURE_VIRTUAL;
2497
2523 virtual void SyncInterruptPeriodSet(uint32_t samples) PURE_VIRTUAL;
2524
2544 virtual int32_t SyncInterruptWait() PURE_VIRTUAL;
2545
2547 virtual bool ServiceThreadStateGet() PURE_VIRTUAL;
2548
2559 virtual int32_t SyncInterruptHostProcessTimeGet() PURE_VIRTUAL;
2560
2562 virtual int32_t SyncInterruptHostProcessFlagGet() PURE_VIRTUAL;
2563
2576 virtual void SyncInterruptHostProcessFlagSet(bool hostProcessFlag) PURE_VIRTUAL;
2577
2588 virtual bool SyncInterruptHostProcessStatusBitGet() PURE_VIRTUAL;
2589
2599 virtual void SyncInterruptHostProcessStatusClear() PURE_VIRTUAL;
2600
2627
2628 virtual void ServiceThreadEnableSet(bool enable) PURE_VIRTUAL;
2630
2635
2636
2637
2656 virtual int32_t RecorderCountGet() PURE_VIRTUAL;
2657
2675 virtual void RecorderCountSet(int32_t recorderCount) PURE_VIRTUAL;
2676
2693 virtual void RecorderPeriodSet(uint32_t samples) PURE_VIRTUAL;
2694
2696 virtual void RecorderPeriodSet(int32_t recorderNumber, uint32_t samples) PURE_VIRTUAL;
2697
2714 virtual void RecorderCircularBufferSet(bool enable) PURE_VIRTUAL;
2715
2717 virtual void RecorderCircularBufferSet(int32_t recorderNumber, bool enable) PURE_VIRTUAL;
2718
2734 virtual void RecorderDataCountSet(int32_t count) PURE_VIRTUAL;
2735
2737 virtual void RecorderDataCountSet(int32_t recorderNumber,int32_t count) PURE_VIRTUAL;
2738
2755 virtual void RecorderDataAddressSet(int32_t index, uint64_t address) PURE_VIRTUAL;
2756
2758 virtual void RecorderDataAddressSet(int32_t recorderNumber,int32_t index, uint64_t address) PURE_VIRTUAL;
2759
2760
2766 virtual void RecorderDataAddressesSet(int32_t recorderNumber, const uint64_t* const addresses, int32_t addressCount) PURE_VIRTUAL;
2767
2781
2787 virtual void RecorderConfigureToTriggerOnMotion(Axis *axis, bool triggerOnMotion) PURE_VIRTUAL;
2788
2795 virtual void RecorderConfigureToTriggerOnMotion(int32_t recorderNumber, Axis *axis, bool triggerOnMotion) PURE_VIRTUAL;
2796
2802 virtual void RecorderConfigureToTriggerOnMotion(MultiAxis *multiAxis, bool triggerOnMotion) PURE_VIRTUAL;
2803
2810 virtual void RecorderConfigureToTriggerOnMotion(int32_t recorderNumber, MultiAxis *multiAxis, bool triggerOnMotion) PURE_VIRTUAL;
2811
2818 virtual void RecorderConfigureToTriggerOnMotion(int32_t recorderNumber, int32_t motionNumber, bool triggerOnMotion) PURE_VIRTUAL;
2819
2828 virtual bool RecorderTriggerOnMotionGet(int32_t recorderNumber) PURE_VIRTUAL;
2829
2845 virtual bool RecorderEnabledGet() PURE_VIRTUAL;
2846
2848 virtual bool RecorderEnabledGet(int32_t recorderNumber ) PURE_VIRTUAL;
2849
2866 virtual int32_t RecorderRecordCountGet() PURE_VIRTUAL;
2867
2869 virtual int32_t RecorderRecordCountGet(int32_t recorderNumber ) PURE_VIRTUAL;
2870
2884 virtual int32_t RecorderRecordMaxCountGet() PURE_VIRTUAL;
2885
2887 virtual int32_t RecorderRecordMaxCountGet(int32_t recorderNumber) PURE_VIRTUAL;
2888
2903 virtual void RecorderStart() PURE_VIRTUAL;
2904
2906 virtual void RecorderStart(int32_t recorderNumber) PURE_VIRTUAL;
2907
2924 virtual void RecorderStop() PURE_VIRTUAL;
2925
2927 virtual void RecorderStop(int32_t recorderNumber) PURE_VIRTUAL;
2928
2929
2930
2946 virtual const int32_t* const RecorderRecordDataGet() PURE_VIRTUAL;
2947
2949 virtual const int32_t* const RecorderRecordDataGet(int32_t recorderNumber) PURE_VIRTUAL;
2950
2965 virtual void RecorderRecordDataRetrieve() PURE_VIRTUAL;
2966
2986 virtual int32_t RecorderRecordDataRetrieveBulk(int32_t recorderNumber, int32_t recordCount) PURE_VIRTUAL;
2987
2989 virtual void RecorderRecordDataRetrieve(int32_t recorderNumber) PURE_VIRTUAL;
2990
3007 virtual int32_t RecorderRecordDataValueGet(int32_t index) PURE_VIRTUAL;
3008
3010 virtual int32_t RecorderRecordDataValueGet(int32_t recorderNumber, int32_t index) PURE_VIRTUAL;
3011
3030 virtual int32_t RecorderRecordDataValueGet(int32_t recorderNumber, int32_t recordIndex, int32_t dataIndex) PURE_VIRTUAL;
3031
3033 virtual double RecorderRecordDataDoubleGet(int32_t index) PURE_VIRTUAL;
3034
3036 virtual double RecorderRecordDataDoubleGet(int32_t recorderNumber, int32_t index) PURE_VIRTUAL;
3037
3056 virtual double RecorderRecordDataDoubleGet(int32_t recorderNumber, int32_t recordIndex, int32_t dataIndex) PURE_VIRTUAL;
3057
3075 virtual void RecorderBufferHighCountSet(int32_t bufferHighCount) PURE_VIRTUAL;
3076
3078 virtual void RecorderBufferHighCountSet(int32_t recorderNumber, int32_t bufferHighCount) PURE_VIRTUAL;
3079
3094 virtual void RecorderReset() PURE_VIRTUAL;
3095
3097 virtual void RecorderReset(int32_t recorderNumber) PURE_VIRTUAL;
3098
3110 virtual int32_t RecorderBufferSizeGet(int32_t recorderNumber) PURE_VIRTUAL;
3111
3128 virtual void RecorderBufferSizeSet(int32_t recorderNumber, int32_t bufferSize) PURE_VIRTUAL;
3130
3135
3136
3137
3138
3163 virtual int32_t CompensatorCountGet() PURE_VIRTUAL;
3164
3184 virtual void CompensatorCountSet(int32_t compensatorCount) PURE_VIRTUAL;
3185
3196 virtual int32_t CompensatorPointCountGet(int32_t compensatorNumber) PURE_VIRTUAL;
3197
3217 virtual void CompensatorPointCountSet(int32_t compensatorNumber, int32_t pointCount) PURE_VIRTUAL;
3218
3232 virtual int32_t CompensatorDimensionGet(int32_t compensatorNumber) PURE_VIRTUAL;
3233
3259 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;
3260
3290 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;
3291
3312 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;
3313
3334 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;
3335
3347 virtual void CompensatorTableSet(int32_t compensatorNumber, const double* const table) PURE_VIRTUAL;
3348
3360 virtual void CompensatorTableGet(int32_t compensatorNumber, double* table) PURE_VIRTUAL;
3361
3381 virtual double CompensatorPositionGet(int32_t compensatorNumber) PURE_VIRTUAL;
3382
3383
3384
3385
3386
3387
3399
3400 virtual void CompensatorTableClear(int32_t compensatorNumber) PURE_VIRTUAL;
3401
3410 virtual void CompensatorDisable(int32_t compensatorNumber) PURE_VIRTUAL;
3411
3416 virtual void CompensatorDisable(int32_t compensatorNumber, bool force) PURE_VIRTUAL;
3417
3424 virtual void CompensatorEnable(int32_t compensatorNumber) PURE_VIRTUAL;
3425
3427
3432
3452 virtual int32_t UserLimitCountGet() PURE_VIRTUAL;
3453
3473 virtual void UserLimitCountSet(int32_t userLimitCount) PURE_VIRTUAL;
3474
3494 virtual void UserLimitConfigSet(int32_t number, RSIUserLimitTriggerType triggerType, RSIAction action, int32_t actionAxis, double duration, bool singleShot) PURE_VIRTUAL;
3495
3498 virtual void UserLimitConfigSet(int32_t number, RSIUserLimitTriggerType triggerType, RSIAction action, int32_t actionAxis, double duration) PURE_VIRTUAL;
3499
3501 virtual RSIUserLimitTriggerType UserLimitTriggerTypeGet(int32_t number) PURE_VIRTUAL;
3502
3504 virtual RSIAction UserLimitActionGet(int32_t number) PURE_VIRTUAL;
3505
3507 virtual int32_t UserLimitAxisNumberGet(int32_t number) PURE_VIRTUAL;
3508
3510 virtual double UserLimitDurationGet(int32_t number) PURE_VIRTUAL;
3511
3513 virtual bool UserLimitSingleShotGet(int32_t number) PURE_VIRTUAL;
3514
3539 virtual void UserLimitConditionSet(int32_t number, int32_t conditionNumber, RSIUserLimitLogic logic, uint64_t addressOfUInt32, uint32_t userLimitMask, uint32_t limitValueUInt32) PURE_VIRTUAL;
3540
3562 virtual void UserLimitConditionSet(int32_t number, int32_t conditionNumber, RSIUserLimitLogic logic, uint64_t addressOfDouble, double limitValueDouble) PURE_VIRTUAL;
3563
3565 virtual RSIDataType UserLimitConditionDataTypeGet(int32_t number, int32_t conditionNumber) PURE_VIRTUAL;
3566
3568 virtual RSIUserLimitLogic UserLimitConditionLogicGet(int32_t number, int32_t conditionNumber) PURE_VIRTUAL;
3569
3571 virtual uint64_t UserLimitConditionAddressGet(int32_t number, int32_t conditionNumber) PURE_VIRTUAL;
3572
3574 virtual uint32_t UserLimitConditionMaskGet(int32_t number, int32_t conditionNumber) PURE_VIRTUAL;
3575
3577 virtual int32_t UserLimitConditionLimitValueGet(int32_t number, int32_t conditionNumber) PURE_VIRTUAL;
3578
3580 virtual double UserLimitConditionLimitValueDoubleGet(int32_t number, int32_t conditionNumber) PURE_VIRTUAL;
3581
3608 virtual void UserLimitOutputSet(int32_t number, uint32_t andMask, uint32_t orMask, uint64_t outputPtr, bool enabled) PURE_VIRTUAL;
3609
3612 virtual void UserLimitOutputSet(int32_t number, int32_t valueSet, uint64_t outputPtr, bool enabled) PURE_VIRTUAL;
3613
3616 virtual void UserLimitOutputSet(int32_t number, uint64_t andMask, uint64_t orMask, uint64_t outputPtr, bool enabled) PURE_VIRTUAL;
3617
3620 virtual void UserLimitOutputSet(int32_t number, double limitValueDouble, uint64_t outputPtr, bool enabled) PURE_VIRTUAL;
3621
3637 virtual void UserLimitOutputSet(int32_t number, RSIDataType dataType, uint64_t inputPtr, uint64_t outputPtr, bool enabled) PURE_VIRTUAL;
3638
3640 virtual bool UserLimitOutputEnableGet(int32_t number) PURE_VIRTUAL;
3641
3643 virtual RSIDataType UserLimitOutputDataTypeGet(int32_t number) PURE_VIRTUAL;
3644
3646 virtual uint64_t UserLimitOutputAddressGet(int32_t number) PURE_VIRTUAL;
3647
3649 virtual uint64_t UserLimitOutputInputAddressGet(int32_t number) PURE_VIRTUAL;
3650
3652 virtual uint32_t UserLimitOutputAndMaskGet(int32_t number) PURE_VIRTUAL;
3653
3655 virtual uint32_t UserLimitOutputOrMaskGet(int32_t number) PURE_VIRTUAL;
3656
3658 virtual int32_t UserLimitOutputValueGet(int32_t number) PURE_VIRTUAL;
3659
3661 virtual uint64_t UserLimitOutputAndMask64Get(int32_t number) PURE_VIRTUAL;
3662
3664 virtual uint64_t UserLimitOutputOrMask64Get(int32_t number) PURE_VIRTUAL;
3665
3666
3668 virtual double UserLimitOutputDoubleGet(int32_t number) PURE_VIRTUAL;
3669
3690 virtual bool UserLimitStateGet(int32_t number) PURE_VIRTUAL;
3691
3712 virtual bool UserLimitEnableGet(int32_t number) PURE_VIRTUAL;
3713
3715 virtual void UserLimitEnableSet(int32_t number, bool enable) PURE_VIRTUAL;
3716
3731 virtual void UserLimitDisable(int32_t number) PURE_VIRTUAL;
3732
3744 virtual void UserLimitReset(int32_t number) PURE_VIRTUAL;
3745
3754
3755 virtual int32_t UserLimitCountMax() PURE_VIRTUAL;
3756
3774 virtual void UserLimitInterruptUserDataAddressSet(int32_t number, uint32_t userDataIndex, uint64_t address) PURE_VIRTUAL;
3775
3777 virtual uint64_t UserLimitInterruptUserDataAddressGet(int32_t number, uint32_t userDataIndex) PURE_VIRTUAL;
3779
3780
3785
3795 virtual int32_t MathBlockCountGet() PURE_VIRTUAL;
3796
3807 virtual void MathBlockCountSet(int32_t mathBlockCount) PURE_VIRTUAL;
3808
3827
3829 virtual MathBlockConfig MathBlockConfigGet(int32_t mathBlockNumber) PURE_VIRTUAL;
3830
3832 virtual void MathBlockConfigSet(int32_t mathBlockNumber, MathBlockConfig& config) PURE_VIRTUAL;
3833
3835 virtual FirmwareValue MathBlockProcessValueGet(int32_t mathBlockNumber) PURE_VIRTUAL;
3836
3838
3839
3844
3847
3849};
3850
3854class RSI_API RapidCodeNetworkNode : public virtual RapidCodeObject {
3855public:
3856
3861
3863 static inline constexpr uint32_t SDOTimeoutMillisecondsDefault = 100;
3864
3866
3867
3872
3874 virtual bool Exists() PURE_VIRTUAL;
3875
3877 virtual RSINodeType TypeGet() PURE_VIRTUAL;
3878
3880 virtual bool IsEtherCAT() PURE_VIRTUAL;
3881
3883 virtual bool IsSynqNet() PURE_VIRTUAL;
3884
3886
3891
3899 virtual bool HasIO() PURE_VIRTUAL;
3900
3910 virtual bool DigitalInGet(int32_t digitalInNumber) PURE_VIRTUAL;
3911
3921 virtual bool DigitalOutGet(int32_t digitalOutNumber) PURE_VIRTUAL;
3922
3931 virtual void DigitalOutSet(int32_t digitalOutNumber, bool state) PURE_VIRTUAL;
3932
3942 virtual int32_t AnalogInGet(int32_t analogChannel) PURE_VIRTUAL;
3943
3953 virtual int32_t AnalogOutGet(int32_t analogChannel) PURE_VIRTUAL;
3954
3963 virtual void AnalogOutSet(int32_t analogChannel, int32_t analogValue) PURE_VIRTUAL;
3964
3966
3970
3978 virtual int32_t DigitalInCountGet() PURE_VIRTUAL;
3979
3987 virtual int32_t DigitalOutCountGet() PURE_VIRTUAL;
3988
3996 virtual int32_t AnalogInCountGet() PURE_VIRTUAL;
3997
4005 virtual int32_t AnalogOutCountGet() PURE_VIRTUAL;
4006
4007
4009 virtual int32_t SegmentCountGet() PURE_VIRTUAL;
4010
4012 virtual int32_t SegmentDigitalInCountGet(int32_t segmentNumber) PURE_VIRTUAL;
4013
4015 virtual int32_t SegmentDigitalOutCountGet(int32_t segmentNumber) PURE_VIRTUAL;
4016
4018 virtual int32_t SegmentAnalogInCountGet(int32_t segmentNumber) PURE_VIRTUAL;
4019
4021 virtual int32_t SegmentAnalogOutCountGet(int32_t segmentNumber) PURE_VIRTUAL;
4022
4024 virtual int32_t SegmentIDGet(int32_t segmentNumber) PURE_VIRTUAL;
4025
4038 virtual uint64_t DigitalInAddressGet(int32_t bitNumber) PURE_VIRTUAL;
4039
4052 virtual int32_t DigitalInMaskGet(int32_t bitNumber) PURE_VIRTUAL;
4053
4066 virtual uint64_t DigitalOutAddressGet(int32_t bitNumber) PURE_VIRTUAL;
4067
4080 virtual int32_t DigitalOutMaskGet(int32_t bitNumber) PURE_VIRTUAL;
4081
4093 virtual uint64_t AnalogInAddressGet(int32_t channel) PURE_VIRTUAL;
4094
4106 virtual int32_t AnalogInMaskGet(int32_t channel) PURE_VIRTUAL;
4107
4119 virtual uint64_t AnalogOutAddressGet(int32_t channel) PURE_VIRTUAL;
4120
4132 virtual int32_t AnalogOutMaskGet(int32_t channel) PURE_VIRTUAL;
4133
4147 virtual int32_t ServiceChannelRead(int32_t index, int32_t subIndex, int32_t byteCount) PURE_VIRTUAL;
4148
4152 virtual int32_t ServiceChannelRead(int32_t index, int32_t subIndex, int32_t byteCount, uint32_t timeoutMilliseconds) PURE_VIRTUAL;
4153
4166 virtual const char* const ServiceChannelReadString(int32_t index, int32_t subIndex, int32_t byteCount) PURE_VIRTUAL;
4167
4171 virtual const char* const ServiceChannelReadString(int32_t index, int32_t subIndex, int32_t byteCount, uint32_t timeoutMilliseconds) PURE_VIRTUAL;
4172
4183 virtual RapidVector<uint8_t> ServiceChannelReadBytes(int32_t index, int32_t subIndex, int32_t byteCount, uint32_t timeoutMilliseconds) PURE_VIRTUAL;
4184
4198 virtual void ServiceChannelWrite(int32_t index, int32_t subIndex, int32_t byteCount, int32_t sdoValue) PURE_VIRTUAL;
4199
4200
4205 virtual void ServiceChannelWrite(int32_t index, int32_t subIndex, int32_t byteCount, int32_t sdoValue, uint32_t timeoutMilliseconds) PURE_VIRTUAL;
4206
4218 virtual void ServiceChannelWrite(int32_t index, int32_t subIndex, int32_t byteCount, const char* const stringValue) PURE_VIRTUAL;
4219
4227 virtual void ServiceChannelWrite(int32_t index, int32_t subIndex, int32_t byteCount, const char* const stringValue, uint32_t timeoutMilliseconds) PURE_VIRTUAL;
4228
4237 virtual void ServiceChannelWrite(int32_t index, int32_t subIndex, int32_t byteCount, RapidVector<uint8_t> bytes, uint32_t timeoutMilliseconds) PURE_VIRTUAL;
4238
4244 virtual char* AKDASCIICommand(const char* const command) PURE_VIRTUAL;
4245
4247 virtual void ClearFaults(int32_t axisNumber) PURE_VIRTUAL;
4248
4250 virtual uint32_t VendorIdGet() PURE_VIRTUAL;
4251
4264 virtual const char* const NameGet() PURE_VIRTUAL;
4265
4278 virtual const char* const ProductNameGet() PURE_VIRTUAL;
4279
4292 virtual const char* const VendorNameGet() PURE_VIRTUAL;
4293
4295 virtual uint32_t ProductCodeGet() PURE_VIRTUAL;
4296
4298 virtual uint32_t RevisionGet() PURE_VIRTUAL;
4299
4301 virtual uint32_t StationAliasGet() PURE_VIRTUAL;
4302
4304 virtual const char* const SerialNumberGet() PURE_VIRTUAL;
4305
4307 virtual uint32_t AxisCountGet() PURE_VIRTUAL;
4308
4310 virtual uint16_t StatusWordGet(int32_t axisIndex) PURE_VIRTUAL;
4311};
4312
4314
4317class RSI_API RapidCodeMotion : public virtual RapidCodeInterrupt{
4318public:
4319
4321 static inline constexpr int32_t AmpEnableTimeoutMillisecondsDefault = 500;
4322
4328
4331
4333
4334
4338
4356 virtual int32_t NumberGet() PURE_VIRTUAL;
4357
4374 virtual int32_t AxisCountGet() PURE_VIRTUAL;
4375
4379
4404 virtual void TriggeredModify() PURE_VIRTUAL;
4405
4432 virtual void Stop() PURE_VIRTUAL;
4433
4458 virtual void Resume() PURE_VIRTUAL;
4459
4484 virtual void EStop() PURE_VIRTUAL;
4485
4506 virtual void EStopAbort() PURE_VIRTUAL;
4507
4524 virtual void EStopModify() PURE_VIRTUAL;
4525
4528 virtual void EStopModifyAbort() PURE_VIRTUAL;
4529
4551 virtual void Abort() PURE_VIRTUAL;
4552
4579 virtual void ClearFaults() PURE_VIRTUAL;
4580
4621 virtual int32_t AmpEnableSet(bool enable, int32_t ampActiveTimeoutMilliseconds = AmpEnableTimeoutMillisecondsDefault, bool overrideRestrictedState = false) PURE_VIRTUAL;
4622
4633 virtual bool AmpEnableGet() PURE_VIRTUAL;
4634
4654
4655 virtual void Map() PURE_VIRTUAL;
4656
4674 virtual void Unmap() PURE_VIRTUAL;
4675
4680 virtual bool IsMapped() PURE_VIRTUAL;
4681
4698 virtual void FeedRateSet(double rate) PURE_VIRTUAL;
4699
4718 virtual double FeedRateGet() PURE_VIRTUAL;
4719
4723
4724
4725
4726
4746 virtual RSIState StateGet() PURE_VIRTUAL;
4747
4775 virtual RSISource SourceGet() PURE_VIRTUAL;
4776
4801 virtual const char* const SourceNameGet(RSISource source) PURE_VIRTUAL;
4802
4825 virtual int32_t MotionDoneWait() PURE_VIRTUAL;
4826
4853 virtual int32_t MotionDoneWait(int32_t waitTimeoutMilliseconds) PURE_VIRTUAL;
4854
4875 virtual bool MotionDoneGet() PURE_VIRTUAL;
4876
4899 virtual bool StatusBitGet(RSIEventType bitMask) PURE_VIRTUAL;
4900
4915 virtual uint64_t StatusBitsGet() PURE_VIRTUAL;
4916
4920
4949 virtual void InterruptEnableSet(bool enable) PURE_VIRTUAL;
4950
4964 virtual void InterruptWake() PURE_VIRTUAL;
4965
4969
4985 virtual double StopTimeGet() PURE_VIRTUAL;
4986
5002 virtual void StopTimeSet(double seconds) PURE_VIRTUAL;
5003
5019 virtual double EStopTimeGet() PURE_VIRTUAL;
5020
5036 virtual void EStopTimeSet(double seconds) PURE_VIRTUAL;
5037
5054 virtual double MotionDelayGet() PURE_VIRTUAL;
5055
5076 virtual void MotionDelaySet(double seconds) PURE_VIRTUAL;
5077
5098 virtual uint16_t MotionIdGet() PURE_VIRTUAL;
5099
5117 virtual void MotionIdSet(uint16_t id) PURE_VIRTUAL;
5118
5120 virtual uint16_t MotionIdExecutingGet() PURE_VIRTUAL;
5121
5123 virtual uint16_t MotionElementIdExecutingGet() PURE_VIRTUAL;
5124
5139 virtual double MotionFinalVelocityGet() PURE_VIRTUAL;
5140
5148 virtual void MotionFinalVelocitySet(double finalVelocity) PURE_VIRTUAL;
5149
5169 virtual RSIMotionHoldType MotionHoldTypeGet() PURE_VIRTUAL;
5170
5203 virtual void MotionHoldTypeSet(RSIMotionHoldType type) PURE_VIRTUAL;
5204
5216 virtual int32_t MotionHoldGateNumberGet() PURE_VIRTUAL;
5217
5236
5237 virtual void MotionHoldGateNumberSet(int32_t gateNumber) PURE_VIRTUAL;
5238
5255 virtual double MotionHoldTimeoutGet() PURE_VIRTUAL;
5256
5275 virtual void MotionHoldTimeoutSet(double seconds) PURE_VIRTUAL;
5276
5300 virtual bool MotionHoldGateGet() PURE_VIRTUAL;
5301
5324 virtual void MotionHoldGateSet(bool hold) PURE_VIRTUAL;
5325
5342 virtual int32_t MotionHoldAxisNumberGet() PURE_VIRTUAL;
5343
5360 virtual void MotionHoldAxisNumberSet(int32_t number) PURE_VIRTUAL;
5361
5378
5379 virtual double MotionHoldAxisPositionGet() PURE_VIRTUAL;
5380
5397 virtual void MotionHoldAxisPositionSet(double position) PURE_VIRTUAL;
5398
5400 virtual RSIUserLimitLogic MotionHoldAxisLogicGet() PURE_VIRTUAL;
5401
5403 virtual void MotionHoldAxisLogicSet(RSIUserLimitLogic logic) PURE_VIRTUAL;
5404
5421 virtual uint64_t MotionHoldUserAddressGet() PURE_VIRTUAL;
5422
5439 virtual void MotionHoldUserAddressSet(uint64_t address) PURE_VIRTUAL;
5440
5456 virtual int32_t MotionHoldUserMaskGet() PURE_VIRTUAL;
5457
5473 virtual void MotionHoldUserMaskSet(int32_t holdMask) PURE_VIRTUAL;
5474
5490 virtual int32_t MotionHoldUserPatternGet() PURE_VIRTUAL;
5491
5507 virtual void MotionHoldUserPatternSet(int32_t pattern) PURE_VIRTUAL;
5508
5510 virtual void MotionAttributeMaskDefaultSet() PURE_VIRTUAL;
5511
5536
5537 virtual bool MotionAttributeMaskOnGet(RSIMotionAttrMask maskOn) PURE_VIRTUAL;
5538
5557 virtual void MotionAttributeMaskOnSet(RSIMotionAttrMask maskOn) PURE_VIRTUAL;
5558
5575
5576 virtual void MotionAttributeMaskOffSet(RSIMotionAttrMask maskOff) PURE_VIRTUAL;
5577
5581
5582
5583
5619 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;
5620
5658 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;
5659
5689 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;
5690
5727 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;
5728
5769 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;
5770
5775 virtual void StreamingOutputAdd(int32_t onMask, int32_t offMask, uint64_t address) PURE_VIRTUAL;
5776
5798 virtual void StreamingOutputAdd(int32_t onMask, int32_t offMask, uint64_t address, int32_t ptPointIndex) PURE_VIRTUAL;
5799
5804 virtual void StreamingOutputAdd(RapidCode::IOPoint* point, bool on) PURE_VIRTUAL;
5805
5824 virtual void StreamingOutputAdd(RapidCode::IOPoint* point, bool on, int32_t ptPointIndex) PURE_VIRTUAL;
5825
5841 virtual void StreamingOutputsClear() PURE_VIRTUAL;
5842
5862 virtual void StreamingOutputsEnableSet(bool enable) PURE_VIRTUAL;
5863};
5864
5865
5870class RSI_API Axis : public virtual RapidCodeMotion{
5871public:
5872
5873 friend class MotionController;
5874 friend class MultiAxis;
5875
5876
5881
5883 static inline constexpr uint32_t NetworkIndexInvalid = 65535;
5884
5886 static inline constexpr double AmpEnableAmpFaultTimeoutSecondsDefault = 1.0;
5887
5889
5890
5895
5900 RapidCodeNetworkNode* NetworkNode;
5901
5902
5904
5909
5947 virtual void MoveTrapezoidal(double position, double vel, double accel, double decel) PURE_VIRTUAL;
5948
5970 virtual void MoveTrapezoidal(double position, double vel, double accel, double decel, double finalVel) PURE_VIRTUAL;
5971
5994 virtual void MoveTrapezoidal(double position) PURE_VIRTUAL; // use defaults Overload
5995
6003
6004 virtual void MoveSCurve(double position, double vel, double accel, double decel, double jerkPct) PURE_VIRTUAL;
6005
6015 virtual void MoveSCurve(double position) PURE_VIRTUAL;
6016
6020 virtual void MoveSCurve(double position, double vel, double accel, double decel, double jerkPct, double finalVel) PURE_VIRTUAL;
6021
6025 virtual void MoveVelocity(double velocity) PURE_VIRTUAL;
6026
6061 virtual void MoveVelocity(double velocity, double accel) PURE_VIRTUAL;
6062
6100 virtual void MoveVelocitySCurve(double velocity, double accel, double jerkPct) PURE_VIRTUAL;
6101
6143 virtual void MoveRelative(double relativePosition, double vel, double accel, double decel, double jerkPct) PURE_VIRTUAL;
6144
6151 virtual void MoveRelative(double relativePosition) PURE_VIRTUAL;
6152
6158 virtual void MoveRelative(double relativePosition, double vel, double accel, double decel, double jerkPct, double finalVel) PURE_VIRTUAL;
6160
6165
6190 virtual void PositionSet(double position) PURE_VIRTUAL;
6191
6210 virtual double ActualPositionGet() PURE_VIRTUAL;
6211
6233 virtual void ActualPositionSet(double position) PURE_VIRTUAL;
6234
6251 virtual double CompensationPositionGet() PURE_VIRTUAL;
6252
6265 virtual void CompensationPositionSet(double position) PURE_VIRTUAL;
6266
6278 virtual double TargetPositionGet() PURE_VIRTUAL;
6279
6299 virtual double CommandPositionGet() PURE_VIRTUAL;
6300
6332 virtual void CommandPositionSet(double position) PURE_VIRTUAL;
6333
6357 virtual void CommandPositionDirectSet(double position) PURE_VIRTUAL;
6358
6375 virtual double OriginPositionGet() PURE_VIRTUAL;
6376
6399 virtual void OriginPositionSet(double position) PURE_VIRTUAL;
6400
6421 virtual double PositionErrorGet() PURE_VIRTUAL;
6422
6444 virtual double CommandVelocityGet() PURE_VIRTUAL;
6445
6468 virtual double ActualVelocityGet() PURE_VIRTUAL;
6469
6490 virtual double CommandAccelGet() PURE_VIRTUAL;
6491
6493 virtual double CommandJerkGet() PURE_VIRTUAL;
6494
6515 virtual double EncoderPositionGet(RSIMotorFeedback encoder) PURE_VIRTUAL;
6516
6538 virtual double UserUnitsGet() PURE_VIRTUAL;
6539
6562 virtual void UserUnitsSet(double countsPerUserUnit) PURE_VIRTUAL;
6563
6565 virtual double UserUnitsToCounts(double userUnits) PURE_VIRTUAL;
6566
6568 virtual double CountsToUserUnits(double counts) PURE_VIRTUAL;
6569
6589 virtual int32_t FramesToExecuteGet() PURE_VIRTUAL;
6591
6596
6617
6618 virtual void Home() PURE_VIRTUAL; // this one moves to zero by default
6619
6623 virtual void Home(bool moveToZero) PURE_VIRTUAL;
6624
6643
6644 virtual RSIHomeMethod HomeMethodGet() PURE_VIRTUAL;
6645
6664
6665 virtual void HomeMethodSet(RSIHomeMethod method) PURE_VIRTUAL;
6666
6687
6688 virtual double HomeOffsetGet() PURE_VIRTUAL;
6689
6734 virtual void HomeOffsetSet(double offset) PURE_VIRTUAL;
6735
6753
6754 virtual double HomeVelocityGet() PURE_VIRTUAL;
6755
6758 virtual double HomeVelocityGet(RSIHomeStage homeStage) PURE_VIRTUAL;
6759
6780 virtual void HomeVelocitySet(double velocity) PURE_VIRTUAL;
6781
6786 virtual void HomeVelocitySet(RSIHomeStage homeStage, double velocity) PURE_VIRTUAL;
6787
6803 virtual double HomeSlowVelocityGet() PURE_VIRTUAL;
6804
6820 virtual void HomeSlowVelocitySet(double velocity) PURE_VIRTUAL;
6821
6839
6840 virtual double HomeAccelerationGet() PURE_VIRTUAL;
6841
6844 virtual double HomeAccelerationGet(RSIHomeStage homeStage) PURE_VIRTUAL;
6845
6865
6866 virtual void HomeAccelerationSet(double accel) PURE_VIRTUAL;
6867
6871 virtual void HomeAccelerationSet(RSIHomeStage homeStage, double accel) PURE_VIRTUAL;
6872
6889
6890 virtual double HomeDecelerationGet() PURE_VIRTUAL;
6891
6894 virtual double HomeDecelerationGet(RSIHomeStage homeStage) PURE_VIRTUAL;
6895
6914
6915 virtual void HomeDecelerationSet(double decel) PURE_VIRTUAL;
6916
6920 virtual void HomeDecelerationSet(RSIHomeStage homeStage, double decel) PURE_VIRTUAL;
6921
6939
6940 virtual double HomeJerkPercentGet() PURE_VIRTUAL;
6941
6944 virtual double HomeJerkPercentGet(RSIHomeStage homeStage) PURE_VIRTUAL;
6945
6965 virtual void HomeJerkPercentSet(double percent) PURE_VIRTUAL;
6966
6971 virtual void HomeJerkPercentSet(RSIHomeStage homeStage, double percent) PURE_VIRTUAL;
6972
6992 virtual void HomeCancelSet(bool cancel) PURE_VIRTUAL;
6993
7012 virtual bool HomeStateGet() PURE_VIRTUAL;
7013
7026 virtual void HomeStateSet(bool homed) PURE_VIRTUAL;
7027
7032 virtual void HomeLimitCustomConfigSet(uint64_t address, int32_t bitIndex) PURE_VIRTUAL;
7033
7035 virtual void HomeLimitCustomConfigReset() PURE_VIRTUAL;
7036
7038 virtual uint64_t HomeLimitCustomConfigAddressGet() PURE_VIRTUAL;
7039
7042 virtual int32_t HomeLimitCustomConfigBitIndexGet() PURE_VIRTUAL;
7043
7065
7066 virtual void HomeTravelDistanceSet(RSIHomeStage stage, double distanceToTravel) PURE_VIRTUAL;
7067
7087 virtual RSIHomeStage HomeStageGet() PURE_VIRTUAL;
7088
7102 virtual void HomeBehaviorSet(RSIAction behavior) PURE_VIRTUAL;
7103
7115 virtual RSIAction HomeBehaviorGet() PURE_VIRTUAL;
7117
7123
7125 virtual bool FaultMaskBitGet(RSIMotorFaultMask bitMask) PURE_VIRTUAL;
7126
7128 virtual uint16_t StatusWordGet() PURE_VIRTUAL;
7130
7135 // reads active configuration to report state
7136
7160
7161 virtual bool NegativeLimitGet() PURE_VIRTUAL;
7162
7186 virtual bool PositiveLimitGet() PURE_VIRTUAL;
7187
7216 virtual bool HomeLimitGet() PURE_VIRTUAL;
7217
7245 virtual bool HomeSwitchGet() PURE_VIRTUAL;
7246
7267 virtual bool AmpFaultGet() PURE_VIRTUAL;
7268
7292 virtual bool AmpEnableGet() PURE_VIRTUAL;
7293
7318 virtual bool DedicatedInExists(RSIMotorDedicatedIn motorDedicatedInNumber) PURE_VIRTUAL;
7319
7344 virtual bool DedicatedOutExists(RSIMotorDedicatedOut motorDedicatedOutNumber) PURE_VIRTUAL;
7345
7368 virtual bool DedicatedInGet(RSIMotorDedicatedIn motorDedicatedInNumber) PURE_VIRTUAL;
7369
7391 virtual uint32_t DedicatedInputsGet() PURE_VIRTUAL;
7392
7415 virtual bool DedicatedOutGet(RSIMotorDedicatedOut motorDedicatedOutNumber) PURE_VIRTUAL;
7416
7438 virtual uint32_t DedicatedOutputsGet() PURE_VIRTUAL;
7440
7445
7466 virtual bool DigitalInGet(RSIMotorGeneralIo motorGeneralIoNumber) PURE_VIRTUAL;
7467
7485 virtual uint32_t DigitalInputsGet() PURE_VIRTUAL;
7486
7507 virtual bool DigitalOutGet(RSIMotorGeneralIo motorGeneralIoNumber) PURE_VIRTUAL;
7508
7526 virtual uint32_t DigitalOutputsGet() PURE_VIRTUAL;
7527
7548
7549 virtual void DigitalOutSet(RSIMotorGeneralIo motorGeneralIoNumber, bool outValue) PURE_VIRTUAL;
7550
7569 virtual bool DigitalIoExists(RSIMotorGeneralIo motorGeneralIoNumber) PURE_VIRTUAL;
7570
7589 virtual const char* const DigitalIoNameGet(RSIMotorGeneralIo motorGeneralIoNumber) PURE_VIRTUAL;
7590
7613 virtual RSIMotorIoTypeMask DigitalIoValidTypesMaskGet(RSIMotorGeneralIo motorGeneralIoNumber) PURE_VIRTUAL;
7614
7633 virtual void DigitalIoTypeSet(RSIMotorGeneralIo motorGeneralIoNumber, RSIMotorIoType type) PURE_VIRTUAL;
7634
7651 virtual double AnalogInGet(int32_t channel) PURE_VIRTUAL;
7653
7658
7672 virtual double EStopDecelerationGet() PURE_VIRTUAL;
7673
7688 virtual void EStopDecelerationSet(double decel) PURE_VIRTUAL;
7689
7700 virtual double EStopJerkPercentGet() PURE_VIRTUAL;
7701
7719 virtual void EStopJerkPercentSet(double jerkPct) PURE_VIRTUAL;
7720
7730 virtual double TriggeredModifyDecelerationGet() PURE_VIRTUAL;
7731
7749 virtual void TriggeredModifyDecelerationSet(double decel) PURE_VIRTUAL;
7750
7761 virtual double TriggeredModifyJerkPercentGet() PURE_VIRTUAL;
7762
7780 virtual void TriggeredModifyJerkPercentSet(double jerkPct) PURE_VIRTUAL;
7781
7783 virtual int32_t FrameBufferSizeGet() PURE_VIRTUAL;
7784
7786 virtual void FrameBufferSizeSet(int32_t frameSize) PURE_VIRTUAL;
7787
7807 virtual uint16_t MotionIdExecutingGet() PURE_VIRTUAL;
7808
7829 virtual uint16_t MotionElementIdExecutingGet() PURE_VIRTUAL;
7831
7836
7838 virtual double MotionFinalVelocityGet() PURE_VIRTUAL;
7839
7841 virtual void MotionFinalVelocitySet(double finalVelocity) PURE_VIRTUAL;
7842
7844 virtual double DefaultVelocityGet() PURE_VIRTUAL;
7845
7847 virtual void DefaultVelocitySet(double velocity) PURE_VIRTUAL;
7848
7850 virtual double DefaultAccelerationGet() PURE_VIRTUAL;
7851
7853 virtual void DefaultAccelerationSet(double acceleration) PURE_VIRTUAL;
7854
7856 virtual double DefaultDecelerationGet() PURE_VIRTUAL;
7857
7859 virtual void DefaultDecelerationSet(double deceleration) PURE_VIRTUAL;
7860
7862 virtual double DefaultJerkPercentGet() PURE_VIRTUAL;
7863
7865 virtual void DefaultJerkPercentSet(double jerkPercent) PURE_VIRTUAL;
7866
7868 virtual double DefaultPosition1Get() PURE_VIRTUAL;
7869
7871 virtual void DefaultPosition1Set(double position1) PURE_VIRTUAL;
7872
7874 virtual double DefaultPosition2Get() PURE_VIRTUAL;
7875
7877 virtual void DefaultPosition2Set(double position2) PURE_VIRTUAL;
7878
7880 virtual double DefaultRelativeIncrementGet() PURE_VIRTUAL;
7881
7883 virtual void DefaultRelativeIncrementSet(double relativeIncrement) PURE_VIRTUAL;
7885
7889 // /@{
7890
7913 virtual RSIAction AmpFaultActionGet() PURE_VIRTUAL;
7914
7937 virtual void AmpFaultActionSet(RSIAction action) PURE_VIRTUAL;
7938
7960 virtual bool AmpFaultTriggerStateGet() PURE_VIRTUAL;
7961
7983 virtual void AmpFaultTriggerStateSet(bool state) PURE_VIRTUAL;
7984
8005 virtual double AmpFaultDurationGet() PURE_VIRTUAL;
8006
8027 virtual void AmpFaultDurationSet(double seconds) PURE_VIRTUAL;
8028
8053 virtual RSIAction HomeActionGet() PURE_VIRTUAL;
8054
8078 virtual void HomeActionSet(RSIAction action) PURE_VIRTUAL;
8079
8105 virtual bool HomeTriggerStateGet() PURE_VIRTUAL;
8106
8127 virtual void HomeTriggerStateSet(bool state) PURE_VIRTUAL;
8128
8150 virtual double HomeDurationGet() PURE_VIRTUAL;
8151
8174 virtual void HomeDurationSet(double seconds) PURE_VIRTUAL;
8175
8204 virtual RSIAction ErrorLimitActionGet() PURE_VIRTUAL;
8205
8232 virtual void ErrorLimitActionSet(RSIAction action) PURE_VIRTUAL;
8233
8256 virtual double ErrorLimitTriggerValueGet() PURE_VIRTUAL;
8257
8279 virtual void ErrorLimitTriggerValueSet(double triggerValue) PURE_VIRTUAL;
8280
8302 virtual double ErrorLimitDurationGet() PURE_VIRTUAL;
8303
8326 virtual void ErrorLimitDurationSet(double seconds) PURE_VIRTUAL;
8327
8352 virtual RSIAction HardwareNegLimitActionGet() PURE_VIRTUAL;
8353
8378 virtual void HardwareNegLimitActionSet(RSIAction action) PURE_VIRTUAL;
8379
8403 virtual bool HardwareNegLimitTriggerStateGet() PURE_VIRTUAL;
8404
8428 virtual void HardwareNegLimitTriggerStateSet(bool state) PURE_VIRTUAL;
8429
8452 virtual double HardwareNegLimitDurationGet() PURE_VIRTUAL;
8453
8477 virtual void HardwareNegLimitDurationSet(double seconds) PURE_VIRTUAL;
8478
8503 virtual RSIAction HardwarePosLimitActionGet() PURE_VIRTUAL;
8504
8529 virtual void HardwarePosLimitActionSet(RSIAction action) PURE_VIRTUAL;
8530
8551 virtual bool HardwarePosLimitTriggerStateGet() PURE_VIRTUAL;
8552
8576 virtual void HardwarePosLimitTriggerStateSet(bool state) PURE_VIRTUAL;
8577
8600 virtual double HardwarePosLimitDurationGet() PURE_VIRTUAL;
8601
8624 virtual void HardwarePosLimitDurationSet(double seconds) PURE_VIRTUAL;
8625
8651 virtual RSIAction SoftwareNegLimitActionGet() PURE_VIRTUAL;
8652
8676 virtual void SoftwareNegLimitActionSet(RSIAction action) PURE_VIRTUAL;
8677
8700 virtual double SoftwareNegLimitTriggerValueGet() PURE_VIRTUAL;
8701
8724 virtual void SoftwareNegLimitTriggerValueSet(double triggerValue) PURE_VIRTUAL;
8725
8749 virtual RSIAction SoftwarePosLimitActionGet() PURE_VIRTUAL;
8750
8774 virtual void SoftwarePosLimitActionSet(RSIAction action) PURE_VIRTUAL;
8775
8798 virtual double SoftwarePosLimitTriggerValueGet() PURE_VIRTUAL;
8799
8822 virtual void SoftwarePosLimitTriggerValueSet(double triggerValue) PURE_VIRTUAL;
8823
8849 virtual RSIAction EncoderFaultActionGet() PURE_VIRTUAL;
8850
8875 virtual void EncoderFaultActionSet(RSIAction action) PURE_VIRTUAL;
8876
8900 virtual RSIMotorFeedbackFault EncoderFaultTriggerGet() PURE_VIRTUAL;
8901
8923 virtual void EncoderFaultTriggerSet(RSIMotorFeedbackFault encoder) PURE_VIRTUAL;
8924
8946 virtual double EncoderFaultDurationGet() PURE_VIRTUAL;
8947
8969 virtual void EncoderFaultDurationSet(double seconds) PURE_VIRTUAL;
8970
8972 virtual RSIAction NodeFailureActionGet() PURE_VIRTUAL;
8973
8975 virtual void NodeFailureActionSet(RSIAction action) PURE_VIRTUAL;
8976
8992 virtual uint64_t AddressGet( RSIAxisAddressType addressType) PURE_VIRTUAL;
8993
9007 virtual RSIDataType AddressDataTypeGet(RSIAxisAddressType type) PURE_VIRTUAL;
9008
9009 // common limit methods
9010
9012 virtual RSIAction LimitActionGet(RSIEventType limit) PURE_VIRTUAL;
9013
9015 virtual void LimitActionSet(RSIEventType limit, RSIAction action) PURE_VIRTUAL;
9016
9018 virtual bool LimitTriggerStateGet(RSIEventType limit) PURE_VIRTUAL;
9019
9021 virtual void LimitTriggerStateSet(RSIEventType limit, bool triggerState) PURE_VIRTUAL;
9022
9024 virtual double LimitTriggerValueGet(RSIEventType limit) PURE_VIRTUAL;
9025
9027 virtual void LimitTriggerValueSet(RSIEventType limit, double triggerValue) PURE_VIRTUAL;
9028
9030 virtual double LimitDurationGet(RSIEventType limit) PURE_VIRTUAL;
9031
9033 virtual void LimitDurationSet(RSIEventType limit, double seconds) PURE_VIRTUAL;
9035
9040
9054 virtual double PositionToleranceFineGet() PURE_VIRTUAL;
9055
9069 virtual void PositionToleranceFineSet(double tolerance) PURE_VIRTUAL;
9070
9084 virtual double PositionToleranceCoarseGet() PURE_VIRTUAL;
9085
9102 virtual void PositionToleranceCoarseSet(double tolerance) PURE_VIRTUAL;
9103
9117 virtual double VelocityToleranceGet() PURE_VIRTUAL;
9118
9132 virtual void VelocityToleranceSet(double tolerance) PURE_VIRTUAL;
9133
9148 virtual double SettlingTimeGet() PURE_VIRTUAL;
9149
9164 virtual void SettlingTimeSet(double time) PURE_VIRTUAL;
9165
9182 virtual bool SettleOnStopGet() PURE_VIRTUAL;
9183
9200
9201 virtual void SettleOnStopSet(bool state) PURE_VIRTUAL;
9202
9219 virtual bool SettleOnEStopGet() PURE_VIRTUAL;
9220
9236 virtual void SettleOnEStopSet(bool state) PURE_VIRTUAL;
9237
9254 virtual bool SettleOnEStopCmdEqActGet() PURE_VIRTUAL;
9255
9271 virtual void SettleOnEStopCmdEqActSet(bool state) PURE_VIRTUAL;
9273
9278
9295 virtual RSIMotorType MotorTypeGet() PURE_VIRTUAL;
9296
9312 virtual void MotorTypeSet(RSIMotorType type) PURE_VIRTUAL;
9313
9330 virtual RSIMotorDisableAction AmpDisableActionGet() PURE_VIRTUAL;
9331
9349 virtual void AmpDisableActionSet(RSIMotorDisableAction action) PURE_VIRTUAL;
9350
9368
9369 virtual RSIMotorBrakeMode BrakeModeGet() PURE_VIRTUAL;
9370
9386 virtual void BrakeModeSet(RSIMotorBrakeMode mode) PURE_VIRTUAL;
9387
9403 virtual double BrakeApplyDelayGet() PURE_VIRTUAL;
9404
9405
9422 virtual void BrakeApplyDelaySet(double seconds) PURE_VIRTUAL;
9423
9439 virtual double BrakeReleaseDelayGet() PURE_VIRTUAL;
9440
9458 virtual void BrakeReleaseDelaySet(double seconds) PURE_VIRTUAL;
9459
9461 virtual void ClosedLoopStepperSet(bool enable) PURE_VIRTUAL;
9462
9464 virtual int32_t ClosedLoopStepperVersionGet() PURE_VIRTUAL;
9465
9467 virtual uint64_t EncoderPointerGet(RSIMotorFeedback encoder) PURE_VIRTUAL;
9468
9470 virtual void EncoderPointerSet(RSIMotorFeedback encoder, uint64_t address) PURE_VIRTUAL;
9471
9473 virtual uint64_t FeedbackDeltaPointerGet(RSIAxisPositionInput input) PURE_VIRTUAL;
9474
9475
9477 virtual void FeedbackDeltaPointerSet(RSIAxisPositionInput input, uint64_t address) PURE_VIRTUAL;
9478
9480 virtual uint64_t FeedbackPointerGet(RSIAxisPositionInput input) PURE_VIRTUAL;
9481
9499 virtual void FeedbackPointerSet(RSIAxisPositionInput input, uint64_t address) PURE_VIRTUAL;
9500
9502 virtual int32_t EncoderRatioNumeratorGet(RSIMotorFeedback encoder) PURE_VIRTUAL;
9503
9505 virtual int32_t EncoderRatioDenominatorGet(RSIMotorFeedback encoder) PURE_VIRTUAL;
9506
9528 virtual void EncoderRatioSet(RSIMotorFeedback encoder, int32_t numerator, int32_t denominator) PURE_VIRTUAL;
9529
9531 virtual const char* const EncoderRatioPrimaryGet() PURE_VIRTUAL;
9532
9534 virtual void EncoderRatioPrimarySet(char* numeratorCommaDenominator) PURE_VIRTUAL;
9535
9537 virtual const char* const EncoderRatioSecondaryGet() PURE_VIRTUAL;
9538
9540 virtual void EncoderRatioSecondarySet(char* numeratorCommaDenominator) PURE_VIRTUAL;
9541
9543 virtual int32_t EncoderCountGet() PURE_VIRTUAL;
9544
9547 virtual void EncoderCountSet(int32_t count) PURE_VIRTUAL;
9548
9550 virtual RSIAxisGantryType GantryTypeGet() PURE_VIRTUAL;
9551
9553 virtual void GantryTypeSet(RSIAxisGantryType type) PURE_VIRTUAL;
9554
9568 virtual RSIOperationMode OperationModeGet() PURE_VIRTUAL;
9569
9583 virtual void OperationModeSet(RSIOperationMode mode) PURE_VIRTUAL;
9584
9604 virtual int32_t MotorFaultMaskGet() PURE_VIRTUAL;
9605
9631 virtual void MotorFaultMaskSet(int32_t faultMask) PURE_VIRTUAL;
9633
9638
9660 virtual void GearingEnable(int32_t masterAxisNumber, RSIAxisMasterType masterFeedbackSource, int32_t numerator, int32_t denominator) PURE_VIRTUAL;
9665 virtual void GearingEnable(Axis* masterAxis, RSIAxisMasterType masterFeedbackSource, int32_t numerator, int32_t denominator) PURE_VIRTUAL;
9666
9685 virtual void GearingRatioChange(int32_t numerator, int32_t denominator) PURE_VIRTUAL;
9686
9703 virtual void GearingDisable() PURE_VIRTUAL;
9704
9706 virtual int32_t GearingNumeratorGet() PURE_VIRTUAL;
9707
9709 virtual int32_t GearingDenominatorGet() PURE_VIRTUAL;
9710
9712 virtual bool GearingEnableGet() PURE_VIRTUAL;
9713
9731 virtual int32_t GearingMasterAxisNumberGet() PURE_VIRTUAL;
9732
9745 virtual RSIAxisMasterType GearingSourceGet() PURE_VIRTUAL;
9747
9752
9769 virtual double MotionCamMasterStartGet(Axis* master) PURE_VIRTUAL;
9770
9785 virtual void MotionCamMasterStartSet(Axis* master, double startPosition) PURE_VIRTUAL;
9786
9803 virtual int32_t MotionCamRepeatFromGet() PURE_VIRTUAL;
9804
9822 virtual void MotionCamRepeatFromSet(int32_t repeatFrom) PURE_VIRTUAL;
9823
9841 virtual void MotionCamRepeatStop() PURE_VIRTUAL;
9842
9865 virtual void MoveCamLinear(int32_t masterAxisNumber, RSIAxisMasterType masterFeedbackSource, const double* const masterDistances, const double* const slavePositions, int32_t pointCount) PURE_VIRTUAL;
9866
9896 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;
9897
9914
9915 virtual int32_t DriveIndexGet() PURE_VIRTUAL;
9917
9922
9935 virtual double BacklashWidthGet() PURE_VIRTUAL;
9936
9949 virtual void BacklashWidthSet(double width) PURE_VIRTUAL;
9950
9963 virtual double BacklashRateGet() PURE_VIRTUAL;
9964
9977 virtual void BacklashRateSet(double rate) PURE_VIRTUAL;
9978
9979
9990 virtual double BacklashValueGet() PURE_VIRTUAL;
9992
9997
10025 virtual RSIFilterAlgorithm FilterAlgorithmGet() PURE_VIRTUAL;
10026
10051 virtual void FilterAlgorithmSet(RSIFilterAlgorithm algorithm) PURE_VIRTUAL;
10052
10078 virtual double FilterCoeffGet(RSIFilterGainPIDCoeff coeff, int32_t gainTable) PURE_VIRTUAL;
10079
10102 virtual void FilterCoeffSet(RSIFilterGainPIDCoeff coeff, int32_t gainTable, double coeffValue) PURE_VIRTUAL;
10103
10106 virtual double FilterCoeffGet(RSIFilterGainPIVCoeff coeff, int32_t gainTable) PURE_VIRTUAL;
10111 virtual void FilterCoeffSet(RSIFilterGainPIVCoeff coeff, int32_t gainTable, double coeffValue) PURE_VIRTUAL;
10112
10147 virtual int32_t FilterGainTableGet() PURE_VIRTUAL;
10148
10177 virtual void FilterGainTableSet(int32_t gainTable) PURE_VIRTUAL;
10178
10195 virtual int32_t FilterGainTableSizeGet() PURE_VIRTUAL;
10196
10198 virtual double FilterOutputGet(void) PURE_VIRTUAL;
10199
10212 virtual double FilterLowPassGet() PURE_VIRTUAL;
10213
10229 virtual void FilterLowPassSet(double frequency) PURE_VIRTUAL;
10230
10249 virtual void FilterDualLoopSet(Axis* velocityAxis, RSIMotorFeedback velocityEncoder, bool enable) PURE_VIRTUAL;
10250
10251
10253 virtual bool FilterGainSchedulingGet() PURE_VIRTUAL;
10254
10255
10257 virtual void FilterGainSchedulingSet(bool enable) PURE_VIRTUAL;
10258
10260 virtual bool IsTuneable() PURE_VIRTUAL;
10261
10278 virtual void PostFilterLowPassSet(int32_t sectionNumber, double frequency) PURE_VIRTUAL;
10279
10295 virtual void PostFilterUnityGainSet(int32_t sectionNumber) PURE_VIRTUAL;
10296
10315 virtual void PostFilterSingleOrderSet(int32_t sectionNumber, double aOne, double bZero, double bOne) PURE_VIRTUAL;
10316
10332 virtual void PostFilterHighPassSet(int32_t sectionNumber, double cornerFreq) PURE_VIRTUAL;
10333
10351 virtual void PostFilterNotchSet(int32_t sectionNumber, double centerFreq, double bandwidth) PURE_VIRTUAL;
10352
10371 virtual void PostFilterResonatorSet(int32_t sectionNumber, double centerFreq, double bandwidth, double gain) PURE_VIRTUAL;
10372
10391 virtual void PostFilterLeadLagSet(int32_t sectionNumber, double lowGain, double highGain, double centerFreq) PURE_VIRTUAL;
10392
10408 virtual void PostFilterClear(int32_t sectionNumber) PURE_VIRTUAL;
10409
10430 virtual void PostFilterBiquadSet(int32_t sectionNumber, double aOne, double aTwo, double bZero, double bOne, double bTwo) PURE_VIRTUAL;
10431
10433 virtual const char* const PostFilterInfoGet() PURE_VIRTUAL;
10434 //virtual RSIFilterPostFilterSection PostFilterSection;
10436
10441
10461 virtual const char* const UserLabelGet() PURE_VIRTUAL;
10462
10483 virtual void UserLabelSet(const char* const userLabel) PURE_VIRTUAL;
10485
10490
10512 virtual void PostTrajectoryGearingEnableSet(bool enable) PURE_VIRTUAL;
10513
10532 virtual bool PostTrajectoryGearingEnableGet() PURE_VIRTUAL;
10533
10553 virtual void PostTrajectoryGearingMasterAxisSet(int32_t masterAxisNumber) PURE_VIRTUAL;
10554
10573 virtual int32_t PostTrajectoryGearingMasterAxisGet() PURE_VIRTUAL;
10574
10594 virtual void PostTrajectoryGearingMultiplierSet(double multiplier) PURE_VIRTUAL;
10595
10614 virtual double PostTrajectoryGearingMultiplierGet() PURE_VIRTUAL;
10615
10636 virtual double PostTrajectoryGearingScaledOffsetGet() PURE_VIRTUAL;
10638
10639
10664 virtual uint32_t NetworkIndexGet(RSINetworkIndexType indexType) PURE_VIRTUAL;
10665
10700 virtual void NetworkIndexSet(RSINetworkIndexType indexType, uint32_t newIndex) PURE_VIRTUAL;
10701
10709 virtual double BacklashHysteresisLimitGet() PURE_VIRTUAL;
10710
10717 virtual void BacklashHysteresisLimitSet(double hysteresisLimit) PURE_VIRTUAL;
10718
10742 virtual bool StepperMotorLoopbackGet() PURE_VIRTUAL;
10743
10767 virtual void StepperMotorLoopbackSet(bool loopback) PURE_VIRTUAL;
10768
10777 virtual RSIMotorStepperPulseType StepperMotorPulseTypeGet(RSIMotorStepperPulse pulse) PURE_VIRTUAL;
10778
10788 virtual void StepperMotorPulseTypeSet(RSIMotorStepperPulse pulse, RSIMotorStepperPulseType type) PURE_VIRTUAL;
10789
10796 virtual uint64_t GearingMasterAddressGet() PURE_VIRTUAL;
10797
10799};
10800
10804class RSI_API MultiAxis : public virtual RapidCodeMotion {
10805public:
10806
10810
10824 virtual void AxisAdd(Axis *axis) PURE_VIRTUAL;
10825
10828 virtual void AxesAdd(Axis* *axes, int32_t axisCount) PURE_VIRTUAL;
10829
10842 virtual void AxisRemoveAll() PURE_VIRTUAL;
10843
10847
10863 virtual Axis* AxisGet(int32_t index) PURE_VIRTUAL;
10864
10884 virtual const char* const UserLabelGet() PURE_VIRTUAL;
10885
10906 virtual void UserLabelSet(const char* const userLabel) PURE_VIRTUAL;
10907
10911
10926 virtual double VectorVelocityGet() PURE_VIRTUAL;
10927
10943 virtual void VectorVelocitySet(double velocity) PURE_VIRTUAL;
10944
10959 virtual double VectorAccelerationGet() PURE_VIRTUAL;
10960
10983 virtual void VectorAccelerationSet(double acceleration) PURE_VIRTUAL;
10984
10999 virtual double VectorDecelerationGet() PURE_VIRTUAL;
11000
11023 virtual void VectorDecelerationSet(double deceleration) PURE_VIRTUAL;
11024
11039 virtual double VectorJerkPercentGet() PURE_VIRTUAL;
11040
11063 virtual void VectorJerkPercentSet(double jerkPercent) PURE_VIRTUAL;
11064
11088 virtual void MoveVector(const double* const position) PURE_VIRTUAL;
11089
11092 virtual void MoveVectorRelative(const double* const relativePosition) PURE_VIRTUAL;
11093
11097
11117
11118 virtual double PathTimeSliceGet() PURE_VIRTUAL;
11119
11140
11141 virtual void PathTimeSliceSet(double seconds) PURE_VIRTUAL;
11142
11167 virtual void PathRatioSet(const double* const ratio) PURE_VIRTUAL;
11168
11171 virtual double PathRatioGet(int32_t index) PURE_VIRTUAL;
11172
11189 virtual void PathBlendSet(bool blend) PURE_VIRTUAL;
11190
11199
11200 virtual void PathPlanTypeSet(RSIPathPlanType type) PURE_VIRTUAL;
11201
11210
11211 virtual RSIPathPlanType PathPlanTypeGet() PURE_VIRTUAL;
11212
11231 virtual void PathListStart(const double* const startPosition) PURE_VIRTUAL;
11232
11253 virtual void PathLineAdd(const double* const position) PURE_VIRTUAL;
11254
11274 virtual void PathArcAdd(const double* const center, double angle) PURE_VIRTUAL;
11275
11294 virtual void PathListEnd() PURE_VIRTUAL;
11295
11312 virtual void PathMotionStart() PURE_VIRTUAL;
11313
11317
11335 virtual void MoveTrapezoidal(const double* const position, const double* const vel, const double* const accel, const double* const decel) PURE_VIRTUAL;
11336
11339 virtual void MoveTrapezoidal(const double* const position) PURE_VIRTUAL;
11340
11370 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;
11371
11382 virtual void MoveSCurve(const double* const position) PURE_VIRTUAL;
11383
11388 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;
11389
11404 virtual void MoveVelocity(const double* const velocity, const double* const accel) PURE_VIRTUAL;
11405
11409 virtual void MoveVelocity(const double* const velocity) PURE_VIRTUAL;
11410
11432 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;
11433
11444 virtual void MoveRelative(const double* const relativePosition) PURE_VIRTUAL;
11445
11450 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;
11451
11468 virtual void MoveVelocitySCurve(const double* const velocity, const double* const accel, const double* const jerkPct) PURE_VIRTUAL;
11469
11486 virtual uint16_t MotionIdExecutingGet() PURE_VIRTUAL;
11487
11505 virtual uint16_t MotionElementIdExecutingGet() PURE_VIRTUAL;
11506
11508 virtual int32_t AxisMapCountGet() PURE_VIRTUAL;
11509
11523 virtual uint64_t AddressGet(RSIMultiAxisAddressType addressType) PURE_VIRTUAL;
11524
11538 virtual RSIDataType AddressDataTypeGet(RSIMultiAxisAddressType type) PURE_VIRTUAL;
11539
11549 virtual bool AmpEnableGet() PURE_VIRTUAL;
11550
11551
11552};
11553
11559class RSI_API IOPoint : public virtual RapidCodeObject {
11560public:
11565
11582 static IOPoint* CreateDigitalInput(Axis* axis, RSIMotorDedicatedIn motorDedicatedInNumber);
11583
11600 static IOPoint* CreateDigitalInput(Axis* axis, RSIMotorGeneralIo motorGeneralIoNumber);
11601
11617 static IOPoint* CreateDigitalInput(RapidCodeNetworkNode* networkNode, int32_t bitNumber);
11618 // use NetworkNode*
11619 static IOPoint* CreateDigitalInput(IO* io, int32_t bitNumber);
11620
11631 static IOPoint* CreateDigitalInput(MotionController* controller, int32_t pdoIndex, int32_t bitNumber, RSIPDOType type);
11632
11646 static IOPoint* CreateDigitalInput(MotionController* controller, uint64_t memoryAddress, int32_t bitNumber);
11647
11665 static IOPoint* CreateDigitalOutput(Axis* axis, RSIMotorDedicatedOut motorDedicatedOutNumber);
11666
11683 static IOPoint* CreateDigitalOutput(Axis* axis, RSIMotorGeneralIo motorGeneralIoNumber);
11684
11700 static IOPoint* CreateDigitalOutput(RapidCodeNetworkNode* networkNode, int32_t bitNumber);
11701 // use NetworkNode*
11702 static IOPoint* CreateDigitalOutput(IO* io, int32_t bitNumber);
11703
11704
11717 static IOPoint* CreateDigitalOutput(MotionController* controller, int32_t pdoIndex, int32_t bitNumber, RSIPDOType type);
11718
11732 static IOPoint* CreateDigitalOutput(MotionController* controller, uint64_t memoryAddress, int32_t bitNumber);
11733
11748 static IOPoint* CreateAnalogInput(RapidCodeNetworkNode* networkNode, int32_t analogChannel);
11749 // use RapidCodeNetworkNode*
11750 static IOPoint* CreateAnalogInput(IO* io, int32_t analogChannel);
11751
11766 static IOPoint* CreateAnalogOutput(RapidCodeNetworkNode* networkNode, int32_t analogChannel);
11767 // use RapidCodeNetworkNode*
11768 static IOPoint* CreateAnalogOutput(IO* io, int32_t analogChannel);
11769
11771
11775
11778 virtual uint64_t AddressGet() PURE_VIRTUAL;
11779
11782 virtual int32_t MaskGet() PURE_VIRTUAL;
11783
11786 virtual bool IsDigital() PURE_VIRTUAL;
11787
11788
11791 virtual bool IsOutput() PURE_VIRTUAL;
11792
11796
11800 virtual bool Get() PURE_VIRTUAL;
11801
11808 virtual void Set(bool state) PURE_VIRTUAL;
11809
11813
11817 virtual double ValueGet() PURE_VIRTUAL;
11818
11822 virtual void ValueSet(double valueDouble) PURE_VIRTUAL;
11823};
11824
11828class RSI_API RTOS {
11829
11830public:
11831#if defined(_WIN32)
11836
11840
11845 static INtimeStatus INtimeStatusGet(const char* const nodeName);
11846
11850
11855 static INtimeStatus INtimeStart(const char* const nodeName);
11856
11860
11865 static INtimeStatus INtimeStop(const char* const nodeName);
11866
11870
11875 static INtimeStatus INtimeRestart(const char* const nodeName);
11876
11879 static const char* const INtimeCatalogRMPGet();
11880
11883 static const char* const INtimeCatalogRMPNetworkGet();
11884
11887 static uint32_t INtimeNodeCountGet();
11888
11892 static const char* const INtimeNodeNameGet(uint32_t nodeNumber);
11893
11897 static bool INtimeNodeIsLocal(uint32_t nodeNumber);
11899#endif // _WIN32
11900};
11901
11903class RSI_API Trace
11904{
11905public:
11910
11923 static void MaskSet(RSITrace mask);
11924
11940 static void MaskOnSet(RSITrace maskOn);
11941
11942
11962 static bool MaskOnGet(RSITrace maskOn);
11963
11979 static void MaskOffSet(RSITrace maskOff);
11980
11993 static void MaskClear();
11994
12009 static int32_t FileSet(const char* const fileName);
12010
12023 static void FileClose();
12024
12039 static void InjectMessage(RSITrace traceLevel, const char* const message);
12040
12042};
12043
12045
12047
12051class RSI_API IO : public virtual RapidCodeObject {
12052public:
12053
12054 friend class MotionController;
12055
12060
12062 RapidCodeNetworkNode* NetworkNode;
12065
12067
12072
12073
12106 virtual bool IOExists() PURE_VIRTUAL;
12107
12124 virtual int32_t NumberGet() PURE_VIRTUAL;
12126
12131
12132
12133
12163 virtual bool DigitalInGet(int32_t digitalInNumber) PURE_VIRTUAL;
12164
12197 virtual bool DigitalOutGet(int32_t digitalOutNumber) PURE_VIRTUAL;
12198
12229 virtual void DigitalOutSet(int32_t digitalOutNumber, bool outValue) PURE_VIRTUAL;
12230
12253 virtual int32_t AnalogInGet(int32_t analogChannel) PURE_VIRTUAL;
12254
12286 virtual int32_t AnalogOutGet(int32_t analogChannel) PURE_VIRTUAL;
12287
12319 virtual void AnalogOutSet(int32_t analogChannel, int32_t analogValue) PURE_VIRTUAL;
12321
12331 virtual const char* const UserLabelGet() PURE_VIRTUAL;
12332
12339 virtual void UserLabelSet(const char* const userLabel) PURE_VIRTUAL;
12340};
12341
12342#if defined(__cplusplus)
12343}
12344#endif
12345
12346template<typename ContainerClass>
12347class RSI_API RapidVectorIterator
12348{
12349public:
12351 typedef typename ContainerClass::ValueType ValueType;
12352
12354 typedef typename ContainerClass::PointerType PointerType;
12355
12358 ValueType& operator*();
12359
12362 const ValueType& operator*() const;
12363
12366 RapidVectorIterator& operator++();
12367
12370 RapidVectorIterator operator++(int);
12371
12374 bool operator==(const RapidVectorIterator&) const;
12375
12378 bool operator!=(const RapidVectorIterator&) const;
12379
12381 RapidVectorIterator(PointerType pointerArgument, PointerType startArgument, const size_t containerSize);
12382
12384 RapidVectorIterator(const RapidVectorIterator&) = default;
12385
12387 RapidVectorIterator& operator=(const RapidVectorIterator&) = default;
12388
12390 RapidVectorIterator(RapidVectorIterator&&) noexcept = default;
12391
12393 RapidVectorIterator& operator=(RapidVectorIterator&&) noexcept = default;
12394private:
12395 PointerType pointer;
12396 PointerType start, end;
12397 void VerifyPointer() const;
12398};
12399
12400// Forward declaration of the RapidVectorImplementation class.
12401template<typename Type>
12402class RapidVectorImplementation;
12403
12406
12419template<typename Type>
12420class RSI_API RapidVector
12421{
12422private:
12423 // The pointer to the implementation.
12424 RapidVectorImplementation<Type>* pImpl;
12425public:
12429 Type& operator[](const size_t index);
12430
12434 const Type& operator[](const size_t index) const;
12435
12439 Type& At(const size_t index);
12440
12444 const Type& At(const size_t index) const;
12445
12448 void PushBack(const Type& element);
12449
12452 void PushBack(Type&& element);
12453
12456 const size_t Size() const;
12457
12459 void Clear();
12460
12462 void PopBack();
12463
12466 Type& Front();
12467
12470 const Type& Front() const;
12471
12474 Type& Back();
12475
12478 const Type& Back() const;
12479
12482 void Reserve(const size_t capacity);
12483
12486
12488#if defined(SWIG) && defined(__linux__)
12489 // SWIG 4.3.0 on Linux cannot parse the complex SFINAE template syntax
12490 // This constructor is ignored via %ignore in the .i files anyway
12491 explicit RapidVector(const size_t size);
12492#elif defined(_WIN32)
12493 template<typename = typename std::enable_if_t<std::is_default_constructible_v<Type>>>
12494 explicit RapidVector(const size_t size);
12495#else
12496 template<typename UType = Type, typename Enable = typename std::enable_if<std::is_default_constructible<UType>::value>::type>
12497 explicit RapidVector(const size_t size);
12498#endif
12499
12501 RapidVector(RapidVectorImplementation<Type>*);
12502
12505
12508
12511
12513 RapidVector(RapidVector&& other) noexcept;
12514
12517
12518 typedef Type* PointerType;
12519 typedef Type ValueType;
12520
12522 typedef RapidVectorIterator<RapidVector> Iterator;
12523
12526 Iterator begin() noexcept;
12527
12530 Iterator begin() const noexcept;
12531
12535 Iterator end() const noexcept;
12536};
12537
12539
12540} // namespace RapidCode
12541
12542} // namespace RSI
12543
12544#endif // _RSI_H
void MoveSCurve(double position)
MoveSCurve with the Axis defaults trajectory values from DefaultVelocitySet, DefaultAccelerationSet,...
void MoveRelative(double relativePosition)
void MoveVelocitySCurve(double velocity, double accel, double jerkPct)
Command a constant velocity move (jog) with non-constant acceleration.
NetworkNode * NetworkNode
Gets the associated NetworkNode object.
Definition rsi.h:5900
void MoveTrapezoidal(double position)
Point-to-point trapezoidal move.
void MoveSCurve(double position, double vel, double accel, double decel, double jerkPct, double finalVel)
void MoveVelocity(double velocity)
void MoveRelative(double relativePosition, double vel, double accel, double decel, double jerkPct, double finalVel)
void MoveTrapezoidal(double position, double vel, double accel, double decel, double finalVel)
Point-to-point trapezoidal move.
void MoveTrapezoidal(double position, double vel, double accel, double decel)
Point-to-point trapezoidal move.
void PositionSet(double position)
Set the Command and Actual positions.
void MoveRelative(double relativePosition, double vel, double accel, double decel, double jerkPct)
Command a relative point-to-point S-Curve motion.
double ActualPositionGet()
Get the current actual position.
void MoveVelocity(double velocity, double accel)
Command a constant velocity move (jog).
void MoveSCurve(double position, double vel, double accel, double decel, double jerkPct)
Represents a single axis of motion control. This class provides an interface for commanding motion,...
Definition rsi.h:5870
bool IOExists()
IOExists validates your IO object is an IO Node.
The IO object provides an interface to the inputs and outputs of a network node.
Definition rsi.h:12051
NetworkNode * NetworkNode
Gets the parent NetworkNode object.
Definition rsi.h:12062
MotionController * rsiControl
Gets the parent MotionController object.
Definition rsi.h:12064
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.
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.
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.
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.
Represents one specific point: Digital Output, Digital Input, Analog Output, or Analog Input....
Definition rsi.h:11559
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 Reset()
Reset the controller which stops and restarts the RMP firmware.
static MotionController * Get()
Get an already running RMP EtherCAT controller.
static MotionController * Create(CreationParameters *creationParameters)
Initialize and start the RMP EtherCAT controller.
static MotionController * Create()
Initialize and start the RMP EtherCAT controller.
static MotionController * CreateFromFile(const char *const fileName)
Create a MotionController from a memory-dumped file.
static MotionController * CreateFromSoftware(const char *const RtaPath, const char *const NodeName)
Initialize and start the RMP EtherCAT controller.
static MotionController * CreateFromSoftware()
Initialize and start the RMP EtherCAT controller.
void Delete(void)
Delete the MotionController and all its objects.
static MotionController * CreateFromSoftware(const char *const RtaPath)
Initialize and start the RMP EtherCAT controller.
IO * IOGet(int32_t nodeNumber)
IOGet returns a pointer to an IO object using its node number and initializes its internals.
static MotionController * Get(int32_t controllerIndex)
Get an already running RMP EtherCAT controller.
MultiAxis * MultiAxisGet(int32_t motionSupervisorNumber)
MultiAxisGet returns a pointer to a MultiAxis object and initializes its internals.
MultiAxis * LoadExistingMultiAxis(int32_t motionSupervisorNumber)
Get/Create a MultiAxis object from one that already exists (previously setup) on the RMP motion contr...
Represents the RMP soft motion controller. This class provides an interface to general controller con...
Definition rsi.h:800
MathBlockConfig MathBlockConfigGet(int32_t mathBlockNumber)
Get a MathBlock configuration.
RapidCodeOS * OS
Provides access to operating system (Windows) features.
Definition rsi.h:3846
FirmwareValue MathBlockProcessValueGet(int32_t mathBlockNumber)
Get a MathBlock process value.
void MathBlockConfigSet(int32_t mathBlockNumber, MathBlockConfig &config)
Set a MathBlock configuration.
void AxisRemoveAll()
Remove all axes from a MultiAxis group.s.
void AxesAdd(Axis **axes, int32_t axisCount)
void AxisAdd(Axis *axis)
Add an Axis to a MultiAxis group.
Represents multiple axes of motion control, allows you to map two or more Axis objects together for e...
Definition rsi.h:10804
bool Exists()
Returns true if this NetworkNode exists on a physical network.
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:11828
const char *const InterruptNameGet()
Get the text name of an interrupt type.
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:594
void InterruptEnableSet(bool enable)
Enable or disable interrupts.
int32_t NumberGet()
Get the axis number.
The RapidCodeMotion interface is implemented by Axis and MultiAxis .
Definition rsi.h:4317
MotionController * rsiControl
Gets the parent MotionController object.
Definition rsi.h:4330
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 TimerCountGet()
Gets the time since startup.
The RapidCodeOS object provides access to operating system (Windows) features. Accessible via MotionC...
Definition rsi.h:497
const char *const VersionGet()
Get the RSI RapidCode version.
The RapidCode base class. All non-error objects are derived from this class.
Definition rsi.h:184
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.
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:12421
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:12522
~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:150
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:173
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:11904
RSIFilterAlgorithm
Filter algorithms.
Definition rsienums.h:1159
RSINetworkEniResult
NetworkEniGenerate return values.
Definition rsienums.h:1451
RSIPDOType
Compensator output types.
Definition rsienums.h:1425
RSIMathBlockOperation
MathBlock operations.
Definition rsienums.h:1431
RSICompensatorOutputType
Compensator output types.
Definition rsienums.h:1419
RSINetworkStartMode
Network start modes.
Definition rsienums.h:588
RSIMotorFeedbackFault
Feedbacks to use for Feedback Fault action.
Definition rsienums.h:1146
RSITrace
Trace masks.
Definition rsienums.h:540
RSIMotorStepperPulse
Pulse A or B.
Definition rsienums.h:1249
RSIAxisGantryType
How to combine Axis Feedback Positions.
Definition rsienums.h:1139
RSINetworkState
State of network.
Definition rsienums.h:568
RSIControllerAddressType
Used to get firmware address used in User Limits, Recorders, etc.
Definition rsienums.h:405
RSIMotorDisableAction
Action for when a motor is disabled.
Definition rsienums.h:1319
RSIEventType
Event Types or Status Bits.
Definition rsienums.h:966
RSIMotionType
PT and PVT streaming motion types.
Definition rsienums.h:1038
RSIDataType
Data types for User Limits and other triggers.
Definition rsienums.h:659
RSIUserLimitLogic
Logic options for User Limits.
Definition rsienums.h:646
RSIMotorIoTypeMask
Possible mask bits for Motor I/O types.
Definition rsienums.h:1265
RSIAction
Action to perform on an Axis.
Definition rsienums.h:1115
RSIAxisAddressType
Used to get firmware address used in User Limits, Recorders, etc.
Definition rsienums.h:434
RSIProcessorType
Controller's processor type.
Definition rsienums.h:295
RSIMotorStepperPulseType
Stepper pulse type.
Definition rsienums.h:1255
RSIMotorType
Motor Type.
Definition rsienums.h:1311
RSINetworkStartError
Network start errors.
Definition rsienums.h:594
RSIMotorGeneralIo
Motor I/O bit numbers.
Definition rsienums.h:917
RSIMotionAttrMask
Attribute masks for motion. You cannot mix RSIMotionAttrMaskDELAY and RSIMotionAttrMaskAPPEND.
Definition rsienums.h:1060
RSIMultiAxisAddressType
Used to get firmware address used in User Limits, Recorders, etc.
Definition rsienums.h:497
RSIFilterGainPIDCoeff
PID gain coefficients.
Definition rsienums.h:1168
RSIUserLimitTriggerType
Trigger types for UserLimits.
Definition rsienums.h:633
RSINetworkOutputAddressType
Network output address types.
Definition rsienums.h:1412
INtimeStatus
INtime status values.
Definition rsienums.h:1357
RSIMotionHoldType
Types for MotionHold attribute.
Definition rsienums.h:1095
RSIControllerType
Controller type.
Definition rsienums.h:284
RSIMotorFaultMask
Mask values for several motor faults.
Definition rsienums.h:1299
RSIHomeStage
Predefined Homing Stage sections.
Definition rsienums.h:397
RSIMotorBrakeMode
Brake modes.
Definition rsienums.h:1325
RSIErrorMessage
All possible RSI Error Messages.
Definition rsienums.h:17
RSINetworkType
Type of Network topology.
Definition rsienums.h:626
RSIMotorIoType
Possible configurations for Motor I/O.
Definition rsienums.h:1228
RSIAxisPositionInput
Feedback Positions for each Axis.
Definition rsienums.h:1133
RSINodeType
Valid Node types.
Definition rsienums.h:677
RSISource
Possible sources that have caused an Error state.
Definition rsienums.h:1014
RSIMotorDedicatedIn
Dedicated Input bits per motor.
Definition rsienums.h:889
RSIMotorFeedback
Encoders per motor.
Definition rsienums.h:1153
RSIMotorDedicatedOut
Dedicated Output bits per motor.
Definition rsienums.h:911
RSIOperationMode
DS402 modes of operation.
Definition rsienums.h:1331
RSIPathPlanType
Path motion planning types.
Definition rsienums.h:1054
RSINetworkTechnologyType
Network technology type.
Definition rsienums.h:1352
RSINetworkIndexType
Network PDO index types for configuring axis input/output mappings.
Definition rsienums.h:1390
RSINetworkStartupMethod
Network startup methods.
Definition rsienums.h:580
RSIFilterGainPIVCoeff
PIV gain coefficients.
Definition rsienums.h:1189
RSIAxisMasterType
Sources available to a slave Axis for electronic gearing & camming.
Definition rsienums.h:1218
int32_t ControllerIndex
The index of the controller to create.
Definition rsi.h:956
int32_t CpuAffinity
[Linux] Indicate the CPU core on which the RMP and RMPNetwork processes run.
Definition rsi.h:1014
int32_t RmpThreadPriorityMax
[Linux] The maximum thread priority. All threads of the RMP and RMPNetwork will be based off of this....
Definition rsi.h:1026
CreationParameters()
Instantiate with default values and all memory zeroed out.
Definition rsi.h:932
CreationParameters for MotionController::Create.
Definition rsi.h:866
RSIDataType ProcessDataType
Data type for processing.
Definition rsi.h:3824
MathBlock configuration structure.
Definition rsi.h:3817
RSIDataType OutputDataType
Data type for Output. (optional)
Definition rsi.h:3822
uint64_t OutputAddress
Host memory address for Output. The MathBlock will write its result to this address....
Definition rsi.h:3823
uint64_t InputAddress0
Host memory address for Input0. Represents the left-hand side operand in math operations.
Definition rsi.h:3818
RSIDataType InputDataType0
Data type for Input0. This is the data type of the left-hand side operand in math operations.
Definition rsi.h:3819
uint64_t InputAddress1
Host memory address for Input1. Represents the right-hand side operand in math operations.
Definition rsi.h:3820
RSIDataType InputDataType1
Data type for Input1. This is the data type of the right-hand side operand in math operations.
Definition rsi.h:3821
RSIMathBlockOperation Operation
Math operation to be performed. (+, -, *, /, etc) use RSIMathBlockOperationNONE to disable a MathBloc...
Definition rsi.h:3825
Union representing a generic RMP firmware value with multiple data types, stored in 64-bits.
Definition rsi.h:468
float Float
Single precision (32-bit) floating-point.
Definition rsi.h:476
int64_t Int64
64-bit signed integer.
Definition rsi.h:478
uint8_t UInt8
8-bit unsigned integer.
Definition rsi.h:471
int8_t Int8
8-bit signed integer.
Definition rsi.h:470
double Double
Double precision (64-bit) floating-point.
Definition rsi.h:477
int32_t Int32
32-bit signed integer.
Definition rsi.h:474
uint16_t UInt16
16-bit unsigned integer.
Definition rsi.h:473
int16_t Int16
16-bit signed integer.
Definition rsi.h:472
bool Bool
Boolean value.
Definition rsi.h:469
uint32_t UInt32
32-bit unsigned integer.
Definition rsi.h:475
uint64_t UInt64
64-bit unsigned integer.
Definition rsi.h:479