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
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
838 static inline constexpr double SampleRateDefault = 1000.0;
839
849 static inline constexpr int32_t AxisFrameBufferSizeDefault = 1024;
850
852
853 // Static functions or attributes should be grouped together.
858
861 {
866
871 static inline constexpr int32_t ControllerIndexDefault = 0;
872
877 static inline constexpr uint32_t PathLengthMaximum = 256;
878
884 static inline constexpr int32_t CpuAffinityDefault = -1;
885
890 static inline constexpr int32_t RmpThreadPriorityMaximumDefault = 45;
891
896 static inline constexpr int32_t RmpThreadPriorityRange = 8;
897
902 static inline constexpr int32_t RmpThreadPriorityMinimum = RmpThreadPriorityRange + 1;
903
908 static inline constexpr int32_t RmpThreadPriorityMaximum = 99;
909
914 static inline constexpr int32_t RmpThreadPriorityNoRealTime = 0;
916
917
922
928 {
929 ControllerIndex = ControllerIndexDefault;
930 std::memset(RmpPath, '\0', PathLengthMaximum);
931 std::memset(NicPrimary, '\0', PathLengthMaximum);
932 std::memset(NicSecondary, '\0', PathLengthMaximum);
933#if defined(_WIN32)
934 std::memset(NodeName, '\0', PathLengthMaximum);
935#elif defined(__linux__)
936 CpuAffinity = CpuAffinityDefault;
937 RmpThreadPriorityMax = RmpThreadPriorityMaximumDefault;
938#endif
939 }
941
946
952
957 char RmpPath[PathLengthMaximum];
958
963 char NicPrimary[PathLengthMaximum];
964
969 char NicSecondary[PathLengthMaximum];
971
972 // Control which platform specific parameters are available
973#if defined(_WIN32) && defined(__linux__)
974 static_assert(false, "_WIN32 and __linux__ defined. Double check preprocessor definitions");
975#elif !defined(_WIN32) && !defined(__linux__) && !defined(DOXYGEN)
976 static_assert(false, "Neither _WIN32 nor __linux__ are defined AND this is not a documentation build. Double check preprocessor definitions");
977#endif //defined(_WIN32) && defined(__linux__)
978#if defined(_WIN32) || defined(DOXYGEN)
979
984
989 char NodeName[PathLengthMaximum];
990
992#endif //defined(_WIN32)
993#if defined(__linux__) || defined(DOXYGEN)
994
999
1010
1022
1024# endif // defined(__linux__)
1025 };
1026
1037 static MotionController* Create(CreationParameters* creationParameters);
1038
1044
1049 static MotionController* Get(int32_t controllerIndex);
1050
1051#if defined(_WIN32)
1079
1084 static MotionController* CreateFromSoftware(const char* const RtaPath);
1085
1091 static MotionController* CreateFromSoftware(const char* const RtaPath, const char* const NodeName);
1092
1120#endif // defined(_WIN32)
1121
1126 static MotionController* CreateFromFile(const char* const fileName);
1128
1133
1152 virtual Axis* AxisGet(int32_t axisNumber) PURE_VIRTUAL;
1153
1170 virtual MultiAxis* MultiAxisGet(int32_t motionSupervisorNumber) PURE_VIRTUAL;
1171
1185 virtual MultiAxis* LoadExistingMultiAxis(int32_t motionSupervisorNumber) PURE_VIRTUAL;
1186
1201 virtual RapidCodeNetworkNode* NetworkNodeGet(int32_t nodeNumber) PURE_VIRTUAL;
1202
1218 virtual IO* IOGet(int32_t nodeNumber) PURE_VIRTUAL;
1219
1242 virtual void Delete(void) PURE_VIRTUAL;
1244
1249
1259 virtual void Reset() PURE_VIRTUAL;
1260
1270 virtual void Refresh() PURE_VIRTUAL;
1271
1279 virtual void Shutdown() PURE_VIRTUAL;
1280
1289 virtual void MemoryToFile(const char* const fileName) PURE_VIRTUAL;
1291
1296
1319 virtual int32_t SampleCounterGet() PURE_VIRTUAL;
1320
1335 virtual double ProcessorUsageGet() PURE_VIRTUAL;
1336
1347 virtual void ProcessorUsageClear() PURE_VIRTUAL;
1348
1352 virtual uint32_t FirmwareTimingDeltaGet() PURE_VIRTUAL;
1353
1354
1356
1361
1362
1363
1386 virtual uint32_t SerialNumberGet(void) PURE_VIRTUAL;
1387
1406 virtual void SampleWait(uint32_t samples) PURE_VIRTUAL;
1407
1408
1410 virtual RSIControllerType ControllerTypeGet() PURE_VIRTUAL;
1411
1413 virtual const char* const ServerNameGet() PURE_VIRTUAL;
1414
1416 virtual int32_t ServerPortGet() PURE_VIRTUAL;
1417
1418
1419
1420
1442 virtual RSIProcessorType ProcessorTypeGet() PURE_VIRTUAL;
1443
1448 virtual void SampleRateSet(double sampleRate) PURE_VIRTUAL;
1449
1452 virtual double SampleRateGet() PURE_VIRTUAL;
1453
1471 virtual int32_t AxisCountGet() PURE_VIRTUAL;
1472
1491 virtual void AxisCountSet(int32_t axisCount) PURE_VIRTUAL;
1492
1495 virtual void AxisCountSet(int32_t axisCount, bool setMotorFilterSupervisor) PURE_VIRTUAL;
1496
1499 virtual bool IsLicensed() PURE_VIRTUAL;
1500
1502 virtual int32_t PackageVariantGet() PURE_VIRTUAL;
1503
1505 virtual int32_t AxisLicenseCountGet() PURE_VIRTUAL;
1506
1508 virtual bool MechaWareLicenseGet() PURE_VIRTUAL;
1509
1511 virtual int32_t UnsupportedOptionSet(int32_t option) PURE_VIRTUAL;
1512
1537 virtual int32_t MotionCountGet() PURE_VIRTUAL;
1538
1555 virtual void MotionCountSet(int32_t motionCount) PURE_VIRTUAL;
1556
1582 virtual int32_t UserVersionGet() PURE_VIRTUAL;
1583
1607 virtual void UserVersionSet(int32_t version) PURE_VIRTUAL;
1608
1611 virtual int32_t ExternalMemorySizeGet() PURE_VIRTUAL;
1612
1629 virtual void AxisFrameBufferSizeSet(int32_t axisNumber, int32_t frameBufferSize) PURE_VIRTUAL;
1630
1645 virtual int32_t AxisFrameBufferSizeGet(int32_t axisNumber) PURE_VIRTUAL;
1647
1652
1670 virtual const char* const FirmwareVersionGet() PURE_VIRTUAL;
1671
1689 virtual int32_t FirmwareOptionGet() PURE_VIRTUAL;
1690
1692 virtual bool HasMechaWare() PURE_VIRTUAL;
1693
1717 virtual int32_t MemoryGet(uint64_t address) PURE_VIRTUAL;
1718
1719
1737 virtual double MemoryDoubleGet(uint64_t address) PURE_VIRTUAL;
1738
1764 virtual void MemoryBlockGet(uint64_t address, void* dataStart, int32_t size) PURE_VIRTUAL;
1765
1780 virtual void MemorySet(uint64_t address, int32_t data) PURE_VIRTUAL;
1781
1782
1783
1800 virtual void MemoryDoubleSet(uint64_t address, double dataDouble) PURE_VIRTUAL;
1801
1827 virtual void MemoryBlockSet(uint64_t address, const void* const dataStart, int32_t size) PURE_VIRTUAL;
1828
1847 virtual uint32_t FirmwareAddressGet(uint64_t hostAddress) PURE_VIRTUAL;
1848
1849
1850
1851
1874 virtual uint64_t HostAddressGet(uint32_t firmwareAddress) PURE_VIRTUAL;
1875
1876
1877
1900 virtual int32_t BackgroundCycleCounterGet() PURE_VIRTUAL;
1901
1902
1903
1904
1913 virtual uint64_t AddressFromStringGet(const char* const addressName) PURE_VIRTUAL;
1914
1915
1916
1925 virtual const char* const StringFromAddressGet(uint64_t hostAddress) PURE_VIRTUAL;
1926
1941 virtual uint64_t AddressGet(RSIControllerAddressType type) PURE_VIRTUAL;
1942
1960 virtual uint64_t AddressGet(RSIControllerAddressType type, int32_t objectIndex) PURE_VIRTUAL;
1961
1962
1975 virtual RSIDataType AddressDataTypeGet(RSIControllerAddressType type) PURE_VIRTUAL;
1976
1981 virtual RSIDataType AddressDataTypeGet(RSIControllerAddressType type, int32_t objectIndex) PURE_VIRTUAL;
1982
1996 virtual bool MotionHoldGateGet(int32_t gateNumber) PURE_VIRTUAL;
1997
1998
1999
2015 virtual void MotionHoldGateSet(int32_t gateNumber, bool hold) PURE_VIRTUAL;
2017
2022
2024 virtual RSINetworkTechnologyType NetworkTechnologyTypeGet() PURE_VIRTUAL;
2025
2027 virtual RSINetworkType NetworkTypeGet() PURE_VIRTUAL;
2028
2031 virtual int32_t NetworkNodeCountGet() PURE_VIRTUAL;
2032
2078 virtual RSINetworkEniResult NetworkEniGenerate() PURE_VIRTUAL;
2079
2100 virtual const char* const NetworkEniGenerateOutputGet() PURE_VIRTUAL;
2101
2108 virtual void NetworkStart() PURE_VIRTUAL;
2109
2114 virtual void NetworkStart(RSINetworkStartupMethod startupMethod) PURE_VIRTUAL;
2115
2122 virtual void NetworkStart(RSINetworkStartMode startMode, RSINetworkStartupMethod startupMethod) PURE_VIRTUAL;
2123
2128 virtual void NetworkStart(RSINetworkStartMode startMode, RSINetworkStartupMethod startupMethod, uint32_t timeoutMilliseconds) PURE_VIRTUAL;
2129
2131 virtual void NetworkShutdown() PURE_VIRTUAL;
2132
2135 virtual RSINetworkState NetworkStateGet() PURE_VIRTUAL;
2136
2138 virtual int32_t NetworkCounterGet() PURE_VIRTUAL;
2139
2141 virtual int32_t NetworkInputCountGet() PURE_VIRTUAL;
2142
2144 virtual int32_t NetworkInputBitSizeGet(int32_t index) PURE_VIRTUAL;
2145
2149 virtual const char* const NetworkInputDataTypeNameGet(int32_t index) PURE_VIRTUAL;
2150
2153 virtual int32_t NetworkInputBitOffsetGet(int32_t index) PURE_VIRTUAL;
2154
2157 virtual const char* const NetworkInputNameGet(int32_t index) PURE_VIRTUAL;
2158
2162 virtual uint64_t NetworkInputValueGet(int32_t index) PURE_VIRTUAL;
2163
2164
2165
2169 virtual uint64_t NetworkInputAddressGet(int32_t index) PURE_VIRTUAL;
2170
2174 virtual int32_t NetworkOutputCountGet() PURE_VIRTUAL;
2175
2178 virtual int32_t NetworkOutputBitSizeGet(int32_t index) PURE_VIRTUAL;
2179
2180
2184 virtual const char* const NetworkOutputDataTypeNameGet(int32_t index) PURE_VIRTUAL;
2185
2187 virtual int32_t NetworkOutputBitOffsetGet(int32_t index) PURE_VIRTUAL;
2188
2190 virtual const char* const NetworkOutputNameGet(int32_t index) PURE_VIRTUAL;
2191
2207 virtual uint64_t NetworkOutputValueGet(int32_t index) PURE_VIRTUAL;
2208
2225 virtual void NetworkOutputValueSet(int32_t index, uint64_t outputValue) PURE_VIRTUAL;
2226
2245 virtual uint64_t NetworkOutputAddressGet(int32_t index) PURE_VIRTUAL;
2246
2251 virtual uint64_t NetworkOutputAddressGet(int32_t index, RSINetworkOutputAddressType type) PURE_VIRTUAL;
2252
2263 virtual uint64_t NetworkOutputIntendedValueGet(int32_t index) PURE_VIRTUAL;
2264
2276 virtual void NetworkOutputOverrideSet(int32_t index, bool outputOverride) PURE_VIRTUAL;
2277
2288 virtual bool NetworkOutputOverrideGet(int32_t index) PURE_VIRTUAL;
2289
2290
2291
2292
2309 virtual void NetworkOutputOverrideValueSet(int32_t index, uint64_t outputValue) PURE_VIRTUAL;
2310
2323 virtual uint64_t NetworkOutputOverrideValueGet(int32_t index) PURE_VIRTUAL;
2324
2339 virtual uint64_t NetworkOutputSentValueGet(int32_t index) PURE_VIRTUAL;
2340
2344 virtual int32_t NetworkLogMessageCountGet() PURE_VIRTUAL;
2345
2347 virtual RSINetworkStartError LastNetworkStartErrorGet() PURE_VIRTUAL;
2348
2353 virtual const char* const NetworkLogMessageGet(int32_t messageIndex) PURE_VIRTUAL;
2354
2356 virtual void NetworkTimingEnableSet(bool enable) PURE_VIRTUAL;
2357
2359 virtual void NetworkTimingClear() PURE_VIRTUAL;
2360
2362 virtual uint32_t NetworkTimingDeltaGet() PURE_VIRTUAL;
2363
2365 virtual uint32_t NetworkTimingMinGet() PURE_VIRTUAL;
2366
2368 virtual uint32_t NetworkTimingMaxGet() PURE_VIRTUAL;
2369
2371 virtual void NetworkTimingThresholdLowSet(uint32_t microseconds) PURE_VIRTUAL;
2372
2374 virtual void NetworkTimingThresholdHighSet(uint32_t microseconds) PURE_VIRTUAL;
2375
2377 virtual uint32_t NetworkTimingThresholdLowCountGet() PURE_VIRTUAL;
2378
2380 virtual uint32_t NetworkTimingThresholdHighCountGet() PURE_VIRTUAL;
2381
2383 virtual bool NetworkSynchronizedGet() PURE_VIRTUAL;
2385
2390
2407 virtual void InterruptEnableSet(bool enable) PURE_VIRTUAL;
2408
2427 virtual void InterruptWake() PURE_VIRTUAL;
2428
2456 virtual void SyncInterruptEnableSet(bool enable) PURE_VIRTUAL;
2457
2483 virtual void SyncInterruptPeriodSet(uint32_t samples) PURE_VIRTUAL;
2484
2504 virtual int32_t SyncInterruptWait() PURE_VIRTUAL;
2505
2507 virtual bool ServiceThreadStateGet() PURE_VIRTUAL;
2508
2519 virtual int32_t SyncInterruptHostProcessTimeGet() PURE_VIRTUAL;
2520
2522 virtual int32_t SyncInterruptHostProcessFlagGet() PURE_VIRTUAL;
2523
2536 virtual void SyncInterruptHostProcessFlagSet(bool hostProcessFlag) PURE_VIRTUAL;
2537
2548 virtual bool SyncInterruptHostProcessStatusBitGet() PURE_VIRTUAL;
2549
2559 virtual void SyncInterruptHostProcessStatusClear() PURE_VIRTUAL;
2560
2586
2587 virtual void ServiceThreadEnableSet(bool enable) PURE_VIRTUAL;
2589
2594
2595
2596
2615 virtual int32_t RecorderCountGet() PURE_VIRTUAL;
2616
2634 virtual void RecorderCountSet(int32_t recorderCount) PURE_VIRTUAL;
2635
2652 virtual void RecorderPeriodSet(uint32_t samples) PURE_VIRTUAL;
2653
2655 virtual void RecorderPeriodSet(int32_t recorderNumber, uint32_t samples) PURE_VIRTUAL;
2656
2673 virtual void RecorderCircularBufferSet(bool enable) PURE_VIRTUAL;
2674
2676 virtual void RecorderCircularBufferSet(int32_t recorderNumber, bool enable) PURE_VIRTUAL;
2677
2693 virtual void RecorderDataCountSet(int32_t count) PURE_VIRTUAL;
2694
2696 virtual void RecorderDataCountSet(int32_t recorderNumber,int32_t count) PURE_VIRTUAL;
2697
2714 virtual void RecorderDataAddressSet(int32_t index, uint64_t address) PURE_VIRTUAL;
2715
2717 virtual void RecorderDataAddressSet(int32_t recorderNumber,int32_t index, uint64_t address) PURE_VIRTUAL;
2718
2719
2725 virtual void RecorderDataAddressesSet(int32_t recorderNumber, const uint64_t* const addresses, int32_t addressCount) PURE_VIRTUAL;
2726
2740
2746 virtual void RecorderConfigureToTriggerOnMotion(Axis *axis, bool triggerOnMotion) PURE_VIRTUAL;
2747
2754 virtual void RecorderConfigureToTriggerOnMotion(int32_t recorderNumber, Axis *axis, bool triggerOnMotion) PURE_VIRTUAL;
2755
2761 virtual void RecorderConfigureToTriggerOnMotion(MultiAxis *multiAxis, bool triggerOnMotion) PURE_VIRTUAL;
2762
2769 virtual void RecorderConfigureToTriggerOnMotion(int32_t recorderNumber, MultiAxis *multiAxis, bool triggerOnMotion) PURE_VIRTUAL;
2770
2777 virtual void RecorderConfigureToTriggerOnMotion(int32_t recorderNumber, int32_t motionNumber, bool triggerOnMotion) PURE_VIRTUAL;
2778
2787 virtual bool RecorderTriggerOnMotionGet(int32_t recorderNumber) PURE_VIRTUAL;
2788
2804 virtual bool RecorderEnabledGet() PURE_VIRTUAL;
2805
2807 virtual bool RecorderEnabledGet(int32_t recorderNumber ) PURE_VIRTUAL;
2808
2825 virtual int32_t RecorderRecordCountGet() PURE_VIRTUAL;
2826
2828 virtual int32_t RecorderRecordCountGet(int32_t recorderNumber ) PURE_VIRTUAL;
2829
2843 virtual int32_t RecorderRecordMaxCountGet() PURE_VIRTUAL;
2844
2846 virtual int32_t RecorderRecordMaxCountGet(int32_t recorderNumber) PURE_VIRTUAL;
2847
2862 virtual void RecorderStart() PURE_VIRTUAL;
2863
2865 virtual void RecorderStart(int32_t recorderNumber) PURE_VIRTUAL;
2866
2883 virtual void RecorderStop() PURE_VIRTUAL;
2884
2886 virtual void RecorderStop(int32_t recorderNumber) PURE_VIRTUAL;
2887
2888
2889
2905 virtual const int32_t* const RecorderRecordDataGet() PURE_VIRTUAL;
2906
2908 virtual const int32_t* const RecorderRecordDataGet(int32_t recorderNumber) PURE_VIRTUAL;
2909
2924 virtual void RecorderRecordDataRetrieve() PURE_VIRTUAL;
2925
2945 virtual int32_t RecorderRecordDataRetrieveBulk(int32_t recorderNumber, int32_t recordCount) PURE_VIRTUAL;
2946
2948 virtual void RecorderRecordDataRetrieve(int32_t recorderNumber) PURE_VIRTUAL;
2949
2966 virtual int32_t RecorderRecordDataValueGet(int32_t index) PURE_VIRTUAL;
2967
2969 virtual int32_t RecorderRecordDataValueGet(int32_t recorderNumber, int32_t index) PURE_VIRTUAL;
2970
2989 virtual int32_t RecorderRecordDataValueGet(int32_t recorderNumber, int32_t recordIndex, int32_t dataIndex) PURE_VIRTUAL;
2990
2992 virtual double RecorderRecordDataDoubleGet(int32_t index) PURE_VIRTUAL;
2993
2995 virtual double RecorderRecordDataDoubleGet(int32_t recorderNumber, int32_t index) PURE_VIRTUAL;
2996
3015 virtual double RecorderRecordDataDoubleGet(int32_t recorderNumber, int32_t recordIndex, int32_t dataIndex) PURE_VIRTUAL;
3016
3034 virtual void RecorderBufferHighCountSet(int32_t bufferHighCount) PURE_VIRTUAL;
3035
3037 virtual void RecorderBufferHighCountSet(int32_t recorderNumber, int32_t bufferHighCount) PURE_VIRTUAL;
3038
3053 virtual void RecorderReset() PURE_VIRTUAL;
3054
3056 virtual void RecorderReset(int32_t recorderNumber) PURE_VIRTUAL;
3057
3069 virtual int32_t RecorderBufferSizeGet(int32_t recorderNumber) PURE_VIRTUAL;
3070
3087 virtual void RecorderBufferSizeSet(int32_t recorderNumber, int32_t bufferSize) PURE_VIRTUAL;
3089
3094
3095
3096
3097
3122 virtual int32_t CompensatorCountGet() PURE_VIRTUAL;
3123
3143 virtual void CompensatorCountSet(int32_t compensatorCount) PURE_VIRTUAL;
3144
3155 virtual int32_t CompensatorPointCountGet(int32_t compensatorNumber) PURE_VIRTUAL;
3156
3176 virtual void CompensatorPointCountSet(int32_t compensatorNumber, int32_t pointCount) PURE_VIRTUAL;
3177
3191 virtual int32_t CompensatorDimensionGet(int32_t compensatorNumber) PURE_VIRTUAL;
3192
3218 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;
3219
3249 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;
3250
3271 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;
3272
3293 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;
3294
3306 virtual void CompensatorTableSet(int32_t compensatorNumber, const double* const table) PURE_VIRTUAL;
3307
3319 virtual void CompensatorTableGet(int32_t compensatorNumber, double* table) PURE_VIRTUAL;
3320
3340 virtual double CompensatorPositionGet(int32_t compensatorNumber) PURE_VIRTUAL;
3341
3342
3343
3344
3345
3346
3358
3359 virtual void CompensatorTableClear(int32_t compensatorNumber) PURE_VIRTUAL;
3360
3369 virtual void CompensatorDisable(int32_t compensatorNumber) PURE_VIRTUAL;
3370
3375 virtual void CompensatorDisable(int32_t compensatorNumber, bool force) PURE_VIRTUAL;
3376
3383 virtual void CompensatorEnable(int32_t compensatorNumber) PURE_VIRTUAL;
3384
3386
3391
3411 virtual int32_t UserLimitCountGet() PURE_VIRTUAL;
3412
3432 virtual void UserLimitCountSet(int32_t userLimitCount) PURE_VIRTUAL;
3433
3453 virtual void UserLimitConfigSet(int32_t number, RSIUserLimitTriggerType triggerType, RSIAction action, int32_t actionAxis, double duration, bool singleShot) PURE_VIRTUAL;
3454
3457 virtual void UserLimitConfigSet(int32_t number, RSIUserLimitTriggerType triggerType, RSIAction action, int32_t actionAxis, double duration) PURE_VIRTUAL;
3458
3460 virtual RSIUserLimitTriggerType UserLimitTriggerTypeGet(int32_t number) PURE_VIRTUAL;
3461
3463 virtual RSIAction UserLimitActionGet(int32_t number) PURE_VIRTUAL;
3464
3466 virtual int32_t UserLimitAxisNumberGet(int32_t number) PURE_VIRTUAL;
3467
3469 virtual double UserLimitDurationGet(int32_t number) PURE_VIRTUAL;
3470
3472 virtual bool UserLimitSingleShotGet(int32_t number) PURE_VIRTUAL;
3473
3498 virtual void UserLimitConditionSet(int32_t number, int32_t conditionNumber, RSIUserLimitLogic logic, uint64_t addressOfUInt32, uint32_t userLimitMask, uint32_t limitValueUInt32) PURE_VIRTUAL;
3499
3521 virtual void UserLimitConditionSet(int32_t number, int32_t conditionNumber, RSIUserLimitLogic logic, uint64_t addressOfDouble, double limitValueDouble) PURE_VIRTUAL;
3522
3524 virtual RSIDataType UserLimitConditionDataTypeGet(int32_t number, int32_t conditionNumber) PURE_VIRTUAL;
3525
3527 virtual RSIUserLimitLogic UserLimitConditionLogicGet(int32_t number, int32_t conditionNumber) PURE_VIRTUAL;
3528
3530 virtual uint64_t UserLimitConditionAddressGet(int32_t number, int32_t conditionNumber) PURE_VIRTUAL;
3531
3533 virtual uint32_t UserLimitConditionMaskGet(int32_t number, int32_t conditionNumber) PURE_VIRTUAL;
3534
3536 virtual int32_t UserLimitConditionLimitValueGet(int32_t number, int32_t conditionNumber) PURE_VIRTUAL;
3537
3539 virtual double UserLimitConditionLimitValueDoubleGet(int32_t number, int32_t conditionNumber) PURE_VIRTUAL;
3540
3567 virtual void UserLimitOutputSet(int32_t number, uint32_t andMask, uint32_t orMask, uint64_t outputPtr, bool enabled) PURE_VIRTUAL;
3568
3571 virtual void UserLimitOutputSet(int32_t number, int32_t valueSet, uint64_t outputPtr, bool enabled) PURE_VIRTUAL;
3572
3575 virtual void UserLimitOutputSet(int32_t number, uint64_t andMask, uint64_t orMask, uint64_t outputPtr, bool enabled) PURE_VIRTUAL;
3576
3579 virtual void UserLimitOutputSet(int32_t number, double limitValueDouble, uint64_t outputPtr, bool enabled) PURE_VIRTUAL;
3580
3596 virtual void UserLimitOutputSet(int32_t number, RSIDataType dataType, uint64_t inputPtr, uint64_t outputPtr, bool enabled) PURE_VIRTUAL;
3597
3599 virtual bool UserLimitOutputEnableGet(int32_t number) PURE_VIRTUAL;
3600
3602 virtual RSIDataType UserLimitOutputDataTypeGet(int32_t number) PURE_VIRTUAL;
3603
3605 virtual uint64_t UserLimitOutputAddressGet(int32_t number) PURE_VIRTUAL;
3606
3608 virtual uint64_t UserLimitOutputInputAddressGet(int32_t number) PURE_VIRTUAL;
3609
3611 virtual uint32_t UserLimitOutputAndMaskGet(int32_t number) PURE_VIRTUAL;
3612
3614 virtual uint32_t UserLimitOutputOrMaskGet(int32_t number) PURE_VIRTUAL;
3615
3617 virtual int32_t UserLimitOutputValueGet(int32_t number) PURE_VIRTUAL;
3618
3620 virtual uint64_t UserLimitOutputAndMask64Get(int32_t number) PURE_VIRTUAL;
3621
3623 virtual uint64_t UserLimitOutputOrMask64Get(int32_t number) PURE_VIRTUAL;
3624
3625
3627 virtual double UserLimitOutputDoubleGet(int32_t number) PURE_VIRTUAL;
3628
3649 virtual bool UserLimitStateGet(int32_t number) PURE_VIRTUAL;
3650
3671 virtual bool UserLimitEnableGet(int32_t number) PURE_VIRTUAL;
3672
3674 virtual void UserLimitEnableSet(int32_t number, bool enable) PURE_VIRTUAL;
3675
3690 virtual void UserLimitDisable(int32_t number) PURE_VIRTUAL;
3691
3703 virtual void UserLimitReset(int32_t number) PURE_VIRTUAL;
3704
3713
3714 virtual int32_t UserLimitCountMax() PURE_VIRTUAL;
3715
3733 virtual void UserLimitInterruptUserDataAddressSet(int32_t number, uint32_t userDataIndex, uint64_t address) PURE_VIRTUAL;
3734
3736 virtual uint64_t UserLimitInterruptUserDataAddressGet(int32_t number, uint32_t userDataIndex) PURE_VIRTUAL;
3738
3739
3744
3754 virtual int32_t MathBlockCountGet() PURE_VIRTUAL;
3755
3766 virtual void MathBlockCountSet(int32_t mathBlockCount) PURE_VIRTUAL;
3767
3786
3788 virtual MathBlockConfig MathBlockConfigGet(int32_t mathBlockNumber) PURE_VIRTUAL;
3789
3791 virtual void MathBlockConfigSet(int32_t mathBlockNumber, MathBlockConfig& config) PURE_VIRTUAL;
3792
3794 virtual FirmwareValue MathBlockProcessValueGet(int32_t mathBlockNumber) PURE_VIRTUAL;
3795
3797
3798
3803
3806
3808};
3809
3813class RSI_API RapidCodeNetworkNode : public virtual RapidCodeObject {
3814public:
3815
3820
3822 static inline constexpr uint32_t SDOTimeoutMillisecondsDefault = 100;
3823
3825
3826
3831
3833 virtual bool Exists() PURE_VIRTUAL;
3834
3836 virtual RSINodeType TypeGet() PURE_VIRTUAL;
3837
3839 virtual bool IsEtherCAT() PURE_VIRTUAL;
3840
3842 virtual bool IsSynqNet() PURE_VIRTUAL;
3843
3845
3850
3852 virtual bool HasIO() PURE_VIRTUAL;
3853
3855 virtual bool DigitalInGet(int32_t digitalInNumber) PURE_VIRTUAL;
3856
3858 virtual bool DigitalOutGet(int32_t digitalOutNumber) PURE_VIRTUAL;
3859
3861 virtual void DigitalOutSet(int32_t digitalOutNumber, bool state) PURE_VIRTUAL;
3862
3864 virtual int32_t AnalogInGet(int32_t analogChannel) PURE_VIRTUAL;
3865
3867 virtual int32_t AnalogOutGet(int32_t analogChannel) PURE_VIRTUAL;
3868
3870 virtual void AnalogOutSet(int32_t analogChannel, int32_t analogValue) PURE_VIRTUAL;
3871
3873
3877
3879 virtual int32_t DigitalInCountGet() PURE_VIRTUAL;
3880
3882 virtual int32_t DigitalOutCountGet() PURE_VIRTUAL;
3883
3885 virtual int32_t AnalogInCountGet() PURE_VIRTUAL;
3886
3888 virtual int32_t AnalogOutCountGet() PURE_VIRTUAL;
3889
3890
3892 virtual int32_t SegmentCountGet() PURE_VIRTUAL;
3893
3895 virtual int32_t SegmentDigitalInCountGet(int32_t segmentNumber) PURE_VIRTUAL;
3896
3898 virtual int32_t SegmentDigitalOutCountGet(int32_t segmentNumber) PURE_VIRTUAL;
3899
3901 virtual int32_t SegmentAnalogInCountGet(int32_t segmentNumber) PURE_VIRTUAL;
3902
3904 virtual int32_t SegmentAnalogOutCountGet(int32_t segmentNumber) PURE_VIRTUAL;
3905
3907 virtual int32_t SegmentIDGet(int32_t segmentNumber) PURE_VIRTUAL;
3908
3921 virtual uint64_t DigitalInAddressGet(int32_t bitNumber) PURE_VIRTUAL;
3922
3935 virtual int32_t DigitalInMaskGet(int32_t bitNumber) PURE_VIRTUAL;
3936
3949 virtual uint64_t DigitalOutAddressGet(int32_t bitNumber) PURE_VIRTUAL;
3950
3963 virtual int32_t DigitalOutMaskGet(int32_t bitNumber) PURE_VIRTUAL;
3964
3976 virtual uint64_t AnalogInAddressGet(int32_t channel) PURE_VIRTUAL;
3977
3989 virtual int32_t AnalogInMaskGet(int32_t channel) PURE_VIRTUAL;
3990
4002 virtual uint64_t AnalogOutAddressGet(int32_t channel) PURE_VIRTUAL;
4003
4015 virtual int32_t AnalogOutMaskGet(int32_t channel) PURE_VIRTUAL;
4016
4030 virtual int32_t ServiceChannelRead(int32_t index, int32_t subIndex, int32_t byteCount) PURE_VIRTUAL;
4031
4035 virtual int32_t ServiceChannelRead(int32_t index, int32_t subIndex, int32_t byteCount, uint32_t timeoutMilliseconds) PURE_VIRTUAL;
4036
4049 virtual const char* const ServiceChannelReadString(int32_t index, int32_t subIndex, int32_t byteCount) PURE_VIRTUAL;
4050
4054 virtual const char* const ServiceChannelReadString(int32_t index, int32_t subIndex, int32_t byteCount, uint32_t timeoutMilliseconds) PURE_VIRTUAL;
4055
4066 virtual RapidVector<uint8_t> ServiceChannelReadBytes(int32_t index, int32_t subIndex, int32_t byteCount, uint32_t timeoutMilliseconds) PURE_VIRTUAL;
4067
4081 virtual void ServiceChannelWrite(int32_t index, int32_t subIndex, int32_t byteCount, int32_t sdoValue) PURE_VIRTUAL;
4082
4083
4088 virtual void ServiceChannelWrite(int32_t index, int32_t subIndex, int32_t byteCount, int32_t sdoValue, uint32_t timeoutMilliseconds) PURE_VIRTUAL;
4089
4101 virtual void ServiceChannelWrite(int32_t index, int32_t subIndex, int32_t byteCount, const char* const stringValue) PURE_VIRTUAL;
4102
4110 virtual void ServiceChannelWrite(int32_t index, int32_t subIndex, int32_t byteCount, const char* const stringValue, uint32_t timeoutMilliseconds) PURE_VIRTUAL;
4111
4120 virtual void ServiceChannelWrite(int32_t index, int32_t subIndex, int32_t byteCount, RapidVector<uint8_t> bytes, uint32_t timeoutMilliseconds) PURE_VIRTUAL;
4121
4127 virtual char* AKDASCIICommand(const char* const command) PURE_VIRTUAL;
4128
4130 virtual void ClearFaults(int32_t axisNumber) PURE_VIRTUAL;
4131
4133 virtual uint32_t VendorIdGet() PURE_VIRTUAL;
4134
4147 virtual const char* const NameGet() PURE_VIRTUAL;
4148
4161 virtual const char* const ProductNameGet() PURE_VIRTUAL;
4162
4175 virtual const char* const VendorNameGet() PURE_VIRTUAL;
4176
4178 virtual uint32_t ProductCodeGet() PURE_VIRTUAL;
4179
4181 virtual uint32_t RevisionGet() PURE_VIRTUAL;
4182
4184 virtual uint32_t StationAliasGet() PURE_VIRTUAL;
4185
4187 virtual const char* const SerialNumberGet() PURE_VIRTUAL;
4188
4190 virtual uint32_t AxisCountGet() PURE_VIRTUAL;
4191
4193 virtual uint16_t StatusWordGet(int32_t axisIndex) PURE_VIRTUAL;
4194};
4195
4197
4200class RSI_API RapidCodeMotion : public virtual RapidCodeInterrupt{
4201public:
4202
4208
4211
4213
4214
4218
4236 virtual int32_t NumberGet() PURE_VIRTUAL;
4237
4254 virtual int32_t AxisCountGet() PURE_VIRTUAL;
4255
4259
4284 virtual void TriggeredModify() PURE_VIRTUAL;
4285
4312 virtual void Stop() PURE_VIRTUAL;
4313
4338 virtual void Resume() PURE_VIRTUAL;
4339
4364 virtual void EStop() PURE_VIRTUAL;
4365
4386 virtual void EStopAbort() PURE_VIRTUAL;
4387
4404 virtual void EStopModify() PURE_VIRTUAL;
4405
4408 virtual void EStopModifyAbort() PURE_VIRTUAL;
4409
4431 virtual void Abort() PURE_VIRTUAL;
4432
4459 virtual void ClearFaults() PURE_VIRTUAL;
4460
4487 virtual void AmpEnableSet(bool enable) PURE_VIRTUAL;
4488
4518 virtual int32_t AmpEnableSet(bool enable, int32_t ampActiveTimeoutMilliseconds) PURE_VIRTUAL;
4519
4539
4540 virtual void Map() PURE_VIRTUAL;
4541
4559 virtual void Unmap() PURE_VIRTUAL;
4560
4565 virtual bool IsMapped() PURE_VIRTUAL;
4566
4583 virtual void FeedRateSet(double rate) PURE_VIRTUAL;
4584
4603 virtual double FeedRateGet() PURE_VIRTUAL;
4604
4608
4609
4610
4611
4631 virtual RSIState StateGet() PURE_VIRTUAL;
4632
4660 virtual RSISource SourceGet() PURE_VIRTUAL;
4661
4686 virtual const char* const SourceNameGet(RSISource source) PURE_VIRTUAL;
4687
4710 virtual int32_t MotionDoneWait() PURE_VIRTUAL;
4711
4738 virtual int32_t MotionDoneWait(int32_t waitTimeoutMilliseconds) PURE_VIRTUAL;
4739
4760 virtual bool MotionDoneGet() PURE_VIRTUAL;
4761
4784 virtual bool StatusBitGet(RSIEventType bitMask) PURE_VIRTUAL;
4785
4800 virtual uint64_t StatusBitsGet() PURE_VIRTUAL;
4801
4805
4834 virtual void InterruptEnableSet(bool enable) PURE_VIRTUAL;
4835
4849 virtual void InterruptWake() PURE_VIRTUAL;
4850
4854
4870 virtual double StopTimeGet() PURE_VIRTUAL;
4871
4887 virtual void StopTimeSet(double seconds) PURE_VIRTUAL;
4888
4904 virtual double EStopTimeGet() PURE_VIRTUAL;
4905
4921 virtual void EStopTimeSet(double seconds) PURE_VIRTUAL;
4922
4939 virtual double MotionDelayGet() PURE_VIRTUAL;
4940
4961 virtual void MotionDelaySet(double seconds) PURE_VIRTUAL;
4962
4983 virtual uint16_t MotionIdGet() PURE_VIRTUAL;
4984
5002 virtual void MotionIdSet(uint16_t id) PURE_VIRTUAL;
5003
5005 virtual uint16_t MotionIdExecutingGet() PURE_VIRTUAL;
5006
5008 virtual uint16_t MotionElementIdExecutingGet() PURE_VIRTUAL;
5009
5024 virtual double MotionFinalVelocityGet() PURE_VIRTUAL;
5025
5033 virtual void MotionFinalVelocitySet(double finalVelocity) PURE_VIRTUAL;
5034
5054 virtual RSIMotionHoldType MotionHoldTypeGet() PURE_VIRTUAL;
5055
5088 virtual void MotionHoldTypeSet(RSIMotionHoldType type) PURE_VIRTUAL;
5089
5101 virtual int32_t MotionHoldGateNumberGet() PURE_VIRTUAL;
5102
5121
5122 virtual void MotionHoldGateNumberSet(int32_t gateNumber) PURE_VIRTUAL;
5123
5140 virtual double MotionHoldTimeoutGet() PURE_VIRTUAL;
5141
5160 virtual void MotionHoldTimeoutSet(double seconds) PURE_VIRTUAL;
5161
5185 virtual bool MotionHoldGateGet() PURE_VIRTUAL;
5186
5209 virtual void MotionHoldGateSet(bool hold) PURE_VIRTUAL;
5210
5227 virtual int32_t MotionHoldAxisNumberGet() PURE_VIRTUAL;
5228
5245 virtual void MotionHoldAxisNumberSet(int32_t number) PURE_VIRTUAL;
5246
5263
5264 virtual double MotionHoldAxisPositionGet() PURE_VIRTUAL;
5265
5282 virtual void MotionHoldAxisPositionSet(double position) PURE_VIRTUAL;
5283
5285 virtual RSIUserLimitLogic MotionHoldAxisLogicGet() PURE_VIRTUAL;
5286
5288 virtual void MotionHoldAxisLogicSet(RSIUserLimitLogic logic) PURE_VIRTUAL;
5289
5306 virtual uint64_t MotionHoldUserAddressGet() PURE_VIRTUAL;
5307
5324 virtual void MotionHoldUserAddressSet(uint64_t address) PURE_VIRTUAL;
5325
5341 virtual int32_t MotionHoldUserMaskGet() PURE_VIRTUAL;
5342
5358 virtual void MotionHoldUserMaskSet(int32_t holdMask) PURE_VIRTUAL;
5359
5375 virtual int32_t MotionHoldUserPatternGet() PURE_VIRTUAL;
5376
5392 virtual void MotionHoldUserPatternSet(int32_t pattern) PURE_VIRTUAL;
5393
5395 virtual void MotionAttributeMaskDefaultSet() PURE_VIRTUAL;
5396
5421
5422 virtual bool MotionAttributeMaskOnGet(RSIMotionAttrMask maskOn) PURE_VIRTUAL;
5423
5442 virtual void MotionAttributeMaskOnSet(RSIMotionAttrMask maskOn) PURE_VIRTUAL;
5443
5460
5461 virtual void MotionAttributeMaskOffSet(RSIMotionAttrMask maskOff) PURE_VIRTUAL;
5462
5466
5467
5468
5504 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;
5505
5543 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;
5544
5574 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;
5575
5580 virtual void StreamingOutputAdd(int32_t onMask, int32_t offMask, uint64_t address) PURE_VIRTUAL;
5581
5603 virtual void StreamingOutputAdd(int32_t onMask, int32_t offMask, uint64_t address, int32_t ptPointIndex) PURE_VIRTUAL;
5604
5609 virtual void StreamingOutputAdd(RapidCode::IOPoint* point, bool on) PURE_VIRTUAL;
5610
5629 virtual void StreamingOutputAdd(RapidCode::IOPoint* point, bool on, int32_t ptPointIndex) PURE_VIRTUAL;
5630
5646 virtual void StreamingOutputsClear() PURE_VIRTUAL;
5647
5667 virtual void StreamingOutputsEnableSet(bool enable) PURE_VIRTUAL;
5668};
5669
5670
5675class RSI_API Axis : public virtual RapidCodeMotion{
5676public:
5677
5678 friend class MotionController;
5679 friend class MultiAxis;
5680
5681
5686
5688 static inline constexpr uint32_t NetworkIndexInvalid = 65535;
5689
5691 static inline constexpr double AmpEnableAmpFaultTimeoutSecondsDefault = 1.0;
5692
5694
5695
5700
5705 RapidCodeNetworkNode* NetworkNode;
5706
5707
5709
5714
5752 virtual void MoveTrapezoidal(double position, double vel, double accel, double decel) PURE_VIRTUAL;
5753
5775 virtual void MoveTrapezoidal(double position, double vel, double accel, double decel, double finalVel) PURE_VIRTUAL;
5776
5799 virtual void MoveTrapezoidal(double position) PURE_VIRTUAL; // use defaults Overload
5800 //virtual void MoveTrapezoidal(double position, double vel, double accel, double decel, double finalVel, bool checkLimits) PURE_VIRTUAL;
5801
5840 virtual void MoveSCurve(double position, double vel, double accel, double decel, double jerkPct) PURE_VIRTUAL;
5841
5846 virtual void MoveSCurve(double position) PURE_VIRTUAL;
5847
5857 virtual void MoveSCurve(double position, double vel, double accel, double decel, double jerkPct, double finalVel) PURE_VIRTUAL;
5858
5862 virtual void MoveVelocity(double velocity) PURE_VIRTUAL;
5863
5898 virtual void MoveVelocity(double velocity, double accel) PURE_VIRTUAL;
5899
5936 virtual void MoveVelocitySCurve(double velocity, double accel, double jerkPct) PURE_VIRTUAL;
5937
5976 virtual void MoveRelative(double relativePosition, double vel, double accel, double decel, double jerkPct) PURE_VIRTUAL;
5977
5981 virtual void MoveRelative(double releativePosition) PURE_VIRTUAL;
5982
5986 virtual void MoveRelative(double relativePosition, double vel, double accel, double decel, double jerkPct, double finalVel) PURE_VIRTUAL;
5988
5993
6018 virtual void PositionSet(double position) PURE_VIRTUAL;
6019
6038 virtual double ActualPositionGet() PURE_VIRTUAL;
6039
6061 virtual void ActualPositionSet(double position) PURE_VIRTUAL;
6062
6079 virtual double CompensationPositionGet() PURE_VIRTUAL;
6080
6093 virtual void CompensationPositionSet(double position) PURE_VIRTUAL;
6094
6106 virtual double TargetPositionGet() PURE_VIRTUAL;
6107
6127 virtual double CommandPositionGet() PURE_VIRTUAL;
6128
6160 virtual void CommandPositionSet(double position) PURE_VIRTUAL;
6161
6185 virtual void CommandPositionDirectSet(double position) PURE_VIRTUAL;
6186
6203 virtual double OriginPositionGet() PURE_VIRTUAL;
6204
6227 virtual void OriginPositionSet(double position) PURE_VIRTUAL;
6228
6249 virtual double PositionErrorGet() PURE_VIRTUAL;
6250
6272 virtual double CommandVelocityGet() PURE_VIRTUAL;
6273
6296 virtual double ActualVelocityGet() PURE_VIRTUAL;
6297
6318 virtual double CommandAccelGet() PURE_VIRTUAL;
6319
6321 virtual double CommandJerkGet() PURE_VIRTUAL;
6322
6343 virtual double EncoderPositionGet(RSIMotorFeedback encoder) PURE_VIRTUAL;
6344
6366 virtual double UserUnitsGet() PURE_VIRTUAL;
6367
6390 virtual void UserUnitsSet(double countsPerUserUnit) PURE_VIRTUAL;
6391
6393 virtual double UserUnitsToCounts(double userUnits) PURE_VIRTUAL;
6394
6396 virtual double CountsToUserUnits(double counts) PURE_VIRTUAL;
6397
6417 virtual int32_t FramesToExecuteGet() PURE_VIRTUAL;
6419
6424
6445
6446 virtual void Home() PURE_VIRTUAL; // this one moves to zero by default
6447
6451 virtual void Home(bool moveToZero) PURE_VIRTUAL;
6452
6471
6472 virtual RSIHomeMethod HomeMethodGet() PURE_VIRTUAL;
6473
6492
6493 virtual void HomeMethodSet(RSIHomeMethod method) PURE_VIRTUAL;
6494
6515
6516 virtual double HomeOffsetGet() PURE_VIRTUAL;
6517
6536
6537 virtual void HomeOffsetSet(double offset) PURE_VIRTUAL;
6538
6556
6557 virtual double HomeVelocityGet() PURE_VIRTUAL;
6558
6561 virtual double HomeVelocityGet(RSIHomeStage homeStage) PURE_VIRTUAL;
6562
6583 virtual void HomeVelocitySet(double velocity) PURE_VIRTUAL;
6584
6589 virtual void HomeVelocitySet(RSIHomeStage homeStage, double velocity) PURE_VIRTUAL;
6590
6606 virtual double HomeSlowVelocityGet() PURE_VIRTUAL;
6607
6623 virtual void HomeSlowVelocitySet(double velocity) PURE_VIRTUAL;
6624
6642
6643 virtual double HomeAccelerationGet() PURE_VIRTUAL;
6644
6647 virtual double HomeAccelerationGet(RSIHomeStage homeStage) PURE_VIRTUAL;
6648
6668
6669 virtual void HomeAccelerationSet(double accel) PURE_VIRTUAL;
6670
6674 virtual void HomeAccelerationSet(RSIHomeStage homeStage, double accel) PURE_VIRTUAL;
6675
6692
6693 virtual double HomeDecelerationGet() PURE_VIRTUAL;
6694
6697 virtual double HomeDecelerationGet(RSIHomeStage homeStage) PURE_VIRTUAL;
6698
6717
6718 virtual void HomeDecelerationSet(double decel) PURE_VIRTUAL;
6719
6723 virtual void HomeDecelerationSet(RSIHomeStage homeStage, double decel) PURE_VIRTUAL;
6724
6742
6743 virtual double HomeJerkPercentGet() PURE_VIRTUAL;
6744
6747 virtual double HomeJerkPercentGet(RSIHomeStage homeStage) PURE_VIRTUAL;
6748
6768 virtual void HomeJerkPercentSet(double percent) PURE_VIRTUAL;
6769
6774 virtual void HomeJerkPercentSet(RSIHomeStage homeStage, double percent) PURE_VIRTUAL;
6775
6795 virtual void HomeCancelSet(bool cancel) PURE_VIRTUAL;
6796
6815 virtual bool HomeStateGet() PURE_VIRTUAL;
6816
6829 virtual void HomeStateSet(bool homed) PURE_VIRTUAL;
6830
6835 virtual void HomeLimitCustomConfigSet(uint64_t address, int32_t bitIndex) PURE_VIRTUAL;
6836
6838 virtual void HomeLimitCustomConfigReset() PURE_VIRTUAL;
6839
6841 virtual uint64_t HomeLimitCustomConfigAddressGet() PURE_VIRTUAL;
6842
6845 virtual int32_t HomeLimitCustomConfigBitIndexGet() PURE_VIRTUAL;
6846
6868
6869 virtual void HomeTravelDistanceSet(RSIHomeStage stage, double distanceToTravel) PURE_VIRTUAL;
6870
6890 virtual RSIHomeStage HomeStageGet() PURE_VIRTUAL;
6891
6905 virtual void HomeBehaviorSet(RSIAction behavior) PURE_VIRTUAL;
6906
6918 virtual RSIAction HomeBehaviorGet() PURE_VIRTUAL;
6920
6926
6928 virtual bool FaultMaskBitGet(RSIMotorFaultMask bitMask) PURE_VIRTUAL;
6929
6931 virtual uint16_t StatusWordGet() PURE_VIRTUAL;
6933
6938 // reads active configuration to report state
6939
6963
6964 virtual bool NegativeLimitGet() PURE_VIRTUAL;
6965
6989 virtual bool PositiveLimitGet() PURE_VIRTUAL;
6990
7019 virtual bool HomeLimitGet() PURE_VIRTUAL;
7020
7048 virtual bool HomeSwitchGet() PURE_VIRTUAL;
7049
7070 virtual bool AmpFaultGet() PURE_VIRTUAL;
7071
7095 virtual bool AmpEnableGet() PURE_VIRTUAL;
7096
7121 virtual bool DedicatedInExists(RSIMotorDedicatedIn motorDedicatedInNumber) PURE_VIRTUAL;
7122
7147 virtual bool DedicatedOutExists(RSIMotorDedicatedOut motorDedicatedOutNumber) PURE_VIRTUAL;
7148
7171 virtual bool DedicatedInGet(RSIMotorDedicatedIn motorDedicatedInNumber) PURE_VIRTUAL;
7172
7194 virtual uint32_t DedicatedInputsGet() PURE_VIRTUAL;
7195
7218 virtual bool DedicatedOutGet(RSIMotorDedicatedOut motorDedicatedOutNumber) PURE_VIRTUAL;
7219
7241 virtual uint32_t DedicatedOutputsGet() PURE_VIRTUAL;
7243
7248
7269 virtual bool DigitalInGet(RSIMotorGeneralIo motorGeneralIoNumber) PURE_VIRTUAL;
7270
7288 virtual uint32_t DigitalInputsGet() PURE_VIRTUAL;
7289
7310 virtual bool DigitalOutGet(RSIMotorGeneralIo motorGeneralIoNumber) PURE_VIRTUAL;
7311
7329 virtual uint32_t DigitalOutputsGet() PURE_VIRTUAL;
7330
7351
7352 virtual void DigitalOutSet(RSIMotorGeneralIo motorGeneralIoNumber, bool outValue) PURE_VIRTUAL;
7353
7372 virtual bool DigitalIoExists(RSIMotorGeneralIo motorGeneralIoNumber) PURE_VIRTUAL;
7373
7392 virtual const char* const DigitalIoNameGet(RSIMotorGeneralIo motorGeneralIoNumber) PURE_VIRTUAL;
7393
7416 virtual RSIMotorIoTypeMask DigitalIoValidTypesMaskGet(RSIMotorGeneralIo motorGeneralIoNumber) PURE_VIRTUAL;
7417
7436 virtual void DigitalIoTypeSet(RSIMotorGeneralIo motorGeneralIoNumber, RSIMotorIoType type) PURE_VIRTUAL;
7437
7454 virtual double AnalogInGet(int32_t channel) PURE_VIRTUAL;
7456
7461
7475 virtual double EStopDecelerationGet() PURE_VIRTUAL;
7476
7491 virtual void EStopDecelerationSet(double decel) PURE_VIRTUAL;
7492
7503 virtual double EStopJerkPercentGet() PURE_VIRTUAL;
7504
7522 virtual void EStopJerkPercentSet(double jerkPct) PURE_VIRTUAL;
7523
7533 virtual double TriggeredModifyDecelerationGet() PURE_VIRTUAL;
7534
7552 virtual void TriggeredModifyDecelerationSet(double decel) PURE_VIRTUAL;
7553
7564 virtual double TriggeredModifyJerkPercentGet() PURE_VIRTUAL;
7565
7583 virtual void TriggeredModifyJerkPercentSet(double jerkPct) PURE_VIRTUAL;
7584
7586 virtual int32_t FrameBufferSizeGet() PURE_VIRTUAL;
7587
7589 virtual void FrameBufferSizeSet(int32_t frameSize) PURE_VIRTUAL;
7590
7610 virtual uint16_t MotionIdExecutingGet() PURE_VIRTUAL;
7611
7632 virtual uint16_t MotionElementIdExecutingGet() PURE_VIRTUAL;
7634
7639
7641 virtual double MotionFinalVelocityGet() PURE_VIRTUAL;
7642
7644 virtual void MotionFinalVelocitySet(double finalVelocity) PURE_VIRTUAL;
7645
7647 virtual double DefaultVelocityGet() PURE_VIRTUAL;
7648
7650 virtual void DefaultVelocitySet(double velocity) PURE_VIRTUAL;
7651
7653 virtual double DefaultAccelerationGet() PURE_VIRTUAL;
7654
7656 virtual void DefaultAccelerationSet(double acceleration) PURE_VIRTUAL;
7657
7659 virtual double DefaultDecelerationGet() PURE_VIRTUAL;
7660
7662 virtual void DefaultDecelerationSet(double deceleration) PURE_VIRTUAL;
7663
7665 virtual double DefaultJerkPercentGet() PURE_VIRTUAL;
7666
7668 virtual void DefaultJerkPercentSet(double jerkPercent) PURE_VIRTUAL;
7669
7671 virtual double DefaultPosition1Get() PURE_VIRTUAL;
7672
7674 virtual void DefaultPosition1Set(double position1) PURE_VIRTUAL;
7675
7677 virtual double DefaultPosition2Get() PURE_VIRTUAL;
7678
7680 virtual void DefaultPosition2Set(double position2) PURE_VIRTUAL;
7681
7683 virtual double DefaultRelativeIncrementGet() PURE_VIRTUAL;
7684
7686 virtual void DefaultRelativeIncrementSet(double relativeIncrement) PURE_VIRTUAL;
7688
7692 // /@{
7693
7716 virtual RSIAction AmpFaultActionGet() PURE_VIRTUAL;
7717
7740 virtual void AmpFaultActionSet(RSIAction action) PURE_VIRTUAL;
7741
7763 virtual bool AmpFaultTriggerStateGet() PURE_VIRTUAL;
7764
7786 virtual void AmpFaultTriggerStateSet(bool state) PURE_VIRTUAL;
7787
7808 virtual double AmpFaultDurationGet() PURE_VIRTUAL;
7809
7830 virtual void AmpFaultDurationSet(double seconds) PURE_VIRTUAL;
7831
7856 virtual RSIAction HomeActionGet() PURE_VIRTUAL;
7857
7881 virtual void HomeActionSet(RSIAction action) PURE_VIRTUAL;
7882
7908 virtual bool HomeTriggerStateGet() PURE_VIRTUAL;
7909
7930 virtual void HomeTriggerStateSet(bool state) PURE_VIRTUAL;
7931
7953 virtual double HomeDurationGet() PURE_VIRTUAL;
7954
7977 virtual void HomeDurationSet(double seconds) PURE_VIRTUAL;
7978
8007 virtual RSIAction ErrorLimitActionGet() PURE_VIRTUAL;
8008
8035 virtual void ErrorLimitActionSet(RSIAction action) PURE_VIRTUAL;
8036
8059 virtual double ErrorLimitTriggerValueGet() PURE_VIRTUAL;
8060
8082 virtual void ErrorLimitTriggerValueSet(double triggerValue) PURE_VIRTUAL;
8083
8105 virtual double ErrorLimitDurationGet() PURE_VIRTUAL;
8106
8129 virtual void ErrorLimitDurationSet(double seconds) PURE_VIRTUAL;
8130
8155 virtual RSIAction HardwareNegLimitActionGet() PURE_VIRTUAL;
8156
8181 virtual void HardwareNegLimitActionSet(RSIAction action) PURE_VIRTUAL;
8182
8206 virtual bool HardwareNegLimitTriggerStateGet() PURE_VIRTUAL;
8207
8231 virtual void HardwareNegLimitTriggerStateSet(bool state) PURE_VIRTUAL;
8232
8255 virtual double HardwareNegLimitDurationGet() PURE_VIRTUAL;
8256
8280 virtual void HardwareNegLimitDurationSet(double seconds) PURE_VIRTUAL;
8281
8306 virtual RSIAction HardwarePosLimitActionGet() PURE_VIRTUAL;
8307
8332 virtual void HardwarePosLimitActionSet(RSIAction action) PURE_VIRTUAL;
8333
8354 virtual bool HardwarePosLimitTriggerStateGet() PURE_VIRTUAL;
8355
8379 virtual void HardwarePosLimitTriggerStateSet(bool state) PURE_VIRTUAL;
8380
8403 virtual double HardwarePosLimitDurationGet() PURE_VIRTUAL;
8404
8427 virtual void HardwarePosLimitDurationSet(double seconds) PURE_VIRTUAL;
8428
8454 virtual RSIAction SoftwareNegLimitActionGet() PURE_VIRTUAL;
8455
8479 virtual void SoftwareNegLimitActionSet(RSIAction action) PURE_VIRTUAL;
8480
8503 virtual double SoftwareNegLimitTriggerValueGet() PURE_VIRTUAL;
8504
8527 virtual void SoftwareNegLimitTriggerValueSet(double triggerValue) PURE_VIRTUAL;
8528
8552 virtual RSIAction SoftwarePosLimitActionGet() PURE_VIRTUAL;
8553
8577 virtual void SoftwarePosLimitActionSet(RSIAction action) PURE_VIRTUAL;
8578
8601 virtual double SoftwarePosLimitTriggerValueGet() PURE_VIRTUAL;
8602
8625 virtual void SoftwarePosLimitTriggerValueSet(double triggerValue) PURE_VIRTUAL;
8626
8652 virtual RSIAction EncoderFaultActionGet() PURE_VIRTUAL;
8653
8678 virtual void EncoderFaultActionSet(RSIAction action) PURE_VIRTUAL;
8679
8703 virtual RSIMotorFeedbackFault EncoderFaultTriggerGet() PURE_VIRTUAL;
8704
8726 virtual void EncoderFaultTriggerSet(RSIMotorFeedbackFault encoder) PURE_VIRTUAL;
8727
8749 virtual double EncoderFaultDurationGet() PURE_VIRTUAL;
8750
8772 virtual void EncoderFaultDurationSet(double seconds) PURE_VIRTUAL;
8773
8775 virtual RSIAction NodeFailureActionGet() PURE_VIRTUAL;
8776
8778 virtual void NodeFailureActionSet(RSIAction action) PURE_VIRTUAL;
8779
8795 virtual uint64_t AddressGet( RSIAxisAddressType addressType) PURE_VIRTUAL;
8796
8810 virtual RSIDataType AddressDataTypeGet(RSIAxisAddressType type) PURE_VIRTUAL;
8811
8812 // common limit methods
8813
8815 virtual RSIAction LimitActionGet(RSIEventType limit) PURE_VIRTUAL;
8816
8818 virtual void LimitActionSet(RSIEventType limit, RSIAction action) PURE_VIRTUAL;
8819
8821 virtual bool LimitTriggerStateGet(RSIEventType limit) PURE_VIRTUAL;
8822
8824 virtual void LimitTriggerStateSet(RSIEventType limit, bool triggerState) PURE_VIRTUAL;
8825
8827 virtual double LimitTriggerValueGet(RSIEventType limit) PURE_VIRTUAL;
8828
8830 virtual void LimitTriggerValueSet(RSIEventType limit, double triggerValue) PURE_VIRTUAL;
8831
8833 virtual double LimitDurationGet(RSIEventType limit) PURE_VIRTUAL;
8834
8836 virtual void LimitDurationSet(RSIEventType limit, double seconds) PURE_VIRTUAL;
8838
8843
8857 virtual double PositionToleranceFineGet() PURE_VIRTUAL;
8858
8872 virtual void PositionToleranceFineSet(double tolerance) PURE_VIRTUAL;
8873
8887 virtual double PositionToleranceCoarseGet() PURE_VIRTUAL;
8888
8905 virtual void PositionToleranceCoarseSet(double tolerance) PURE_VIRTUAL;
8906
8920 virtual double VelocityToleranceGet() PURE_VIRTUAL;
8921
8935 virtual void VelocityToleranceSet(double tolerance) PURE_VIRTUAL;
8936
8951 virtual double SettlingTimeGet() PURE_VIRTUAL;
8952
8967 virtual void SettlingTimeSet(double time) PURE_VIRTUAL;
8968
8985 virtual bool SettleOnStopGet() PURE_VIRTUAL;
8986
9003
9004 virtual void SettleOnStopSet(bool state) PURE_VIRTUAL;
9005
9022 virtual bool SettleOnEStopGet() PURE_VIRTUAL;
9023
9039 virtual void SettleOnEStopSet(bool state) PURE_VIRTUAL;
9040
9057 virtual bool SettleOnEStopCmdEqActGet() PURE_VIRTUAL;
9058
9074 virtual void SettleOnEStopCmdEqActSet(bool state) PURE_VIRTUAL;
9076
9081
9098 virtual RSIMotorType MotorTypeGet() PURE_VIRTUAL;
9099
9115 virtual void MotorTypeSet(RSIMotorType type) PURE_VIRTUAL;
9116
9133 virtual RSIMotorDisableAction AmpDisableActionGet() PURE_VIRTUAL;
9134
9150 virtual void AmpDisableActionSet(RSIMotorDisableAction action) PURE_VIRTUAL;
9151
9169
9170 virtual RSIMotorBrakeMode BrakeModeGet() PURE_VIRTUAL;
9171
9187 virtual void BrakeModeSet(RSIMotorBrakeMode mode) PURE_VIRTUAL;
9188
9204 virtual double BrakeApplyDelayGet() PURE_VIRTUAL;
9205
9206
9223 virtual void BrakeApplyDelaySet(double seconds) PURE_VIRTUAL;
9224
9240 virtual double BrakeReleaseDelayGet() PURE_VIRTUAL;
9241
9259 virtual void BrakeReleaseDelaySet(double seconds) PURE_VIRTUAL;
9260
9262 virtual void ClosedLoopStepperSet(bool enable) PURE_VIRTUAL;
9263
9265 virtual int32_t ClosedLoopStepperVersionGet() PURE_VIRTUAL;
9266
9268 virtual uint64_t EncoderPointerGet(RSIMotorFeedback encoder) PURE_VIRTUAL;
9269
9271 virtual void EncoderPointerSet(RSIMotorFeedback encoder, uint64_t address) PURE_VIRTUAL;
9272
9274 virtual uint64_t FeedbackDeltaPointerGet(RSIAxisPositionInput input) PURE_VIRTUAL;
9275
9276
9278 virtual void FeedbackDeltaPointerSet(RSIAxisPositionInput input, uint64_t address) PURE_VIRTUAL;
9279
9281 virtual uint64_t FeedbackPointerGet(RSIAxisPositionInput input) PURE_VIRTUAL;
9282
9300 virtual void FeedbackPointerSet(RSIAxisPositionInput input, uint64_t address) PURE_VIRTUAL;
9301
9303 virtual int32_t EncoderRatioNumeratorGet(RSIMotorFeedback encoder) PURE_VIRTUAL;
9304
9306 virtual int32_t EncoderRatioDenominatorGet(RSIMotorFeedback encoder) PURE_VIRTUAL;
9307
9329 virtual void EncoderRatioSet(RSIMotorFeedback encoder, int32_t numerator, int32_t denominator) PURE_VIRTUAL;
9330
9332 virtual const char* const EncoderRatioPrimaryGet() PURE_VIRTUAL;
9333
9335 virtual void EncoderRatioPrimarySet(char* numeratorCommaDenominator) PURE_VIRTUAL;
9336
9338 virtual const char* const EncoderRatioSecondaryGet() PURE_VIRTUAL;
9339
9341 virtual void EncoderRatioSecondarySet(char* numeratorCommaDenominator) PURE_VIRTUAL;
9342
9344 virtual int32_t EncoderCountGet() PURE_VIRTUAL;
9345
9348 virtual void EncoderCountSet(int32_t count) PURE_VIRTUAL;
9349
9351 virtual RSIAxisGantryType GantryTypeGet() PURE_VIRTUAL;
9352
9354 virtual void GantryTypeSet(RSIAxisGantryType type) PURE_VIRTUAL;
9355
9369 virtual RSIOperationMode OperationModeGet() PURE_VIRTUAL;
9370
9384 virtual void OperationModeSet(RSIOperationMode mode) PURE_VIRTUAL;
9385
9405 virtual int32_t MotorFaultMaskGet() PURE_VIRTUAL;
9406
9432 virtual void MotorFaultMaskSet(int32_t faultMask) PURE_VIRTUAL;
9434
9439
9461 virtual void GearingEnable(int32_t masterAxisNumber, RSIAxisMasterType masterFeedbackSource, int32_t numerator, int32_t denominator) PURE_VIRTUAL;
9466 virtual void GearingEnable(Axis* masterAxis, RSIAxisMasterType masterFeedbackSource, int32_t numerator, int32_t denominator) PURE_VIRTUAL;
9467
9486 virtual void GearingRatioChange(int32_t numerator, int32_t denominator) PURE_VIRTUAL;
9487
9504 virtual void GearingDisable() PURE_VIRTUAL;
9505
9507 virtual int32_t GearingNumeratorGet() PURE_VIRTUAL;
9508
9510 virtual int32_t GearingDenominatorGet() PURE_VIRTUAL;
9511
9513 virtual bool GearingEnableGet() PURE_VIRTUAL;
9514
9532 virtual int32_t GearingMasterAxisNumberGet() PURE_VIRTUAL;
9533
9546 virtual RSIAxisMasterType GearingSourceGet() PURE_VIRTUAL;
9548
9553
9570 virtual double MotionCamMasterStartGet(Axis* master) PURE_VIRTUAL;
9571
9586 virtual void MotionCamMasterStartSet(Axis* master, double startPosition) PURE_VIRTUAL;
9587
9604 virtual int32_t MotionCamRepeatFromGet() PURE_VIRTUAL;
9605
9623 virtual void MotionCamRepeatFromSet(int32_t repeatFrom) PURE_VIRTUAL;
9624
9642 virtual void MotionCamRepeatStop() PURE_VIRTUAL;
9643
9666 virtual void MoveCamLinear(int32_t masterAxisNumber, RSIAxisMasterType masterFeedbackSource, const double* const masterDistances, const double* const slavePositions, int32_t pointCount) PURE_VIRTUAL;
9667
9697 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;
9698
9715
9716 virtual int32_t DriveIndexGet() PURE_VIRTUAL;
9718
9723
9736 virtual double BacklashWidthGet() PURE_VIRTUAL;
9737
9750 virtual void BacklashWidthSet(double width) PURE_VIRTUAL;
9751
9764 virtual double BacklashRateGet() PURE_VIRTUAL;
9765
9778 virtual void BacklashRateSet(double rate) PURE_VIRTUAL;
9779
9780
9791 virtual double BacklashValueGet() PURE_VIRTUAL;
9793
9798
9826 virtual RSIFilterAlgorithm FilterAlgorithmGet() PURE_VIRTUAL;
9827
9852 virtual void FilterAlgorithmSet(RSIFilterAlgorithm algorithm) PURE_VIRTUAL;
9853
9879 virtual double FilterCoeffGet(RSIFilterGainPIDCoeff coeff, int32_t gainTable) PURE_VIRTUAL;
9880
9903 virtual void FilterCoeffSet(RSIFilterGainPIDCoeff coeff, int32_t gainTable, double coeffValue) PURE_VIRTUAL;
9904
9907 virtual double FilterCoeffGet(RSIFilterGainPIVCoeff coeff, int32_t gainTable) PURE_VIRTUAL;
9912 virtual void FilterCoeffSet(RSIFilterGainPIVCoeff coeff, int32_t gainTable, double coeffValue) PURE_VIRTUAL;
9913
9948 virtual int32_t FilterGainTableGet() PURE_VIRTUAL;
9949
9978 virtual void FilterGainTableSet(int32_t gainTable) PURE_VIRTUAL;
9979
9996 virtual int32_t FilterGainTableSizeGet() PURE_VIRTUAL;
9997
9999 virtual double FilterOutputGet(void) PURE_VIRTUAL;
10000
10013 virtual double FilterLowPassGet() PURE_VIRTUAL;
10014
10030 virtual void FilterLowPassSet(double frequency) PURE_VIRTUAL;
10031
10050 virtual void FilterDualLoopSet(Axis* velocityAxis, RSIMotorFeedback velocityEncoder, bool enable) PURE_VIRTUAL;
10051
10052
10054 virtual bool FilterGainSchedulingGet() PURE_VIRTUAL;
10055
10056
10058 virtual void FilterGainSchedulingSet(bool enable) PURE_VIRTUAL;
10059
10061 virtual bool IsTuneable() PURE_VIRTUAL;
10062
10079 virtual void PostFilterLowPassSet(int32_t sectionNumber, double frequency) PURE_VIRTUAL;
10080
10096 virtual void PostFilterUnityGainSet(int32_t sectionNumber) PURE_VIRTUAL;
10097
10116 virtual void PostFilterSingleOrderSet(int32_t sectionNumber, double aOne, double bZero, double bOne) PURE_VIRTUAL;
10117
10133 virtual void PostFilterHighPassSet(int32_t sectionNumber, double cornerFreq) PURE_VIRTUAL;
10134
10152 virtual void PostFilterNotchSet(int32_t sectionNumber, double centerFreq, double bandwidth) PURE_VIRTUAL;
10153
10172 virtual void PostFilterResonatorSet(int32_t sectionNumber, double centerFreq, double bandwidth, double gain) PURE_VIRTUAL;
10173
10192 virtual void PostFilterLeadLagSet(int32_t sectionNumber, double lowGain, double highGain, double centerFreq) PURE_VIRTUAL;
10193
10209 virtual void PostFilterClear(int32_t sectionNumber) PURE_VIRTUAL;
10210
10231 virtual void PostFilterBiquadSet(int32_t sectionNumber, double aOne, double aTwo, double bZero, double bOne, double bTwo) PURE_VIRTUAL;
10232
10234 virtual const char* const PostFilterInfoGet() PURE_VIRTUAL;
10235 //virtual RSIFilterPostFilterSection PostFilterSection;
10237
10242
10262 virtual const char* const UserLabelGet() PURE_VIRTUAL;
10263
10284 virtual void UserLabelSet(const char* const userLabel) PURE_VIRTUAL;
10286
10291
10313 virtual void PostTrajectoryGearingEnableSet(bool enable) PURE_VIRTUAL;
10314
10333 virtual bool PostTrajectoryGearingEnableGet() PURE_VIRTUAL;
10334
10354 virtual void PostTrajectoryGearingMasterAxisSet(int32_t masterAxisNumber) PURE_VIRTUAL;
10355
10374 virtual int32_t PostTrajectoryGearingMasterAxisGet() PURE_VIRTUAL;
10375
10395 virtual void PostTrajectoryGearingMultiplierSet(double multiplier) PURE_VIRTUAL;
10396
10415 virtual double PostTrajectoryGearingMultiplierGet() PURE_VIRTUAL;
10416
10437 virtual double PostTrajectoryGearingScaledOffsetGet() PURE_VIRTUAL;
10439
10440
10459 virtual uint32_t NetworkIndexGet(RSINetworkIndexType indexType) PURE_VIRTUAL;
10460
10479 virtual void NetworkIndexSet(RSINetworkIndexType indexType, uint32_t newIndex) PURE_VIRTUAL;
10480
10488 virtual double BacklashHysteresisLimitGet() PURE_VIRTUAL;
10489
10496 virtual void BacklashHysteresisLimitSet(double hysteresisLimit) PURE_VIRTUAL;
10497
10521 virtual bool StepperMotorLoopbackGet() PURE_VIRTUAL;
10522
10546 virtual void StepperMotorLoopbackSet(bool loopback) PURE_VIRTUAL;
10547
10556 virtual RSIMotorStepperPulseType StepperMotorPulseTypeGet(RSIMotorStepperPulse pulse) PURE_VIRTUAL;
10557
10567 virtual void StepperMotorPulseTypeSet(RSIMotorStepperPulse pulse, RSIMotorStepperPulseType type) PURE_VIRTUAL;
10568
10575 virtual uint64_t GearingMasterAddressGet() PURE_VIRTUAL;
10576
10578};
10579
10583class RSI_API MultiAxis : public virtual RapidCodeMotion {
10584public:
10585
10589
10603 virtual void AxisAdd(Axis *axis) PURE_VIRTUAL;
10604
10607 virtual void AxesAdd(Axis* *axes, int32_t axisCount) PURE_VIRTUAL;
10608
10621 virtual void AxisRemoveAll() PURE_VIRTUAL;
10622
10626
10642 virtual Axis* AxisGet(int32_t index) PURE_VIRTUAL;
10643
10663 virtual const char* const UserLabelGet() PURE_VIRTUAL;
10664
10685 virtual void UserLabelSet(const char* const userLabel) PURE_VIRTUAL;
10686
10690
10705 virtual double VectorVelocityGet() PURE_VIRTUAL;
10706
10722 virtual void VectorVelocitySet(double velocity) PURE_VIRTUAL;
10723
10738 virtual double VectorAccelerationGet() PURE_VIRTUAL;
10739
10762 virtual void VectorAccelerationSet(double acceleration) PURE_VIRTUAL;
10763
10778 virtual double VectorDecelerationGet() PURE_VIRTUAL;
10779
10802 virtual void VectorDecelerationSet(double deceleration) PURE_VIRTUAL;
10803
10818 virtual double VectorJerkPercentGet() PURE_VIRTUAL;
10819
10842 virtual void VectorJerkPercentSet(double jerkPercent) PURE_VIRTUAL;
10843
10867 virtual void MoveVector(const double* const position) PURE_VIRTUAL;
10868
10871 virtual void MoveVectorRelative(const double* const relativePosition) PURE_VIRTUAL;
10872
10876
10896
10897 virtual double PathTimeSliceGet() PURE_VIRTUAL;
10898
10919
10920 virtual void PathTimeSliceSet(double seconds) PURE_VIRTUAL;
10921
10946 virtual void PathRatioSet(const double* const ratio) PURE_VIRTUAL;
10947
10950 virtual double PathRatioGet(int32_t index) PURE_VIRTUAL;
10951
10968 virtual void PathBlendSet(bool blend) PURE_VIRTUAL;
10969
10978
10979 virtual void PathPlanTypeSet(RSIPathPlanType type) PURE_VIRTUAL;
10980
10989
10990 virtual RSIPathPlanType PathPlanTypeGet() PURE_VIRTUAL;
10991
11010 virtual void PathListStart(const double* const startPosition) PURE_VIRTUAL;
11011
11032 virtual void PathLineAdd(const double* const position) PURE_VIRTUAL;
11033
11053 virtual void PathArcAdd(const double* const center, double angle) PURE_VIRTUAL;
11054
11073 virtual void PathListEnd() PURE_VIRTUAL;
11074
11091 virtual void PathMotionStart() PURE_VIRTUAL;
11092
11096
11114 virtual void MoveTrapezoidal(const double* const position, const double* const vel, const double* const accel, const double* const decel) PURE_VIRTUAL;
11115
11118 virtual void MoveTrapezoidal(const double* const position) PURE_VIRTUAL;
11119
11146 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;
11147
11150 virtual void MoveSCurve(const double* const position) PURE_VIRTUAL;
11151
11166 virtual void MoveVelocity(const double* const velocity, const double* const accel) PURE_VIRTUAL;
11167
11171 virtual void MoveVelocity(const double* const velocity) PURE_VIRTUAL;
11172
11191 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;
11192
11195 virtual void MoveRelative(const double* const relativePosition) PURE_VIRTUAL;
11196
11212 virtual void MoveVelocitySCurve(const double* const velocity, const double* const accel, const double* const jerkPct) PURE_VIRTUAL;
11213
11230 virtual uint16_t MotionIdExecutingGet() PURE_VIRTUAL;
11231
11249 virtual uint16_t MotionElementIdExecutingGet() PURE_VIRTUAL;
11250
11252 virtual int32_t AxisMapCountGet() PURE_VIRTUAL;
11253
11267 virtual uint64_t AddressGet(RSIMultiAxisAddressType addressType) PURE_VIRTUAL;
11268
11282 virtual RSIDataType AddressDataTypeGet(RSIMultiAxisAddressType type) PURE_VIRTUAL;
11283
11293 virtual bool AmpEnableGet() PURE_VIRTUAL;
11294
11295
11296};
11297
11303class RSI_API IOPoint : public virtual RapidCodeObject {
11304public:
11309
11326 static IOPoint* CreateDigitalInput(Axis* axis, RSIMotorDedicatedIn motorDedicatedInNumber);
11327
11344 static IOPoint* CreateDigitalInput(Axis* axis, RSIMotorGeneralIo motorGeneralIoNumber);
11345
11361 static IOPoint* CreateDigitalInput(RapidCodeNetworkNode* networkNode, int32_t bitNumber);
11362 // use NetworkNode*
11363 static IOPoint* CreateDigitalInput(IO* io, int32_t bitNumber);
11364
11375 static IOPoint* CreateDigitalInput(MotionController* controller, int32_t pdoIndex, int32_t bitNumber, RSIPDOType type);
11376
11390 static IOPoint* CreateDigitalInput(MotionController* controller, uint64_t memoryAddress, int32_t bitNumber);
11391
11409 static IOPoint* CreateDigitalOutput(Axis* axis, RSIMotorDedicatedOut motorDedicatedOutNumber);
11410
11427 static IOPoint* CreateDigitalOutput(Axis* axis, RSIMotorGeneralIo motorGeneralIoNumber);
11428
11444 static IOPoint* CreateDigitalOutput(RapidCodeNetworkNode* networkNode, int32_t bitNumber);
11445 // use NetworkNode*
11446 static IOPoint* CreateDigitalOutput(IO* io, int32_t bitNumber);
11447
11448
11461 static IOPoint* CreateDigitalOutput(MotionController* controller, int32_t pdoIndex, int32_t bitNumber, RSIPDOType type);
11462
11476 static IOPoint* CreateDigitalOutput(MotionController* controller, uint64_t memoryAddress, int32_t bitNumber);
11477
11492 static IOPoint* CreateAnalogInput(RapidCodeNetworkNode* networkNode, int32_t analogChannel);
11493 // use RapidCodeNetworkNode*
11494 static IOPoint* CreateAnalogInput(IO* io, int32_t analogChannel);
11495
11510 static IOPoint* CreateAnalogOutput(RapidCodeNetworkNode* networkNode, int32_t analogChannel);
11511 // use RapidCodeNetworkNode*
11512 static IOPoint* CreateAnalogOutput(IO* io, int32_t analogChannel);
11513
11515
11519
11522 virtual uint64_t AddressGet() PURE_VIRTUAL;
11523
11526 virtual int32_t MaskGet() PURE_VIRTUAL;
11527
11530 virtual bool IsDigital() PURE_VIRTUAL;
11531
11532
11535 virtual bool IsOutput() PURE_VIRTUAL;
11536
11540
11544 virtual bool Get() PURE_VIRTUAL;
11545
11552 virtual void Set(bool state) PURE_VIRTUAL;
11553
11557
11561 virtual double ValueGet() PURE_VIRTUAL;
11562
11566 virtual void ValueSet(double valueDouble) PURE_VIRTUAL;
11567};
11568
11572class RSI_API RTOS {
11573
11574public:
11575#if defined(_WIN32)
11580
11584
11589 static INtimeStatus INtimeStatusGet(const char* const nodeName);
11590
11594
11599 static INtimeStatus INtimeStart(const char* const nodeName);
11600
11604
11609 static INtimeStatus INtimeStop(const char* const nodeName);
11610
11614
11619 static INtimeStatus INtimeRestart(const char* const nodeName);
11620
11623 static const char* const INtimeCatalogRMPGet();
11624
11627 static const char* const INtimeCatalogRMPNetworkGet();
11628
11631 static uint32_t INtimeNodeCountGet();
11632
11636 static const char* const INtimeNodeNameGet(uint32_t nodeNumber);
11637
11641 static bool INtimeNodeIsLocal(uint32_t nodeNumber);
11643#endif // _WIN32
11644};
11645
11647class RSI_API Trace
11648{
11649public:
11654
11667 static void MaskSet(RSITrace mask);
11668
11684 static void MaskOnSet(RSITrace maskOn);
11685
11686
11706 static bool MaskOnGet(RSITrace maskOn);
11707
11723 static void MaskOffSet(RSITrace maskOff);
11724
11737 static void MaskClear();
11738
11753 static int32_t FileSet(const char* const fileName);
11754
11767 static void FileClose();
11768
11783 static void InjectMessage(RSITrace traceLevel, const char* const message);
11784
11786};
11787
11789
11791
11795class RSI_API IO : public virtual RapidCodeObject {
11796public:
11797
11798 friend class MotionController;
11799
11804
11806 RapidCodeNetworkNode* NetworkNode;
11809
11811
11816
11817
11850 virtual bool IOExists() PURE_VIRTUAL;
11851
11868 virtual int32_t NumberGet() PURE_VIRTUAL;
11870
11875
11876
11877
11907 virtual bool DigitalInGet(int32_t digitalInNumber) PURE_VIRTUAL;
11908
11941 virtual bool DigitalOutGet(int32_t digitalOutNumber) PURE_VIRTUAL;
11942
11973 virtual void DigitalOutSet(int32_t digitalOutNumber, bool outValue) PURE_VIRTUAL;
11974
11997 virtual int32_t AnalogInGet(int32_t analogChannel) PURE_VIRTUAL;
11998
12030 virtual int32_t AnalogOutGet(int32_t analogChannel) PURE_VIRTUAL;
12031
12063 virtual void AnalogOutSet(int32_t analogChannel, int32_t analogValue) PURE_VIRTUAL;
12065
12075 virtual const char* const UserLabelGet() PURE_VIRTUAL;
12076
12083 virtual void UserLabelSet(const char* const userLabel) PURE_VIRTUAL;
12084};
12085
12086#if defined(__cplusplus)
12087}
12088#endif
12089
12090template<typename ContainerClass>
12091class RSI_API RapidVectorIterator
12092{
12093public:
12095 typedef typename ContainerClass::ValueType ValueType;
12096
12098 typedef typename ContainerClass::PointerType PointerType;
12099
12102 ValueType& operator*();
12103
12106 const ValueType& operator*() const;
12107
12110 RapidVectorIterator& operator++();
12111
12114 RapidVectorIterator operator++(int);
12115
12118 bool operator==(const RapidVectorIterator&) const;
12119
12122 bool operator!=(const RapidVectorIterator&) const;
12123
12125 RapidVectorIterator(PointerType pointerArgument, PointerType startArgument, const size_t containerSize);
12126
12128 RapidVectorIterator(const RapidVectorIterator&) = default;
12129
12131 RapidVectorIterator& operator=(const RapidVectorIterator&) = default;
12132
12134 RapidVectorIterator(RapidVectorIterator&&) noexcept = default;
12135
12137 RapidVectorIterator& operator=(RapidVectorIterator&&) noexcept = default;
12138private:
12139 PointerType pointer;
12140 PointerType start, end;
12141 void VerifyPointer() const;
12142};
12143
12145template<typename Type>
12147
12150
12159template<typename Type>
12160class RSI_API RapidVector
12161{
12162private:
12163 // The pointer to the implementation.
12165public:
12169 Type& operator[](const size_t index);
12170
12174 const Type& operator[](const size_t index) const;
12175
12179 Type& At(const size_t index);
12180
12184 const Type& At(const size_t index) const;
12185
12188 void PushBack(const Type& element);
12189
12192 const size_t Size() const;
12193
12195 void Clear();
12196
12198 void PopBack();
12199
12202 Type& Front();
12203
12206 const Type& Front() const;
12207
12210 Type& Back();
12211
12214 const Type& Back() const;
12215
12218
12220 RapidVector(const size_t size);
12221
12224
12227
12230
12233
12235 RapidVector(RapidVector&& other) noexcept;
12236
12239
12240 typedef Type* PointerType;
12241 typedef Type ValueType;
12242
12244 typedef RapidVectorIterator<RapidVector> Iterator;
12245
12248 Iterator begin() noexcept;
12249
12252 Iterator begin() const noexcept;
12253
12257 Iterator end() const noexcept;
12258};
12259
12261
12262} // namespace RapidCode
12263
12264} // namespace RSI
12265
12266#endif // _RSI_H
void MoveSCurve(double position)
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:5705
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 releativePosition)
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)
Command a point-to-point S-Curve motion.
Represents a single axis of motion control. This class provides an interface for commanding motion,...
Definition rsi.h:5675
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:11795
NetworkNode * NetworkNode
Gets the parent NetworkNode object.
Definition rsi.h:11806
MotionController * rsiControl
Gets the parent MotionController object.
Definition rsi.h:11808
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:11303
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:3805
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:10583
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:11572
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:4200
MotionController * rsiControl
Gets the parent MotionController object.
Definition rsi.h:4210
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
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.
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.
Forward declaration of the implementation class for RapidVector.
Definition rsi.h:12161
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:12244
~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.
Forward declaration of the implementation class for RapidVector.
Definition rsi.h:12146
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:11648
RSIFilterAlgorithm
Filter algorithms.
Definition rsienums.h:1119
RSINetworkEniResult
NetworkEniGenerate return values.
Definition rsienums.h:1384
RSIPDOType
Compensator output types.
Definition rsienums.h:1358
RSIMathBlockOperation
MathBlock operations.
Definition rsienums.h:1364
RSICompensatorOutputType
Compensator output types.
Definition rsienums.h:1352
RSINetworkStartMode
Network start modes.
Definition rsienums.h:587
RSIMotorFeedbackFault
Feedbacks to use for Feedback Fault action.
Definition rsienums.h:1106
RSITrace
Trace masks.
Definition rsienums.h:539
RSIMotorStepperPulse
Pulse A or B.
Definition rsienums.h:1209
RSIAxisGantryType
How to combine Axis Feedback Positions.
Definition rsienums.h:1099
RSINetworkState
State of network.
Definition rsienums.h:567
RSIControllerAddressType
Used to get firmware address used in User Limits, Recorders, etc.
Definition rsienums.h:404
RSIMotorDisableAction
Action for when a motor is disabled.
Definition rsienums.h:1279
RSIEventType
Event Types or Status Bits.
Definition rsienums.h:928
RSIMotionType
PT and PVT streaming motion types.
Definition rsienums.h:1000
RSIDataType
Data types for User Limits and other triggers.
Definition rsienums.h:654
RSIUserLimitLogic
Logic options for User Limits.
Definition rsienums.h:641
RSIMotorIoTypeMask
Possible mask bits for Motor I/O types.
Definition rsienums.h:1225
RSIAction
Action to perform on an Axis.
Definition rsienums.h:1075
RSIAxisAddressType
Used to get firmware address used in User Limits, Recorders, etc.
Definition rsienums.h:433
RSIProcessorType
Controller's processor type.
Definition rsienums.h:294
RSIMotorStepperPulseType
Stepper pulse type.
Definition rsienums.h:1215
RSIMotorType
Motor Type.
Definition rsienums.h:1271
RSINetworkStartError
Network start errors.
Definition rsienums.h:593
RSIMotorGeneralIo
Motor I/O bit numbers.
Definition rsienums.h:879
RSIMotionAttrMask
Attribute masks for motion. You cannot mix RSIMotionAttrMaskDELAY and RSIMotionAttrMaskAPPEND.
Definition rsienums.h:1020
RSIMultiAxisAddressType
Used to get firmware address used in User Limits, Recorders, etc.
Definition rsienums.h:496
RSIFilterGainPIDCoeff
PID gain coefficients.
Definition rsienums.h:1128
RSIUserLimitTriggerType
Trigger types for UserLimits.
Definition rsienums.h:628
RSINetworkOutputAddressType
Network output address types.
Definition rsienums.h:1345
INtimeStatus
INtime status values.
Definition rsienums.h:1317
RSIMotionHoldType
Types for MotionHold attribute.
Definition rsienums.h:1055
RSIControllerType
Controller type.
Definition rsienums.h:283
RSIMotorFaultMask
Mask values for several motor faults.
Definition rsienums.h:1259
RSIHomeStage
Predefined Homing Stage sections.
Definition rsienums.h:396
RSIMotorBrakeMode
Brake modes.
Definition rsienums.h:1285
RSIErrorMessage
All possible RSI Error Messages.
Definition rsienums.h:17
RSINetworkType
Type of Network topology.
Definition rsienums.h:621
RSIMotorIoType
Possible configurations for Motor I/O.
Definition rsienums.h:1188
RSIAxisPositionInput
Feedback Positions for each Axis.
Definition rsienums.h:1093
RSINodeType
Valid Node types.
Definition rsienums.h:671
RSISource
Possible sources that have caused an Error state.
Definition rsienums.h:976
RSIMotorDedicatedIn
Dedicated Input bits per motor.
Definition rsienums.h:851
RSIMotorFeedback
Encoders per motor.
Definition rsienums.h:1113
RSIMotorDedicatedOut
Dedicated Output bits per motor.
Definition rsienums.h:873
RSIOperationMode
DS402 modes of operation.
Definition rsienums.h:1291
RSIPathPlanType
Path motion planning types.
Definition rsienums.h:1014
RSINetworkTechnologyType
Network technology type.
Definition rsienums.h:1312
RSINetworkIndexType
Network index types for Axis.
Definition rsienums.h:1325
RSINetworkStartupMethod
Network startup methods.
Definition rsienums.h:579
RSIFilterGainPIVCoeff
PIV gain coefficients.
Definition rsienums.h:1149
RSIAxisMasterType
Sources available to a slave Axis for electronic gearing & camming.
Definition rsienums.h:1178
int32_t ControllerIndex
The index of the controller to create.
Definition rsi.h:951
int32_t CpuAffinity
[Linux] Indicate the CPU core on which the RMP and RMPNetwork processes run.
Definition rsi.h:1009
int32_t RmpThreadPriorityMax
[Linux] The maximum thread priority. All threads of the RMP and RMPNetwork will be based off of this....
Definition rsi.h:1021
CreationParameters()
Instantiate with default values and all memory zeroed out.
Definition rsi.h:927
CreationParameters for MotionController::Create.
Definition rsi.h:861
RSIDataType ProcessDataType
Data type for processing.
Definition rsi.h:3783
MathBlock configuration structure.
Definition rsi.h:3776
RSIDataType OutputDataType
Data type for Output. (optional)
Definition rsi.h:3781
uint64_t OutputAddress
Host memory address for Output. The MathBlock will write its result to this address....
Definition rsi.h:3782
uint64_t InputAddress0
Host memory address for Input0. Represents the left-hand side operand in math operations.
Definition rsi.h:3777
RSIDataType InputDataType0
Data type for Input0. This is the data type of the left-hand side operand in math operations.
Definition rsi.h:3778
uint64_t InputAddress1
Host memory address for Input1. Represents the right-hand side operand in math operations.
Definition rsi.h:3779
RSIDataType InputDataType1
Data type for Input1. This is the data type of the right-hand side operand in math operations.
Definition rsi.h:3780
RSIMathBlockOperation Operation
Math operation to be performed. (+, -, *, /, etc) use RSIMathBlockOperationNONE to disable a MathBloc...
Definition rsi.h:3784
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