ECMC: EtherCAT open source motion control.
Motion control based on the open source EtherCAT master (www.etherlab.org). The motion package is integerated into the ESS EPCIS environment (E3).
Loading...
Searching...
No Matches
ecmcMotion.h
Go to the documentation of this file.
1/*************************************************************************\
2* Copyright (c) 2019 European Spallation Source ERIC
3* ecmc is distributed subject to a Software License Agreement found
4* in file LICENSE that is included with this distribution.
5*
6* ecmcMotion.h
7*
8* Created on: Jan 10, 2019
9* Author: anderssandstrom
10*
11\*************************************************************************/
12
18#ifndef ECMC_MOTION_H_
19#define ECMC_MOTION_H_
20
21# ifdef __cplusplus
22extern "C" {
23# endif // ifdef __cplusplus
24
25
26#define CHECK_AXIS_RETURN_IF_ERROR(axisIndex)\
27 {\
28 if (axisIndex >= ECMC_MAX_AXES || axisIndex <= 0) {\
29 LOGERR("ERROR: Axis index out of range.\n");\
30 return ERROR_MAIN_AXIS_INDEX_OUT_OF_RANGE;\
31 }\
32 if (axes[axisIndex] == NULL) {\
33 LOGERR("ERROR: Axis object NULL\n");\
34 return ERROR_MAIN_AXIS_OBJECT_NULL;\
35 }\
36 }\
37
38#define CHECK_AXIS_RETURN_IF_ERROR_AND_BLOCK_COM(axisIndex)\
39 {\
40 CHECK_AXIS_RETURN_IF_ERROR(axisIndex);\
41 if (axes[axisIndex]->getBlockExtCom()) {\
42 LOGERR("ERROR: External Commands Disabled\n");\
43 return ERROR_MAIN_AXIS_EXTERNAL_COM_DISABLED;\
44 }\
45 }\
46
47#define CHECK_AXIS_ENCODER_RETURN_IF_ERROR(axisIndex)\
48 {\
49 CHECK_AXIS_RETURN_IF_ERROR(axisIndex);\
50 if (axes[axisIndex]->\
51 getEnc() == NULL) {\
52 LOGERR("ERROR: Encoder object NULL.\n");\
53 return ERROR_MAIN_ENCODER_OBJECT_NULL;\
54 }\
55 }\
56
57#define CHECK_AXIS_ENCODER_CFG_RETURN_IF_ERROR(axisIndex)\
58 {\
59 CHECK_AXIS_RETURN_IF_ERROR(axisIndex);\
60 if (axes[axisIndex]->\
61 getConfigEnc() == NULL) {\
62 LOGERR("ERROR: Encoder object NULL.\n");\
63 return ERROR_MAIN_ENCODER_OBJECT_NULL;\
64 }\
65 }\
66
67#define CHECK_AXIS_CONTROLLER_RETURN_IF_ERROR(axisIndex)\
68 {\
69 CHECK_AXIS_RETURN_IF_ERROR(axisIndex);\
70 if (axes[axisIndex]->getCntrl() == NULL) {\
71 LOGERR("ERROR: Controller object NULL.\n");\
72 return ERROR_MAIN_CONTROLLER_OBJECT_NULL;\
73 }\
74 }\
75
76#define CHECK_AXIS_DRIVE_RETURN_IF_ERROR(axisIndex)\
77 {\
78 CHECK_AXIS_RETURN_IF_ERROR(axisIndex);\
79 if (axes[axisIndex]->getDrv() == NULL) {\
80 LOGERR("ERROR: Drive object NULL.\n");\
81 return ERROR_MAIN_DRIVE_OBJECT_NULL;\
82 }\
83 }\
84
85#define CHECK_AXIS_TRAJ_RETURN_IF_ERROR(axisIndex)\
86 {\
87 CHECK_AXIS_RETURN_IF_ERROR(axisIndex);\
88 if (axes[axisIndex]->getTraj() == NULL) {\
89 LOGERR("ERROR: Trajectory object NULL.\n");\
90 return ERROR_MAIN_TRAJECTORY_OBJECT_NULL;\
91 }\
92 }\
93
94#define CHECK_AXIS_SEQ_RETURN_IF_ERROR(axisIndex)\
95 {\
96 CHECK_AXIS_RETURN_IF_ERROR(axisIndex);\
97 if (axes[axisIndex]->getSeq() == NULL) {\
98 LOGERR("ERROR: Sequence object NULL.\n");\
99 return ERROR_MAIN_SEQUENCE_OBJECT_NULL;\
100 }\
101 }\
102
103#define CHECK_AXIS_MON_RETURN_IF_ERROR(axisIndex)\
104 {\
105 CHECK_AXIS_RETURN_IF_ERROR(axisIndex);\
106 if (axes[axisIndex]->getMon() == NULL) {\
107 LOGERR("ERROR: Monitor object NULL.\n");\
108 return ERROR_MAIN_MONITOR_OBJECT_NULL;\
109 }\
110 }\
111
112
127 int axisIndex,
128 double positionSet,
129 double velocitySet,
130 double accelerationSet,
131 double decelerationSet);
132
148 int axisIndex,
149 double positionSet,
150 double velocitySet,
151 double accelerationSet,
152 double decelerationSet);
153
167int moveVelocity(int axisIndex,
168 double velocitySet,
169 double accelerationSet,
170 double decelerationSet);
171
182int stopMotion(int axisIndex,
183 int killAmplifier);
184
197int moveHome(int axisIndex,
198 int nCmdData,
199 double homePositionSet,
200 double velocityTowardsCamSet,
201 double velocityOffCamSet,
202 double accelerationSet,
203 double decelerationSet);
204
214int setPosition(int axisIndex,
215 double homePositionSet);
216
228int getAxisError(int axisIndex);
229
241int getAxisErrorID(int axisIndex);
242
255int getAxisCycleCounter(int axisIndex,
256 int *counter);
257
271int getAxisDebugInfoData(int axisIndex,
272 char *buffer,
273 int bufferByteSize);
274
288int getAxisStatusStructV2(int axisIndex,
289 char *buffer,
290 int bufferByteSize);
291
304int getAxisExecute(int axisIndex,
305 int *value);
306
328int getAxisCommand(int axisIndex,
329 int *value);
330
354int getAxisCmdData(int axisIndex,
355 int *value);
356
369int getAxisReset(int axisIndex,
370 int *value);
371
384int getAxisEnabled(int axisIndex,
385 int *value);
386
399int getAxisEnable(int axisIndex,
400 int *value);
401
414int getAxisBlockCom(int axisIndex,
415 int *block);
416
430int getAxisBusy(int axisIndex,
431 int *value);
432
442int getAxisEncVelo(int axisIndex,
443 double *velo);
444
454int getAxisTrajVelo(int axisIndex,
455 double *velo);
456
475int getAxisID(int axisIndex,
476 int *value);
477
489 int *value);
490
503int getAxisSoftLimitPosBwd(int axisIndex,
504 double *value);
505
518int getAxisSoftLimitPosFwd(int axisIndex,
519 double *value);
520
534 int *value);
535
549 int *value);
550
563int getAxisAcceleration(int axisIndex,
564 double *value);
565
578int getAxisDeceleration(int axisIndex,
579 double *value);
580
595int getAxisTargetPos(int axisIndex,
596 double *value);
597
613int getAxisTargetVel(int axisIndex,
614 double *value);
615
631int getAxisDone(int axisIndex,
632 int *value);
633
648int getAxisAtHardFwd(int axisIndex,
649 int *value);
650
655int getAxisLimitSwitchFwd(int axisIndex,
656 int *value);
657
672int getAxisAtHardBwd(int axisIndex,
673 int *value);
674
679int getAxisLimitSwitchBwd(int axisIndex,
680 int *value);
681
696int getAxisEncHomed(int axisIndex,
697 int *value);
698
711int getAxisEncPosAct(int axisIndex,
712 double *value);
713
726int getAxisEncVelAct(int axisIndex,
727 double *value);
728
743int getAxisAtHome(int axisIndex,
744 int *value);
745
760int getAxisCntrlError(int axisIndex,
761 double *value);
762
779int getAxisHomeVelOffCam(int axisIndex,
780 double *value);
781
798int getAxisHomeVelTowardsCam(int axisIndex,
799 double *value);
800
816int getAxisEncScaleNum(int axisIndex,
817 double *value);
818
834int getAxisEncScaleDenom(int axisIndex,
835 double *value);
836
847int getAxisEncPosRaw(int axisIndex,
848 int64_t *value);
849
859int getAxisCntrlOutPpart(int axisIndex,
860 double *value);
861
871int getAxisCntrlOutIpart(int axisIndex,
872 double *value);
873
883int getAxisCntrlOutDpart(int axisIndex,
884 double *value);
885
895int getAxisCntrlOutFFpart(int axisIndex,
896 double *value);
897
910int getAxisCntrlOutput(int axisIndex,
911 double *value);
912
913// int getAxisCntrlVelSet(int axisIndex,double *value);
914// int getAxisCntrlRate(int axisIndex,double *value);
915
926int getAxisDrvScale(int axisIndex,
927 double *value);
928
938int getAxisDrvEnable(int axisIndex,
939 int *value);
940
952int getAxisMonAtTarget(int axisIndex,
953 int *value);
954
969int getAxisType(int axisIndex,
970 int *value);
971
993const char* getAxisTrajTransExpr(int axisIndex,
994 int *error);
995
1017const char* getAxisEncTransExpr(int axisIndex,
1018 int *error);
1019
1037const char* getAxisPLCExpr(int axisIndex,
1038 int *error);
1039
1055int getAxisTrajSource(int axisIndex,
1056 int *value);
1057
1072int getAxisEncSource(int axisIndex,
1073 int *value);
1074
1090 int *value);
1091
1105int getAxisPLCEnable(int axisIndex,
1106 int *value);
1107
1126int setAxisExecute(int axisIndex,
1127 int value);
1128
1149int setAxisCommand(int axisIndex,
1150 int value);
1151
1196int setAxisCmdData(int axisIndex,
1197 int value);
1198
1211int setAxisEnable(int axisIndex,
1212 int value);
1213
1227 int enablePos,
1228 int enableConstVel,
1229 int enableHome);
1230
1242 int value);
1243
1254int setAxisBlockCom(int axisIndex,
1255 int block);
1256
1270 int value);
1271
1285 int value);
1286
1299int setAxisSoftLimitPosBwd(int axisIndex,
1300 double value);
1301
1314int setAxisSoftLimitPosFwd(int axisIndex,
1315 double value);
1316
1329 int value);
1330
1344int setAxisAcceleration(int axisIndex,
1345 double value);
1346
1360int setAxisDeceleration(int axisIndex,
1361 double value);
1362
1379 double value);
1380
1393int setAxisJerk(int axisIndex,
1394 double value);
1395
1410int setAxisTargetPos(int axisIndex,
1411 double value);
1412
1440int setAxisTargetVel(int axisIndex,
1441 double value);
1442
1457int setAxisJogVel(int axisIndex,
1458 double value);
1459
1460
1471int setAxisExtSetPos(int axisIndex,
1472 double value);
1473
1489int setAxisEncScaleDenom(int axisIndex,
1490 double value);
1491
1507int setAxisEncScaleNum(int axisIndex,
1508 double value);
1509
1525int setAxisEncInvHwReady(int axisIndex,
1526 int invert);
1527
1544int setAxisHomePos(int axisIndex,
1545 double value);
1546
1558int setAxisErrorId(int axisIndex,
1559 int errorId);
1560
1578 int count);
1579
1601 double dVel);
1602
1623int setAxisHomeVelOffCam(int axisIndex,
1624 double dVel);
1625
1639/*int setAxisGearRatio(int axisIndex,
1640 double ratioNum,
1641 double ratioDenom);*/
1642
1655int axisErrorReset(int axisIndex,
1656 int value);
1657
1678 int enable);
1679
1701 int size);
1702
1716 int enable);
1717
1732 int size);
1733
1748int setAxisEncVelFilterSize(int axisIndex,
1749 int size);
1750
1751
1766int setAxisEncPosFilterSize(int axisIndex,
1767 int size);
1768
1780 int enable);
1781
1798int setAxisTrajSource(int axisIndex,
1799 int value);
1800
1816int setAxisEncSource(int axisIndex,
1817 int value);
1818
1831int setAxisTrajStartPos(int axisIndex,
1832 double value);
1833
1844int setAxisEncOffset(int axisIndex,
1845 double value);
1846
1859int setAxisEncType(int axisIndex,
1860 int value);
1861
1880int setAxisEncBits(int axisIndex,
1881 int bits);
1882
1899int setAxisEncAbsBits(int axisIndex,
1900 int bits);
1901
1918int setAxisEncRawMask(int axisIndex,
1919 uint64_t rawMask);
1920
1938int addAxisEnc(int axisIndex);
1939
1957int selectAxisEncPrimary(int axisIndex,
1958 int index);
1959
1974int selectAxisEncConfig(int axisIndex,
1975 int index);
1976
1991 int enable);
1992
2004int getAxisEncPrimaryIndex(int axisIndex,
2005 int *index);
2006
2018int getAxisEncConfigIndex(int axisIndex,
2019 int *index);
2020
2036 int encRef);
2037
2050 double value);
2051
2062int setAxisCntrlKp(int axisIndex,
2063 double value);
2064
2075int setAxisCntrlKi(int axisIndex,
2076 double value);
2077
2088int setAxisCntrlKd(int axisIndex,
2089 double value);
2090
2101int setAxisCntrlKff(int axisIndex,
2102 double value);
2103
2114int setAxisCntrlDeadband(int axisIndex,
2115 double value);
2116
2128 int value);
2129
2145int setAxisCntrlInnerParams(int axisIndex,
2146 double kp,
2147 double ki,
2148 double kd,
2149 double tol);
2150
2161int setAxisCntrlOutHL(int axisIndex,
2162 double value);
2163
2174int setAxisCntrlOutLL(int axisIndex,
2175 double value);
2176
2187int setAxisCntrlIpartLL(int axisIndex,
2188 double value);
2189
2200int setAxisCntrlIpartHL(int axisIndex,
2201 double value);
2202
2210int getAxisDrvScaleNum(int axisIndex,
2211 double *value);
2212
2223int setAxisDrvScaleNum(int axisIndex,
2224 double value);
2225
2236int setAxisDrvScaleDenom(int axisIndex,
2237 double value);
2238
2239
2256 double value);
2257
2279int setAxisDrvBrakeEnable(int axisIndex,
2280 int enable);
2281
2299 int delayTime);
2300
2317 int aheadTime);
2318
2333 double seconds);
2334
2353 int enable);
2354
2370/*int setAxisDrvType(int axisIndex,
2371 int type);*/
2372
2379int getAxisMonAtTargetTol(int axisIndex,
2380 double *value);
2381
2401int setAxisMonAtTargetTol(int axisIndex,
2402 double value);
2403
2419 int enable);
2420
2427int getAxisMonAtTargetTime(int axisIndex,
2428 int *value);
2429
2448int setAxisMonAtTargetTime(int axisIndex,
2449 int value);
2450
2459 int *value);
2460
2478 int value);
2479
2487int getAxisMonPosLagTol(int axisIndex,
2488 double *value);
2489
2511int setAxisMonPosLagTol(int axisIndex,
2512 double value);
2513
2521int getAxisMonPosLagTime(int axisIndex,
2522 int *value);
2523
2545int setAxisMonPosLagTime(int axisIndex,
2546 int value);
2547
2563int getAxisMonEnableLagMon(int axisIndex,
2564 int *value);
2565
2584int setAxisMonEnableLagMon(int axisIndex,
2585 int value);
2586
2598int getAxisMonMaxVel(int axisIndex,
2599 double *value);
2600
2617int setAxisMonMaxVel(int axisIndex,
2618 double value);
2619
2633int setAxisMonEnableMaxVel(int axisIndex,
2634 int value);
2635
2644int getAxisMonEnableMaxVel(int axisIndex,
2645 int *value);
2646
2667 int value);
2668
2690 int value);
2691
2699int getAxisMonLatchLimit(int axisIndex,
2700 int *value);
2701
2718int setAxisMonLatchLimit(int axisIndex,
2719 int value);
2720
2736int setAxisSeqTimeout(int axisIndex,
2737 int value);
2738
2749int setAxisHomeSeqId(int axisIndex,
2750 int value);
2751
2762int setAxisHomeAcc(int axisIndex,
2763 double acc);
2764
2775int setAxisHomeDec(int axisIndex,
2776 double acc);
2777
2793 int enable);
2794
2810 double targetPosition);
2811
2834 int value);
2835
2855int setAxisMonCntrlOutHL(int axisIndex,
2856 double value);
2857
2869 int value);
2870
2883 int value);
2884
2897 int value);
2898
2910int setAxisMonVelDiffTol(int axisIndex,
2911 double value);
2912
2931 int value);
2932
2952 int value);
2953
2975 int value);
2976
2994 int value);
2995
3011 double value);
3012
3034 int *pol);
3035
3049 int value);
3050
3064 int *pol);
3065
3079 int value);
3080
3094 int *pol);
3095
3109 int value);
3110
3124 int *pol);
3125
3141 int value);
3142
3156int setAxisPLCEnable(int axisIndex,
3157 int value);
3158
3184int appendAxisPLCExpr(int axisIndex,
3185 char *expr);
3186
3198int compileAxisPLCExpr(int axisIndex);
3199
3226int createAxis(int axisIndex,
3227 int axisType,
3228 int drvType,
3229 int trajType);
3230
3255int linkEcEntryToAxisEnc(int slaveBusPosition,
3256 char *entryIdString,
3257 int axisIndex,
3258 int encoderEntryIndex,
3259 int entryBitIndex);
3260
3303int linkEcEntryToAxisDrv(int slaveBusPosition,
3304 char *entryIdString,
3305 int axisIndex,
3306 int driveEntryIndex,
3307 int entryBitIndex);
3308
3341int linkEcEntryToAxisMon(int slaveBusPosition,
3342 char *entryIdString,
3343 int axisIndex,
3344 int monitorEntryIndex,
3345 int entryBitIndex);
3346
3370 char *entryIDString,
3371 int axisIndex);
3372
3390 char *entryIDString,
3391 int axisIndex);
3392
3410 char *entryIDString,
3411 int axisIndex);
3412
3427 int cmd);
3428
3429
3444 int cmd);
3445
3455int setDiagAxisIndex(int axisIndex);
3456
3466int setDiagAxisFreq(int freq);
3467
3481int setDiagAxisEnable(int enable);
3482
3493int getAxisModRange(int axisIndex,
3494 double *range);
3495
3506int setAxisModRange(int axisIndex,
3507 double range);
3508
3527int setAxisModType(int axisIndex,
3528 int type);
3529
3544int getAxisModType(int axisIndex,
3545 int *value);
3546
3561 int disable);
3562
3574 int allow);
3575
3580int getAxisValid(int axisIndex);
3581
3592 int stop);
3593
3594# ifdef __cplusplus
3595}
3596# endif // ifdef __cplusplus
3597
3598#endif /* ECMC_MOTION_H_ */
int getAxisMonEnableLagMon(int axisIndex, int *value)
Get position lag monitoring enable. .
int setAxisEnableCheckEncsDiff(int axisIndex, int enable)
Set "at target" monitoring tolerance. .
int setAxisMonLatchLimit(int axisIndex, int value)
Set latch limit settings. .
int setAxisEnableSoftLimitBwd(int axisIndex, int value)
Set enable backward soft-limit of an axis. .
int setAxisExecute(int axisIndex, int value)
Set axis execute bit. .
int getAxisExecute(int axisIndex, int *value)
Get axis execute bit. .
int setAxisBlockCom(int axisIndex, int block)
Block/unblock communicatiom from via cmd parser. .
int getAxisAtHome(int axisIndex, int *value)
Get state of reference/home switch. .
int getAxisEncVelAct(int axisIndex, double *value)
Get actual encoder velocity. .
int setPosition(int axisIndex, double homePositionSet)
set position. used by epics autosave to restore axis value after ioc reboot.
int setAxisDisableAtErrorReset(int axisIndex, int disable)
Disable axis at error reset .
int setAxisEncScaleDenom(int axisIndex, double value)
Set the denominator part of the encoder scale. .
int getAxisSoftLimitPosFwd(int axisIndex, double *value)
Get forward soft-limit position. .
int setAxisEncPosFilterEnable(int axisIndex, int enable)
Enables/disables encoder position filter. .
int setAxisCommand(int axisIndex, int value)
Set axis command word. .
int getAxisPLCEnable(int axisIndex, int *value)
Get axis enable for axis sync. PLC. .
int setAxisEmergDeceleration(int axisIndex, double value)
Set axis emergency deceleration setpoint. .
int setAxisEnableAlarmAtHardLimits(int axisIndex, int value)
Set enable alarms at limits bit. .
int setAxisMonPosLagTime(int axisIndex, int value)
Set position lag monitoring time (cycles). .
int setAxisHomePos(int axisIndex, double value)
Set axis home reference position setpoint. .
int setAxisTrajSource(int axisIndex, int value)
Set axis trajectory data source. .
int setAxisEncVelFilterSize(int axisIndex, int size)
Set size of encoder velocity filter. .
int getAxisSoftLimitPosBwd(int axisIndex, double *value)
Get backward soft-limit position. .
int selectAxisEncPrimary(int axisIndex, int index)
Select encoder to be used for control. .
int setAxisEncHomeLatchCountOffset(int axisIndex, int count)
Set home index pulse count offset. .
int setAxisMonHomeSwitchPolarity(int axisIndex, int value)
Set polarity of home switch. .
int setAxisEncAbsBits(int axisIndex, int bits)
Set encoder register bit count for absolute data. .
int setAxisMonPosLagTol(int axisIndex, double value)
Set position lag maximum monitoring tolerance. .
int setAxisEncBits(int axisIndex, int bits)
Set encoder register bit count. .
int getAxisTargetVel(int axisIndex, double *value)
Get axis target velocity setpoint. .
int getAxisCmdData(int axisIndex, int *value)
Get axis command data word. .
int getAxisDebugInfoData(int axisIndex, char *buffer, int bufferByteSize)
Get axis debug information string. .
int setAxisCntrlKff(int axisIndex, double value)
Set PID-controller feed forward gain. .
int linkEcEntryToAxisDrv(int slaveBusPosition, char *entryIdString, int axisIndex, int driveEntryIndex, int entryBitIndex)
Links an EtherCAT entry to the drive object of the axis at axisIndex.
int setAxisCntrlInnerParams(int axisIndex, double kp, double ki, double kd, double tol)
Use a differnt set of pid parameters if within a certain distance of target.
int setAxisErrorId(int axisIndex, int errorId)
Set axis error code. .
int setAxisEncMaxDiffToPrimEnc(int axisIndex, double value)
Set maximum position deviation between current encoder and primary encoder. .
int getAxisEnabled(int axisIndex, int *value)
Get axis amplifier state bit. .
int setAxisAllowSourceChangeWhenEnabled(int axisIndex, int allow)
Allow change of encoder and trajectory source when axis is enabled.
int getAxisBusy(int axisIndex, int *value)
Get axis busy bit. .
int setAxisEncType(int axisIndex, int value)
Set encoder type. .
int linkEcEntryToAxisSeqAutoModeSet(int slaveIndex, char *entryIDString, int axisIndex)
Links an EtherCAT entry to the an axis object for setting drive mode .
int getAxisCntrlOutFFpart(int axisIndex, double *value)
Get PID-controller feed forward output part. .
int addAxisEnc(int axisIndex)
Add encoder object to axis. .
int setAxisEncSource(int axisIndex, int value)
Set axis encoder data source. .
const char * getAxisTrajTransExpr(int axisIndex, int *error)
Get axis trajectory transformation expression. .
int getAxisTargetPos(int axisIndex, double *value)
Get axis target position setpoint. .
int getAxisTrajVelo(int axisIndex, double *velo)
Get axis traj velo. .
int setAxisEncRawMask(int axisIndex, uint64_t rawMask)
Set encoder raw data mask. .
int getAxisMonEnableMaxVel(int axisIndex, int *value)
Get enable maximum velocity monitoring (over speed). .
int getAxisMonAtTargetTime(int axisIndex, int *value)
Get "at target" monitoring time (cycles). .
int setAxisMonEnableExternalInterlock(int axisIndex, int value)
Enable motion axis interlock from EtherCAT entry. .
int setAxisJerk(int axisIndex, double value)
Set axis maximum jerk setpoint. .
int getAxisCntrlOutput(int axisIndex, double *value)
Get PID-controllegetAxisAtHomer total output part. .
int getAxisCycleCounter(int axisIndex, int *counter)
Get axis execution cycle counter. Can be used for checking that logic for an axis object is executing...
int setAxisDrvStateMachineTimeout(int axisIndex, double seconds)
Set drive timeout . .
int getAxisAllowCommandsFromPLC(int axisIndex, int *value)
Get axis allow command from PLC. .
int linkEcEntryToAxisSeqAutoModeAct(int slaveIndex, char *entryIDString, int axisIndex)
Links an EtherCAT entry to the an axis object for reading actual drive mode .
int getAxisHomeVelTowardsCam(int axisIndex, double *value)
Get Towards cam referencing/homing velocity setpoint. .
int linkEcEntryToAxisMon(int slaveBusPosition, char *entryIdString, int axisIndex, int monitorEntryIndex, int entryBitIndex)
Links an EtherCAT entry to the monitor object of the axis at axisIndex .
int setAxisJogVel(int axisIndex, double value)
Set axis jog velocity setpoint. .
int setAxisCntrlKd(int axisIndex, double value)
Set PID-controller differential gain. .
int getAxisEncScaleDenom(int axisIndex, double *value)
Get the denominator part of the encoder scale. .
int setAxisSoftLimitPosFwd(int axisIndex, double value)
Set forward soft-limit position. .
int setAxisCmdData(int axisIndex, int value)
Set axis command data word. .
int setAxisDrvVelSetOffsetRaw(int axisIndex, double value)
Set drive raw velocity offset. .
const char * getAxisPLCExpr(int axisIndex, int *error)
Get axis sync. PLC expression. .
int setAxisMonVelDiffDriveILDelay(int axisIndex, int value)
Set drive interlock filter time in cycles for velocity difference monitoring. .
int setAxisDrvReduceTorqueEnable(int axisIndex, int enable)
Set enable of reduce torque functionality. .
int setAxisPLCEncVelFilterSize(int axisIndex, int size)
Set size of external encoder velocity filter. .
int setAxisPLCTrajVelFilterSize(int axisIndex, int size)
Set size of external trajectory velocity filter. .
int getAxisMonPosLagTime(int axisIndex, int *value)
Get position lag monitoring time (cycles). .
int setAxisMonEnableAtTargetMon(int axisIndex, int value)
Enable "at target" monitoring. .
int setAxisHomeVelOffCam(int axisIndex, double dVel)
Set off cam referencing/homing velocity setpoint. .
int setAxisMonMaxVel(int axisIndex, double value)
Set maximum allowed velocity. .
int setAxisEmergencyStopInterlock(int axisIndex, int stop)
Init emergency stop ramp for an axis.
int getAxisTrajSource(int axisIndex, int *value)
Get axis trajectory data source. .
int getAxisEnableSoftLimitFwd(int axisIndex, int *value)
Get forward soft-limit enabled state of an axis. .
int getAxisCntrlOutDpart(int axisIndex, double *value)
Get PID-controller differential output part. .
int getAxisLimitSwitchBwd(int axisIndex, int *value)
Same as getAxisAtHardBwd() but better name. .
int getAxisMonLatchLimit(int axisIndex, int *value)
Get latch on limit settings. .
int setAxisMonEnableCntrlOutHLMon(int axisIndex, int value)
Enable controller output high limit monitoring. .
int getAxisDeceleration(int axisIndex, double *value)
Get axis deceleration setpoint. .
int getAxisLimitSwitchFwd(int axisIndex, int *value)
Same as getAxisAtHardFwd() but better name. .
int setAxisHomePostMoveEnable(int axisIndex, int enable)
Set homing post movement enable.
int setAxisDrvScaleNum(int axisIndex, double value)
Set drive output scale numerator. .
int getAxisMonAtTarget(int axisIndex, int *value)
Get at target. .
int setAxisMonMaxVelTrajILDelay(int axisIndex, int value)
Set velocity monitoring interlock delay for trajectory. .
int getAxisID(int axisIndex, int *value)
Get axis index. .
int getAxisMonExtHWInterlockPolarity(int axisIndex, int *pol)
Get polarity of motion axis interlock from EtherCAT entry. .
int getAxisDrvScale(int axisIndex, double *value)
Get the drive output scale factor. .
int setAxisEnableSoftLimitFwd(int axisIndex, int value)
Set enable forward soft-limit of an axis. .
const char * getAxisEncTransExpr(int axisIndex, int *error)
Get axis encoder transformation expression. .
int getAxisErrorID(int axisIndex)
Get axis error code. .
int setAxisDrvBrakeCloseAheadTime(int axisIndex, int aheadTime)
Set brake close ahead time . .
int setAxisHomeAcc(int axisIndex, double acc)
Set homing acceleration for current encoder beeing configured. .
int setAxisPLCEnable(int axisIndex, int value)
Enable axis sync PLC expression. .
int setAxisCntrlKp(int axisIndex, double value)
Set PID-controller proportional gain. .
int setAxisCntrlKi(int axisIndex, double value)
Set PID-controller integral gain. .
int setAxisMonCntrlOutHL(int axisIndex, double value)
Set monitoring controller output high limit. .
int getAxisBlockCom(int axisIndex, int *block)
Get axis block external com. If true the axis will not take any active commands via cmd parser (sta...
int getAxisStatusStructV2(int axisIndex, char *buffer, int bufferByteSize)
Get axis status structure V2. .
int linkEcEntryToAxisEnc(int slaveBusPosition, char *entryIdString, int axisIndex, int encoderEntryIndex, int entryBitIndex)
Links an EtherCAT entry to the encoder object of the axis at axisIndex.
int setAxisEnableAlarmAtSoftLimit(int axisIndex, int value)
Enable alarm when at softlimit.
int setAxisMonLimitFwdPolarity(int axisIndex, int value)
Set polarity of hard high limit switch. .
int linkEcEntryToAxisStatusOutput(int slaveIndex, char *entryIDString, int axisIndex)
Links an EtherCAT entry to the an axis object for status output .
int getAxisDrvScaleNum(int axisIndex, double *value)
Get drive output scale numerator. .
int getAxisAtHardFwd(int axisIndex, int *value)
Get state of forward hard limit. .
int setAxisEncInvHwReady(int axisIndex, int invert)
Invert Encoder Ready bit.
int setAxisModType(int axisIndex, int type)
Set axis modulo motion type. .
int setAxisSoftLimitPosBwd(int axisIndex, double value)
Set backward soft-limit position. .
int setAxisEncRefToOtherEncAtStartup(int axisIndex, int encRef)
Reference this encoder to other encoder at startup. .
int setAxisEncScaleNum(int axisIndex, double value)
Set the numerator part of the encoder scale. .
int setAxisPLCTrajVelFilterEnable(int axisIndex, int enable)
Enables/disables velocity filter of external setpoint. .
int getAxisEncPrimaryIndex(int axisIndex, int *index)
Get index of current encoder being used for control (PID). .
int setAxisMonAtTargetTime(int axisIndex, int value)
Set "at target" monitoring time (cycles). .
int getAxisDrvEnable(int axisIndex, int *value)
Get enable state of drive. .
int getAxisEncHomed(int axisIndex, int *value)
Get encoder homed bit. .
int setAxisAutoModeCmdHoming(int axisIndex, int cmd)
Set axis auto mode command for homing. .
int setAxisCntrlDeadband(int axisIndex, double value)
Set PID-controller deadband. .
int setAxisAcceleration(int axisIndex, double value)
Set axis acceleration setpoint. .
int setAxisHomePostMoveTargetPosition(int axisIndex, double targetPosition)
Set homing post movement target position.
int createAxis(int axisIndex, int axisType, int drvType, int trajType)
Creates an axis object at index axisIndex.
int setAxisSeqTimeout(int axisIndex, int value)
Set sequence timeout time in seconds. .
int getAxisEnableAlarmAtHardLimits(int axisIndex, int *value)
Get enable alarms at limits bit. .
int moveRelativePosition(int axisIndex, double positionSet, double velocitySet, double accelerationSet, double decelerationSet)
Move axis to a relative position. .
int setAxisDeceleration(int axisIndex, double value)
Set axis deceleration setpoint. .
int setAxisCntrlDeadbandTime(int axisIndex, int value)
Set PID-controller deadband time filter. .
int setAxisCntrlOutLL(int axisIndex, double value)
Set PID-controller minimum output value. .
int getAxisError(int axisIndex)
Get axis error state. .
int getAxisMonLimitFwdPolarity(int axisIndex, int *pol)
Get polarity of hard high limit switch. .
int getAxisMonHomeSwitchPolarity(int axisIndex, int *pol)
Get polarity of home switch. .
int getAxisMonMaxVel(int axisIndex, double *value)
Get maximum allowed velocity. .
int getAxisAtHardBwd(int axisIndex, int *value)
Get state of backward hard limit. .
int setAxisPLCEncVelFilterEnable(int axisIndex, int enable)
Enables/disables velocity filter of external actual value. .
int setAxisDrvScaleDenom(int axisIndex, double value)
Set drive output scale denominator. .
int getAxisCntrlOutIpart(int axisIndex, double *value)
Get PID-controller integral output part. .
int setAxisMonEnableAnalogInterlock(int axisIndex, int value)
Enable motion axis interlock from analog EtherCAT entry. A typical usecase is temperature sensors....
int selectAxisEncConfig(int axisIndex, int index)
Select encoder to configured. .
int setAxisModRange(int axisIndex, double range)
Set axis modulo range. .
int setAxisMonVelDiffTol(int axisIndex, double value)
Set maximum allowed difference between setpoint speed and actual speedĀ±n.
int setAxisMonAnalogInterlockRawLimit(int axisIndex, double value)
Set analog interlock raw value limit . .
int setAxisMonEnableMaxVel(int axisIndex, int value)
Enable maximum velocity monitoring (over speed). .
int setAxisEncOffset(int axisIndex, double value)
Set encoder offset value. .
int getAxisAcceleration(int axisIndex, double *value)
Get axis acceleration setpoint. .
int setAxisMonEnableVelocityDiff(int axisIndex, int value)
Enable monitoring of velocity difference. .
int getAxisEnable(int axisIndex, int *value)
Get axis amplifier command bit. .
int setAxisMonExtHWInterlockPolarity(int axisIndex, int value)
Set polarity of motion axis interlock from EtherCAT entry. .
int setAxisHomeDec(int axisIndex, double acc)
Set homing deceleration for current encoder beeing configured. .
int getAxisEncPosRaw(int axisIndex, int64_t *value)
Get raw unscaled encoder value. .
int getAxisMonAtTargetTol(int axisIndex, double *value)
Set drive type. OBSOLETE COMMAND. USE CREATEAXIS(id,type,drvtype).
int getAxisDone(int axisIndex, int *value)
Get axis done bit. .
int getAxisCommand(int axisIndex, int *value)
Get axis command word. .
int setAxisCntrlIpartHL(int axisIndex, double value)
Set PID-controller maximum integral part output value. .
int getAxisCntrlOutPpart(int axisIndex, double *value)
Get PID-controller proportional output part. .
int getAxisHomeVelOffCam(int axisIndex, double *value)
Get off cam referencing/homing velocity setpoint. .
int stopMotion(int axisIndex, int killAmplifier)
Stop axis. .
int setDiagAxisFreq(int freq)
Set axis frequency of detailed motion diagnostics printouts. .
int getAxisEncScaleNum(int axisIndex, double *value)
Get the numerator part of the encoder scale. .
int appendAxisPLCExpr(int axisIndex, char *expr)
Append axis sync. PLC expression. .
int setAxisTargetVel(int axisIndex, double value)
Set axis target velocity setpoint. .
int setAxisEnableMotionFunctions(int axisIndex, int enablePos, int enableConstVel, int enableHome)
Set enable of motion functions. .
int setAxisHomeVelTowardsCam(int axisIndex, double dVel)
Set Towards cam referencing/homing velocity setpoint. .
int setAxisMonEnableLagMon(int axisIndex, int value)
Enable position lag monitoring. .
int getAxisEncVelo(int axisIndex, double *velo)
Get axis act velo. .
int getAxisMonLimitBwdPolarity(int axisIndex, int *pol)
Get polarity of hard low limit switch. .
int getAxisMonEnableAtTargetMon(int axisIndex, int *value)
Get enable "at target" monitoring. .
int setAxisDrvBrakeOpenDelayTime(int axisIndex, int delayTime)
Set brake open delay time . .
int getAxisCntrlError(int axisIndex, double *value)
Get actual pid controller error. .
int getAxisEncSource(int axisIndex, int *value)
Get axis encoder data source. .
int moveAbsolutePosition(int axisIndex, double positionSet, double velocitySet, double accelerationSet, double decelerationSet)
Move axis to an absolute position. .
int moveVelocity(int axisIndex, double velocitySet, double accelerationSet, double decelerationSet)
Move axis in a constant velocity. .
int setAxisTrajStartPos(int axisIndex, double value)
Set axis trajectory start position. NOTE: NOT USED!!. .
int getAxisType(int axisIndex, int *value)
Get axis type. .
int setAxisHomeSeqId(int axisIndex, int value)
Set homing sequence id for current encoder beeing configured. .
int setAxisExtSetPos(int axisIndex, double value)
Set axis external position setpoint. .
int compileAxisPLCExpr(int axisIndex)
Compile Axis PLC code .
int setAxisMonLimitBwdPolarity(int axisIndex, int value)
Set polarity of hard low limit switch. .
int setAxisAllowCommandsFromPLC(int axisIndex, int value)
Allow commands from PLCs. .
int moveHome(int axisIndex, int nCmdData, double homePositionSet, double velocityTowardsCamSet, double velocityOffCamSet, double accelerationSet, double decelerationSet)
Execute homing sequence. .
int axisErrorReset(int axisIndex, int value)
Set gear ration setting. .
int setAxisTargetPos(int axisIndex, double value)
Set axis target position setpoint. .
int setDiagAxisIndex(int axisIndex)
Set axis index for detailed motion diagnostics. .
int setAxisMonAtTargetTol(int axisIndex, double value)
Set "at target" monitoring tolerance. .
int setAxisEnable(int axisIndex, int value)
Set axis amplifier enable command bit. .
int setAxisEncEnableRefAtHome(int axisIndex, int enable)
Set referance this encoder at homing.
int setAxisMonVelDiffTrajILDelay(int axisIndex, int value)
Set trajectory interlock filter time in cycles for velocity difference monitoring....
int setAxisAutoModeCmdMotion(int axisIndex, int cmd)
Set axis auto mode command for motion. .
int setAxisMonAnalogInterlockPolarity(int axisIndex, int value)
Set polarity of motion axis interlock from EtherCAT entry. .
int getAxisEncPosAct(int axisIndex, double *value)
Get actual encoder position. .
int getAxisReset(int axisIndex, int *value)
Get axis reset bit. .
int setAxisDrvBrakeEnable(int axisIndex, int enable)
Set enable of brake. .
int setAxisEncPosFilterSize(int axisIndex, int size)
Set size of encoder position filter. .
int setDiagAxisEnable(int enable)
Enable detailed motion diagnostics printouts. .
int getAxisEncConfigIndex(int axisIndex, int *index)
Get index of current encoder being configured. .
int setAxisMonMaxVelDriveILDelay(int axisIndex, int value)
Set velocity monitoring interlock delay for drive. .
int setAxisCntrlIpartLL(int axisIndex, double value)
Set PID-controller minimum integral part output value. .
int getAxisMonPosLagTol(int axisIndex, double *value)
Get position lag maximum monitoring tolerance. .
int getAxisValid(int axisIndex)
Returns 1 if axis index is in use.
int getAxisModRange(int axisIndex, double *range)
Get axis modulo range. .
int getAxisEnableSoftLimitBwd(int axisIndex, int *value)
Get backward soft-limit enabled state of an axis. .
int setAxisCntrlOutHL(int axisIndex, double value)
Set PID-controller maximum output value. .
int getAxisModType(int axisIndex, int *value)
Set axis modulo motion type. .