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# if !defined(RSI_API)
28# define RSI_API __attribute__ ((visibility ("default")))
29# endif
30#endif
31
32// Macro for pure virtual definitions
33#define PURE_VIRTUAL = 0
34
36namespace RSI
37{
38
40namespace RapidCode
41{
42
43#if defined(__cplusplus)
44extern "C"
45{
46#endif
47
48
49class MotionController;
50class Axis;
51class MultiAxis;
52class IO;
53class RapidCodeNetworkNode;
54class IOPoint;
55class RTOS;
56
58class StaticInstanceMediator
59{
60private:
61 bool isValid;
62public:
63
64 bool IsValid() { return isValid; }
65
66 void OnDelete() { isValid = false; }
67
68 void OnCreate() { isValid = true; }
69};
70
73
105class RsiError : public std::exception
106{
107public:
111 int32_t lineNumber;
113 int32_t objectIndex;
117 static inline constexpr uint32_t RSI_ERROR_TEXT_SIZE = 512U;
118 char text[RSI_ERROR_TEXT_SIZE];
125
126 RsiError()
127 {
128 text[0] = '\0';
129 functionName[0] = '\0';
130 shortText[0] = '\0';
131 fileName[0] = '\0';
133 lineNumber = -1;
134 isWarning = false;
135 objectIndex = -1;
136 }
145 RsiError(const RsiError& copyFrom)
146 {
147#if defined(_WIN32)
148 strncpy_s(text, RSI_ERROR_TEXT_SIZE, copyFrom.text, RSI_ERROR_TEXT_SIZE);
152#elif defined(__linux__)
153 strncpy(text, copyFrom.text, RSI_ERROR_TEXT_SIZE);
155 strncpy(shortText, copyFrom.shortText, RSI_ERROR_TEXT_SIZE);
156 strncpy(fileName, copyFrom.fileName, RSI_ERROR_TEXT_SIZE);
157#endif
158 number = copyFrom.number;
159 lineNumber = copyFrom.lineNumber;
160 isWarning = copyFrom.isWarning;
161 objectIndex = copyFrom.objectIndex;
162 }
163 ~RsiError()
164 {
165 }
166
168 virtual const char* what() const noexcept { return text; }
169};
170
179class RSI_API RapidCodeObject {
180public:
185
186
187
200 virtual const char* const VersionGet() PURE_VIRTUAL;
201
203 virtual int32_t MpiVersionMajor() PURE_VIRTUAL;
205 virtual int32_t MpiVersionMinor() PURE_VIRTUAL;
207 virtual int32_t MpiVersionRelease() PURE_VIRTUAL;
209 virtual int32_t RSIVersionMajor() PURE_VIRTUAL;
211 virtual int32_t RSIVersionMinor() PURE_VIRTUAL;
213 virtual int32_t RSIVersionMicro() PURE_VIRTUAL;
215 virtual int32_t RSIVersionPatch() PURE_VIRTUAL;
216
219 virtual int32_t NumberGet() PURE_VIRTUAL;
221
226
227
228
229
255 virtual int32_t ErrorLogCountGet() PURE_VIRTUAL;
256
270 virtual const RsiError* const ErrorLogGet() PURE_VIRTUAL;
271
284 virtual void ErrorLogClear() PURE_VIRTUAL;
285
304 virtual void ThrowExceptions(bool state) PURE_VIRTUAL;
305
307 virtual const char* const RsiErrorMessageGet(RSIErrorMessage msg) PURE_VIRTUAL;
308
310 virtual const char* const ErrorMessageGet(RSIErrorMessage msg) PURE_VIRTUAL;
311
313 virtual bool WarningMsgCheck(RSIErrorMessage msg) PURE_VIRTUAL;
315
320
321
336 virtual void Trace(bool state) PURE_VIRTUAL;
337
352 virtual void TraceMaskOnSet(RSITrace maskOn) PURE_VIRTUAL;
353
354
375 virtual bool TraceMaskOnGet(RSITrace maskOn) PURE_VIRTUAL;
376
392 virtual void TraceMaskOffSet(RSITrace maskOff) PURE_VIRTUAL;
393
407 virtual void TraceMaskClear() PURE_VIRTUAL;
408
423 virtual void TraceFileSet(const char* const fileName) PURE_VIRTUAL;
424
437 virtual void TraceFileClose() PURE_VIRTUAL;
438
453 virtual void TraceInjectMessage(RSITrace traceLevel, const char* const message) PURE_VIRTUAL;
454
455
456
457
459};
460
462typedef union
463{
464 bool Bool;
465 int8_t Int8;
466 uint8_t UInt8;
467 int16_t Int16;
468 uint16_t UInt16;
469 int32_t Int32;
470 uint32_t UInt32;
471 float Float;
472 double Double;
473 int64_t Int64;
474 uint64_t UInt64;
476
478
492class RSI_API RapidCodeOS {
493public:
494
499
512 virtual void Sleep(int32_t milliseconds) PURE_VIRTUAL;
513
532 virtual int32_t KeyGet(int32_t milliseconds) PURE_VIRTUAL;
533
543 virtual int32_t TimerCountGet() PURE_VIRTUAL;
544
553 virtual int32_t TimerFrequencyGet() PURE_VIRTUAL;
554
555
567 virtual int32_t PerformanceTimerCountGet() PURE_VIRTUAL;
568
580 virtual int32_t PerformanceTimerFrequencyGet() PURE_VIRTUAL;
581
583};
584
586
589class RSI_API RapidCodeInterrupt : public virtual RapidCodeObject {
590public:
594
596 virtual void InterruptEnableSet(bool enable) PURE_VIRTUAL;
597
598
620 virtual RSIEventType InterruptWait(int32_t milliseconds) PURE_VIRTUAL;
621
641 virtual const char* const InterruptNameGet() PURE_VIRTUAL;
642
663 virtual int32_t InterruptSampleTimeGet() PURE_VIRTUAL;
664
665
686 virtual int32_t InterruptSourceNumberGet() PURE_VIRTUAL;
687
689 virtual uint16_t InterruptMotionIdGet() PURE_VIRTUAL;
690
692 virtual void InterruptWake() PURE_VIRTUAL;
693
695 virtual void InterruptMaskClear() PURE_VIRTUAL;
696
698 virtual void InterruptMaskAllSet() PURE_VIRTUAL;
699
701 virtual void InterruptMaskOnSet(RSIEventType eventType) PURE_VIRTUAL;
702
704 virtual void InterruptMaskOffSet(RSIEventType eventType) PURE_VIRTUAL;
705
707 virtual bool InterruptMaskOnGet(RSIEventType eventType) PURE_VIRTUAL;
708
709
722 virtual uint64_t InterruptUserDataGet(uint32_t userDataIndex) PURE_VIRTUAL;
723
724
736 virtual double InterruptUserDataDoubleGet(uint32_t userDataIndex) PURE_VIRTUAL;
737
743 virtual FirmwareValue InterruptUserDataValueGet(uint32_t userDataIndex) PURE_VIRTUAL;
744
780
782 virtual void InterruptUserDataAddressSet(uint32_t userDataIndex, uint64_t hostAddress) PURE_VIRTUAL;
783
789 virtual uint64_t InterruptUserDataAddressGet(uint32_t userDataIndex) PURE_VIRTUAL;
790};
791
795class RSI_API MotionController : public virtual RapidCodeInterrupt {
796protected:
798 StaticInstanceMediator* _mediator;
799
800public:
801
802 // Static functions or attributes should be grouped together.
807
809 static inline constexpr uint32_t NetworkStartTimeoutMillisecondsDefault = 30000;
810
812 static inline constexpr uint32_t AxisCountMaximum = 64;
813
815 static inline constexpr uint32_t MotionCountMaximum = 64;
816
818 static inline constexpr uint32_t NetworkNodeCountMaximum = 64;
819
821 static inline constexpr uint32_t RecorderCountMaximum = 64;
822
824 static inline constexpr uint32_t CompensatorCountMaximum = 64;
825
827 static inline constexpr uint32_t MathBlockCountMaximum = 64;
828
830 static inline constexpr uint32_t UserBufferDataCountMaximum = 1024;
831
833 static inline constexpr double SampleRateDefault = 1000.0;
834
844 static inline constexpr int32_t AxisFrameBufferSizeDefault = 1024;
845
847
848 // Static functions or attributes should be grouped together.
853
856 {
861
866 static inline constexpr uint32_t PathLengthMaximum = 256;
867
873 static inline constexpr int32_t CpuAffinityDefault = -1;
874
879 static inline constexpr int32_t RmpThreadPriorityMaximumDefault = 45;
880
885 static inline constexpr int32_t RmpThreadPriorityRange = 8;
886
891 static inline constexpr int32_t RmpThreadPriorityMinimum = RmpThreadPriorityRange + 1;
892
897 static inline constexpr int32_t RmpThreadPriorityMaximum = 99;
898
903 static inline constexpr int32_t RmpThreadPriorityNoRealTime = 0;
905
906
911
917 {
918 std::memset(RmpPath, '\0', PathLengthMaximum);
919 std::memset(NicPrimary, '\0', PathLengthMaximum);
920 std::memset(NicSecondary, '\0', PathLengthMaximum);
921#if defined(_WIN32)
922 std::memset(NodeName, '\0', PathLengthMaximum);
923#elif defined(__linux__)
924 CpuAffinity = CpuAffinityDefault;
925 RmpThreadPriorityMax = RmpThreadPriorityMaximumDefault;
926#endif
927 }
929
934
939 char RmpPath[PathLengthMaximum];
940
945 char NicPrimary[PathLengthMaximum];
946
951 char NicSecondary[PathLengthMaximum];
953
954 // Control which platform specific parameters are available
955#if defined(_WIN32) && defined(__linux__)
956 static_assert(false, "_WIN32 and __linux__ defined. Double check preprocessor definitions");
957#elif !defined(_WIN32) && !defined(__linux__) && !defined(DOXYGEN)
958 static_assert(false, "Neither _WIN32 nor __linux__ are defined AND this is not a documentation build. Double check preprocessor definitions");
959#endif //defined(_WIN32) && defined(__linux__)
960#if defined(_WIN32) || defined(DOXYGEN)
961
966
971 char NodeName[PathLengthMaximum];
972
974#endif //defined(_WIN32)
975#if defined(__linux__) || defined(DOXYGEN)
976
981
991 int32_t CpuAffinity;
992
1004
1006# endif // defined(__linux__)
1007 };
1008
1019 static MotionController* Create(CreationParameters* creationParameters);
1020
1021#if defined(_WIN32)
1049
1054 static MotionController* CreateFromSoftware(const char* const RtaPath);
1055
1061 static MotionController* CreateFromSoftware(const char* const RtaPath, const char* const NodeName);
1062
1090#endif // defined(_WIN32)
1091
1096 static MotionController* CreateFromFile(const char* const fileName);
1098
1103
1122 virtual Axis* AxisGet(int32_t axisNumber) PURE_VIRTUAL;
1123
1140 virtual MultiAxis* MultiAxisGet(int32_t motionSupervisorNumber) PURE_VIRTUAL;
1141
1155 virtual MultiAxis* LoadExistingMultiAxis(int32_t motionSupervisorNumber) PURE_VIRTUAL;
1156
1171 virtual RapidCodeNetworkNode* NetworkNodeGet(int32_t nodeNumber) PURE_VIRTUAL;
1172
1188 virtual IO* IOGet(int32_t nodeNumber) PURE_VIRTUAL;
1189
1212 virtual void Delete(void) PURE_VIRTUAL;
1214
1219
1229 virtual void Reset() PURE_VIRTUAL;
1230
1235 virtual void Refresh() PURE_VIRTUAL;
1236
1244 virtual void Shutdown() PURE_VIRTUAL;
1245
1254 virtual void MemoryToFile(const char* const fileName) PURE_VIRTUAL;
1256
1261
1284 virtual int32_t SampleCounterGet() PURE_VIRTUAL;
1285
1300 virtual double ProcessorUsageGet() PURE_VIRTUAL;
1301
1312 virtual void ProcessorUsageClear() PURE_VIRTUAL;
1313
1317 virtual uint32_t FirmwareTimingDeltaGet() PURE_VIRTUAL;
1318
1319
1321
1326
1327
1328
1351 virtual uint32_t SerialNumberGet(void) PURE_VIRTUAL;
1352
1371 virtual void SampleWait(uint32_t samples) PURE_VIRTUAL;
1372
1373
1375 virtual RSIControllerType ControllerTypeGet() PURE_VIRTUAL;
1376
1378 virtual const char* const ServerNameGet() PURE_VIRTUAL;
1379
1381 virtual int32_t ServerPortGet() PURE_VIRTUAL;
1382
1383
1384
1385
1407 virtual RSIProcessorType ProcessorTypeGet() PURE_VIRTUAL;
1408
1413 virtual void SampleRateSet(double sampleRate) PURE_VIRTUAL;
1414
1417 virtual double SampleRateGet() PURE_VIRTUAL;
1418
1436 virtual int32_t AxisCountGet() PURE_VIRTUAL;
1437
1456 virtual void AxisCountSet(int32_t axisCount) PURE_VIRTUAL;
1457
1460 virtual void AxisCountSet(int32_t axisCount, bool setMotorFilterSupervisor) PURE_VIRTUAL;
1461
1464 virtual bool IsLicensed() PURE_VIRTUAL;
1465
1467 virtual int32_t PackageVariantGet() PURE_VIRTUAL;
1468
1470 virtual int32_t AxisLicenseCountGet() PURE_VIRTUAL;
1471
1473 virtual bool MechaWareLicenseGet() PURE_VIRTUAL;
1474
1476 virtual int32_t UnsupportedOptionSet(int32_t option) PURE_VIRTUAL;
1477
1502 virtual int32_t MotionCountGet() PURE_VIRTUAL;
1503
1520 virtual void MotionCountSet(int32_t motionCount) PURE_VIRTUAL;
1521
1547 virtual int32_t UserVersionGet() PURE_VIRTUAL;
1548
1572 virtual void UserVersionSet(int32_t version) PURE_VIRTUAL;
1573
1576 virtual int32_t ExternalMemorySizeGet() PURE_VIRTUAL;
1577
1594 virtual void AxisFrameBufferSizeSet(int32_t axisNumber, int32_t frameBufferSize) PURE_VIRTUAL;
1595
1610 virtual int32_t AxisFrameBufferSizeGet(int32_t axisNumber) PURE_VIRTUAL;
1612
1617
1635 virtual const char* const FirmwareVersionGet() PURE_VIRTUAL;
1636
1654 virtual int32_t FirmwareOptionGet() PURE_VIRTUAL;
1655
1657 virtual bool HasMechaWare() PURE_VIRTUAL;
1658
1682 virtual int32_t MemoryGet(uint64_t address) PURE_VIRTUAL;
1683
1684
1702 virtual double MemoryDoubleGet(uint64_t address) PURE_VIRTUAL;
1703
1729 virtual void MemoryBlockGet(uint64_t address, void* dataStart, int32_t size) PURE_VIRTUAL;
1730
1745 virtual void MemorySet(uint64_t address, int32_t data) PURE_VIRTUAL;
1746
1747
1748
1765 virtual void MemoryDoubleSet(uint64_t address, double dataDouble) PURE_VIRTUAL;
1766
1792 virtual void MemoryBlockSet(uint64_t address, const void* const dataStart, int32_t size) PURE_VIRTUAL;
1793
1812 virtual uint32_t FirmwareAddressGet(uint64_t hostAddress) PURE_VIRTUAL;
1813
1814
1815
1816
1839 virtual uint64_t HostAddressGet(uint32_t firmwareAddress) PURE_VIRTUAL;
1840
1841
1842
1865 virtual int32_t BackgroundCycleCounterGet() PURE_VIRTUAL;
1866
1867
1868
1869
1878 virtual uint64_t AddressFromStringGet(const char* const addressName) PURE_VIRTUAL;
1879
1880
1881
1890 virtual const char* const StringFromAddressGet(uint64_t hostAddress) PURE_VIRTUAL;
1891
1906 virtual uint64_t AddressGet(RSIControllerAddressType type) PURE_VIRTUAL;
1907
1925 virtual uint64_t AddressGet(RSIControllerAddressType type, int32_t objectIndex) PURE_VIRTUAL;
1926
1927
1940 virtual RSIDataType AddressDataTypeGet(RSIControllerAddressType type) PURE_VIRTUAL;
1941
1946 virtual RSIDataType AddressDataTypeGet(RSIControllerAddressType type, int32_t objectIndex) PURE_VIRTUAL;
1947
1961 virtual bool MotionHoldGateGet(int32_t gateNumber) PURE_VIRTUAL;
1962
1963
1964
1980 virtual void MotionHoldGateSet(int32_t gateNumber, bool hold) PURE_VIRTUAL;
1982
1987
1989 virtual RSINetworkTechnologyType NetworkTechnologyTypeGet() PURE_VIRTUAL;
1990
1992 virtual RSINetworkType NetworkTypeGet() PURE_VIRTUAL;
1993
1996 virtual int32_t NetworkNodeCountGet() PURE_VIRTUAL;
1997
1999 virtual void NetworkStart() PURE_VIRTUAL;
2000
2009 virtual void NetworkStart(RSINetworkStartupMethod startupMethod) PURE_VIRTUAL;
2010
2014 virtual void NetworkStart(RSINetworkStartMode startMode, RSINetworkStartupMethod startupMethod) PURE_VIRTUAL;
2015
2020 virtual void NetworkStart(RSINetworkStartMode startMode, RSINetworkStartupMethod startupMethod, uint32_t timeoutMilliseconds) PURE_VIRTUAL;
2021
2023 virtual void NetworkShutdown() PURE_VIRTUAL;
2024
2027 virtual RSINetworkState NetworkStateGet() PURE_VIRTUAL;
2028
2030 virtual int32_t NetworkCounterGet() PURE_VIRTUAL;
2031
2033 virtual int32_t NetworkInputCountGet() PURE_VIRTUAL;
2034
2036 virtual int32_t NetworkInputBitSizeGet(int32_t index) PURE_VIRTUAL;
2037
2041 virtual const char* const NetworkInputDataTypeNameGet(int32_t index) PURE_VIRTUAL;
2042
2045 virtual int32_t NetworkInputBitOffsetGet(int32_t index) PURE_VIRTUAL;
2046
2049 virtual const char* const NetworkInputNameGet(int32_t index) PURE_VIRTUAL;
2050
2054 virtual uint64_t NetworkInputValueGet(int32_t index) PURE_VIRTUAL;
2055
2056
2057
2061 virtual uint64_t NetworkInputAddressGet(int32_t index) PURE_VIRTUAL;
2062
2066 virtual int32_t NetworkOutputCountGet() PURE_VIRTUAL;
2067
2070 virtual int32_t NetworkOutputBitSizeGet(int32_t index) PURE_VIRTUAL;
2071
2072
2076 virtual const char* const NetworkOutputDataTypeNameGet(int32_t index) PURE_VIRTUAL;
2077
2079 virtual int32_t NetworkOutputBitOffsetGet(int32_t index) PURE_VIRTUAL;
2080
2082 virtual const char* const NetworkOutputNameGet(int32_t index) PURE_VIRTUAL;
2083
2099 virtual uint64_t NetworkOutputValueGet(int32_t index) PURE_VIRTUAL;
2100
2117 virtual void NetworkOutputValueSet(int32_t index, uint64_t outputValue) PURE_VIRTUAL;
2118
2137 virtual uint64_t NetworkOutputAddressGet(int32_t index) PURE_VIRTUAL;
2138
2143 virtual uint64_t NetworkOutputAddressGet(int32_t index, RSINetworkOutputAddressType type) PURE_VIRTUAL;
2144
2155 virtual uint64_t NetworkOutputIntendedValueGet(int32_t index) PURE_VIRTUAL;
2156
2168 virtual void NetworkOutputOverrideSet(int32_t index, bool outputOverride) PURE_VIRTUAL;
2169
2180 virtual bool NetworkOutputOverrideGet(int32_t index) PURE_VIRTUAL;
2181
2182
2183
2184
2201 virtual void NetworkOutputOverrideValueSet(int32_t index, uint64_t outputValue) PURE_VIRTUAL;
2202
2215 virtual uint64_t NetworkOutputOverrideValueGet(int32_t index) PURE_VIRTUAL;
2216
2231 virtual uint64_t NetworkOutputSentValueGet(int32_t index) PURE_VIRTUAL;
2232
2236 virtual int32_t NetworkLogMessageCountGet() PURE_VIRTUAL;
2237
2239 virtual RSINetworkStartError LastNetworkStartErrorGet() PURE_VIRTUAL;
2240
2245 virtual const char* const NetworkLogMessageGet(int32_t messageIndex) PURE_VIRTUAL;
2246
2248 virtual void NetworkTimingEnableSet(bool enable) PURE_VIRTUAL;
2249
2251 virtual void NetworkTimingClear() PURE_VIRTUAL;
2252
2254 virtual uint32_t NetworkTimingDeltaGet() PURE_VIRTUAL;
2255
2257 virtual uint32_t NetworkTimingMinGet() PURE_VIRTUAL;
2258
2260 virtual uint32_t NetworkTimingMaxGet() PURE_VIRTUAL;
2261
2263 virtual void NetworkTimingThresholdLowSet(uint32_t microseconds) PURE_VIRTUAL;
2264
2266 virtual void NetworkTimingThresholdHighSet(uint32_t microseconds) PURE_VIRTUAL;
2267
2269 virtual uint32_t NetworkTimingThresholdLowCountGet() PURE_VIRTUAL;
2270
2272 virtual uint32_t NetworkTimingThresholdHighCountGet() PURE_VIRTUAL;
2273
2275 virtual bool NetworkSynchronizedGet() PURE_VIRTUAL;
2277
2282
2299 virtual void InterruptEnableSet(bool enable) PURE_VIRTUAL;
2300
2319 virtual void InterruptWake() PURE_VIRTUAL;
2320
2348 virtual void SyncInterruptEnableSet(bool enable) PURE_VIRTUAL;
2349
2375 virtual void SyncInterruptPeriodSet(uint32_t samples) PURE_VIRTUAL;
2376
2396 virtual int32_t SyncInterruptWait() PURE_VIRTUAL;
2397
2399 virtual bool ServiceThreadStateGet() PURE_VIRTUAL;
2400
2411 virtual int32_t SyncInterruptHostProcessTimeGet() PURE_VIRTUAL;
2412
2414 virtual int32_t SyncInterruptHostProcessFlagGet() PURE_VIRTUAL;
2415
2428 virtual void SyncInterruptHostProcessFlagSet(bool hostProcessFlag) PURE_VIRTUAL;
2429
2440 virtual bool SyncInterruptHostProcessStatusBitGet() PURE_VIRTUAL;
2441
2451 virtual void SyncInterruptHostProcessStatusClear() PURE_VIRTUAL;
2452
2478
2479 virtual void ServiceThreadEnableSet(bool enable) PURE_VIRTUAL;
2481
2486
2487
2488
2507 virtual int32_t RecorderCountGet() PURE_VIRTUAL;
2508
2526 virtual void RecorderCountSet(int32_t recorderCount) PURE_VIRTUAL;
2527
2544 virtual void RecorderPeriodSet(uint32_t samples) PURE_VIRTUAL;
2545
2547 virtual void RecorderPeriodSet(int32_t recorderNumber, uint32_t samples) PURE_VIRTUAL;
2548
2565 virtual void RecorderCircularBufferSet(bool enable) PURE_VIRTUAL;
2566
2568 virtual void RecorderCircularBufferSet(int32_t recorderNumber, bool enable) PURE_VIRTUAL;
2569
2585 virtual void RecorderDataCountSet(int32_t count) PURE_VIRTUAL;
2586
2588 virtual void RecorderDataCountSet(int32_t recorderNumber,int32_t count) PURE_VIRTUAL;
2589
2606 virtual void RecorderDataAddressSet(int32_t index, uint64_t address) PURE_VIRTUAL;
2607
2609 virtual void RecorderDataAddressSet(int32_t recorderNumber,int32_t index, uint64_t address) PURE_VIRTUAL;
2610
2611
2617 virtual void RecorderDataAddressesSet(int32_t recorderNumber, const uint64_t* const addresses, int32_t addressCount) PURE_VIRTUAL;
2618
2632
2638 virtual void RecorderConfigureToTriggerOnMotion(Axis *axis, bool triggerOnMotion) PURE_VIRTUAL;
2639
2646 virtual void RecorderConfigureToTriggerOnMotion(int32_t recorderNumber, Axis *axis, bool triggerOnMotion) PURE_VIRTUAL;
2647
2653 virtual void RecorderConfigureToTriggerOnMotion(MultiAxis *multiAxis, bool triggerOnMotion) PURE_VIRTUAL;
2654
2661 virtual void RecorderConfigureToTriggerOnMotion(int32_t recorderNumber, MultiAxis *multiAxis, bool triggerOnMotion) PURE_VIRTUAL;
2662
2669 virtual void RecorderConfigureToTriggerOnMotion(int32_t recorderNumber, int32_t motionNumber, bool triggerOnMotion) PURE_VIRTUAL;
2670
2679 virtual bool RecorderTriggerOnMotionGet(int32_t recorderNumber) PURE_VIRTUAL;
2680
2696 virtual bool RecorderEnabledGet() PURE_VIRTUAL;
2697
2699 virtual bool RecorderEnabledGet(int32_t recorderNumber ) PURE_VIRTUAL;
2700
2717 virtual int32_t RecorderRecordCountGet() PURE_VIRTUAL;
2718
2720 virtual int32_t RecorderRecordCountGet(int32_t recorderNumber ) PURE_VIRTUAL;
2721
2735 virtual int32_t RecorderRecordMaxCountGet() PURE_VIRTUAL;
2736
2738 virtual int32_t RecorderRecordMaxCountGet(int32_t recorderNumber) PURE_VIRTUAL;
2739
2754 virtual void RecorderStart() PURE_VIRTUAL;
2755
2757 virtual void RecorderStart(int32_t recorderNumber) PURE_VIRTUAL;
2758
2775 virtual void RecorderStop() PURE_VIRTUAL;
2776
2778 virtual void RecorderStop(int32_t recorderNumber) PURE_VIRTUAL;
2779
2780
2781
2797 virtual const int32_t* const RecorderRecordDataGet() PURE_VIRTUAL;
2798
2800 virtual const int32_t* const RecorderRecordDataGet(int32_t recorderNumber) PURE_VIRTUAL;
2801
2816 virtual void RecorderRecordDataRetrieve() PURE_VIRTUAL;
2817
2837 virtual int32_t RecorderRecordDataRetrieveBulk(int32_t recorderNumber, int32_t recordCount) PURE_VIRTUAL;
2838
2840 virtual void RecorderRecordDataRetrieve(int32_t recorderNumber) PURE_VIRTUAL;
2841
2858 virtual int32_t RecorderRecordDataValueGet(int32_t index) PURE_VIRTUAL;
2859
2861 virtual int32_t RecorderRecordDataValueGet(int32_t recorderNumber, int32_t index) PURE_VIRTUAL;
2862
2881 virtual int32_t RecorderRecordDataValueGet(int32_t recorderNumber, int32_t recordIndex, int32_t dataIndex) PURE_VIRTUAL;
2882
2884 virtual double RecorderRecordDataDoubleGet(int32_t index) PURE_VIRTUAL;
2885
2887 virtual double RecorderRecordDataDoubleGet(int32_t recorderNumber, int32_t index) PURE_VIRTUAL;
2888
2907 virtual double RecorderRecordDataDoubleGet(int32_t recorderNumber, int32_t recordIndex, int32_t dataIndex) PURE_VIRTUAL;
2908
2926 virtual void RecorderBufferHighCountSet(int32_t bufferHighCount) PURE_VIRTUAL;
2927
2929 virtual void RecorderBufferHighCountSet(int32_t recorderNumber, int32_t bufferHighCount) PURE_VIRTUAL;
2930
2945 virtual void RecorderReset() PURE_VIRTUAL;
2946
2948 virtual void RecorderReset(int32_t recorderNumber) PURE_VIRTUAL;
2949
2961 virtual int32_t RecorderBufferSizeGet(int32_t recorderNumber) PURE_VIRTUAL;
2962
2979 virtual void RecorderBufferSizeSet(int32_t recorderNumber, int32_t bufferSize) PURE_VIRTUAL;
2981
2986
2987
2988
2989
3014 virtual int32_t CompensatorCountGet() PURE_VIRTUAL;
3015
3035 virtual void CompensatorCountSet(int32_t compensatorCount) PURE_VIRTUAL;
3036
3047 virtual int32_t CompensatorPointCountGet(int32_t compensatorNumber) PURE_VIRTUAL;
3048
3068 virtual void CompensatorPointCountSet(int32_t compensatorNumber, int32_t pointCount) PURE_VIRTUAL;
3069
3083 virtual int32_t CompensatorDimensionGet(int32_t compensatorNumber) PURE_VIRTUAL;
3084
3110 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;
3111
3141 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;
3142
3163 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;
3164
3185 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;
3186
3198 virtual void CompensatorTableSet(int32_t compensatorNumber, const double* const table) PURE_VIRTUAL;
3199
3211 virtual void CompensatorTableGet(int32_t compensatorNumber, double* table) PURE_VIRTUAL;
3212
3232 virtual double CompensatorPositionGet(int32_t compensatorNumber) PURE_VIRTUAL;
3233
3234
3235
3236
3237
3238
3250
3251 virtual void CompensatorTableClear(int32_t compensatorNumber) PURE_VIRTUAL;
3252
3261 virtual void CompensatorDisable(int32_t compensatorNumber) PURE_VIRTUAL;
3262
3267 virtual void CompensatorDisable(int32_t compensatorNumber, bool force) PURE_VIRTUAL;
3268
3275 virtual void CompensatorEnable(int32_t compensatorNumber) PURE_VIRTUAL;
3276
3278
3283
3303 virtual int32_t UserLimitCountGet() PURE_VIRTUAL;
3304
3324 virtual void UserLimitCountSet(int32_t userLimitCount) PURE_VIRTUAL;
3325
3345 virtual void UserLimitConfigSet(int32_t number, RSIUserLimitTriggerType triggerType, RSIAction action, int32_t actionAxis, double duration, bool singleShot) PURE_VIRTUAL;
3346
3349 virtual void UserLimitConfigSet(int32_t number, RSIUserLimitTriggerType triggerType, RSIAction action, int32_t actionAxis, double duration) PURE_VIRTUAL;
3350
3352 virtual RSIUserLimitTriggerType UserLimitTriggerTypeGet(int32_t number) PURE_VIRTUAL;
3353
3355 virtual RSIAction UserLimitActionGet(int32_t number) PURE_VIRTUAL;
3356
3358 virtual int32_t UserLimitAxisNumberGet(int32_t number) PURE_VIRTUAL;
3359
3361 virtual double UserLimitDurationGet(int32_t number) PURE_VIRTUAL;
3362
3364 virtual bool UserLimitSingleShotGet(int32_t number) PURE_VIRTUAL;
3365
3390 virtual void UserLimitConditionSet(int32_t number, int32_t conditionNumber, RSIUserLimitLogic logic, uint64_t addressOfUInt32, uint32_t userLimitMask, uint32_t limitValueUInt32) PURE_VIRTUAL;
3391
3413 virtual void UserLimitConditionSet(int32_t number, int32_t conditionNumber, RSIUserLimitLogic logic, uint64_t addressOfDouble, double limitValueDouble) PURE_VIRTUAL;
3414
3416 virtual RSIDataType UserLimitConditionDataTypeGet(int32_t number, int32_t conditionNumber) PURE_VIRTUAL;
3417
3419 virtual RSIUserLimitLogic UserLimitConditionLogicGet(int32_t number, int32_t conditionNumber) PURE_VIRTUAL;
3420
3422 virtual uint64_t UserLimitConditionAddressGet(int32_t number, int32_t conditionNumber) PURE_VIRTUAL;
3423
3425 virtual uint32_t UserLimitConditionMaskGet(int32_t number, int32_t conditionNumber) PURE_VIRTUAL;
3426
3428 virtual int32_t UserLimitConditionLimitValueGet(int32_t number, int32_t conditionNumber) PURE_VIRTUAL;
3429
3431 virtual double UserLimitConditionLimitValueDoubleGet(int32_t number, int32_t conditionNumber) PURE_VIRTUAL;
3432
3459 virtual void UserLimitOutputSet(int32_t number, uint32_t andMask, uint32_t orMask, uint64_t outputPtr, bool enabled) PURE_VIRTUAL;
3460
3463 virtual void UserLimitOutputSet(int32_t number, int32_t valueSet, uint64_t outputPtr, bool enabled) PURE_VIRTUAL;
3464
3467 virtual void UserLimitOutputSet(int32_t number, uint64_t andMask, uint64_t orMask, uint64_t outputPtr, bool enabled) PURE_VIRTUAL;
3468
3471 virtual void UserLimitOutputSet(int32_t number, double limitValueDouble, uint64_t outputPtr, bool enabled) PURE_VIRTUAL;
3472
3488 virtual void UserLimitOutputSet(int32_t number, RSIDataType dataType, uint64_t inputPtr, uint64_t outputPtr, bool enabled) PURE_VIRTUAL;
3489
3491 virtual bool UserLimitOutputEnableGet(int32_t number) PURE_VIRTUAL;
3492
3494 virtual RSIDataType UserLimitOutputDataTypeGet(int32_t number) PURE_VIRTUAL;
3495
3497 virtual uint64_t UserLimitOutputAddressGet(int32_t number) PURE_VIRTUAL;
3498
3500 virtual uint64_t UserLimitOutputInputAddressGet(int32_t number) PURE_VIRTUAL;
3501
3503 virtual uint32_t UserLimitOutputAndMaskGet(int32_t number) PURE_VIRTUAL;
3504
3506 virtual uint32_t UserLimitOutputOrMaskGet(int32_t number) PURE_VIRTUAL;
3507
3509 virtual int32_t UserLimitOutputValueGet(int32_t number) PURE_VIRTUAL;
3510
3512 virtual uint64_t UserLimitOutputAndMask64Get(int32_t number) PURE_VIRTUAL;
3513
3515 virtual uint64_t UserLimitOutputOrMask64Get(int32_t number) PURE_VIRTUAL;
3516
3517
3519 virtual double UserLimitOutputDoubleGet(int32_t number) PURE_VIRTUAL;
3520
3541 virtual bool UserLimitStateGet(int32_t number) PURE_VIRTUAL;
3542
3563 virtual bool UserLimitEnableGet(int32_t number) PURE_VIRTUAL;
3564
3566 virtual void UserLimitEnableSet(int32_t number, bool enable) PURE_VIRTUAL;
3567
3582 virtual void UserLimitDisable(int32_t number) PURE_VIRTUAL;
3583
3595 virtual void UserLimitReset(int32_t number) PURE_VIRTUAL;
3596
3605
3606 virtual int32_t UserLimitCountMax() PURE_VIRTUAL;
3607
3625 virtual void UserLimitInterruptUserDataAddressSet(int32_t number, uint32_t userDataIndex, uint64_t address) PURE_VIRTUAL;
3626
3628 virtual uint64_t UserLimitInterruptUserDataAddressGet(int32_t number, uint32_t userDataIndex) PURE_VIRTUAL;
3630
3631
3636
3646 virtual int32_t MathBlockCountGet() PURE_VIRTUAL;
3647
3658 virtual void MathBlockCountSet(int32_t mathBlockCount) PURE_VIRTUAL;
3659
3678
3680 virtual MathBlockConfig MathBlockConfigGet(int32_t mathBlockNumber) PURE_VIRTUAL;
3681
3683 virtual void MathBlockConfigSet(int32_t mathBlockNumber, MathBlockConfig& config) PURE_VIRTUAL;
3684
3686 virtual FirmwareValue MathBlockProcessValueGet(int32_t mathBlockNumber) PURE_VIRTUAL;
3687
3689
3690
3695
3698
3700};
3701
3705class RSI_API RapidCodeNetworkNode : public virtual RapidCodeObject {
3706public:
3707
3712
3714 static inline constexpr uint32_t SDOTimeoutMillisecondsDefault = 100;
3715
3717
3718
3723
3725 virtual bool Exists() PURE_VIRTUAL;
3726
3728 virtual RSINodeType TypeGet() PURE_VIRTUAL;
3729
3731 virtual bool IsEtherCAT() PURE_VIRTUAL;
3732
3734 virtual bool IsSynqNet() PURE_VIRTUAL;
3735
3737
3742
3744 virtual bool HasIO() PURE_VIRTUAL;
3745
3747 virtual bool DigitalInGet(int32_t digitalInNumber) PURE_VIRTUAL;
3748
3750 virtual bool DigitalOutGet(int32_t digitalOutNumber) PURE_VIRTUAL;
3751
3753 virtual void DigitalOutSet(int32_t digitalOutNumber, bool state) PURE_VIRTUAL;
3754
3756 virtual int32_t AnalogInGet(int32_t analogChannel) PURE_VIRTUAL;
3757
3759 virtual int32_t AnalogOutGet(int32_t analogChannel) PURE_VIRTUAL;
3760
3762 virtual void AnalogOutSet(int32_t analogChannel, int32_t analogValue) PURE_VIRTUAL;
3763
3765
3769
3771 virtual int32_t DigitalInCountGet() PURE_VIRTUAL;
3772
3774 virtual int32_t DigitalOutCountGet() PURE_VIRTUAL;
3775
3777 virtual int32_t AnalogInCountGet() PURE_VIRTUAL;
3778
3780 virtual int32_t AnalogOutCountGet() PURE_VIRTUAL;
3781
3782
3784 virtual int32_t SegmentCountGet() PURE_VIRTUAL;
3785
3787 virtual int32_t SegmentDigitalInCountGet(int32_t segmentNumber) PURE_VIRTUAL;
3788
3790 virtual int32_t SegmentDigitalOutCountGet(int32_t segmentNumber) PURE_VIRTUAL;
3791
3793 virtual int32_t SegmentAnalogInCountGet(int32_t segmentNumber) PURE_VIRTUAL;
3794
3796 virtual int32_t SegmentAnalogOutCountGet(int32_t segmentNumber) PURE_VIRTUAL;
3797
3799 virtual int32_t SegmentIDGet(int32_t segmentNumber) PURE_VIRTUAL;
3800
3813 virtual uint64_t DigitalInAddressGet(int32_t bitNumber) PURE_VIRTUAL;
3814
3827 virtual int32_t DigitalInMaskGet(int32_t bitNumber) PURE_VIRTUAL;
3828
3841 virtual uint64_t DigitalOutAddressGet(int32_t bitNumber) PURE_VIRTUAL;
3842
3855 virtual int32_t DigitalOutMaskGet(int32_t bitNumber) PURE_VIRTUAL;
3856
3868 virtual uint64_t AnalogInAddressGet(int32_t channel) PURE_VIRTUAL;
3869
3881 virtual int32_t AnalogInMaskGet(int32_t channel) PURE_VIRTUAL;
3882
3894 virtual uint64_t AnalogOutAddressGet(int32_t channel) PURE_VIRTUAL;
3895
3907 virtual int32_t AnalogOutMaskGet(int32_t channel) PURE_VIRTUAL;
3908
3920 virtual int32_t ServiceChannelRead(int32_t index, int32_t subIndex, int32_t byteCount) PURE_VIRTUAL;
3921
3925 virtual int32_t ServiceChannelRead(int32_t index, int32_t subIndex, int32_t byteCount, uint32_t timeoutMilliseconds) PURE_VIRTUAL;
3926
3939 virtual const char* const ServiceChannelReadString(int32_t index, int32_t subIndex, int32_t byteCount) PURE_VIRTUAL;
3940
3944 virtual const char* const ServiceChannelReadString(int32_t index, int32_t subIndex, int32_t byteCount, uint32_t timeoutMilliseconds) PURE_VIRTUAL;
3945
3961 virtual void ServiceChannelWrite(int32_t index, int32_t subIndex, int32_t byteCount, int32_t sdoValue) PURE_VIRTUAL;
3962
3963
3968 virtual void ServiceChannelWrite(int32_t index, int32_t subIndex, int32_t byteCount, int32_t sdoValue, uint32_t timeoutMilliseconds) PURE_VIRTUAL;
3969
3982 virtual void ServiceChannelWrite(int32_t index, int32_t subIndex, int32_t byteCount, const char* const stringValue) PURE_VIRTUAL;
3983
3991 virtual void ServiceChannelWrite(int32_t index, int32_t subIndex, int32_t byteCount, const char* const stringValue, uint32_t timeoutMilliseconds) PURE_VIRTUAL;
3992
3998 virtual char* AKDASCIICommand(const char* const command) PURE_VIRTUAL;
3999
4001 virtual void ClearFaults(int32_t axisNumber) PURE_VIRTUAL;
4002
4004 virtual uint32_t VendorIdGet() PURE_VIRTUAL;
4005
4018 virtual const char* const NameGet() PURE_VIRTUAL;
4019
4032 virtual const char* const ProductNameGet() PURE_VIRTUAL;
4033
4046 virtual const char* const VendorNameGet() PURE_VIRTUAL;
4047
4049 virtual uint32_t ProductCodeGet() PURE_VIRTUAL;
4050
4052 virtual uint32_t RevisionGet() PURE_VIRTUAL;
4053
4055 virtual uint32_t StationAliasGet() PURE_VIRTUAL;
4056
4058 virtual const char* const SerialNumberGet() PURE_VIRTUAL;
4059
4061 virtual uint32_t AxisCountGet() PURE_VIRTUAL;
4062
4064 virtual uint16_t StatusWordGet(int32_t axisIndex) PURE_VIRTUAL;
4065};
4066
4068
4071class RSI_API RapidCodeMotion : public virtual RapidCodeInterrupt{
4072public:
4073
4079
4082
4084
4085
4089
4107 virtual int32_t NumberGet() PURE_VIRTUAL;
4108
4125 virtual int32_t AxisCountGet() PURE_VIRTUAL;
4126
4130
4155 virtual void TriggeredModify() PURE_VIRTUAL;
4156
4183 virtual void Stop() PURE_VIRTUAL;
4184
4209 virtual void Resume() PURE_VIRTUAL;
4210
4235 virtual void EStop() PURE_VIRTUAL;
4236
4257 virtual void EStopAbort() PURE_VIRTUAL;
4258
4275 virtual void EStopModify() PURE_VIRTUAL;
4276
4279 virtual void EStopModifyAbort() PURE_VIRTUAL;
4280
4302 virtual void Abort() PURE_VIRTUAL;
4303
4330 virtual void ClearFaults() PURE_VIRTUAL;
4331
4358 virtual void AmpEnableSet(bool enable) PURE_VIRTUAL;
4359
4389 virtual int32_t AmpEnableSet(bool enable, int32_t ampActiveTimeoutMilliseconds) PURE_VIRTUAL;
4390
4410
4411 virtual void Map() PURE_VIRTUAL;
4412
4430 virtual void Unmap() PURE_VIRTUAL;
4431
4436 virtual bool IsMapped() PURE_VIRTUAL;
4437
4454 virtual void FeedRateSet(double rate) PURE_VIRTUAL;
4455
4474 virtual double FeedRateGet() PURE_VIRTUAL;
4475
4479
4480
4481
4482
4502 virtual RSIState StateGet() PURE_VIRTUAL;
4503
4515
4536 virtual RSISource SourceGet() PURE_VIRTUAL;
4537
4567 virtual const char* const SourceNameGet(RSISource source) PURE_VIRTUAL;
4568
4591 virtual int32_t MotionDoneWait() PURE_VIRTUAL;
4592
4619 virtual int32_t MotionDoneWait(int32_t waitTimeoutMilliseconds) PURE_VIRTUAL;
4620
4641 virtual bool MotionDoneGet() PURE_VIRTUAL;
4642
4665 virtual bool StatusBitGet(RSIEventType bitMask) PURE_VIRTUAL;
4666
4681 virtual uint64_t StatusBitsGet() PURE_VIRTUAL;
4682
4686
4715 virtual void InterruptEnableSet(bool enable) PURE_VIRTUAL;
4716
4730 virtual void InterruptWake() PURE_VIRTUAL;
4731
4735
4751 virtual double StopTimeGet() PURE_VIRTUAL;
4752
4768 virtual void StopTimeSet(double seconds) PURE_VIRTUAL;
4769
4785 virtual double EStopTimeGet() PURE_VIRTUAL;
4786
4802 virtual void EStopTimeSet(double seconds) PURE_VIRTUAL;
4803
4820 virtual double MotionDelayGet() PURE_VIRTUAL;
4821
4842 virtual void MotionDelaySet(double seconds) PURE_VIRTUAL;
4843
4864 virtual uint16_t MotionIdGet() PURE_VIRTUAL;
4865
4883 virtual void MotionIdSet(uint16_t id) PURE_VIRTUAL;
4884
4886 virtual uint16_t MotionIdExecutingGet() PURE_VIRTUAL;
4887
4889 virtual uint16_t MotionElementIdExecutingGet() PURE_VIRTUAL;
4890
4905 virtual double MotionFinalVelocityGet() PURE_VIRTUAL;
4906
4914 virtual void MotionFinalVelocitySet(double finalVelocity) PURE_VIRTUAL;
4915
4935 virtual RSIMotionHoldType MotionHoldTypeGet() PURE_VIRTUAL;
4936
4969 virtual void MotionHoldTypeSet(RSIMotionHoldType type) PURE_VIRTUAL;
4970
4982 virtual int32_t MotionHoldGateNumberGet() PURE_VIRTUAL;
4983
5002
5003 virtual void MotionHoldGateNumberSet(int32_t gateNumber) PURE_VIRTUAL;
5004
5021 virtual double MotionHoldTimeoutGet() PURE_VIRTUAL;
5022
5041 virtual void MotionHoldTimeoutSet(double seconds) PURE_VIRTUAL;
5042
5066 virtual bool MotionHoldGateGet() PURE_VIRTUAL;
5067
5090 virtual void MotionHoldGateSet(bool hold) PURE_VIRTUAL;
5091
5108 virtual int32_t MotionHoldAxisNumberGet() PURE_VIRTUAL;
5109
5126 virtual void MotionHoldAxisNumberSet(int32_t number) PURE_VIRTUAL;
5127
5144
5145 virtual double MotionHoldAxisPositionGet() PURE_VIRTUAL;
5146
5163 virtual void MotionHoldAxisPositionSet(double position) PURE_VIRTUAL;
5164
5166 virtual RSIUserLimitLogic MotionHoldAxisLogicGet() PURE_VIRTUAL;
5167
5169 virtual void MotionHoldAxisLogicSet(RSIUserLimitLogic logic) PURE_VIRTUAL;
5170
5187 virtual uint64_t MotionHoldUserAddressGet() PURE_VIRTUAL;
5188
5205 virtual void MotionHoldUserAddressSet(uint64_t address) PURE_VIRTUAL;
5206
5222 virtual int32_t MotionHoldUserMaskGet() PURE_VIRTUAL;
5223
5239 virtual void MotionHoldUserMaskSet(int32_t holdMask) PURE_VIRTUAL;
5240
5256 virtual int32_t MotionHoldUserPatternGet() PURE_VIRTUAL;
5257
5273 virtual void MotionHoldUserPatternSet(int32_t pattern) PURE_VIRTUAL;
5274
5276 virtual void MotionAttributeMaskDefaultSet() PURE_VIRTUAL;
5277
5302
5303 virtual bool MotionAttributeMaskOnGet(RSIMotionAttrMask maskOn) PURE_VIRTUAL;
5304
5323 virtual void MotionAttributeMaskOnSet(RSIMotionAttrMask maskOn) PURE_VIRTUAL;
5324
5341
5342 virtual void MotionAttributeMaskOffSet(RSIMotionAttrMask maskOff) PURE_VIRTUAL;
5343
5347
5348
5349
5385 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;
5386
5424 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;
5425
5455 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;
5456
5461 virtual void StreamingOutputAdd(int32_t onMask, int32_t offMask, uint64_t address) PURE_VIRTUAL;
5462
5484 virtual void StreamingOutputAdd(int32_t onMask, int32_t offMask, uint64_t address, int32_t ptPointIndex) PURE_VIRTUAL;
5485
5490 virtual void StreamingOutputAdd(RapidCode::IOPoint* point, bool on) PURE_VIRTUAL;
5491
5510 virtual void StreamingOutputAdd(RapidCode::IOPoint* point, bool on, int32_t ptPointIndex) PURE_VIRTUAL;
5511
5527 virtual void StreamingOutputsClear() PURE_VIRTUAL;
5528
5548 virtual void StreamingOutputsEnableSet(bool enable) PURE_VIRTUAL;
5549};
5550
5551
5556class RSI_API Axis : public virtual RapidCodeMotion{
5557public:
5558
5559 friend class MotionController;
5560 friend class MultiAxis;
5561
5562
5567
5569 static inline constexpr uint32_t NetworkIndexInvalid = 65535;
5570
5572 static inline constexpr double AmpEnableAmpFaultTimeoutSecondsDefault = 1.0;
5573
5575
5576
5581
5586 RapidCodeNetworkNode* NetworkNode;
5587
5588
5590
5595
5633 virtual void MoveTrapezoidal(double position, double vel, double accel, double decel) PURE_VIRTUAL;
5634
5656 virtual void MoveTrapezoidal(double position, double vel, double accel, double decel, double finalVel) PURE_VIRTUAL;
5657
5680 virtual void MoveTrapezoidal(double position) PURE_VIRTUAL; // use defaults Overload
5681 //virtual void MoveTrapezoidal(double position, double vel, double accel, double decel, double finalVel, bool checkLimits) PURE_VIRTUAL;
5682
5721 virtual void MoveSCurve(double position, double vel, double accel, double decel, double jerkPct) PURE_VIRTUAL;
5722
5727 virtual void MoveSCurve(double position) PURE_VIRTUAL;
5728
5738 virtual void MoveSCurve(double position, double vel, double accel, double decel, double jerkPct, double finalVel) PURE_VIRTUAL;
5739
5743 virtual void MoveVelocity(double velocity) PURE_VIRTUAL;
5744
5779 virtual void MoveVelocity(double velocity, double accel) PURE_VIRTUAL;
5780
5817 virtual void MoveVelocitySCurve(double velocity, double accel, double jerkPct) PURE_VIRTUAL;
5818
5857 virtual void MoveRelative(double relativePosition, double vel, double accel, double decel, double jerkPct) PURE_VIRTUAL;
5858
5862 virtual void MoveRelative(double releativePosition) PURE_VIRTUAL;
5863
5867 virtual void MoveRelative(double relativePosition, double vel, double accel, double decel, double jerkPct, double finalVel) PURE_VIRTUAL;
5869
5874
5899 virtual void PositionSet(double position) PURE_VIRTUAL;
5900
5919 virtual double ActualPositionGet() PURE_VIRTUAL;
5920
5942 virtual void ActualPositionSet(double position) PURE_VIRTUAL;
5943
5960 virtual double CompensationPositionGet() PURE_VIRTUAL;
5961
5974 virtual void CompensationPositionSet(double position) PURE_VIRTUAL;
5975
5987 virtual double TargetPositionGet() PURE_VIRTUAL;
5988
6008 virtual double CommandPositionGet() PURE_VIRTUAL;
6009
6041 virtual void CommandPositionSet(double position) PURE_VIRTUAL;
6042
6066 virtual void CommandPositionDirectSet(double position) PURE_VIRTUAL;
6067
6084 virtual double OriginPositionGet() PURE_VIRTUAL;
6085
6108 virtual void OriginPositionSet(double position) PURE_VIRTUAL;
6109
6130 virtual double PositionErrorGet() PURE_VIRTUAL;
6131
6153 virtual double CommandVelocityGet() PURE_VIRTUAL;
6154
6177 virtual double ActualVelocityGet() PURE_VIRTUAL;
6178
6199 virtual double CommandAccelGet() PURE_VIRTUAL;
6200
6202 virtual double CommandJerkGet() PURE_VIRTUAL;
6203
6224 virtual double EncoderPositionGet(RSIMotorFeedback encoder) PURE_VIRTUAL;
6225
6247 virtual double UserUnitsGet() PURE_VIRTUAL;
6248
6271 virtual void UserUnitsSet(double countsPerUserUnit) PURE_VIRTUAL;
6272
6274 virtual double UserUnitsToCounts(double userUnits) PURE_VIRTUAL;
6275
6277 virtual double CountsToUserUnits(double counts) PURE_VIRTUAL;
6278
6298 virtual int32_t FramesToExecuteGet() PURE_VIRTUAL;
6300
6305
6326
6327 virtual void Home() PURE_VIRTUAL; // this one moves to zero by default
6328
6332 virtual void Home(bool moveToZero) PURE_VIRTUAL;
6333
6352
6353 virtual RSIHomeMethod HomeMethodGet() PURE_VIRTUAL;
6354
6373
6374 virtual void HomeMethodSet(RSIHomeMethod method) PURE_VIRTUAL;
6375
6396
6397 virtual double HomeOffsetGet() PURE_VIRTUAL;
6398
6417
6418 virtual void HomeOffsetSet(double offset) PURE_VIRTUAL;
6419
6437
6438 virtual double HomeVelocityGet() PURE_VIRTUAL;
6439
6442 virtual double HomeVelocityGet(RSIHomeStage homeStage) PURE_VIRTUAL;
6443
6464 virtual void HomeVelocitySet(double velocity) PURE_VIRTUAL;
6465
6470 virtual void HomeVelocitySet(RSIHomeStage homeStage, double velocity) PURE_VIRTUAL;
6471
6487 virtual double HomeSlowVelocityGet() PURE_VIRTUAL;
6488
6504 virtual void HomeSlowVelocitySet(double velocity) PURE_VIRTUAL;
6505
6523
6524 virtual double HomeAccelerationGet() PURE_VIRTUAL;
6525
6528 virtual double HomeAccelerationGet(RSIHomeStage homeStage) PURE_VIRTUAL;
6529
6549
6550 virtual void HomeAccelerationSet(double accel) PURE_VIRTUAL;
6551
6555 virtual void HomeAccelerationSet(RSIHomeStage homeStage, double accel) PURE_VIRTUAL;
6556
6573
6574 virtual double HomeDecelerationGet() PURE_VIRTUAL;
6575
6578 virtual double HomeDecelerationGet(RSIHomeStage homeStage) PURE_VIRTUAL;
6579
6598
6599 virtual void HomeDecelerationSet(double decel) PURE_VIRTUAL;
6600
6604 virtual void HomeDecelerationSet(RSIHomeStage homeStage, double decel) PURE_VIRTUAL;
6605
6623
6624 virtual double HomeJerkPercentGet() PURE_VIRTUAL;
6625
6628 virtual double HomeJerkPercentGet(RSIHomeStage homeStage) PURE_VIRTUAL;
6629
6649 virtual void HomeJerkPercentSet(double percent) PURE_VIRTUAL;
6650
6655 virtual void HomeJerkPercentSet(RSIHomeStage homeStage, double percent) PURE_VIRTUAL;
6656
6676 virtual void HomeCancelSet(bool cancel) PURE_VIRTUAL;
6677
6696 virtual bool HomeStateGet() PURE_VIRTUAL;
6697
6710 virtual void HomeStateSet(bool homed) PURE_VIRTUAL;
6711
6716 virtual void HomeLimitCustomConfigSet(uint64_t address, int32_t bitIndex) PURE_VIRTUAL;
6717
6719 virtual void HomeLimitCustomConfigReset() PURE_VIRTUAL;
6720
6722 virtual uint64_t HomeLimitCustomConfigAddressGet() PURE_VIRTUAL;
6723
6726 virtual int32_t HomeLimitCustomConfigBitIndexGet() PURE_VIRTUAL;
6727
6749
6750 virtual void HomeTravelDistanceSet(RSIHomeStage stage, double distanceToTravel) PURE_VIRTUAL;
6751
6771 virtual RSIHomeStage HomeStageGet() PURE_VIRTUAL;
6772
6786 virtual void HomeBehaviorSet(RSIAction behavior) PURE_VIRTUAL;
6787
6799 virtual RSIAction HomeBehaviorGet() PURE_VIRTUAL;
6801
6807
6809 virtual bool FaultMaskBitGet(RSIMotorFaultMask bitMask) PURE_VIRTUAL;
6810
6812 virtual uint16_t StatusWordGet() PURE_VIRTUAL;
6814
6819 // reads active configuration to report state
6820
6844
6845 virtual bool NegativeLimitGet() PURE_VIRTUAL;
6846
6870 virtual bool PositiveLimitGet() PURE_VIRTUAL;
6871
6900 virtual bool HomeLimitGet() PURE_VIRTUAL;
6901
6929 virtual bool HomeSwitchGet() PURE_VIRTUAL;
6930
6951 virtual bool AmpFaultGet() PURE_VIRTUAL;
6952
6976 virtual bool AmpEnableGet() PURE_VIRTUAL;
6977
7002 virtual bool DedicatedInExists(RSIMotorDedicatedIn motorDedicatedInNumber) PURE_VIRTUAL;
7003
7028 virtual bool DedicatedOutExists(RSIMotorDedicatedOut motorDedicatedOutNumber) PURE_VIRTUAL;
7029
7052 virtual bool DedicatedInGet(RSIMotorDedicatedIn motorDedicatedInNumber) PURE_VIRTUAL;
7053
7076 virtual bool DedicatedOutGet(RSIMotorDedicatedOut motorDedicatedOutNumber) PURE_VIRTUAL;
7078
7083
7104 virtual bool DigitalInGet(RSIMotorGeneralIo motorGeneralIoNumber) PURE_VIRTUAL;
7105
7126 virtual bool DigitalOutGet(RSIMotorGeneralIo motorGeneralIoNumber) PURE_VIRTUAL;
7127
7148
7149 virtual void DigitalOutSet(RSIMotorGeneralIo motorGeneralIoNumber, bool outValue) PURE_VIRTUAL;
7150
7169 virtual bool DigitalIoExists(RSIMotorGeneralIo motorGeneralIoNumber) PURE_VIRTUAL;
7170
7189 virtual const char* const DigitalIoNameGet(RSIMotorGeneralIo motorGeneralIoNumber) PURE_VIRTUAL;
7190
7213 virtual RSIMotorIoTypeMask DigitalIoValidTypesMaskGet(RSIMotorGeneralIo motorGeneralIoNumber) PURE_VIRTUAL;
7214
7233 virtual void DigitalIoTypeSet(RSIMotorGeneralIo motorGeneralIoNumber, RSIMotorIoType type) PURE_VIRTUAL;
7234
7251 virtual double AnalogInGet(int32_t channel) PURE_VIRTUAL;
7253
7258
7272 virtual double EStopDecelerationGet() PURE_VIRTUAL;
7273
7288 virtual void EStopDecelerationSet(double decel) PURE_VIRTUAL;
7289
7300 virtual double EStopJerkPercentGet() PURE_VIRTUAL;
7301
7319 virtual void EStopJerkPercentSet(double jerkPct) PURE_VIRTUAL;
7320
7330 virtual double TriggeredModifyDecelerationGet() PURE_VIRTUAL;
7331
7349 virtual void TriggeredModifyDecelerationSet(double decel) PURE_VIRTUAL;
7350
7361 virtual double TriggeredModifyJerkPercentGet() PURE_VIRTUAL;
7362
7380 virtual void TriggeredModifyJerkPercentSet(double jerkPct) PURE_VIRTUAL;
7381
7383 virtual int32_t FrameBufferSizeGet() PURE_VIRTUAL;
7384
7386 virtual void FrameBufferSizeSet(int32_t frameSize) PURE_VIRTUAL;
7387
7407 virtual uint16_t MotionIdExecutingGet() PURE_VIRTUAL;
7408
7429 virtual uint16_t MotionElementIdExecutingGet() PURE_VIRTUAL;
7431
7436
7438 virtual double MotionFinalVelocityGet() PURE_VIRTUAL;
7439
7441 virtual void MotionFinalVelocitySet(double finalVelocity) PURE_VIRTUAL;
7442
7444 virtual double DefaultVelocityGet() PURE_VIRTUAL;
7445
7447 virtual void DefaultVelocitySet(double velocity) PURE_VIRTUAL;
7448
7450 virtual double DefaultAccelerationGet() PURE_VIRTUAL;
7451
7453 virtual void DefaultAccelerationSet(double acceleration) PURE_VIRTUAL;
7454
7456 virtual double DefaultDecelerationGet() PURE_VIRTUAL;
7457
7459 virtual void DefaultDecelerationSet(double deceleration) PURE_VIRTUAL;
7460
7462 virtual double DefaultJerkPercentGet() PURE_VIRTUAL;
7463
7465 virtual void DefaultJerkPercentSet(double jerkPercent) PURE_VIRTUAL;
7466
7468 virtual double DefaultPosition1Get() PURE_VIRTUAL;
7469
7471 virtual void DefaultPosition1Set(double position1) PURE_VIRTUAL;
7472
7474 virtual double DefaultPosition2Get() PURE_VIRTUAL;
7475
7477 virtual void DefaultPosition2Set(double position2) PURE_VIRTUAL;
7478
7480 virtual double DefaultRelativeIncrementGet() PURE_VIRTUAL;
7481
7483 virtual void DefaultRelativeIncrementSet(double relativeIncrement) PURE_VIRTUAL;
7485
7489 // /@{
7490
7513 virtual RSIAction AmpFaultActionGet() PURE_VIRTUAL;
7514
7537 virtual void AmpFaultActionSet(RSIAction action) PURE_VIRTUAL;
7538
7560 virtual bool AmpFaultTriggerStateGet() PURE_VIRTUAL;
7561
7583 virtual void AmpFaultTriggerStateSet(bool state) PURE_VIRTUAL;
7584
7605 virtual double AmpFaultDurationGet() PURE_VIRTUAL;
7606
7627 virtual void AmpFaultDurationSet(double seconds) PURE_VIRTUAL;
7628
7653 virtual RSIAction HomeActionGet() PURE_VIRTUAL;
7654
7678 virtual void HomeActionSet(RSIAction action) PURE_VIRTUAL;
7679
7705 virtual bool HomeTriggerStateGet() PURE_VIRTUAL;
7706
7727 virtual void HomeTriggerStateSet(bool state) PURE_VIRTUAL;
7728
7750 virtual double HomeDurationGet() PURE_VIRTUAL;
7751
7774 virtual void HomeDurationSet(double seconds) PURE_VIRTUAL;
7775
7804 virtual RSIAction ErrorLimitActionGet() PURE_VIRTUAL;
7805
7832 virtual void ErrorLimitActionSet(RSIAction action) PURE_VIRTUAL;
7833
7856 virtual double ErrorLimitTriggerValueGet() PURE_VIRTUAL;
7857
7879 virtual void ErrorLimitTriggerValueSet(double triggerValue) PURE_VIRTUAL;
7880
7902 virtual double ErrorLimitDurationGet() PURE_VIRTUAL;
7903
7926 virtual void ErrorLimitDurationSet(double seconds) PURE_VIRTUAL;
7927
7952 virtual RSIAction HardwareNegLimitActionGet() PURE_VIRTUAL;
7953
7978 virtual void HardwareNegLimitActionSet(RSIAction action) PURE_VIRTUAL;
7979
8003 virtual bool HardwareNegLimitTriggerStateGet() PURE_VIRTUAL;
8004
8028 virtual void HardwareNegLimitTriggerStateSet(bool state) PURE_VIRTUAL;
8029
8052 virtual double HardwareNegLimitDurationGet() PURE_VIRTUAL;
8053
8077 virtual void HardwareNegLimitDurationSet(double seconds) PURE_VIRTUAL;
8078
8103 virtual RSIAction HardwarePosLimitActionGet() PURE_VIRTUAL;
8104
8129 virtual void HardwarePosLimitActionSet(RSIAction action) PURE_VIRTUAL;
8130
8151 virtual bool HardwarePosLimitTriggerStateGet() PURE_VIRTUAL;
8152
8176 virtual void HardwarePosLimitTriggerStateSet(bool state) PURE_VIRTUAL;
8177
8200 virtual double HardwarePosLimitDurationGet() PURE_VIRTUAL;
8201
8224 virtual void HardwarePosLimitDurationSet(double seconds) PURE_VIRTUAL;
8225
8251 virtual RSIAction SoftwareNegLimitActionGet() PURE_VIRTUAL;
8252
8276 virtual void SoftwareNegLimitActionSet(RSIAction action) PURE_VIRTUAL;
8277
8300 virtual double SoftwareNegLimitTriggerValueGet() PURE_VIRTUAL;
8301
8324 virtual void SoftwareNegLimitTriggerValueSet(double triggerValue) PURE_VIRTUAL;
8325
8349 virtual RSIAction SoftwarePosLimitActionGet() PURE_VIRTUAL;
8350
8374 virtual void SoftwarePosLimitActionSet(RSIAction action) PURE_VIRTUAL;
8375
8398 virtual double SoftwarePosLimitTriggerValueGet() PURE_VIRTUAL;
8399
8422 virtual void SoftwarePosLimitTriggerValueSet(double triggerValue) PURE_VIRTUAL;
8423
8449 virtual RSIAction EncoderFaultActionGet() PURE_VIRTUAL;
8450
8475 virtual void EncoderFaultActionSet(RSIAction action) PURE_VIRTUAL;
8476
8500 virtual RSIMotorFeedbackFault EncoderFaultTriggerGet() PURE_VIRTUAL;
8501
8523 virtual void EncoderFaultTriggerSet(RSIMotorFeedbackFault encoder) PURE_VIRTUAL;
8524
8546 virtual double EncoderFaultDurationGet() PURE_VIRTUAL;
8547
8569 virtual void EncoderFaultDurationSet(double seconds) PURE_VIRTUAL;
8570
8572 virtual RSIAction NodeFailureActionGet() PURE_VIRTUAL;
8573
8575 virtual void NodeFailureActionSet(RSIAction action) PURE_VIRTUAL;
8576
8592 virtual uint64_t AddressGet( RSIAxisAddressType addressType) PURE_VIRTUAL;
8593
8607 virtual RSIDataType AddressDataTypeGet(RSIAxisAddressType type) PURE_VIRTUAL;
8608
8609 // common limit methods
8610
8612 virtual RSIAction LimitActionGet(RSIEventType limit) PURE_VIRTUAL;
8613
8615 virtual void LimitActionSet(RSIEventType limit, RSIAction action) PURE_VIRTUAL;
8616
8618 virtual bool LimitTriggerStateGet(RSIEventType limit) PURE_VIRTUAL;
8619
8621 virtual void LimitTriggerStateSet(RSIEventType limit, bool triggerState) PURE_VIRTUAL;
8622
8624 virtual double LimitTriggerValueGet(RSIEventType limit) PURE_VIRTUAL;
8625
8627 virtual void LimitTriggerValueSet(RSIEventType limit, double triggerValue) PURE_VIRTUAL;
8628
8630 virtual double LimitDurationGet(RSIEventType limit) PURE_VIRTUAL;
8631
8633 virtual void LimitDurationSet(RSIEventType limit, double seconds) PURE_VIRTUAL;
8635
8640
8654 virtual double PositionToleranceFineGet() PURE_VIRTUAL;
8655
8669 virtual void PositionToleranceFineSet(double tolerance) PURE_VIRTUAL;
8670
8684 virtual double PositionToleranceCoarseGet() PURE_VIRTUAL;
8685
8702 virtual void PositionToleranceCoarseSet(double tolerance) PURE_VIRTUAL;
8703
8717 virtual double VelocityToleranceGet() PURE_VIRTUAL;
8718
8732 virtual void VelocityToleranceSet(double tolerance) PURE_VIRTUAL;
8733
8748 virtual double SettlingTimeGet() PURE_VIRTUAL;
8749
8764 virtual void SettlingTimeSet(double time) PURE_VIRTUAL;
8765
8782 virtual bool SettleOnStopGet() PURE_VIRTUAL;
8783
8800
8801 virtual void SettleOnStopSet(bool state) PURE_VIRTUAL;
8802
8819 virtual bool SettleOnEStopGet() PURE_VIRTUAL;
8820
8836 virtual void SettleOnEStopSet(bool state) PURE_VIRTUAL;
8837
8854 virtual bool SettleOnEStopCmdEqActGet() PURE_VIRTUAL;
8855
8871 virtual void SettleOnEStopCmdEqActSet(bool state) PURE_VIRTUAL;
8873
8878
8895 virtual RSIMotorType MotorTypeGet() PURE_VIRTUAL;
8896
8912 virtual void MotorTypeSet(RSIMotorType type) PURE_VIRTUAL;
8913
8930 virtual RSIMotorDisableAction AmpDisableActionGet() PURE_VIRTUAL;
8931
8947 virtual void AmpDisableActionSet(RSIMotorDisableAction action) PURE_VIRTUAL;
8948
8966
8967 virtual RSIMotorBrakeMode BrakeModeGet() PURE_VIRTUAL;
8968
8984 virtual void BrakeModeSet(RSIMotorBrakeMode mode) PURE_VIRTUAL;
8985
9001 virtual double BrakeApplyDelayGet() PURE_VIRTUAL;
9002
9003
9020 virtual void BrakeApplyDelaySet(double seconds) PURE_VIRTUAL;
9021
9037 virtual double BrakeReleaseDelayGet() PURE_VIRTUAL;
9038
9056 virtual void BrakeReleaseDelaySet(double seconds) PURE_VIRTUAL;
9057
9059 virtual void ClosedLoopStepperSet(bool enable) PURE_VIRTUAL;
9060
9062 virtual int32_t ClosedLoopStepperVersionGet() PURE_VIRTUAL;
9063
9065 virtual uint64_t EncoderPointerGet(RSIMotorFeedback encoder) PURE_VIRTUAL;
9066
9068 virtual void EncoderPointerSet(RSIMotorFeedback encoder, uint64_t address) PURE_VIRTUAL;
9069
9071 virtual uint64_t FeedbackDeltaPointerGet(RSIAxisPositionInput input) PURE_VIRTUAL;
9072
9073
9075 virtual void FeedbackDeltaPointerSet(RSIAxisPositionInput input, uint64_t address) PURE_VIRTUAL;
9076
9078 virtual uint64_t FeedbackPointerGet(RSIAxisPositionInput input) PURE_VIRTUAL;
9079
9097 virtual void FeedbackPointerSet(RSIAxisPositionInput input, uint64_t address) PURE_VIRTUAL;
9098
9100 virtual int32_t EncoderRatioNumeratorGet(RSIMotorFeedback encoder) PURE_VIRTUAL;
9101
9103 virtual int32_t EncoderRatioDenominatorGet(RSIMotorFeedback encoder) PURE_VIRTUAL;
9104
9126 virtual void EncoderRatioSet(RSIMotorFeedback encoder, int32_t numerator, int32_t denominator) PURE_VIRTUAL;
9127
9129 virtual const char* const EncoderRatioPrimaryGet() PURE_VIRTUAL;
9130
9132 virtual void EncoderRatioPrimarySet(char* numeratorCommaDenominator) PURE_VIRTUAL;
9133
9135 virtual const char* const EncoderRatioSecondaryGet() PURE_VIRTUAL;
9136
9138 virtual void EncoderRatioSecondarySet(char* numeratorCommaDenominator) PURE_VIRTUAL;
9139
9141 virtual int32_t EncoderCountGet() PURE_VIRTUAL;
9142
9145 virtual void EncoderCountSet(int32_t count) PURE_VIRTUAL;
9146
9148 virtual RSIAxisGantryType GantryTypeGet() PURE_VIRTUAL;
9149
9151 virtual void GantryTypeSet(RSIAxisGantryType type) PURE_VIRTUAL;
9152
9166 virtual RSIOperationMode OperationModeGet() PURE_VIRTUAL;
9167
9181 virtual void OperationModeSet(RSIOperationMode mode) PURE_VIRTUAL;
9182
9202 virtual int32_t MotorFaultMaskGet() PURE_VIRTUAL;
9203
9229 virtual void MotorFaultMaskSet(int32_t faultMask) PURE_VIRTUAL;
9231
9236
9258 virtual void GearingEnable(int32_t masterAxisNumber, RSIAxisMasterType masterFeedbackSource, int32_t numerator, int32_t denominator) PURE_VIRTUAL;
9263 virtual void GearingEnable(Axis* masterAxis, RSIAxisMasterType masterFeedbackSource, int32_t numerator, int32_t denominator) PURE_VIRTUAL;
9264
9283 virtual void GearingRatioChange(int32_t numerator, int32_t denominator) PURE_VIRTUAL;
9284
9301 virtual void GearingDisable() PURE_VIRTUAL;
9302
9304 virtual int32_t GearingNumeratorGet() PURE_VIRTUAL;
9305
9307 virtual int32_t GearingDenominatorGet() PURE_VIRTUAL;
9308
9310 virtual bool GearingEnableGet() PURE_VIRTUAL;
9311
9329 virtual int32_t GearingMasterAxisNumberGet() PURE_VIRTUAL;
9330
9343 virtual RSIAxisMasterType GearingSourceGet() PURE_VIRTUAL;
9345
9350
9367 virtual double MotionCamMasterStartGet(Axis* master) PURE_VIRTUAL;
9368
9383 virtual void MotionCamMasterStartSet(Axis* master, double startPosition) PURE_VIRTUAL;
9384
9401 virtual int32_t MotionCamRepeatFromGet() PURE_VIRTUAL;
9402
9420 virtual void MotionCamRepeatFromSet(int32_t repeatFrom) PURE_VIRTUAL;
9421
9439 virtual void MotionCamRepeatStop() PURE_VIRTUAL;
9440
9463 virtual void MoveCamLinear(int32_t masterAxisNumber, RSIAxisMasterType masterFeedbackSource, const double* const masterDistances, const double* const slavePositions, int32_t pointCount) PURE_VIRTUAL;
9464
9494 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;
9495
9512
9513 virtual int32_t DriveIndexGet() PURE_VIRTUAL;
9515
9520
9533 virtual double BacklashWidthGet() PURE_VIRTUAL;
9534
9547 virtual void BacklashWidthSet(double width) PURE_VIRTUAL;
9548
9561 virtual double BacklashRateGet() PURE_VIRTUAL;
9562
9575 virtual void BacklashRateSet(double rate) PURE_VIRTUAL;
9576
9577
9588 virtual double BacklashValueGet() PURE_VIRTUAL;
9590
9595
9623 virtual RSIFilterAlgorithm FilterAlgorithmGet() PURE_VIRTUAL;
9624
9649 virtual void FilterAlgorithmSet(RSIFilterAlgorithm algorithm) PURE_VIRTUAL;
9650
9676 virtual double FilterCoeffGet(RSIFilterGainPIDCoeff coeff, int32_t gainTable) PURE_VIRTUAL;
9677
9700 virtual void FilterCoeffSet(RSIFilterGainPIDCoeff coeff, int32_t gainTable, double coeffValue) PURE_VIRTUAL;
9701
9704 virtual double FilterCoeffGet(RSIFilterGainPIVCoeff coeff, int32_t gainTable) PURE_VIRTUAL;
9709 virtual void FilterCoeffSet(RSIFilterGainPIVCoeff coeff, int32_t gainTable, double coeffValue) PURE_VIRTUAL;
9710
9745 virtual int32_t FilterGainTableGet() PURE_VIRTUAL;
9746
9775 virtual void FilterGainTableSet(int32_t gainTable) PURE_VIRTUAL;
9776
9793 virtual int32_t FilterGainTableSizeGet() PURE_VIRTUAL;
9794
9796 virtual double FilterOutputGet(void) PURE_VIRTUAL;
9797
9810 virtual double FilterLowPassGet() PURE_VIRTUAL;
9811
9827 virtual void FilterLowPassSet(double frequency) PURE_VIRTUAL;
9828
9847 virtual void FilterDualLoopSet(Axis* velocityAxis, RSIMotorFeedback velocityEncoder, bool enable) PURE_VIRTUAL;
9848
9849
9851 virtual bool FilterGainSchedulingGet() PURE_VIRTUAL;
9852
9853
9855 virtual void FilterGainSchedulingSet(bool enable) PURE_VIRTUAL;
9856
9858 virtual bool IsTuneable() PURE_VIRTUAL;
9859
9876 virtual void PostFilterLowPassSet(int32_t sectionNumber, double frequency) PURE_VIRTUAL;
9877
9893 virtual void PostFilterUnityGainSet(int32_t sectionNumber) PURE_VIRTUAL;
9894
9913 virtual void PostFilterSingleOrderSet(int32_t sectionNumber, double aOne, double bZero, double bOne) PURE_VIRTUAL;
9914
9930 virtual void PostFilterHighPassSet(int32_t sectionNumber, double cornerFreq) PURE_VIRTUAL;
9931
9949 virtual void PostFilterNotchSet(int32_t sectionNumber, double centerFreq, double bandwidth) PURE_VIRTUAL;
9950
9969 virtual void PostFilterResonatorSet(int32_t sectionNumber, double centerFreq, double bandwidth, double gain) PURE_VIRTUAL;
9970
9989 virtual void PostFilterLeadLagSet(int32_t sectionNumber, double lowGain, double highGain, double centerFreq) PURE_VIRTUAL;
9990
10006 virtual void PostFilterClear(int32_t sectionNumber) PURE_VIRTUAL;
10007
10028 virtual void PostFilterBiquadSet(int32_t sectionNumber, double aOne, double aTwo, double bZero, double bOne, double bTwo) PURE_VIRTUAL;
10029
10031 virtual const char* const PostFilterInfoGet() PURE_VIRTUAL;
10032 //virtual RSIFilterPostFilterSection PostFilterSection;
10034
10039
10059 virtual const char* const UserLabelGet() PURE_VIRTUAL;
10060
10081 virtual void UserLabelSet(const char* const userLabel) PURE_VIRTUAL;
10083
10088
10090 virtual void PostTrajectoryGearingEnableSet(bool enable) PURE_VIRTUAL;
10091
10093 virtual bool PostTrajectoryGearingEnableGet() PURE_VIRTUAL;
10094
10096 virtual void PostTrajectoryGearingMasterAxisSet(int32_t masterAxisNumber) PURE_VIRTUAL;
10097
10099 virtual int32_t PostTrajectoryGearingMasterAxisGet() PURE_VIRTUAL;
10100
10102 virtual void PostTrajectoryGearingMultiplierSet(double multiplier) PURE_VIRTUAL;
10103
10105 virtual double PostTrajectoryGearingMultiplierGet() PURE_VIRTUAL;
10106
10124 virtual uint32_t NetworkIndexGet(RSINetworkIndexType indexType) PURE_VIRTUAL;
10125
10144 virtual void NetworkIndexSet(RSINetworkIndexType indexType, uint32_t newIndex) PURE_VIRTUAL;
10146
10148
10156 virtual double BacklashHysteresisLimitGet() PURE_VIRTUAL;
10157
10164 virtual void BacklashHysteresisLimitSet(double hysteresisLimit) PURE_VIRTUAL;
10165
10189 virtual bool StepperMotorLoopbackGet() PURE_VIRTUAL;
10190
10214 virtual void StepperMotorLoopbackSet(bool loopback) PURE_VIRTUAL;
10215
10224 virtual RSIMotorStepperPulseType StepperMotorPulseTypeGet(RSIMotorStepperPulse pulse) PURE_VIRTUAL;
10225
10235 virtual void StepperMotorPulseTypeSet(RSIMotorStepperPulse pulse, RSIMotorStepperPulseType type) PURE_VIRTUAL;
10236
10243 virtual uint64_t GearingMasterAddressGet() PURE_VIRTUAL;
10244
10246};
10247
10251class RSI_API MultiAxis : public virtual RapidCodeMotion {
10252public:
10253
10257
10271 virtual void AxisAdd(Axis *axis) PURE_VIRTUAL;
10272
10275 virtual void AxesAdd(Axis* *axes, int32_t axisCount) PURE_VIRTUAL;
10276
10289 virtual void AxisRemoveAll() PURE_VIRTUAL;
10290
10294
10310 virtual Axis* AxisGet(int32_t index) PURE_VIRTUAL;
10311
10331 virtual const char* const UserLabelGet() PURE_VIRTUAL;
10332
10353 virtual void UserLabelSet(const char* const userLabel) PURE_VIRTUAL;
10354
10358
10373 virtual double VectorVelocityGet() PURE_VIRTUAL;
10374
10390 virtual void VectorVelocitySet(double velocity) PURE_VIRTUAL;
10391
10406 virtual double VectorAccelerationGet() PURE_VIRTUAL;
10407
10430 virtual void VectorAccelerationSet(double acceleration) PURE_VIRTUAL;
10431
10446 virtual double VectorDecelerationGet() PURE_VIRTUAL;
10447
10470 virtual void VectorDecelerationSet(double deceleration) PURE_VIRTUAL;
10471
10486 virtual double VectorJerkPercentGet() PURE_VIRTUAL;
10487
10510 virtual void VectorJerkPercentSet(double jerkPercent) PURE_VIRTUAL;
10511
10535 virtual void MoveVector(const double* const position) PURE_VIRTUAL;
10536
10539 virtual void MoveVectorRelative(const double* const relativePosition) PURE_VIRTUAL;
10540
10544
10564
10565 virtual double PathTimeSliceGet() PURE_VIRTUAL;
10566
10587
10588 virtual void PathTimeSliceSet(double seconds) PURE_VIRTUAL;
10589
10614 virtual void PathRatioSet(const double* const ratio) PURE_VIRTUAL;
10615
10618 virtual double PathRatioGet(int32_t index) PURE_VIRTUAL;
10619
10636 virtual void PathBlendSet(bool blend) PURE_VIRTUAL;
10637
10646
10647 virtual void PathPlanTypeSet(RSIPathPlanType type) PURE_VIRTUAL;
10648
10657
10658 virtual RSIPathPlanType PathPlanTypeGet() PURE_VIRTUAL;
10659
10678 virtual void PathListStart(const double* const startPosition) PURE_VIRTUAL;
10679
10700 virtual void PathLineAdd(const double* const position) PURE_VIRTUAL;
10701
10721 virtual void PathArcAdd(const double* const center, double angle) PURE_VIRTUAL;
10722
10741 virtual void PathListEnd() PURE_VIRTUAL;
10742
10759 virtual void PathMotionStart() PURE_VIRTUAL;
10760
10764
10782 virtual void MoveTrapezoidal(const double* const position, const double* const vel, const double* const accel, const double* const decel) PURE_VIRTUAL;
10783
10786 virtual void MoveTrapezoidal(const double* const position) PURE_VIRTUAL;
10787
10814 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;
10815
10818 virtual void MoveSCurve(const double* const position) PURE_VIRTUAL;
10819
10834 virtual void MoveVelocity(const double* const velocity, const double* const accel) PURE_VIRTUAL;
10835
10839 virtual void MoveVelocity(const double* const velocity) PURE_VIRTUAL;
10840
10859 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;
10860
10863 virtual void MoveRelative(const double* const relativePosition) PURE_VIRTUAL;
10864
10880 virtual void MoveVelocitySCurve(const double* const velocity, const double* const accel, const double* const jerkPct) PURE_VIRTUAL;
10881
10898 virtual uint16_t MotionIdExecutingGet() PURE_VIRTUAL;
10899
10917 virtual uint16_t MotionElementIdExecutingGet() PURE_VIRTUAL;
10918
10920 virtual int32_t AxisMapCountGet() PURE_VIRTUAL;
10921
10935 virtual uint64_t AddressGet(RSIMultiAxisAddressType addressType) PURE_VIRTUAL;
10936
10950 virtual RSIDataType AddressDataTypeGet(RSIMultiAxisAddressType type) PURE_VIRTUAL;
10951
10961 virtual bool AmpEnableGet() PURE_VIRTUAL;
10962
10963
10964};
10965
10971class RSI_API IOPoint : public virtual RapidCodeObject {
10972public:
10977
10994 static IOPoint* CreateDigitalInput(Axis* axis, RSIMotorDedicatedIn motorDedicatedInNumber);
10995
11012 static IOPoint* CreateDigitalInput(Axis* axis, RSIMotorGeneralIo motorGeneralIoNumber);
11013
11029 static IOPoint* CreateDigitalInput(RapidCodeNetworkNode* networkNode, int32_t bitNumber);
11030 // use NetworkNode*
11031 static IOPoint* CreateDigitalInput(IO* io, int32_t bitNumber);
11032
11043 static IOPoint* CreateDigitalInput(MotionController* controller, int32_t pdoIndex, int32_t bitNumber, RSIPDOType type);
11044
11058 static IOPoint* CreateDigitalInput(MotionController* controller, uint64_t memoryAddress, int32_t bitNumber);
11059
11077 static IOPoint* CreateDigitalOutput(Axis* axis, RSIMotorDedicatedOut motorDedicatedOutNumber);
11078
11095 static IOPoint* CreateDigitalOutput(Axis* axis, RSIMotorGeneralIo motorGeneralIoNumber);
11096
11112 static IOPoint* CreateDigitalOutput(RapidCodeNetworkNode* networkNode, int32_t bitNumber);
11113 // use NetworkNode*
11114 static IOPoint* CreateDigitalOutput(IO* io, int32_t bitNumber);
11115
11116
11129 static IOPoint* CreateDigitalOutput(MotionController* controller, int32_t pdoIndex, int32_t bitNumber, RSIPDOType type);
11130
11144 static IOPoint* CreateDigitalOutput(MotionController* controller, uint64_t memoryAddress, int32_t bitNumber);
11145
11160 static IOPoint* CreateAnalogInput(RapidCodeNetworkNode* networkNode, int32_t analogChannel);
11161 // use RapidCodeNetworkNode*
11162 static IOPoint* CreateAnalogInput(IO* io, int32_t analogChannel);
11163
11178 static IOPoint* CreateAnalogOutput(RapidCodeNetworkNode* networkNode, int32_t analogChannel);
11179 // use RapidCodeNetworkNode*
11180 static IOPoint* CreateAnalogOutput(IO* io, int32_t analogChannel);
11181
11183
11187
11190 virtual uint64_t AddressGet() PURE_VIRTUAL;
11191
11194 virtual int32_t MaskGet() PURE_VIRTUAL;
11195
11198 virtual bool IsDigital() PURE_VIRTUAL;
11199
11200
11203 virtual bool IsOutput() PURE_VIRTUAL;
11204
11208
11212 virtual bool Get() PURE_VIRTUAL;
11213
11220 virtual void Set(bool state) PURE_VIRTUAL;
11221
11225
11229 virtual double ValueGet() PURE_VIRTUAL;
11230
11234 virtual void ValueSet(double valueDouble) PURE_VIRTUAL;
11235};
11236
11240class RSI_API RTOS {
11241
11242public:
11243#if defined(_WIN32)
11248
11252
11257 static INtimeStatus INtimeStatusGet(const char* const nodeName);
11258
11262
11267 static INtimeStatus INtimeStart(const char* const nodeName);
11268
11272
11277 static INtimeStatus INtimeStop(const char* const nodeName);
11278
11282
11287 static INtimeStatus INtimeRestart(const char* const nodeName);
11288
11291 static const char* const INtimeCatalogRMPGet();
11292
11295 static const char* const INtimeCatalogRMPNetworkGet();
11296
11299 static uint32_t INtimeNodeCountGet();
11300
11304 static const char* const INtimeNodeNameGet(uint32_t nodeNumber);
11305
11309 static bool INtimeNodeIsLocal(uint32_t nodeNumber);
11311#endif // _WIN32
11312};
11313
11315class RSI_API Trace
11316{
11317public:
11322
11335 static void MaskSet(RSITrace mask);
11336
11352 static void MaskOnSet(RSITrace maskOn);
11353
11354
11374 static bool MaskOnGet(RSITrace maskOn);
11375
11391 static void MaskOffSet(RSITrace maskOff);
11392
11405 static void MaskClear();
11406
11421 static int32_t FileSet(const char* const fileName);
11422
11435 static void FileClose();
11436
11451 static void InjectMessage(RSITrace traceLevel, const char* const message);
11452
11454};
11455
11457
11459
11463class RSI_API IO : public virtual RapidCodeObject {
11464public:
11465
11466 friend class MotionController;
11467
11472
11474 RapidCodeNetworkNode* NetworkNode;
11477
11479
11484
11485
11518 virtual bool IOExists() PURE_VIRTUAL;
11519
11536 virtual int32_t NumberGet() PURE_VIRTUAL;
11538
11543
11544
11545
11575 virtual bool DigitalInGet(int32_t digitalInNumber) PURE_VIRTUAL;
11576
11609 virtual bool DigitalOutGet(int32_t digitalOutNumber) PURE_VIRTUAL;
11610
11641 virtual void DigitalOutSet(int32_t digitalOutNumber, bool outValue) PURE_VIRTUAL;
11642
11665 virtual int32_t AnalogInGet(int32_t analogChannel) PURE_VIRTUAL;
11666
11698 virtual int32_t AnalogOutGet(int32_t analogChannel) PURE_VIRTUAL;
11699
11731 virtual void AnalogOutSet(int32_t analogChannel, int32_t analogValue) PURE_VIRTUAL;
11733
11743 virtual const char* const UserLabelGet() PURE_VIRTUAL;
11744
11751 virtual void UserLabelSet(const char* const userLabel) PURE_VIRTUAL;
11752};
11753
11754#if defined(__cplusplus)
11755}
11756#endif
11757
11758template<typename ContainerClass>
11759class RSI_API RapidVectorIterator
11760{
11761public:
11763 typedef typename ContainerClass::ValueType ValueType;
11764
11766 typedef typename ContainerClass::PointerType PointerType;
11767
11770 ValueType& operator*();
11771
11774 const ValueType& operator*() const;
11775
11778 RapidVectorIterator& operator++();
11779
11782 RapidVectorIterator operator++(int);
11783
11786 bool operator==(const RapidVectorIterator&) const;
11787
11790 bool operator!=(const RapidVectorIterator&) const;
11791
11793 RapidVectorIterator(PointerType pointerArgument, PointerType startArgument, const size_t containerSize);
11794
11796 RapidVectorIterator(const RapidVectorIterator&) = default;
11797
11799 RapidVectorIterator& operator=(const RapidVectorIterator&) = default;
11800
11802 RapidVectorIterator(RapidVectorIterator&&) noexcept = default;
11803
11805 RapidVectorIterator& operator=(RapidVectorIterator&&) noexcept = default;
11806private:
11807 PointerType pointer;
11808 PointerType start, end;
11809 void VerifyPointer() const;
11810};
11811
11813template<typename Type>
11815
11818
11827template<typename Type>
11828class RSI_API RapidVector
11829{
11830private:
11831 // The pointer to the implementation.
11833public:
11837 Type& operator[](const size_t index);
11838
11842 const Type& operator[](const size_t index) const;
11843
11847 Type& At(const size_t index);
11848
11852 const Type& At(const size_t index) const;
11853
11856 void PushBack(const Type& element);
11857
11860 const size_t Size() const;
11861
11863 void Clear();
11864
11866 void PopBack();
11867
11870 Type& Front();
11871
11874 const Type& Front() const;
11875
11878 Type& Back();
11879
11882 const Type& Back() const;
11883
11886
11888 RapidVector(const size_t size);
11889
11892
11895
11898
11901
11903 RapidVector(RapidVector&& other) noexcept;
11904
11907
11908 typedef Type* PointerType;
11909 typedef Type ValueType;
11910
11912 typedef RapidVectorIterator<RapidVector> Iterator;
11913
11916 Iterator begin() noexcept;
11917
11920 Iterator begin() const noexcept;
11921
11925 Iterator end() const noexcept;
11926};
11927
11929
11930} // namespace RapidCode
11931
11932} // namespace RSI
11933
11934#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:5586
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:5556
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:11463
NetworkNode * NetworkNode
Gets the parent NetworkNode object.
Definition rsi.h:11474
MotionController * rsiControl
Gets the parent MotionController object.
Definition rsi.h:11476
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:10971
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 * 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.
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:795
MathBlockConfig MathBlockConfigGet(int32_t mathBlockNumber)
Get a MathBlock configuration.
RapidCodeOS * OS
Provides access to operating system (Windows) features.
Definition rsi.h:3697
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:10251
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:11240
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:589
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:4071
MotionController * rsiControl
Gets the parent MotionController object.
Definition rsi.h:4081
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:492
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:179
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.
A wrapper class for the C++ STL vector class that aims to maintain application binary interface....
Definition rsi.h:11829
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:11912
~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:11814
RsiError(const RsiError &copyFrom)
Copy constructor for RsiError.
Definition rsi.h:145
Represents the error details thrown as an exception by all RapidCode classes. This class contains an ...
Definition rsi.h:106
char fileName[RSI_ERROR_TEXT_SIZE]
source file name
Definition rsi.h:124
bool isWarning
Whether the error is or is not a warning.
Definition rsi.h:115
static constexpr uint32_t RSI_ERROR_TEXT_SIZE
Error message text.
Definition rsi.h:117
const char * what() const noexcept
Returns a null terminated character sequence that may be used to identify the exception.
Definition rsi.h:168
char shortText[RSI_ERROR_TEXT_SIZE]
Error short text.
Definition rsi.h:122
int32_t lineNumber
Source code line number.
Definition rsi.h:111
char functionName[RSI_ERROR_TEXT_SIZE]
Function name of the raised the error.
Definition rsi.h:120
RSIErrorMessage number
Error number.
Definition rsi.h:109
int32_t objectIndex
Object index (0-based index of the object that has the error).
Definition rsi.h:113
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:11316
RSIFilterAlgorithm
Filter algorithms.
Definition rsienums.h:1109
RSIPDOType
Compensator output types.
Definition rsienums.h:1348
RSIMathBlockOperation
MathBlock operations.
Definition rsienums.h:1354
RSICompensatorOutputType
Compensator output types.
Definition rsienums.h:1342
RSINetworkStartMode
Network start modes.
Definition rsienums.h:585
RSIMotorFeedbackFault
Feedbacks to use for Feedback Fault action.
Definition rsienums.h:1096
RSITrace
Trace masks.
Definition rsienums.h:537
RSIMotorStepperPulse
Pulse A or B.
Definition rsienums.h:1199
RSIAxisGantryType
How to combine Axis Feedback Positions.
Definition rsienums.h:1089
RSINetworkState
State of network.
Definition rsienums.h:565
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:1269
RSIEventType
Event Types or Status Bits.
Definition rsienums.h:920
RSIMotionType
PT and PVT streaming motion types.
Definition rsienums.h:992
RSIDataType
Data types for User Limits and other triggers.
Definition rsienums.h:652
RSIUserLimitLogic
Logic options for User Limits.
Definition rsienums.h:639
RSIMotorIoTypeMask
Possible mask bits for Motor I/O types.
Definition rsienums.h:1215
RSIAction
Action to perform on an Axis.
Definition rsienums.h:1065
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:1205
RSIMotorType
Motor Type.
Definition rsienums.h:1261
RSINetworkStartError
Network start errors.
Definition rsienums.h:591
RSIMotorGeneralIo
Motor I/O bit numbers.
Definition rsienums.h:871
RSIMotionAttrMask
Attribute masks for motion. You cannot mix RSIMotionAttrMaskDELAY and RSIMotionAttrMaskAPPEND.
Definition rsienums.h:1010
RSIMultiAxisAddressType
Used to get firmware address used in User Limits, Recorders, etc.
Definition rsienums.h:495
RSIFilterGainPIDCoeff
PID gain coefficients.
Definition rsienums.h:1118
RSIUserLimitTriggerType
Trigger types for UserLimits.
Definition rsienums.h:626
RSINetworkOutputAddressType
Network output address types.
Definition rsienums.h:1335
INtimeStatus
INtime status values.
Definition rsienums.h:1307
RSIMotionHoldType
Types for MotionHold attribute.
Definition rsienums.h:1045
RSIControllerType
Controller type.
Definition rsienums.h:283
RSIMotorFaultMask
Mask values for several motor faults.
Definition rsienums.h:1249
RSIHomeStage
Predefined Homing Stage sections.
Definition rsienums.h:396
RSIMotorBrakeMode
Brake modes.
Definition rsienums.h:1275
RSIErrorMessage
All possible RSI Error Messages.
Definition rsienums.h:17
RSINetworkType
Type of Network topology.
Definition rsienums.h:619
RSIMotorIoType
Possible configurations for Motor I/O.
Definition rsienums.h:1178
RSIAxisPositionInput
Feedback Positions for each Axis.
Definition rsienums.h:1083
RSINodeType
Valid Node types.
Definition rsienums.h:669
RSISource
Possible sources that have caused an Error state.
Definition rsienums.h:968
RSIMotorDedicatedIn
Dedicated Input bits per motor.
Definition rsienums.h:843
RSIMotorFeedback
Encoders per motor.
Definition rsienums.h:1103
RSIMotorDedicatedOut
Dedicated Output bits per motor.
Definition rsienums.h:865
RSIOperationMode
DS402 modes of operation.
Definition rsienums.h:1281
RSIPathPlanType
Path motion planning types.
Definition rsienums.h:1004
RSINetworkTechnologyType
Network technology type.
Definition rsienums.h:1302
RSINetworkIndexType
Network index types for Axis.
Definition rsienums.h:1315
RSINetworkStartupMethod
Network startup methods.
Definition rsienums.h:577
RSIFilterGainPIVCoeff
PIV gain coefficients.
Definition rsienums.h:1139
RSIAxisMasterType
Sources available to a slave Axis for electronic gearing & camming.
Definition rsienums.h:1168
int32_t CpuAffinity
[Linux] Indicate the CPU core on which the RMP and RMPNetwork processes run.
Definition rsi.h:991
int32_t RmpThreadPriorityMax
[Linux] The maximum thread priority. All threads of the RMP and RMPNetwork will be based off of this....
Definition rsi.h:1003
CreationParameters()
Instantiate with default values and all memory zeroed out.
Definition rsi.h:916
CreationParameters for MotionController::Create.
Definition rsi.h:856
RSIDataType ProcessDataType
Data type for processing.
Definition rsi.h:3675
MathBlock configuration structure.
Definition rsi.h:3668
RSIDataType OutputDataType
Data type for Output. (optional)
Definition rsi.h:3673
uint64_t OutputAddress
Host memory address for Output. The MathBlock will write its result to this address....
Definition rsi.h:3674
uint64_t InputAddress0
Host memory address for Input0. Represents the left-hand side operand in math operations.
Definition rsi.h:3669
RSIDataType InputDataType0
Data type for Input0. This is the data type of the left-hand side operand in math operations.
Definition rsi.h:3670
uint64_t InputAddress1
Host memory address for Input1. Represents the right-hand side operand in math operations.
Definition rsi.h:3671
RSIDataType InputDataType1
Data type for Input1. This is the data type of the right-hand side operand in math operations.
Definition rsi.h:3672
RSIMathBlockOperation Operation
Math operation to be performed. (+, -, *, /, etc) use RSIMathBlockOperationNONE to disable a MathBloc...
Definition rsi.h:3676
Union representing a generic RMP firmware value with multiple data types, stored in 64-bits.
Definition rsi.h:463
float Float
Single precision (32-bit) floating-point.
Definition rsi.h:471
int64_t Int64
64-bit signed integer.
Definition rsi.h:473
uint8_t UInt8
8-bit unsigned integer.
Definition rsi.h:466
int8_t Int8
8-bit signed integer.
Definition rsi.h:465
double Double
Double precision (64-bit) floating-point.
Definition rsi.h:472
int32_t Int32
32-bit signed integer.
Definition rsi.h:469
uint16_t UInt16
16-bit unsigned integer.
Definition rsi.h:468
int16_t Int16
16-bit signed integer.
Definition rsi.h:467
bool Bool
Boolean value.
Definition rsi.h:464
uint32_t UInt32
32-bit unsigned integer.
Definition rsi.h:470
uint64_t UInt64
64-bit unsigned integer.
Definition rsi.h:474