Refman
Refman
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2.2 SDO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.3 PDO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4.1 CanInterface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.4.2 EtherCatHardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2 Hierarchical Index 9
3 Class Index 13
4 File Index 19
5 Class Documentation 23
5.1.2.1 GetInVal() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.1.2.2 Init() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.1.2.3 Received() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.2.2.1 AlgoPhaseInit() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.2.3.1 phaseInitConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.3.2.1 Init() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.3.2.2 Transmit() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.3.2.3 Update() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Generated by Doxygen
CONTENTS iii
5.4.3.1 AccLoad2User() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
5.4.3.2 AccMtr2User() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
5.4.3.3 AccUser2Load() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
5.4.3.4 AccUser2Mtr() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
5.4.3.5 CheckStateForMove() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
5.4.3.6 ClearEventLatch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
5.4.3.7 ClearFaults() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
5.4.3.8 ClearHaltedMove() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
5.4.3.9 ClearNodeGuardEvent() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
5.4.3.10 Disable() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
5.4.3.17 DnldString() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
5.4.3.22 Download() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
5.4.3.23 Enable() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Generated by Doxygen
iv CONTENTS
5.4.3.24 FormatPosInit() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
5.4.3.25 FormatPtSeg() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
5.4.3.26 FormatPvtSeg() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
5.4.3.27 GetAlgoPhaseInit() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
5.4.3.28 GetAmpConfig() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
5.4.3.29 GetAmpInfo() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
5.4.3.30 GetAmpMode() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
5.4.3.31 GetAmpName() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
5.4.3.32 GetAmpTemp() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
5.4.3.33 GetAnalogCommandFilter() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
5.4.3.34 GetAnalogEncoder() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
5.4.3.35 GetAnalogRefConfig() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
5.4.3.36 GetCammingConfig() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
5.4.3.37 GetCanNetworkConfig() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
5.4.3.38 GetControlWord() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
5.4.3.41 GetCrntLoopConfig() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
5.4.3.42 GetCurrentActual() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
5.4.3.43 GetCurrentCommand() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
5.4.3.44 GetCurrentLimited() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
5.4.3.45 GetCurrentProgrammed() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
5.4.3.46 GetDAConverterConfig() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.4.3.47 GetEncoderErrorConfig() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.4.3.48 GetErrorStatus() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.4.3.49 GetEventLatch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
5.4.3.50 GetEventMask() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
5.4.3.51 GetEventStatus() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Generated by Doxygen
CONTENTS v
5.4.3.52 GetEventSticky() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
5.4.3.53 GetFaultMask() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
5.4.3.54 GetFaults() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
5.4.3.55 GetFuncGenConfig() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
5.4.3.56 GetGainScheduling() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
5.4.3.57 GetHallState() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
5.4.3.58 GetHaltMode() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
5.4.3.59 GetHighVoltage() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
5.4.3.60 GetHomeAccel() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
5.4.3.61 GetHomeAdjustment() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
5.4.3.62 GetHomeCapture() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
5.4.3.63 GetHomeConfig() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
5.4.3.64 GetHomeCurrent() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
5.4.3.65 GetHomeDelay() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
5.4.3.66 GetHomeMethod() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
5.4.3.67 GetHomeOffset() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
5.4.3.68 GetHomeVelFast() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
5.4.3.69 GetHomeVelSlow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
5.4.3.70 GetIloopCommandFilter() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
5.4.3.71 GetIloopCommandFilter2() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
5.4.3.72 GetIndexCapture() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
5.4.3.75 GetInputDebounce() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
5.4.3.76 GetInputs() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
5.4.3.77 GetInputs32() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
5.4.3.78 GetInputShapingFilter() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
5.4.3.79 GetIoConfig() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Generated by Doxygen
vi CONTENTS
5.4.3.80 GetIOOPtions() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
5.4.3.81 GetIoPullup() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
5.4.3.82 GetIoPullup32() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
5.4.3.83 GetLinkage() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
5.4.3.84 GetLinkRef() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
5.4.3.85 GetMicrostepRate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
5.4.3.86 GetMotorCurrent() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
5.4.3.87 GetMtrInfo() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
5.4.3.88 GetNetworkOptions() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
5.4.3.89 GetNetworkRef() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
5.4.3.96 GetOutputs() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
5.4.3.97 GetPhaseAngle() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
5.4.3.98 GetPhaseMode() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
5.4.3.99 GetPosCaptureCfg() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
5.4.3.100 GetPosCaptureStat() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
5.4.3.101 GetPositionActual() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
5.4.3.102 GetPositionCommand() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
5.4.3.103 GetPositionError() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
5.4.3.104 GetPositionErrorWindow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
5.4.3.105 GetPositionLoad() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
5.4.3.106 GetPositionMotor() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
5.4.3.107 GetPositionWarnWindow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Generated by Doxygen
CONTENTS vii
5.4.3.108 GetPosLoopConfig() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
5.4.3.109 GetProfileAcc() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
5.4.3.110 GetProfileConfig() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
5.4.3.111 GetProfileDec() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
5.4.3.112 GetProfileJerk() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
5.4.3.113 GetProfileType() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
5.4.3.114 GetProfileVel() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
5.4.3.115 GetPvtBuffFree() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
5.4.3.116 GetPvtBuffStat() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
5.4.3.117 GetPvtSegID() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
5.4.3.118 GetPvtSegPos() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
5.4.3.119 GetPwmInConfig() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
5.4.3.120 GetPwmMode() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
5.4.3.121 GetQuickStop() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Generated by Doxygen
viii CONTENTS
Generated by Doxygen
CONTENTS ix
Generated by Doxygen
x CONTENTS
Generated by Doxygen
CONTENTS xi
Generated by Doxygen
xii CONTENTS
Generated by Doxygen
CONTENTS xiii
Generated by Doxygen
xiv CONTENTS
Generated by Doxygen
CONTENTS xv
Generated by Doxygen
xvi CONTENTS
Generated by Doxygen
CONTENTS xvii
5.21.2.2 id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Generated by Doxygen
xviii CONTENTS
Generated by Doxygen
CONTENTS xix
Generated by Doxygen
xx CONTENTS
Generated by Doxygen
CONTENTS xxi
Generated by Doxygen
xxii CONTENTS
Generated by Doxygen
CONTENTS xxiii
Generated by Doxygen
xxiv CONTENTS
Generated by Doxygen
CONTENTS xxv
Generated by Doxygen
xxvi CONTENTS
Generated by Doxygen
CONTENTS xxvii
Generated by Doxygen
xxviii CONTENTS
Generated by Doxygen
CONTENTS xxix
Generated by Doxygen
xxx CONTENTS
Generated by Doxygen
CONTENTS xxxi
Generated by Doxygen
xxxii CONTENTS
Generated by Doxygen
CONTENTS xxxiii
5.68.3.100Din32SetMaskHigh2Low() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413
5.68.3.101Din32SetMaskLow2High() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414
5.68.3.102Din32SetPol() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414
5.68.3.103Din8GetCt() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
Generated by Doxygen
xxxiv CONTENTS
5.68.3.104Din8GetFilt() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
5.68.3.105Din8GetMaskAny() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416
5.68.3.106Din8GetMaskHigh2Low() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416
5.68.3.107Din8GetMaskLow2High() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416
5.68.3.108Din8GetPol() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
5.68.3.109Din8Read() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
5.68.3.110Din8SetFilt() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418
5.68.3.111Din8SetMaskAny() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418
5.68.3.112Din8SetMaskHigh2Low() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419
5.68.3.113Din8SetMaskLow2High() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419
5.68.3.114Din8SetPol() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
5.68.3.115DinGetCt() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
5.68.3.116DinGetFilt() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
5.68.3.117DinGetIntEna() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
5.68.3.118DinGetMaskAny() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
5.68.3.119DinGetMaskHigh2Low() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
5.68.3.120DinGetMaskLow2High() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
5.68.3.121DinGetPol() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
5.68.3.122DinRead() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
5.68.3.123DinSetFilt() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
5.68.3.124DinSetIntEna() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
5.68.3.125DinSetMaskAny() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
5.68.3.126DinSetMaskHigh2Low() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
5.68.3.127DinSetMaskLow2High() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
5.68.3.128DinSetPol() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426
5.68.3.129Dout16GetCt() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426
5.68.3.130Dout16GetErrMode() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
5.68.3.131Dout16GetErrValue() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
Generated by Doxygen
CONTENTS xxxv
5.68.3.132Dout16GetFilt() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428
5.68.3.133Dout16GetPol() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428
5.68.3.134Dout16Read() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
5.68.3.135Dout16SetErrMode() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
5.68.3.136Dout16SetErrValue() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
5.68.3.137Dout16SetFilt() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
5.68.3.138Dout16SetPol() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
5.68.3.139Dout16Write() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
5.68.3.140Dout32GetCt() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
5.68.3.141Dout32GetErrMode() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432
5.68.3.142Dout32GetErrValue() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432
5.68.3.143Dout32GetFilt() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
5.68.3.144Dout32GetPol() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
5.68.3.145Dout32Read() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434
5.68.3.146Dout32SetErrMode() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434
5.68.3.147Dout32SetErrValue() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434
5.68.3.148Dout32SetFilt() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
5.68.3.149Dout32SetPol() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
5.68.3.150Dout32Write() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
5.68.3.151Dout8GetCt() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
5.68.3.152Dout8GetErrMode() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
5.68.3.153Dout8GetErrValue() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
5.68.3.154Dout8GetFilt() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
5.68.3.155Dout8GetPol() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
5.68.3.156Dout8Read() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
5.68.3.157Dout8SetErrMode() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
5.68.3.158Dout8SetErrValue() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
5.68.3.159Dout8SetFilt() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440
Generated by Doxygen
xxxvi CONTENTS
5.68.3.160Dout8SetPol() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440
5.68.3.161Dout8Write() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441
5.68.3.162DoutGetCt() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441
5.68.3.163DoutGetErrMode() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442
5.68.3.164DoutGetErrValue() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442
5.68.3.165DoutGetFilt() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443
5.68.3.166DoutGetPol() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443
5.68.3.167DoutSetErrMode() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444
5.68.3.168DoutSetErrValue() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444
5.68.3.169DoutSetFilt() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445
5.68.3.170DoutSetPol() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445
5.68.3.171DoutWrite() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445
5.68.3.174PostIOEvent() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447
Generated by Doxygen
CONTENTS xxxvii
Generated by Doxygen
xxxviii CONTENTS
Generated by Doxygen
CONTENTS xxxix
Generated by Doxygen
xl CONTENTS
Generated by Doxygen
CONTENTS xli
Generated by Doxygen
xlii CONTENTS
Generated by Doxygen
CONTENTS xliii
Generated by Doxygen
xliv CONTENTS
Generated by Doxygen
CONTENTS xlv
Generated by Doxygen
xlvi CONTENTS
Generated by Doxygen
CONTENTS xlvii
Generated by Doxygen
xlviii CONTENTS
Generated by Doxygen
CONTENTS xlix
Generated by Doxygen
l CONTENTS
Generated by Doxygen
CONTENTS li
Generated by Doxygen
lii CONTENTS
5.120.3.11DnldFlt() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629
Generated by Doxygen
CONTENTS liii
5.120.3.12DnldString() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629
5.120.3.15EnableBlkDnld() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631
5.120.3.16EnableBlkUpld() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631
5.120.3.17GetMaxRetry() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631
5.120.3.18GetTimeout() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 632
5.120.3.19Init() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 632
5.120.3.20SetTimeout() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 632
5.120.3.27UpldFlt() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635
5.120.3.28UpldString() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 636
Generated by Doxygen
liv CONTENTS
Generated by Doxygen
CONTENTS lv
Generated by Doxygen
lvi CONTENTS
Generated by Doxygen
CONTENTS lvii
Generated by Doxygen
lviii CONTENTS
Generated by Doxygen
CONTENTS lix
Generated by Doxygen
lx CONTENTS
Generated by Doxygen
CONTENTS lxi
Generated by Doxygen
lxii CONTENTS
Generated by Doxygen
CONTENTS lxiii
Generated by Doxygen
lxiv CONTENTS
Index 791
Generated by Doxygen
Chapter 1
1.1 Introduction
The Copley Motion Library is a collection of C++ objects which are intended to simplify the development of CANopen
and EtherCAT based products. These libraries allow low level access to the CANopen and EtherCAT networks while
also providing high level methods for easy development of network based motion control applications.
The Copley Motion Library is designed to be highly platform independent. The only requirements of a platform are:
• C++ must be supported. The Copley Motion Library makes heavy use of the object oriented features of the C++
language. Porting it to standard C would require significant effort.
• Multi-tasking. The library uses multiple threads of execution. For this reason, some type of multi-tasking operating
system is required. A real time operating system is desirable, but not necessary.
• Network hardware. Some sort of CAN hardware must be available for CANopen support. An Ethernet port must
be available for EtherCAT support.
The majority of the library code should be easily portable across platforms, even to those systems that do not have a
very complete C++ implementation. In particular, the standard C and C++ libraries have been avoided to the extent
possible.
The C++ language does not define any standard method for multi-tasking, so a generic multi-tasking layer has been
defined for use by this library. Three classes have been defined in the header file CML_Threads.h which define the
multi-tasking interface. These classes are;
• Mutex: A mechanism used to provide mutually exclusive access to a variable or system resource.
• Semaphore: A mechanism used to control access to a resource pool. This object allows threads to pend on it
with timeouts.
When porting the library to a new environment, these three objects will need to be implemented for that environment.
The libraries currently support multi-tasking under posix compatible operating systems (most Unix varieties including
Linux), and MS Windows.
2 Copley Motion Library
The Copley Motion Libraries have been designed to use a generic interface to the low level CAN network hardware.
This makes porting the libraries to new CAN hardware very straight forward. All CAN hardware access is routed through
the CanInterface object defined in the header file CML_Can.h. This object defines generic methods to open, close, read
from, and write to the CAN network. Adding support for new CAN interface hardware is as simple as implementing a
new CanInterface object derived from this class.
When communicating over an EtherCAT network, CML uses the standard operating system API calls to access the
Ethernet hardware. No special device drivers other then those normally used to access the Ethernet hardware are
required.
Note that EtherCAT requires a dedicated Ethernet port. It is generally not possible to share a single Ethernet port for
both a EtherCAT and general Ethernet communications at the same time.
CAN (Control Area Network) is a serial network originally developed for use in the automotive industry. The physical
layer of CAN consists of a two wire differentially driven bus, typically terminated with 120 Ohm resisters on each end.
The maximum bit rate supported by CAN is 1,000,000 bits/second for up to 25 meters. Lower bit rates may be used for
longer network lengths.
Communication over the CAN bus takes the form of network packets. Each packet consists of an identifier, some control
bits, and zero to eight bytes of data. Each packet is sent with CRC information which allows the CAN controllers on the
network to identify and re-send incorrectly formatted packets.
The identifier sent with each CAN packet identifies the type of packet being sent, as well as the priority of the packet.
If two or more devices on the network attempt to transmit packets at the same time, the one sending the higher priority
packet will succeed. The device sending the lower priority packet will detect the network collision and automatically back
off the network and re-try the transmission later. The fact that the higher priority packet is transmitted when a network
collision occurs allows very high network bandwidth utilization. Other network technologies (such as Ethernet) would
require both transmitting devices to abort their transmissions if a network collision was detected.
CANopen is a high level protocol used to communicate over a CAN network. It allows blocks of data larger then the
eight byte CAN limit to be transmitted as a single entity. Additionally, CANopen defines a standard framework for device
operation which simplifies communication between dissimilar devices.
In most cases a CANopen network consists of one master device, and multiple slave devices (also called network
nodes). Each of the nodes on the network has a 7-bit node ID number associated with it in the range 1 to 127 (the node
ID 0 is reserved, and should not be used). The Copley Motion Libraries are designed to run on the CANopen network
master.
Generated by Doxygen
1.2 CANopen basics 3
One of the central concepts defined by the CANopen protocol is the notion of an object dictionary. This is essentially a
collection of parameters on each device which define it's configuration and status. Most communication over the CA←-
Nopen network consists of uploading data to, and downloading data from the object dictionaries of the various devices.
Each entry in the object dictionary is accessed using a 16-bit index value. Most entries in a device's object dictionary
are simple atomic types (16-bit integers, 32-bit integers, strings, etc), however entries may be defined as complex types
(records or arrays). In this case, the individual elements in the record or array are accessed using an additional 8-bit
sub-index. It is not possible for these objects to be of complex types, so nesting of structures is not allowed.
1.2.2 SDO
The majority of traffic over the CANopen network consists of the network master reading and writing to the object
dictionaries of the slave devices (nodes) on the network. The primary mechanism through which this is accomplished is
the Service Data Object (SDO).
Each node on the CANopen network is required to implement at least one SDO. The SDO is essentially a channel that
can be opened between a network master and a slave for the purpose of reading from and writing to the slave's object
dictionary.
SDO transfers are always initiated by the master, and always confirmed by the slave. The synchronous nature of the
SDO makes error detection very straight forward. However, since every transfer using an SDO takes at least two CAN
messages (one from the master to the slave, one from the slave to the master) they can be somewhat slow for the
transfer of real time information.
For example, for the network master to update an object which holds an eight byte long value, six CAN messages will
be required:
• 1.The master sends a message to the slave indicating it's intentions to update the object. In this message it sends
the object's index and sub-index values. It also passes the size (in bytes) of the data that will be transferred.
• 2.The slave responds to the master indicating that it is ready to receive the data.
• 3.The master sends the first 7 bytes of data. SDO transfers use one byte of the CAN message data for header
information, so the largest amount of data that can be passed in any single message is 7 bytes.
• 4.The slave responds indicating that it received the data and is ready for more.
Generated by Doxygen
4 Copley Motion Library
1.2.3 PDO
A second method of accessing the data in the node's object dictionaries is defined by CANopen. This method is called
the Process Data Object (PDO) and is primarily used to transfer frequently changing real-time data.
Unlike an SDO, a PDO can be initiated by either the network master, or the slave device. In fact, unlike SDO transfers,
PDO transfers do not really follow a master - slave model. Any device on the network can initiate a PDO transfer, and a
PDO message can be received and processed by multiple devices on the network.
Every PDO message consists of exactly one CAN message. Unlike SDO transfers, there is no confirmation with PDO
transfers. This has the benefit of making much better use of the CAN network bandwidth, but since there is no response
to a PDO, some other mechanism must be found to determine if the message was received successfully.
For example, updating the value of an 8-byte long variable in a device's object dictionary using a PDO can be accom-
plished in one CAN message, unlike the 6 messages that it required using SDO transfers.
• 1.The master sends a CAN message containing the 8-bytes of data. No additional header information is passed
in the message, and no response is sent.
Of course, since all 8 bytes of the CAN message data were used to hold the object's value, there is no place the transmit
the index / sub-index of the object being updated. This information must be implied based on the CAN message ID
associated with the PDO. To create this association, a PDO must be mapped to one or more objects in a device's object
dictionary before it can be used. This is accomplished by using SDO transfers, and effectively tells the device which
object(s) a particular PDO transfer will access.
The result is that sending a PDO like in the above example requires a bit of setup using SDO transfers. It's therefore
not useful to use a PDO transfer to update an object's value just once, since this could be more efficiently done using
a single SDO transfer. However, if a particular object needs to be updated repeatedly, then the overhead of mapping a
PDO to it makes more sense.
Aside from efficiency issues, PDO transfers have some other useful features. SDO transfers are inherently one master
to one slave. PDO transfers can be used to broadcast a message to multiple other devices on the network. This is
useful for synchronizing the start of a multi-axis move, for example.
Additionally, a slave device can be configured to transmit the value of one (or more) of the objects in it's object dictionary
either at a set frequency, or when some internal event occurs. This would also be accomplished using PDO transfers.
Most communication over the CANopen network consists of reading and writing values to a device's object dictionary
using either SDO or PDO transfers. There are however several other message types which are required by the CANopen
protocol.
Network management messages are used to control the state of the devices on the CANopen network. Every CANopen
device implements a simple state machine which is controlled through the use of these messages. The following states
are defined:
• Pre-operational: Every node enters this state after power-up or reset. In this state, the device is not functional, but
will communicate over the CANopen network. PDO transfers are not allowed in pre-operational state, but SDO
transfers may be used.
Generated by Doxygen
1.2 CANopen basics 5
• Operational: This is the normal operating state for all devices. SDO and PDO transfers are both allowed.
• Stopped: No communication is allowed in this state except for network management messages. Neither SDO nor
PDO transfers may be used.
One use of network management messages is to control these state changes on the network devices. The following
network management messages are sent by the network manager to control these state changes. Each of these
messages can be either sent to a single node (by node ID), or broadcast to all the nodes on the network.
• Reset. This message causes the receiving node(s) to perform a soft reset and come up in pre-operation state.
• Reset communications. Causes the receiving node(s) to reset their CANopen network to it's power-on state, and
enter pre-operational state. This is not a full device reset, just a reset of the CANopen interface.
• Pre-operational. This message causes the receiving node(s) to enter pre-operational state. No reset is performed.
In addition to controlling the device's state machines, network management messages can be used to monitor the
operation of the nodes on the CANopen network. There are two protocols to perform this task; heartbeat and node
guarding.
The heartbeat protocol is very simple, the network master configures the node to transmit a heartbeat message at some
interval. The heartbeat message is then sent by the node at the specified frequency. The only information passed in the
heartbeat message is the current state of the node (i.e. pre-operational, operational or stopped). The network manager
can monitor these messages, and if anything happens to the node (or the network connection to the node) it can detect
this by the lack of heartbeat messages.
Node guarding is similar. The network manager configures the node to expect node guarding messages at some
interval. The network manager then sends a message to the configured node at that frequency, and the node responds
with a node guarding message. This allows both the network manager and slave device to identify a network failure if
the guarding messages stop.
Another type of message defined by the CANopen protocol is the SYNC message. This is a message that one device
is configured to transmit at some interval, and that all other devices on the network receive. It can be used for device
synchronization, and PDO transfers can be configured to be sent in response to the SYNC event.
Every CANopen network should have one (and only one) device which is configured to produce SYNC messages (the
SYNC producer). Other devices on the network which receive the SYNC messages are SYNC consumers.
Copley Controls amplifiers are able to be configured as both SYNC producers and SYNC consumers. The default
configuration for every amplifier after reset is as a SYNC consumer. The Copley Motion Library Amp class constructor
will configure one of the amplifiers as a SYNC producer by default.
Emergency messages are sent by CANopen devices when some error condition is detected. They contain information
about the type of error condition as well as manufacturer specific information not defined by the CANopen spec.
Generated by Doxygen
6 Copley Motion Library
The EtherCAT network is a high performance field bus based on the Ethernet physical layer. There are several different
high level protocols that can be implemented on top of EtherCAT, but the most common protocol, and the one supported
by CML, is the CANopen over EtherCAT (CoE) protocol. When using this protocol, the EtherCAT network acts very
much like a high speed CANopen network supporting an object dictionary, SDO and PDO access just like in CANopen.
One significant difference between the EtherCAT network and CANopen network is that in the CANopen network the
nodes are able to transmit their status updates any time they like. In the EtherCAT network the network master needs
to poll the status of the nodes.
The Copley Motion Libraries are made up of a large number of classes, but several are of primary importance and
will be used for every program. This section gives a brief overview of the most important of these classes. Detailed
documentation of each of the provided classes is provided later in the manual.
1.4.1 CanInterface
This class has already been mentioned above. It is one of the few classes that is highly platform dependent. The
CanInterface class is used to abstract the CAN network interface hardware available on the system.
Typically, one of the first objects created in a program using the Copley Motion Libraries is a CanInterface object. This
will in turn be passed to the CanOpen object.
1.4.2 EtherCatHardware
This class is the generic representation of the Ethernet hardware interface used by the operating system. Like the
CanInterface object, the exact details of this class's implementation will be different depending on the operating system
being used.
The CanOpen class is derived from the Network class and represents the CANopen network. The Open method of this
class must be called before the class can be used. This method takes a reference to a CanInterface object as it's only
parameter. The CanOpen class will then attempt to open the CAN interface (by calling CanInterface::Open method),
and if that is successful it will start a new thread which will be responsible for reading messages from the CAN interface.
It is possible to have more then one CanOpen object in a system. Each should be connected to a distinct CAN network,
and each should therefore be passed a distinct CanInterface object.
The primary responsibility of the CanOpen object is to listen for messages on the CAN network. To perform this task, the
CanOpen object creates a separate high priority thread which constantly monitors the CAN network for new messages.
Every time a new message is received, the read thread searches for a Receiver object associated with the message's
CAN ID. If such an object is found, it's handler method is called to process the message.
Generated by Doxygen
1.4 Architectural overview 7
The EtherCAT class is derived from the Network class and represents the EtherCAT network. The Open method of this
class must be called before the class can be used. This method takes a reference to a EtherCatHardware object as it's
only parameter. That object will be used to perform the low level communications with the Ethernet hardware.
Receiver objects are used to listen for messages on the CAN network. Each Receiver object has a CAN message ID
associated with it. When a message is received which has this ID value, the CanOpen object will search for a Receiver
object with that ID. If no such Receiver is found, the message will be ignored. If a Receiver object with a matching ID is
found, then the virtual Receiver::NewFrame() method will be called.
The Node class represents a node (slave device) on the CANopen network. This class is passed a node ID value,
and a reference to a CanOpen object during construction. The CanOpen object identifies which network the Node is
connected to.
The Node class defines various methods to read and write standard objects from the node's object dictionary. The
objects that are built into the Node class are those that are defined in the CANopen communication specification (D←-
S301).
The Node class also includes logic which allows it to transmit and monitor the node guarding (or heartbeat) protocols
for the device on the network. If the device being monitored stops responding, or changes state, the virtual method
HandleStateChange() will be called. By default this does nothing, but it may be extended to perform any necessary
action to handle the condition.
The Amp inherits from the Node class, and is used to represent a Copley Controls amplifier on the CANopen network.
This class includes numerous methods used to get and set various amplifier parameters. The Amp class also includes
several high level methods used to make point to point moves, home the amplifier, and stream complex PVT style
profiles down to the amplifier.
Generated by Doxygen
8 Copley Motion Library
Generated by Doxygen
Chapter 2
Hierarchical Index
AlgoPhaseInit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
AmpConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
AmpInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
AmpIoCfg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
AmpSettings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
AnalogRefConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
Array< C > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Array< PDO_Info > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
CammingConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
CanFrame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
CanNetworkConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
CanOpenSettings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
CopleyIOAnlg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
CopleyIOCfg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
CopleyIODigi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
CopleyIOInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
CopleyIOPWM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
CopleyMotionLibrary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
CrntLoopConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
DAConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
EcatDgram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
APRD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
APWR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
ARMW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
BRD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
BWR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
FPRD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
FPWR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
EncoderErrorConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
AmpFileError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
10 Hierarchical Index
CanError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
CanOpenError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
EtherCatError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
EventError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
FirmwareError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
IOFileError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
LinkError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484
NetworkError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518
NodeError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539
AmpError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
AmpFault . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
CopleyNodeError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
IOError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
PathError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551
PDO_Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559
PvtConstAccelTrjError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595
PvtTrjError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 600
ScurveError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621
SDO_Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637
ThreadError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655
TrjError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665
EtherCatSettings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
EventAll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
EventAny . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
EventAnyClear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
EventNone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
EventMap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
Firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
FuncGenConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
GainScheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
HomeConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
InputShaper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
IOModuleSettings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448
LinkSettings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487
MtrInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507
Mutex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512
MutexLocker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513
NetworkNodeInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519
CanOpenNodeInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
NetworkOptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 520
NodeIdentity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541
Pmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 560
Pmap16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565
Pmap24 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569
Pmap32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572
Pmap8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576
PmapRaw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579
PointN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 584
Point< N > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 582
Point< CML_MAX_AMPS_PER_LINK > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 582
Point< PATH_MAX_DIMENSIONS > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 582
Generated by Doxygen
2.1 Class Hierarchy 11
PosLoopConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586
ProfileConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587
ProfileConfigScurve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589
ProfileConfigTrap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 590
ProfileConfigVel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 592
PvtSegCache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596
PwmInConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601
RefObj . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605
CanInterface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
CopleyCAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
IxxatCAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452
IxxatCANV3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
KvaserCAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
SiemensCAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643
EcatFrame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
EtherCatHardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
LinuxEcatHardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496
WinUdpEcatHardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675
Linkage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468
LinkTrajectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489
LinkTrjScurve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493
Path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 542
PvtConstAccelTrj . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594
PvtTrj . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599
Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514
CanOpen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
EtherCAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
Node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521
CopleyNode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Amp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
IOModule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
CopleyIO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
PDO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553
RPDO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616
IOModule::AlgOutPDO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
IOModule::DigOutPDO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
RPDO_LinkCtrl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618
TPDO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656
IOModule::AlgInPDO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
IOModule::DigInPDO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Receiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603
LSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497
Trajectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661
TrjScurve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 666
RefObjLocker< RefClass > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612
RegenConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613
SDO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622
Semaphore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 640
ServoLoopConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 642
SoftPosLimit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 649
Thread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 651
CanOpen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Generated by Doxygen
12 Hierarchical Index
Linkage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468
TrackingWindows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659
UstepConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670
VelLoopConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672
Generated by Doxygen
Chapter 3
Class Index
Here are the classes, structs, unions and interfaces with brief descriptions:
IOModule::AlgInPDO
Transmit PDO for mapping analog inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
AlgoPhaseInit
Configuration structure used to set up algorithmic phase init . . . . . . . . . . . . . . . . . . . . . 26
IOModule::AlgOutPDO
Receive PDO for mapping analog outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Amp
Copley Controls amplifier object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
AmpConfig
Amplifier configuration structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
AmpError
This class represents error conditions that can occur in the Copley Amplifier object . . . . . . . . . 188
AmpFault
This class represents latching amplifier fault conditions . . . . . . . . . . . . . . . . . . . . . . . . 192
AmpFileError
This class represents error conditions that can occur when loading amplifer data from a data file . . 195
AmpInfo
Amplifier characteristics data structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
AmpIoCfg
Programmable I/O pin configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
AmpSettings
Copley amplifier settings object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
AnalogRefConfig
Analog input configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
APRD
Read by position in network (aka Auto Increment Physical Read) The read is performed on the node
who's position matches the passed address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
APWR
Write by position in network (Auto Increment Physical Write) Like the APRD datagram, but a write
version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
ARMW
Read by position in network and write to the same address of all following nodes . . . . . . . . . . . 210
14 Class Index
Array< C >
This class template implements a simple dynamic array of a given type . . . . . . . . . . . . . . . . 211
BRD
Broadcast read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
BWR
Broadcast write. This type of datagram writes data to the same location on every node in the network 215
CammingConfig
Configuration structure used to set up the camming . . . . . . . . . . . . . . . . . . . . . . . . . . 216
CanError
Class used to represent an error condition returned from a CAN interface function . . . . . . . . . . 218
CanFrame
Low level CAN data frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
CanInterface
Abstract class used for low level interaction with CAN hardware . . . . . . . . . . . . . . . . . . . . 221
CanNetworkConfig
CANopen Node ID and bit rate configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
CanOpen
Top level interface into the CANopen network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
CanOpenError
This class holds the error codes that describe CANopen error conditions . . . . . . . . . . . . . . . 243
CanOpenNodeInfo
The CanOpenNodeInfo structure holds some data required by the CANopen network interface which
is present in every node it manages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
CanOpenSettings
Configuration object used to customize global settings for the CANopen network . . . . . . . . . . . 249
CopleyCAN
This class extends the generic CanInterface class into a working interface for the Copley can device
driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
CopleyIO
This class represents a Copley CANopen I/O module . . . . . . . . . . . . . . . . . . . . . . . . . 256
CopleyIOAnlg
This structure is used to return information about the analog inputs of a Copley I/O module . . . . . 266
CopleyIOCfg
IO Module configuration structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
CopleyIODigi
This structure is used to return information about the digital I/O of a Copley I/O module . . . . . . . 268
CopleyIOInfo
IO Module characteristics data structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
CopleyIOPWM
This structure is used to return information about the PWM outputs of a Copley I/O module . . . . . 271
CopleyMotionLibrary
Copley Motion Libraries utility object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
CopleyNode
Copley CANopen Node class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
CopleyNodeError
This class represents errors that can be returned by the CopleyNode class . . . . . . . . . . . . . . 280
CrntLoopConfig
This structure holds the current loop configuration parameters . . . . . . . . . . . . . . . . . . . . 282
DAConfig
Configuration structure used to hold the settings for a drive's D/A converter . . . . . . . . . . . . . . 285
IOModule::DigInPDO
Transmit PDO for mapping digital inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
IOModule::DigOutPDO
Receive PDO for mapping digital output pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
Generated by Doxygen
3.1 Class List 15
EcatDgram
Generic EtherCAT datagram class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
EcatFrame
EtherCAT frame class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
EncoderErrorConfig
This structure holds configuration info about the encoder error filter . . . . . . . . . . . . . . . . . . 300
Error
This class is the root class for all error codes returned by functions defined within the Motion Library 301
EtherCAT
Top level interface into the EtherCAT network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
EtherCatError
This class holds the error codes that describe EtherCAT error conditions . . . . . . . . . . . . . . . 317
EtherCatHardware
Low level Ethernet hardware interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
EtherCatSettings
Configuration object used to customize global settings for the EtherCAT network . . . . . . . . . . . 321
Event
Events are a generic mechanism used to wait on some condition . . . . . . . . . . . . . . . . . . . 322
EventAll
This is an event that matches if all of a group of bits are set in the EventMap mask . . . . . . . . . . 328
EventAny
This is an event that matches if any of a group of bits are set in the EventMap mask . . . . . . . . . 330
EventAnyClear
This is an event that matches if any of a group of bits are clear in the EventMap mask . . . . . . . . 333
EventError
This class represents error conditions related to the Event object . . . . . . . . . . . . . . . . . . . 335
EventMap
An event map is a mechanism that allows one or more threads to wait on some pre-defined event, or
group of events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
EventNone
This is an event that matches if none of a group of bits are set in the EventMap mask . . . . . . . . 340
Filter
Generic filter structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
Firmware
Copley Controls amplifier firmware object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
FirmwareError
This class represents error conditions that can occur while accessing a Copley Controls amplifier
firmware object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
FPRD
Read by assigned node ID (Configured Address Physical Read) The master assigns each node a
unique 16-bit address at startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
FPWR
Write by assigned node ID (Configured Address Physical Write) . . . . . . . . . . . . . . . . . . . 349
FuncGenConfig
Configuration parameters for amplifier's internal function generator . . . . . . . . . . . . . . . . . . 350
GainScheduling
Configuration structure used to set up the Gain Scheduling . . . . . . . . . . . . . . . . . . . . . . 351
HomeConfig
Homing parameter structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
InputShaper
Generic input shaper structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
IOError
I/O module errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
Generated by Doxygen
16 Class Index
IOFileError
This class represents error conditions that can occur when loading IO module data from a data file . 358
IOModule
Standard CANopen I/O module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
IOModuleSettings
Standard CANopen I/O module settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448
IxxatCAN
Ixxat specific CAN interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452
IxxatCANV3
Ixxat specific CAN interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
KvaserCAN
Kvaser specific CAN interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
Linkage
Linkage object, used for controlling a group of coordinated amplifiers . . . . . . . . . . . . . . . . . 468
LinkError
This class represents error conditions that can occur in the Linkage class . . . . . . . . . . . . . . 484
LinkSettings
Linkage object settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487
LinkTrajectory
Linkage trajectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489
LinkTrjScurve
Multi-axis s-curve profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493
LinuxEcatHardware
This class provides an interface to the Ethernet ports on a linux system . . . . . . . . . . . . . . . 496
LSS
CANopen Layer Setting Services object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497
MtrInfo
Motor information structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507
Mutex
This class represents an object that can be used by multiple threads to gain safe access to a shared
resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512
MutexLocker
This is a utility class that locks a mutex in it's constructor, and unlocks it in it's destructor . . . . . . . 513
Network
Abstract network class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514
NetworkError
This class holds the error codes that describe various Netowrk error conditions . . . . . . . . . . . 518
NetworkNodeInfo
Private data owned by the network object attached to every node . . . . . . . . . . . . . . . . . . . 519
NetworkOptions
Configuration structure used to configure the amplifiers network support . . . . . . . . . . . . . . . 520
Node
Node class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521
NodeError
This class represents node errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539
NodeIdentity
CANopen identity object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541
Path
Multi-axis complex trajectory path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 542
PathError
This class represents errors returned by the path Path object . . . . . . . . . . . . . . . . . . . . . 551
PDO
PDO (Process Data Object) base class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553
Generated by Doxygen
3.1 Class List 17
PDO_Error
This class represents error conditions related to PDOs . . . . . . . . . . . . . . . . . . . . . . . . 559
Pmap
This class allows variables to be mapped into a PDO . . . . . . . . . . . . . . . . . . . . . . . . . 560
Pmap16
This is a PDO variable mapping class that extends the virtual Pmap class to handle 16-bit integers . 565
Pmap24
This is a PDO variable mapping class that extends the virtual Pmap class to handle 24-bit integers . 569
Pmap32
This is a PDO variable mapping class that extends the virtual Pmap class to handle 32-bit integers . 572
Pmap8
This is a PDO variable mapping class that extends the virtual Pmap class to handle 8-bit integers . . 576
PmapRaw
This is the most generic PDO variable mapping class . . . . . . . . . . . . . . . . . . . . . . . . . 579
Point< N >
Template used for N dimensional objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 582
PointN
An N axis point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 584
PosLoopConfig
This structure holds the position loop configuration parameters specific to the Copley amplifier . . . 586
ProfileConfig
Amplifier profile parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587
ProfileConfigScurve
S-curve profile parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589
ProfileConfigTrap
Trapezoidal profile parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 590
ProfileConfigVel
Velocity profile parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 592
PvtConstAccelTrj . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594
PvtConstAccelTrjError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595
PvtSegCache
PVT trajectory segment cache object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596
PvtTrj . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599
PvtTrjError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 600
PwmInConfig
PWM or Pulse/Direction input configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601
Receiver
CANopen receiver object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603
RefObj
This class is used to track object references in the CML library . . . . . . . . . . . . . . . . . . . . 605
RefObjLocker< RefClass >
This is a utility class that locks a reference in it's constructor, and unlocks it in it's destructor . . . . . 612
RegenConfig
Configuration structure used to set up the amplifier regeneration resister . . . . . . . . . . . . . . . 613
RPDO
Receive PDO (received by node, transmitted by this software) . . . . . . . . . . . . . . . . . . . . 616
RPDO_LinkCtrl
Receive PDO used to update the control word of all amplifiers in the linkage . . . . . . . . . . . . . 618
ScurveError
This class represents error conditions that can occur in the TrjScurve class . . . . . . . . . . . . . . 621
SDO
CANopen Service Data Object (SDO) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622
SDO_Error
This class represents SDO errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637
Generated by Doxygen
18 Class Index
Semaphore
Generic semaphore class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 640
ServoLoopConfig
This structure holds configuration info about specific parts of the velocity and position loops . . . . . 642
SiemensCAN
SiemensPCIeToCAN specific CAN interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643
SoftPosLimit
Software limit switch configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 649
Thread
Virtual class which provides multi-tasking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 651
ThreadError
Errors related to the multi-threaded libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655
TPDO
Transmit PDO (transmitted by node, received by this software) . . . . . . . . . . . . . . . . . . . . 656
TrackingWindows
Position and velocity error windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659
Trajectory
Trajectory information class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661
TrjError
This class represents error conditions reported by the trajectory classes . . . . . . . . . . . . . . . 665
TrjScurve
Asymmetric S-curve profile generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 666
UstepConfig
Configuration structure used to set up the microstepper . . . . . . . . . . . . . . . . . . . . . . . . 670
VelLoopConfig
This structure holds the velocity loop configuration parameters specific to the Copley amplifier . . . . 672
WinUdpEcatHardware
This class provides an interface to the Ethernet ports on a windows system . . . . . . . . . . . . . 675
Generated by Doxygen
Chapter 4
File Index
Amp.cpp
This file provides most of the implementation for the Copley Amplifier object . . . . . . . . . . . . . 679
AmpFile.cpp
This file contains code used to read CME-2 .ccx and .ccd amplifier files . . . . . . . . . . . . . . . 680
AmpFW.cpp
This file contains code used to update an amplifier's firmware over the CANopen network . . . . . . 682
AmpParam.cpp
This file contains the AMP object methods used to upload / download various amplifier parameters . 682
AmpPDO.cpp
This file contains code that implements PDO objects used by the Copley Controls amplifier object . . 683
AmpPVT.cpp
This file contains the code used by the Amp object to stream PVT trajectory profiles over the CA←-
Nopen network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684
AmpStruct.cpp
This file contains the AMP object methods used to upload / download structures containing groups
of amplifier parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684
AmpUnits.cpp
This file contains the AMP object methods used to handle unit conversions . . . . . . . . . . . . . . 685
AmpVersion.cpp
This file contains some rules used by the Amp object to determine if certain features are supported
by the amplifier based on it's model number and firmware version number . . . . . . . . . . . . . . 685
Can.cpp
This file handles the initialization of the static variables (error codes) used by the CanError and Can←-
Interface classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686
can_copley.h
CAN hardware interface for the Copley Controls CAN card . . . . . . . . . . . . . . . . . . . . . . 686
can_ixxat.h
CAN hardware interface for the Ixxat CAN driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . 688
can_ixxat_v3.h
CAN hardware interface for the Ixxat CAN driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689
can_kvaser.h
CAN hardware interface for the Kvaser CAN driver . . . . . . . . . . . . . . . . . . . . . . . . . . 690
20 File Index
can_siemens.h
CAN hardware interface for the SiemensPCIeToCAN CAN driver . . . . . . . . . . . . . . . . . . . 692
CanOpen.cpp
This file holds code for the top level CANopen class . . . . . . . . . . . . . . . . . . . . . . . . . . 692
CML.cpp
CML object definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 693
CML.h
Top level include file for the CML libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 694
CML_Amp.h
This file defines the Copley Amplifier object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 695
CML_AmpDef.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697
CML_AmpStruct.h
This file contains a number of structures used to pass configuration parameters to an Amp object . . 722
CML_Array.h
This file implements a simple dynamic array template used in CML . . . . . . . . . . . . . . . . . . 725
CML_Can.h
This file contains the base classes used to define the low level interface to the CAN network hardware 726
CML_CanOpen.h
This header file defines the classes used for the top level of the CANopen network . . . . . . . . . . 727
CML_Copley.h
This header file defines a generic Copley node type . . . . . . . . . . . . . . . . . . . . . . . . . . 729
CML_CopleyIO.h
Standard CANopen I/O module support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 730
CML_Error.h
This file defines the top level error class used throughout the library . . . . . . . . . . . . . . . . . 734
CML_EtherCAT.h
This header file defines the classes used to represent the top level of the EtherCAT network interface 735
CML_EventMap.h
This file defines the Event Map class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 737
CML_File.h
This file holds various handy functions for parsing files . . . . . . . . . . . . . . . . . . . . . . . . 738
CML_Filter.h
This file defines the Filter object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 739
CML_Firmware.h
This file defines classes related to the Copley amplifier Firmware object . . . . . . . . . . . . . . . 741
CML_Geometry.h
This file contains class definitions used to define multi-axis trajectory paths . . . . . . . . . . . . . . 742
CML_InputShaper.h
This file defines the InputShaper object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 743
CML_IO.h
Standard CANopen I/O module support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 745
CML_Linkage.h
This file defines the Linkage object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 751
CML_Network.h
This header file defines the classes used for the generic top level network interface . . . . . . . . . 753
CML_Node.h
This header file defines the classes that define a generic node on the network . . . . . . . . . . . . 756
CML_PDO.h
This header file defines the classes used to communicate to CANopen nodes using Process Data
Objects (PDOs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 758
CML_PvtConstAccelTrj.h
This header file defines the classes that define the PvtConstAccelTrj class . . . . . . . . . . . . . . 759
CML_PvtTrj.h
This header file defines the classes that define the PvtTrj class . . . . . . . . . . . . . . . . . . . . 760
Generated by Doxygen
4.1 File List 21
CML_Reference.h
This header file defines a set of classes used to handle reference counting within the CML library . . 761
CML_SDO.h
This header file defines the classes used to communicate to CANopen nodes using Service Data
Objects (SDOs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 763
CML_Settings.h
This file provides some configuration options used to customize the Copley Motion Libraries . . . . . 766
CML_Threads.h
The classes defined in this file provide an operating system independent way of accessing multi-
tasking system features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 770
CML_Trajectory.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 772
CML_TrjScurve.h
This file defines the TrjScurve class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 773
CML_Utils.h
This file holds various handy utility types and functions . . . . . . . . . . . . . . . . . . . . . . . . 774
CopleyIO.cpp
This file contains the CopleyIO object methods used to upload / download structures containing
groups of module parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 777
CopleyNode.cpp
This file holds code to implement the CopleyNode object . . . . . . . . . . . . . . . . . . . . . . . 778
ecatdc.cpp
This file holds some utility code used by the EtherCAT network when initializing it's distributed clock . 778
Error.cpp
This file handles initializing the static data objects used by the Error class . . . . . . . . . . . . . . 779
EtherCAT.cpp
This file holds code for the top level EtherCAT class . . . . . . . . . . . . . . . . . . . . . . . . . . 779
EventMap.cpp
This file contains the implementation of the EventMap class . . . . . . . . . . . . . . . . . . . . . . 780
File.cpp
This file contains code used to parse CME-2 type files . . . . . . . . . . . . . . . . . . . . . . . . 781
Filter.cpp
Implementation of the Filter class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 781
Firmware.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 782
Geometry.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783
InputShaper.cpp
Implementation of the InputShaper class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783
IOmodule.cpp
I/O module object support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783
Linkage.cpp
Implementation of the Linkage class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 784
Network.cpp
This file holds code for the top level CANopen class . . . . . . . . . . . . . . . . . . . . . . . . . . 785
Node.cpp
This file holds code to implement the CANopen node related objects . . . . . . . . . . . . . . . . . 785
PDO.cpp
This file holds the code needed to implement CANopen Process Data Objects (PDOs) . . . . . . . 786
PvtConstAccelTrj.cpp
This file holds code to implement the PvtConstAccelTrj class . . . . . . . . . . . . . . . . . . . . . 786
PvtTrj.cpp
This file holds code to implement the PvtTrj class . . . . . . . . . . . . . . . . . . . . . . . . . . . 787
Reference.cpp
This file holds the code needed to implement the CML reference counting objects . . . . . . . . . . 787
SDO.cpp
This file contains the code used to implement the CANopen SDO objects . . . . . . . . . . . . . . 788
Generated by Doxygen
22 File Index
Threads.cpp
This file only contains definitions for the generic thread error objects . . . . . . . . . . . . . . . . . 788
Generated by Doxygen
Chapter 5
Class Documentation
RefObj
PDO
TPDO
IOModule::AlgInPDO
24 Class Documentation
RefObj Pmap
map
PDO
TPDO
IOModule::AlgInPDO
• const Error ∗ Init (class IOModule ∗io, uint32 cobID, uint8 ct, uint8 id[ ], IOMODULE_EVENTS event)
Initialize a analog input PDO object.
• bool GetInVal (uint8 id, int16 &value)
Read the specified input from the PDO's cached data.
• void Received (void)
New transmit PDO received.
This class represents the standard transmit PDO which can be used to map up to 4 16-bit analog inputs.
Generated by Doxygen
5.1 IOModule::AlgInPDO Class Reference 25
5.1.2.1 GetInVal()
bool GetInVal (
uint8 id,
int16 & value )
The value returned will be the last value received via PDO for this input bank.
Parameters
id The input ID to be checked.
value The input value will be returned here. If the input is not mapped to this PDO, then this will not be changed.
Returns
true if the value was returned, false if the input isn't mapped to this PDO.
5.1.2.2 Init()
Parameters
Returns
Generated by Doxygen
26 Class Documentation
5.1.2.3 Received()
void Received (
void ) [virtual]
This method is called by the CANopen reader thread when a new PDO message is received. It causes this PDO object
to post it's event to the IOModule object's event map. This will cause any waiting threads to wake up.
The documentation for this class was generated from the following files:
• CML_IO.h
• IOmodule.cpp
• AlgoPhaseInit (void)
Default constructor.
Public Attributes
• uint16 phaseInitCurrent
Maximum Current to use with algorithmic phase initialization. (0.01 amp units)
• uint16 phaseInitTime
Algorithmic phase initialization timeout. (milliseconds)
• uint16 phaseInitConfig
Algorithmic Phase Initialization config.
These settings may be up/download from the amplifier using the functions Amp::SetAlgoPhaseInit and Amp::GetAlgo←-
PhaseInit.
Generated by Doxygen
5.3 IOModule::AlgOutPDO Class Reference 27
5.2.2.1 AlgoPhaseInit()
AlgoPhaseInit (
void ) [inline]
Default constructor.
5.2.3.1 phaseInitConfig
uint16 phaseInitConfig
Bit mapped as follows (Bit 0 If clear, use algorithmic phase initialization. If set force the phase angle to 0. bits 1 - 15
reserved
The documentation for this struct was generated from the following file:
• CML_AmpStruct.h
Generated by Doxygen
28 Class Documentation
RefObj
PDO
RPDO
IOModule::AlgOutPDO
RefObj Pmap
map
PDO
RPDO
IOModule::AlgOutPDO
Generated by Doxygen
5.3 IOModule::AlgOutPDO Class Reference 29
• const Error ∗ Init (class IOModule ∗io, uint32 cobID, uint8 ct, uint8 id[ ])
Initialize an analog output PDO object.
• bool Update (uint8 id, int16 value)
Update the locally stored value of one of the 16-bit analog outputs associated with this PDO.
• const Error ∗ Transmit (void)
Transmit this PDO.
This class represents the standard receive PDO which can be used to transmit up to 4 16-bit analog outputs.
5.3.2.1 Init()
Parameters
Returns
Generated by Doxygen
30 Class Documentation
5.3.2.2 Transmit()
Returns
5.3.2.3 Update()
bool Update (
uint8 id,
int16 value )
Update the locally stored value of one of the 16-bit analog outputs associated with this PDO.
Parameters
id The output block ID to be updatad.
value The new value for the output block.
Returns
true if the value was updated, false if the block isn't mapped to this PDO.
The documentation for this class was generated from the following files:
• CML_IO.h
• IOmodule.cpp
Generated by Doxygen
5.4 Amp Class Reference 31
RefObj
Node
CopleyNode
Amp
RefObj SDO
sdo
Node
CopleyNode EventMap
eventMap
Amp
Generated by Doxygen
32 Class Documentation
• virtual const Error ∗ UpdateEvents (uint16 stat, uint32 events, uint16 inputs)
Update the amplifier's event map based on the status information received by a status PDO.
• void PvtStatusUpdate (uint32 status)
This is an internal function which should not be called by user code.
• virtual uint32 GetNetworkRef (void)
Return a reference ID to the network that this node is attached to.
• virtual NodeState GetState (void)
Returns the present state of this node.
• const Error ∗ GetStatusWord (uint16 &value)
Get the current value of the drive's status word.
• virtual const Error ∗ SetControlWord (uint16 value)
Set the amplifier's control word.
• const Error ∗ GetControlWord (uint16 &value)
Returns the present value of the CANopen device profile control word.
Amplifier initialization
• Amp ()
Default constructor.
• Amp (Network &net, int16 nodeID)
Construct and initialize an amplifier object using defaults for all amp settings.
• Amp (Network &net, int16 nodeID, AmpSettings &settings)
Construct and initialize an amplifier object.
• virtual ∼Amp ()
Amp object destructor.
• const Error ∗ Init (Network &net, int16 nodeID)
Initialize the amplifier object using all default settings.
• const Error ∗ Init (Network &net, int16 nodeID, AmpSettings &settings)
Initialize the amplifier object with custom amp settings.
• const Error ∗ ReInit (void)
Re-initialize an amplifier.
• const Error ∗ Reset (void)
Reset the amplifier object.
• const Error ∗ InitSubAxis (Amp &primary, int axis=2)
Initialize an Amp object for use with a secondary axis of a multi-axis EtherCAT amplifier.
Generated by Doxygen
5.4 Amp Class Reference 33
Generated by Doxygen
34 Class Documentation
Generated by Doxygen
5.4 Amp Class Reference 35
Set the input pin configuration for the specified input pin.
• const Error ∗ GetInputConfig (int8 pin, INPUT_PIN_CONFIG &cfg)
Get the input pin configuration for the specified input pin.
• const Error ∗ GetInputConfig (int8 pin, INPUT_PIN_CONFIG &cfg, uint16 &axis)
Get the input pin configuration for the specified input pin.
• const Error ∗ SetInputDebounce (int8 pin, int16 value)
Set the input pin debounce time for the specified input pin.
• const Error ∗ GetInputDebounce (int8 pin, int16 &value)
Get the input pin debounce time for the specified input pin.
• const Error ∗ SetOutputConfig (int8 pin, OUTPUT_PIN_CONFIG cfg, uint32 mask1=0, uint32 mask2=0, uint16
axis=0)
Set the output pin configuration for the specified pin.
• const Error ∗ GetOutputConfig (int8 pin, OUTPUT_PIN_CONFIG &cfg)
Get the output configuration for the specified pin.
• const Error ∗ GetOutputConfig (int8 pin, OUTPUT_PIN_CONFIG &cfg, uint16 &axis)
Get the output configuration for the specified pin.
• const Error ∗ GetOutputConfig (int8 pin, OUTPUT_PIN_CONFIG &cfg, uint32 &mask)
Get the output pin configuration for the specified pin.
• const Error ∗ GetOutputConfig (int8 pin, OUTPUT_PIN_CONFIG &cfg, uint32 &mask, uint16 &axis)
Get the output pin configuration for the specified pin.
• const Error ∗ GetOutputConfig (int8 pin, OUTPUT_PIN_CONFIG &cfg, uint32 &mask1, uint32 &mask2)
Get the output pin configuration for the specified pin.
• const Error ∗ GetOutputConfig (int8 pin, OUTPUT_PIN_CONFIG &cfg, uint32 &mask1, uint32 &mask2, uint16
&axis)
Get the output pin configuration for the specified pin.
• const Error ∗ SetOutputs (uint16 value)
Update the state of the manual output pins.
• const Error ∗ GetOutputs (uint16 &value)
Get the present value of the output pin control register.
• const Error ∗ SetIOOptions (int32 value)
Set the IO Options.
• const Error ∗ GetIOOPtions (int32 &value)
Get the IO Options.
• const Error ∗ SetIoPullup32 (int32 value)
32 Bit version of SetIoPullup.
• const Error ∗ GetIoPullup32 (int32 &value)
32 Bit version of GetIoPullup.
Position capture
Generated by Doxygen
36 Class Documentation
Read the complete amplifier configuration from the amplifier and return it in the passed structure.
• const Error ∗ SetAmpConfig (AmpConfig &cfg)
Update an amplifier's configuration from the passed structure.
• const Error ∗ SaveAmpConfig (AmpConfig &cfg)
Upload the passed amplifier configuration to the amplifier's workign memory, and then copy that working memory to
flash.
• const Error ∗ SaveAmpConfig (void)
Save all amplifier parameters to internal flash memory.
• const Error ∗ LoadFromFile (const char ∗name, int &line)
Load the specified amplifier data file.
• const Error ∗ LoadCCDFromFile (const char ∗name, Network &net)
Checks the network type and calls the correct function to write the ccd file to the amplifier.
• const Error ∗ GetCanNetworkConfig (CanNetworkConfig &cfg)
Get the current CANopen network configuration programmed into the amplifier.
• const Error ∗ SetCanNetworkConfig (CanNetworkConfig &cfg)
Set the CANopen node ID and bit rate configuration.
• const Error ∗ GetNetworkOptions (NetworkOptions &cfg)
Set the Network Options configuration.
• const Error ∗ SetNetworkOptions (NetworkOptions &cfg)
Set the Network Options configuration.
• const Error ∗ GetAmpInfo (AmpInfo &info)
Read the Amplifier information parameters from the drive.
• const Error ∗ GetMtrInfo (MtrInfo &info)
Read the motor information structure from the amplifier.
• const Error ∗ SetMtrInfo (MtrInfo &info)
Update the amplifier's motor information.
• const Error ∗ GetRegenConfig (RegenConfig &cfg)
Upload the current configuration parameters for the power regeneration resister connected to the amplifier.
• const Error ∗ SetRegenConfig (RegenConfig &cfg)
Download a new configuration structure for the power regeneration resister.
• const Error ∗ GetUstepConfig (UstepConfig &cfg)
Upload the current configuration parameters for the stepper.
• const Error ∗ SetUstepConfig (UstepConfig &cfg)
Download a new configuration structure for the microstepper.
• const Error ∗ GetAlgoPhaseInit (AlgoPhaseInit &cfg)
Upload the current configuration parameters for the algorithmic phase init.
• const Error ∗ SetAlgoPhaseInit (AlgoPhaseInit &cfg)
Download a new configuration structure for the algorithmic phase init.
• const Error ∗ GetCammingConfig (CammingConfig &cfg)
Upload the current configuration parameters for the camming.
• const Error ∗ SetCammingConfig (CammingConfig &cfg)
Download a new configuration structure for Camming.
• const Error ∗ GetGainScheduling (GainScheduling &cfg)
Upload the current configuration parameters for the GainS cheduling.
• const Error ∗ SetGainScheduling (GainScheduling &cfg)
Download a new configuration structure for Gain Scheduling.
• const Error ∗ GetDAConverterConfig (DAConfig &cfg)
Get the configuration for the D/A converter.
• const Error ∗ SetDAConverterConfig (DAConfig &cfg)
Set the D/A converter configuration.
• const Error ∗ GetSpecialFirmwareConfig (AmpConfig &cfg)
Reads the amplifier's special firmware.
• const Error ∗ SetSpecialFirmwareConfig (AmpConfig &cfg)
Configure the amplifier's special firmware.
• const Error ∗ GetEncoderErrorConfig (EncoderErrorConfig &cfg)
Generated by Doxygen
5.4 Amp Class Reference 37
• const Error ∗ Download (int16 index, int16 sub, int32 size, byte ∗data)
Download data to an object in this Amps object dictionary.
• const Error ∗ Upload (int16 index, int16 sub, int32 &size, byte ∗data)
Upload data from an object in this Amps object dictionary.
• const Error ∗ Dnld32 (int16 index, int16 sub, uint32 data)
Download data to an object in this Amps object dictionary.
• const Error ∗ Dnld32 (int16 index, int16 sub, int32 data)
Download data to an object in this Amps object dictionary.
• const Error ∗ Upld32 (int16 index, int16 sub, uint32 &data)
Upload data from an object in this Amps object dictionary.
• const Error ∗ Upld32 (int16 index, int16 sub, int32 &data)
Upload data from an object in this Amps object dictionary.
• const Error ∗ Dnld16 (int16 index, int16 sub, uint16 data)
Download data to an object in this Amps object dictionary.
• const Error ∗ Dnld16 (int16 index, int16 sub, int16 data)
Download data to an object in this Amps object dictionary.
• const Error ∗ Upld16 (int16 index, int16 sub, uint16 &data)
Upload data from an object in this Amps object dictionary.
• const Error ∗ Upld16 (int16 index, int16 sub, int16 &data)
Upload data from an object in this Amps object dictionary.
• const Error ∗ Dnld8 (int16 index, int16 sub, uint8 data)
Download data to an object in this Amps object dictionary.
• const Error ∗ Dnld8 (int16 index, int16 sub, int8 data)
Download data to an object in this Amps object dictionary.
• const Error ∗ Upld8 (int16 index, int16 sub, uint8 &data)
Upload data from an object in this Amps object dictionary.
• const Error ∗ Upld8 (int16 index, int16 sub, int8 &data)
Upload data from an object in this Amps object dictionary.
• const Error ∗ DnldString (int16 index, int16 sub, char ∗data)
Download data to an object in this Amps object dictionary.
• const Error ∗ UpldString (int16 index, int16 sub, int32 &len, char ∗data)
Upload data from an object in this Amps object dictionary.
Generated by Doxygen
38 Class Documentation
Generated by Doxygen
5.4 Amp Class Reference 39
Homing mode.
Generated by Doxygen
40 Class Documentation
Generated by Doxygen
5.4 Amp Class Reference 41
Generated by Doxygen
42 Class Documentation
Generated by Doxygen
5.4 Amp Class Reference 43
Linkage access
Amplifier object may be attached to a Linkage object.
In this case, multi- axis moves may be easily performed through calls to the Linkage object holding the amplifiers.
Generated by Doxygen
44 Class Documentation
Generated by Doxygen
5.4 Amp Class Reference 45
Protected Attributes
• EventMap eventMap
This is an event map that is used to track amplifier events and state changes.
Friends
• class Linkage
The Amp object can be used directly for fairly easy control of an amplifier on the CANopen network. The object provides
easy to use methods for setting and getting amplifier parameter blocks. It also handles many of the details of both point
to point moves and the transfer of complex PVT profiles.
In addition, the standard Amp object provides several virtual functions which can be used in derived classes to signal
the derived object on state changes or emergency conditions.
Amp (
void )
Default constructor.
Amp (
Network & net,
int16 nodeID )
Construct and initialize an amplifier object using defaults for all amp settings.
Generated by Doxygen
46 Class Documentation
Parameters
Amp (
Network & net,
int16 nodeID,
AmpSettings & settings )
Parameters
5.4.3.1 AccLoad2User()
uunit AccLoad2User (
int32 acc ) [virtual]
Internal to the amplifier, all accelerations are stored in units of 10 encoder counts / second∧ 2. If user units are not
enabled in CML_Settings.h, then user units are the same as amplifier units, and this function has no effect.
If user units are enabled, then this function converts from amplifier units to user units (defined using Amp::SetCounts←-
PerUnit).
For dual encoder systems the unit conversion used by this function is based on the load encoder resolution. To convert
motor encoder accelerations, use Amp::AccMtr2User. On single encoder systems either of these functions can be used.
Generated by Doxygen
5.4 Amp Class Reference 47
Parameters
Returns
5.4.3.2 AccMtr2User()
uunit AccMtr2User (
int32 acc ) [virtual]
This function converts using motor encoder units on a dual encoder system. Load encoder accelerations can be con-
verted using Amp::AccLoad2User.
Parameters
Returns
5.4.3.3 AccUser2Load()
int32 AccUser2Load (
uunit acc ) [virtual]
Internal to the amplifier, all accelerations are stored in units of 10 encoder counts / second / second. If user units are
not enabled in CML_Settings.h, then user units are the same as amplifier units, and this function has no effect.
If user units are enabled, then this function converts from user units (defined using Amp::SetCountsPerUnit) to these
internal amplifier units.
For dual encoder systems the unit conversion used by this function is based on the load encoder resolution. To convert
motor encoder accelerations, use Amp::AccUser2Mtr. On single encoder systems either of these functions can be used.
Generated by Doxygen
48 Class Documentation
Parameters
acc The acceleration in user units
Returns
5.4.3.4 AccUser2Mtr()
int32 AccUser2Mtr (
uunit acc ) [virtual]
This function converts using motor encoder units on a dual encoder system. Load encoder accelerations can be con-
verted using Amp::AccUser2Load.
Parameters
acc The acceleration in user units
Returns
5.4.3.5 CheckStateForMove()
This function is used internally by the functions that start moves & homing. It looks at the current state of the amplifier
and returns an appropriate error code if something is wrong that would cause problems during a move/home.
Returns
Generated by Doxygen
5.4 Amp Class Reference 49
5.4.3.6 ClearEventLatch()
This function is protected and generally only intended for internal use.
Parameters
stat Identifies which bits to clear. Any bit set in this parameter will be cleared in the latched event status register.
Returns
5.4.3.7 ClearFaults()
This function can be used to clear any latching faults on the amplifier (see Amp::SetFaultMask for details on latching
fault conditions). It also clears tracking error conditions.
Returns
5.4.3.8 ClearHaltedMove()
Returns
Generated by Doxygen
50 Class Documentation
5.4.3.9 ClearNodeGuardEvent()
Node guarding events occur when the amplifier fails to respond to it's heartbeat protocol for some reason. This could
be caused by a network wiring problem, slow processing on the master controller (causing the amplifier guard message
to be delayed or lost), or an amplifier error such as a reset or power down.
In any case, once a node guarding error is identified, the error condition must be cleared before any new moves may be
performed.
This function attempts to clear the node guarding event condition, however if it determines that the amplifier has been
reset then it fails and returns the error object AmpError::Reset. In this case, the amplifier object must be reinitialized
before it can be used. The amp may be reinitialized by calling Amp::Init or Amp::ReInit.
If node guarding error become a problem, it may mean that the guard time is set too low. This can be adjusted when the
amplifier object is initialized by the values in the AmpSettings object.
Returns
5.4.3.10 Disable()
Note that if the brake delays are in use, then the amplifier may still be enabled when this function returns success. The
outputs will actually be disabled after the amplifier finishes the braking procedure.
Parameters
Returns
Generated by Doxygen
5.4 Amp Class Reference 51
Parameters
Returns
Parameters
Returns
Generated by Doxygen
52 Class Documentation
Parameters
Returns
Parameters
Returns
Generated by Doxygen
5.4 Amp Class Reference 53
Parameters
Returns
Parameters
Returns
Generated by Doxygen
54 Class Documentation
5.4.3.17 DnldString()
Parameters
Returns
The move will use the trapezoidal profile mode, and all parameters will be programmed before the move is started.
This function can also be used to update a move that is alread in progress.
Parameters
Returns
Generated by Doxygen
5.4 Amp Class Reference 55
The move will use the S-curve profile mode, and all parameters will be programmed before the move is started.
Parameters
Returns
This function can also be used to update a move that is alread in progress.
Parameters
Returns
Generated by Doxygen
56 Class Documentation
It's assumed that the drive is already configured with the properly trajectory parameters (velocity, acceleration, deceler-
ation, profile type, etc).
This function sets the trajectories target position to the passed value, and manipulates the control word to start the
move. It can be used for either absolute moves or relative moves
Parameters
Returns
5.4.3.22 Download()
Parameters
Returns
5.4.3.23 Enable()
Generated by Doxygen
5.4 Amp Class Reference 57
Parameters
wait If true, the function won't return until a status message from the amp is received indicating that it
successfully enabled.
Returns
5.4.3.24 FormatPosInit()
Parameters
pos The 32-bit initial position
data Buffer of at least 8 bytes where formatted data will be stored.
Returns
An error object
5.4.3.25 FormatPtSeg()
The position and time information passed to the function are organized into the proper format and stored in the passed
buffer. The buffer is assumed to be at least 8 bytes long.
Generated by Doxygen
58 Class Documentation
Parameters
Returns
An error object
5.4.3.26 FormatPvtSeg()
The position, velocity and time information passed to the function are organized into the proper format and stored in the
passed buffer. The buffer is assumed to be at least 8 bytes long.
Parameters
Returns
An error object
5.4.3.27 GetAlgoPhaseInit()
Upload the current configuration parameters for the algorithmic phase init.
Generated by Doxygen
5.4 Amp Class Reference 59
Parameters
Returns
5.4.3.28 GetAmpConfig()
Read the complete amplifier configuration from the amplifier and return it in the passed structure.
This structure holds every amplifier parameter that can be stored to the amplifier's internal flash memory. The contents
of the structure represent the complete amplifier configuration.
Parameters
Returns
5.4.3.29 GetAmpInfo()
These parameters describe the amplifiers capabilities. They are read only.
Parameters
Generated by Doxygen
60 Class Documentation
Returns
5.4.3.30 GetAmpMode()
Parameters
Returns
5.4.3.31 GetAmpName()
Parameters
name The name of the drive is returned here. This buffer should be at least 50 bytes long to avoid overflow.
Returns
5.4.3.32 GetAmpTemp()
Generated by Doxygen
5.4 Amp Class Reference 61
Parameters
value The value will be returned in this variable
Returns
5.4.3.33 GetAnalogCommandFilter()
Parameters
Returns
5.4.3.34 GetAnalogEncoder()
Get the raw voltage on the two analog encoder inputs (0.1 millivolt units).
If the amplifier has analog encoder inputs, then they will be read and returned.
Parameters
sin The sine input of the analog encoder will be returned here.
cos The cosine input of the analog encoder will be returned here.
Generated by Doxygen
62 Class Documentation
Returns
5.4.3.35 GetAnalogRefConfig()
Parameters
Returns
5.4.3.36 GetCammingConfig()
Parameters
Returns
5.4.3.37 GetCanNetworkConfig()
Get the current CANopen network configuration programmed into the amplifier.
Generated by Doxygen
5.4 Amp Class Reference 63
Parameters
Returns
5.4.3.38 GetControlWord()
Returns the present value of the CANopen device profile control word.
Parameters
value Returns the control word value
Returns
This function is only available when user units are selected in CML_Settings.h.
This value defaults to 1.0 (i.e. user distance units are in encoder counts). It can be adjusted if some other distance unit
is desired.
This value controls velocity, acceleration, and jerk units also. These units are always based on a time interval of seconds.
Parameters
cts The count value will be returned here
Generated by Doxygen
64 Class Documentation
Returns
Get the number of encoder counts / user distance unit for both encoders in a dual encoder system.
This function is only available when user units are selected in CML_Settings.h.
These values default to 1.0 (i.e. user distance units are in encoder counts). It can be adjusted if some other distance
unit is desired.
These values control velocity, acceleration, and jerk units also. These units are always based on a time interval of
seconds.
Parameters
Returns
5.4.3.41 GetCrntLoopConfig()
Parameters
Generated by Doxygen
5.4 Amp Class Reference 65
Returns
5.4.3.42 GetCurrentActual()
This current is based on the amplifiers current sensors, and indicates the portion of current that is being used to generate
torque in the motor.
Parameters
value A variable that will store the returned value.
Returns
5.4.3.43 GetCurrentCommand()
This current is the input to the current limiter. This value is also the output of the velocity loop when the motor is in either
position or velocity control mode. When in current control mode, the commanded current is derived from the control
source (analog input, PWM input, function generator, etc).
Parameters
value A variable that will store the returned value.
Generated by Doxygen
66 Class Documentation
Returns
5.4.3.44 GetCurrentLimited()
The commanded current (GetCurrentCommand) is passed to a current limiter. The output of the current limiter is the
limited current which is passed as an input to the current loop.
Parameters
value A variable that will store the returned value.
Returns
5.4.3.45 GetCurrentProgrammed()
This parameter is the current that the amplifier will attempt to maintain when set to the mode AMPMODE_PROG_CRNT.
Parameters
Returns
Generated by Doxygen
5.4 Amp Class Reference 67
5.4.3.46 GetDAConverterConfig()
Parameters
Returns
5.4.3.47 GetEncoderErrorConfig()
Parameters
Returns
5.4.3.48 GetErrorStatus()
This function causes the amplifier object to examine it's event mask and return an error object corresponding to the most
serious error present.
Generated by Doxygen
68 Class Documentation
Parameters
noComm If true, then no CAN message communications will be performed by this function. This is useful if the
function is being called from a CAN message handler which can't perform SDO communications. If
false (default), then the amplifier may be queried for more detailed error information.
Returns
5.4.3.49 GetEventLatch()
This register is a copy of the normal event status register in which bits are latched, i.e. they are set bit not cleared.
Bits in this register are only cleared in response to a Amp::ClearEventLatch function call (which is protected by the Amp
object). This register is primarily used internally by the Amp object to detect reset conditions on the amplifier.
Parameters
stat The register status is returned here.
Returns
5.4.3.50 GetEventMask()
The event mask is a bit-mapped variable identifies many interesting elements of the amplifiers state. The contents of
this variable are built up from several different amplifier status words which are constantly updated over the CANopen
network.
When the event mask is read using this function, no new messages are passed over the network. The current value
of the event mask is simply returned. Any time the amplifier's state changes, it sends a message over the CANopen
network which is used to update this mask.
It is also possible to wait on a particular value for this mask. See Amp::WaitEvent for details.
Generated by Doxygen
5.4 Amp Class Reference 69
Parameters
Returns
5.4.3.51 GetEventStatus()
This is the main register used internal to the amplifier to describe it's current state.
Parameters
stat The register status is returned here.
Returns
5.4.3.52 GetEventSticky()
This register is a copy of the amplifiers event status register in which bits are set normally, but only cleared when the
register is read (i.e. the bits are 'sticky'). It's useful for checking for transitory events which might me missed by reading
the standard event status register.
Parameters
stat The register status is returned here.
Generated by Doxygen
70 Class Documentation
Returns
5.4.3.53 GetFaultMask()
This mask identifies which error conditions will be treated as latching faults by the amplifier.
Parameters
Returns
5.4.3.54 GetFaults()
Parameters
value A bit mask identifying the active faults will be returned here.
Returns
5.4.3.55 GetFuncGenConfig()
Generated by Doxygen
5.4 Amp Class Reference 71
Generated by Doxygen
72 Class Documentation
Parameters
Returns
5.4.3.56 GetGainScheduling()
Parameters
Returns
5.4.3.57 GetHallState()
The hall state is the value of the hall sensors after any adjustments have been made to them based on the hallWiring
parameter of the MtrInfo structure.
Parameters
value variable that will store the returned value
Returns
Generated by Doxygen
5.4 Amp Class Reference 73
5.4.3.58 GetHaltMode()
This mode defines what happens when a halt command is issued to the amplifier.
Parameters
mode The mode will be returned here.
Returns
5.4.3.59 GetHighVoltage()
Parameters
value The value will be returned in this variable
Returns
5.4.3.60 GetHomeAccel()
Generated by Doxygen
74 Class Documentation
Parameters
value variable that will store the returned value
Returns
5.4.3.61 GetHomeAdjustment()
The value returned is distance that the home position was adjusted by on the last successful home opperation.
Parameters
value variable that will store the returned value
Returns
5.4.3.62 GetHomeCapture()
Parameters
Generated by Doxygen
5.4 Amp Class Reference 75
Returns
5.4.3.63 GetHomeConfig()
Parameters
Returns
5.4.3.64 GetHomeCurrent()
The homing current is returned in 0.01 Amp units (i.e. a value of 123 would be 1.23 Amps).
Parameters
value variable that will store the returned value
Returns
5.4.3.65 GetHomeDelay()
Generated by Doxygen
76 Class Documentation
Parameters
value variable that will store the returned value
Returns
5.4.3.66 GetHomeMethod()
Parameters
method The home method will be returned here.
extended If this pointer is non-null, then the extended homing method value will be returned here. If this pointer is
null, then it will be ignored.
Returns
5.4.3.67 GetHomeOffset()
Parameters
value variable that will store the returned value
Generated by Doxygen
5.4 Amp Class Reference 77
Returns
5.4.3.68 GetHomeVelFast()
This velocity is used for any home moves that may be made at a high velocity without effecting the quality of the home
sensor detection.
Parameters
value variable that will store the returned value
Returns
5.4.3.69 GetHomeVelSlow()
Parameters
value variable that will store the returned value
Returns
Generated by Doxygen
78 Class Documentation
5.4.3.70 GetIloopCommandFilter()
Parameters
Returns
5.4.3.71 GetIloopCommandFilter2()
Get the coefficients used in the second current loop input filter.
Parameters
Returns
5.4.3.72 GetIndexCapture()
Parameters
Generated by Doxygen
5.4 Amp Class Reference 79
Returns
Get the input pin configuration for the specified input pin.
Each of the amplifier input pins can be configured to perform some function. This function configures the specified input
to perform the specified function.
Parameters
pin The input pin to check. Input pins are numbered starting from 0. Check the amplifier datasheet for the number
of input pins available.
cfg The input pin function will be returned in this variable.
Returns
Get the input pin configuration for the specified input pin.
Each of the amplifier input pins can be configured to perform some function. This function configures the specified input
to perform the specified function.
Parameters
pin The input pin to check. Input pins are numbered starting from 0. Check the amplifier datasheet for the
number of input pins available.
cfg The input pin function will be returned in this variable.
axis The axis number that this input pin is configured for
Generated by Doxygen
80 Class Documentation
Returns
5.4.3.75 GetInputDebounce()
Get the input pin debounce time for the specified input pin.
Parameters
pin The input pin to configure. Input pins are numbered starting from 0. Check the amplifier datasheet for the
number of input pins available.
value The pins debounce time (milliseconds) is returned here.
Returns
5.4.3.76 GetInputs()
The input pin values are returned one per bit. The value of input pin 1 will be returned in bit 0 (1 if high, 0 if low), pin 2
will be in bit 1, etc.
Parameters
value variable that will store the returned value
viaSDO If true, an SDO will be used to read the input pins. If false (default), the most recent input value received
from the amplifier via PDO will be returned.
Returns
Generated by Doxygen
5.4 Amp Class Reference 81
5.4.3.77 GetInputs32()
32-bit version to Get the present value of the general purpose input pins.
Note that only the lower 16 input pins are PDO mapped, so this function will always use an SDO access to read the full
set of inputs. If the input of interest is one of the lower 16 pins, then the method Amp::GetInputs() is generally a much
faster way to read the pin's state.
The input pin values are returned one per bit. The value of input pin 1 will be returned in bit 0 (1 if high, 0 if low), pin 2
will be in bit 1, etc.
Parameters
value variable that will store the returned value
Returns
5.4.3.78 GetInputShapingFilter()
Parameters
Returns
5.4.3.79 GetIoConfig()
Generated by Doxygen
82 Class Documentation
Read the amplifier's programmable I/O pin configuration and return it in the passed config structure.
Parameters
Returns
5.4.3.80 GetIOOPtions()
Parameters
value variable that will store the returned value
Returns
5.4.3.81 GetIoPullup()
Get the current state of the input pin pull up/down resisters.
Pull up/down resisters control how an undriven input pin will be interpreted by the amplifier. Depending on the model of
amplifier being controlled, there may be zero or more groups of pull up/down resisters attached to some the input pins.
Each bit of this register is used to control one group of pull up/down resisters. Bit 0 controls group 0, etc.
Please refer to the amplifier data sheet for details on the number of groups of pull up/down resisters, and which input
pins are included in each group.
Generated by Doxygen
5.4 Amp Class Reference 83
Parameters
value variable that will store the returned value
Returns
5.4.3.82 GetIoPullup32()
This is useful on drives that support more then 16 pull up/down resistors. Please see Amp::GetIoPullup() for more
details.
Parameters
value variable that will store the returned value.
Returns
5.4.3.83 GetLinkage()
Linkage ∗ GetLinkage (
void )
WARNING - this function is dangerous as the pointer is not locked. Use Amp::GetLinkRef instead!
Returns
The linkage pointer, or NULL if the Amp is not attached to any linkage object.
Generated by Doxygen
84 Class Documentation
5.4.3.84 GetLinkRef()
uint32 GetLinkRef (
void )
Returns
The linkage reference, or 0 if the Amp is not attached to any linkage object.
5.4.3.85 GetMicrostepRate()
Parameters
Returns
5.4.3.86 GetMotorCurrent()
Get the actual current values read directly from the amplifier's current sensors.
Note that if the motor wiring is being swapped in software, the U and V reading will be swapped.
Parameters
u The U winding current will be returned here.
v The V winding current will be returned here.
Generated by Doxygen
5.4 Amp Class Reference 85
Returns
5.4.3.87 GetMtrInfo()
Parameters
Returns
5.4.3.88 GetNetworkOptions()
Parameters
cfg Reference to the NetworkOptions structure where the configuration data will be returned.
Returns
5.4.3.89 GetNetworkRef()
uint32 GetNetworkRef (
void ) [virtual]
Generated by Doxygen
86 Class Documentation
Returns
Parameters
pin The output pin to check.
cfg The pin configuration value will be returned here.
Returns
Parameters
pin The output pin to check.
cfg The pin configuration value will be returned here.
axis On multi-axis drives the axis number that this output pin is configured for will be returned here.
Returns
Generated by Doxygen
5.4 Amp Class Reference 87
Parameters
pin The output pin to check.
cfg The pin configuration value will be returned here.
mask The pin's status bit selection mask will be returned here.
Returns
Parameters
pin The output pin to check.
cfg The pin configuration value will be returned here.
mask The pin's status bit selection mask will be returned here.
axis On multi-axis drives the axis number that this output pin is configured for will be returned here
Returns
Generated by Doxygen
88 Class Documentation
This function supports output pin configurations that require two 32-bit parameters.
Parameters
pin The output pin to check.
cfg The pin configuration value will be returned here.
param1 The pin's first 32-bit parameter will be returned here
param2 The pin's second 32-bit parameter will be returned here
Returns
This function supports output pin configurations that require two 32-bit parameters.
Parameters
pin The output pin to check.
cfg The pin configuration value will be returned here.
param1 The pin's first 32-bit parameter will be returned here
param2 The pin's second 32-bit parameter will be returned here
axis On multi-axis drives the axis number that this pin is configured for will be returned here
Generated by Doxygen
5.4 Amp Class Reference 89
Returns
5.4.3.96 GetOutputs()
This register shows the current state of all digital output pins. For each pin, the corresponding bit in the register will be
1 if the pin is active, and 0 if the pin is inactive. Bit 0 follows output pin 0, bit 1 follows pin 1, etc.
Parameters
value variable that will store the returned value
Returns
5.4.3.97 GetPhaseAngle()
The phase angle describes the motor's electrical position with respect to it's windings. It's an internal parameter used
by the amplifier to commutate a brushless motor.
Parameters
value variable that will store the returned value
Returns
Generated by Doxygen
90 Class Documentation
5.4.3.98 GetPhaseMode()
Parameters
Returns
5.4.3.99 GetPosCaptureCfg()
Parameters
Returns
5.4.3.100 GetPosCaptureStat()
Parameters
stat The position capture status value is returned here.
Generated by Doxygen
5.4 Amp Class Reference 91
Returns
5.4.3.101 GetPositionActual()
For dual encoder systems, this will be the load encoder position. To get the motor encoder position on such a system,
use Amp::GetPositionMotor.
Parameters
value variable that will store the returned value
Returns
5.4.3.102 GetPositionCommand()
This position is the command input to the servo loop. The commanded position is calculated by the trajectory generator
and updated every servo cycle.
Parameters
value variable that will store the returned value
Generated by Doxygen
92 Class Documentation
Returns
5.4.3.103 GetPositionError()
This is the difference between the instantaneous commanded position and the actual position.
Parameters
value variable that will store the returned value
Returns
5.4.3.104 GetPositionErrorWindow()
Parameters
value The position error window value will be returned here.
Returns
Generated by Doxygen
5.4 Amp Class Reference 93
5.4.3.105 GetPositionLoad()
For dual encoder systems, this function returns the load encoder position and is identical to the value returned by
Amp::GetPositionActual. This is also the passive load position when the load encoder is configured to be in passive
mode.
Parameters
value variable that will store the returned value
Returns
5.4.3.106 GetPositionMotor()
For single encoder systems, this value is identical to the value returned by Amp::GetPositionActual.
For dual encoder systems, this function returns the actual motor position and Amp::GetPositionActual may be used to
get the load encoder position.
Parameters
value variable that will store the returned value
Returns
Generated by Doxygen
94 Class Documentation
5.4.3.107 GetPositionWarnWindow()
Parameters
value variable that will store the returned value
Returns
5.4.3.108 GetPosLoopConfig()
Parameters
Returns
5.4.3.109 GetProfileAcc()
Generated by Doxygen
5.4 Amp Class Reference 95
Parameters
value variable that will store the returned value
Returns
5.4.3.110 GetProfileConfig()
Parameters
Returns
5.4.3.111 GetProfileDec()
Parameters
value variable that will store the returned value
Returns
Generated by Doxygen
96 Class Documentation
5.4.3.112 GetProfileJerk()
Parameters
value The location in which the jerk value will be returned.
Returns
5.4.3.113 GetProfileType()
This profile type is used for point to point moves in which the amplifier calculates it's own trajectory.
Parameters
type variable that will store the returned value
Returns
5.4.3.114 GetProfileVel()
Generated by Doxygen
5.4 Amp Class Reference 97
Parameters
value variable that will store the returned value
Returns
5.4.3.115 GetPvtBuffFree()
Parameters
Returns
5.4.3.116 GetPvtBuffStat()
Parameters
Returns
Generated by Doxygen
98 Class Documentation
5.4.3.117 GetPvtSegID()
Get the segment ID that the amplifier expects for the next PVT segment.
This starts at zero when the amp is reset, and is increased for every segment received.
Parameters
Returns
5.4.3.118 GetPvtSegPos()
Get the starting position of the PVT segment currently active in the amplifier.
When running in PVT mode, this allows an approximation of the amplifier position to be retrieved without adding any
additional overhead to the CANopen network.
The position returned by this function is only valid when running in PVT mode.
Parameters
pos The position is returned here.
Returns
5.4.3.119 GetPwmInConfig()
Generated by Doxygen
5.4 Amp Class Reference 99
Parameters
Returns
5.4.3.120 GetPwmMode()
Get the current PWM output mode configuration from the amplifier.
Parameters
Returns
5.4.3.121 GetQuickStop()
This mode defines what happens when a quick stop command is issued to the amplifier.
Parameters
mode The mode will be returned here.
Returns
Generated by Doxygen
100 Class Documentation
5.4.3.122 GetQuickStopDec()
Parameters
value variable that will store the returned value
Returns
5.4.3.123 GetRefVoltage()
If the amplifier has an analog reference input, it's value will be returned in millivolts.
Parameters
value The value will be returned in this variable
Returns
5.4.3.124 GetRegenConfig()
Upload the current configuration parameters for the power regeneration resister connected to the amplifier.
Note that not all amplifiers support a regen resister. Please see the amplifier datasheet to determine if this feature is
available for the amplifier being used.
Generated by Doxygen
5.4 Amp Class Reference 101
Parameters
Returns
5.4.3.125 GetServoLoopConfig()
This parameter allows various parts of the drive servo loops to be enabled/disabled.
Parameters
value variable that will store the returned value
Returns
5.4.3.126 GetSettlingTime()
This timeout is used in conjunction with the position window value to identify when a motor has come to rest at the
desired position.
Parameters
value variable that will store the returned value
Generated by Doxygen
102 Class Documentation
Returns
5.4.3.127 GetSettlingWindow()
This window, along with the position window time value, is used to identify when the motor has come to rest at the
desired position.
Parameters
value variable that will store the returned value
Returns
5.4.3.128 GetSoftLimits()
Upload the current software limit switch settings from the amplifier.
Parameters
Returns
Generated by Doxygen
5.4 Amp Class Reference 103
5.4.3.129 GetSpecialFirmwareConfig()
These will use serial binary commands since there are no corresponding CAN objects.
Parameters
Returns
5.4.3.130 GetState()
NodeState GetState (
void ) [virtual]
Returns
5.4.3.131 GetStatusWord()
The drive status word indicates the drives current state in it's internal state machine. The drives state in turn identifies if
the drive is enabled / disabled, whether a fault is present on the drive, whether it is in motion, etc.
This status word is part of the CANopen device profile (DSP-402). It's used internally by the amplifier object.
Generated by Doxygen
104 Class Documentation
Parameters
value Returns the current status word value
Returns
5.4.3.132 GetTargetPos()
Parameters
value variable that will store the returned value
Returns
5.4.3.133 GetTargetVel()
Parameters
value variable that will store the returned value
Generated by Doxygen
5.4 Amp Class Reference 105
Returns
5.4.3.134 GetTorqueActual()
Get the actual torque being applied by the motor at the moment.
Parameters
value The torque value is returned here. This is specified in thousandths of the motor rated torque (see
Amp::SetTorqueTarget more more info).
Returns
5.4.3.135 GetTorqueDemand()
This is the torque that the amplifier is attempting to apply at the moment.
Parameters
value The torque value is returned here. This is specified in thousandths of the motor rated torque (see
Amp::SetTorqueTarget more more info).
Returns
Generated by Doxygen
106 Class Documentation
5.4.3.136 GetTorqueRated()
The motor's rated torque is the amount of torque that the motor can continuously output without damage.
Parameters
value The motor's rated torque in 0.001 Nm units. For linear motors the units are 0.001 N.
Returns
5.4.3.137 GetTorqueSlope()
Get the rate of change of torque for use in profile torque mode (AMPMODE_CAN_TORQUE).
Parameters
value The rate of change specified in thousandths of the total rated torque per second.
Returns
5.4.3.138 GetTorqueTarget()
This parameter is used in profile torque mode (AMPMODE_CAN_TORQUE) to specify the torque that should be applied
by the motor.
Generated by Doxygen
5.4 Amp Class Reference 107
Parameters
value The torque value is returned here. This is specified in thousandths of the motor rated torque (see
Amp::SetTorqueTarget more more info).
Returns
5.4.3.139 GetTraceChannel()
Get the amplifier variable current selected on one of the trace channels.
Parameters
ndx The trace channel to get
value The trace variable assigned to this channel will be returned here.
Returns
5.4.3.140 GetTraceData()
Trace data should only be uploaded when the traces are stopped. Uploading data while it is currently being collected in
the amplifier can cause corrupt data to be uploaded.
The trace data is returned as an array of 32-bit integer values. If there are N currently active trace channels, and M
samples of data have been collected, then a total of N x M integer values will be returned. In this case, the samples for
channel n (0 <= n < N) will be located at postion n + m∗N for 0 <= m < M.
Generated by Doxygen
108 Class Documentation
Parameters
data An array where the trace data will be returned.
max On entry to this call, this parameter must hold the maximum number of 32-bit integer values to upload. On
successful return this parameter will be filled with the total number of integers uploaded.
Returns
5.4.3.141 GetTraceMaxChannel()
Parameters
Returns
5.4.3.142 GetTracePeriod()
When the trace system is running, the amplifier will sample and store it's internal variables this often.
Note that this parameter specifies time in units of the amplifier's 'reference period'. See Amp::GetTraceRefPeriod for
more information.
Parameters
per The trace period is returned here.
Generated by Doxygen
5.4 Amp Class Reference 109
Returns
5.4.3.143 GetTraceRefPeriod()
Get the 'reference period' used with the amplifiers trace mechanism.
The amplifier internally samples it's trace channels at integer multiples of this time.
For example, if the amplifier's reference period is 100,000 nanoseconds, then setting the trace period to 12 would
indicate that the amplifier should sample it's internal variables every 1.2 milliseconds.
Parameters
Returns
5.4.3.144 GetTraceStatus()
Parameters
stat Information on whether the trace is currently running is returned in this parameter.
samp The total number of trace samples collected is returned here.
sampMax The maximum number of trace samples that will fit in the internal buffer is returned here. This value will
change depending on how many trace channels are active and which variables are selected.
Generated by Doxygen
110 Class Documentation
Returns
5.4.3.145 GetTraceTrigger()
Parameters
Returns
5.4.3.146 GetTrackingWindows()
Get the configuration values of the amplifiers position & velocity tracking windows.
This function allows all tracking window paramters to be read from the amplifier as a group.
Parameters
Generated by Doxygen
5.4 Amp Class Reference 111
Returns
5.4.3.147 GetTrajectoryAcc()
Get the instantaneous commanded acceleration passed out of the trajectory generator.
This acceleration is used by the position loop to calculate it's acceleration feed forward term.
Parameters
value variable that will store the returned value
Returns
5.4.3.148 GetTrajectoryJrkAbort()
If this is 0, then the abort will be calculated without any jerk limits.
Parameters
value variable that will store the returned value
Returns
Generated by Doxygen
112 Class Documentation
5.4.3.149 GetTrajectoryVel()
Get the instantaneous commanded velocity passed out of the trajectory generator.
This velocity is used by the position loop to calculate it's velocity feed forward term.
Parameters
value variable that will store the returned value
Returns
5.4.3.150 GetUstepConfig()
Parameters
Returns
5.4.3.151 GetVelLoopConfig()
Generated by Doxygen
5.4 Amp Class Reference 113
Parameters
Returns
5.4.3.152 GetVelocityActual()
The motor velocity is estimated by the amplifier based on the change in position seen at the encoder. For dual encoder
systems, the load encoder veloctiy can be queried using the function Amp::GetVelocityLoad.
Parameters
value variable that will store the returned value
Returns
5.4.3.153 GetVelocityCommand()
The commanded velocity is the velocity value that is passed to the velocity limiter, and from there to the velocity control
loop. If the amplifier is in position mode (i.e. the position loop is active), then this velocity is the output of the position
control loop.
Generated by Doxygen
114 Class Documentation
Parameters
value variable that will store the returned value
Returns
5.4.3.154 GetVelocityLimited()
This velocity is the result of applying the velocity limiter to the commanded velocity (see GetVelocityCommand).
When the velocity loop is being driven by the position loop, the velocity limiter consists of a maximum velocity value only.
When some other source is driving the velocity loop, the limiter also includes a maximum acceleration and deceleration
value.
Parameters
value variable that will store the returned value
Returns
5.4.3.155 GetVelocityLoad()
The load velocity is estimated by the amplifier based on the change in position seen at the load encoder. For dual
encoder systems, the motor encoder veloctiy can be queried using the function Amp::GetVelocityActual.
Generated by Doxygen
5.4 Amp Class Reference 115
Parameters
value variable that will store the returned value
Returns
5.4.3.156 GetVelocityProgrammed()
This parameter is the velocity that the amplifier will attempt to maintain when set to the mode AMPMODE_PROG_VEL.
Parameters
vel The velocity will be returned here.
Returns
5.4.3.157 GetVelocityWarnTime()
Parameters
value variable that will store the returned value
Returns
Generated by Doxygen
116 Class Documentation
5.4.3.158 GetVelocityWarnWindow()
Parameters
value variable that will store the returned value
Returns
5.4.3.159 GetVloopCommandFilter()
Parameters
Returns
5.4.3.160 GetVloopOutputFilter()
Parameters
Generated by Doxygen
5.4 Amp Class Reference 117
Returns
5.4.3.161 GetVloopOutputFilter2()
Get the coefficients used in the second velocity loop output filter.
Parameters
Returns
5.4.3.162 GetVloopOutputFilter3()
Get the coefficients used in the third velocity loop output filter.
Parameters
Returns
Generated by Doxygen
118 Class Documentation
Returns
This function simply programs all the homing parameters passed in the structure, then calls Amp::GoHome().
Parameters
Returns
5.4.3.165 HaltMove()
Returns
5.4.3.166 HandleStateChange()
void HandleStateChange (
NodeState from,
NodeState to ) [protected], [virtual]
Generated by Doxygen
5.4 Amp Class Reference 119
Parameters
Parameters
Returns
Parameters
Generated by Doxygen
120 Class Documentation
Returns
5.4.3.169 InitSubAxis()
Initialize an Amp object for use with a secondary axis of a multi-axis EtherCAT amplifier.
For Copley EtherCAT multi-axis drives (such as the AE2, BE2, etc), the drive is configured as a single node on the
EtherCAT network with multiple axes of motion residing at that node. To control such a drive using CML, use a seperate
Amp object for each axis.
The first axis of such a drive is the primary axis and should be initialized using the normal Amp::Init() function call just
like a single axis amp. For any additional axes, use the Amp::InitSubAxis() call and pass in a reference to the primary
Amp object.
Note that multi-axis CANopen drives are normally configured as multiple distinct nodes on the CANopen network. Do
not use this method to initialize nodes on a multi-axis CANopen drive, instead use the Amp::Init() method for each Amp
object.
Parameters
primary Reference to the Amp object created for the primary (first) axis of the multi-axis EtherCAT drive.
axis The axis number of the axis to be initialized. The axis number passed should be greater then or equal to
two. Axis one is the primary axis and should be initialized using the Amp::Init() method.
Returns
5.4.3.170 IsHardwareEnabled()
bool IsHardwareEnabled (
void )
Returns
Generated by Doxygen
5.4 Amp Class Reference 121
5.4.3.171 IsReferenced()
bool IsReferenced (
void )
When an amplifier is first powered up (or after a reset) it does not know the absolute position of the motor. Once
the home routine has been successfully executed, the encoder zero location is known and the amplifier is considered
referenced.
Once an amplifier has been referenced, it will not loose reference until it is reset, or until a new home routine is executed.
During the execution of a home routine, the amplifier is considered to be unreferenced. If the home routine is completed
successfully, the amplifier will then be referenced again.
Returns
true if the amplifier has been referenced. Return false if the amplifier has not been referenced if an error occurs
reading this information from the amplifier.
5.4.3.172 IsSoftwareEnabled()
bool IsSoftwareEnabled (
void )
The amplifier outputs may still be disabled if this is true due to an error condition, etc.
Returns
5.4.3.173 JrkLoad2User()
uunit JrkLoad2User (
int32 jrk ) [virtual]
Internal to the amplifier, all jerk values are stored in units of 100 encoder counts / second∧ 3. If user units are not enabled
in CML_Settings.h, then user units are the same as amplifier units, and this function has no effect.
If user units are enabled, then this function converts from amplifier units to user units (defined using Amp::SetCounts←-
PerUnit).
For dual encoder systems the unit conversion used by this function is based on the load encoder resolution.
Generated by Doxygen
122 Class Documentation
Parameters
Returns
5.4.3.174 JrkUser2Load()
int32 JrkUser2Load (
uunit jrk ) [virtual]
Internal to the amplifier, all jerk values are stored in units of 100 encoder counts / second ∧ 3. If user units are not
enabled in CML_Settings.h, then user units are the same as amplifier units, and this function has no effect.
If user units are enabled, then this function converts from user units (defined using Amp::SetCountsPerUnit) to these
internal amplifier units.
For dual encoder systems the unit conversion used by this function is based on the load encoder resolution.
Parameters
jrk The jerk in user units
Returns
5.4.3.175 LoadCCDFromFile()
Checks the network type and calls the correct function to write the ccd file to the amplifier.
Parameters
Returns
5.4.3.176 LoadFromFile()
This function presently supports loading ∗.ccx files created by the CME-2 program, version 3.1 and later.
Parameters
Returns
5.4.3.177 MoveAbs()
Parameters
pos The position to move to
Returns
Generated by Doxygen
124 Class Documentation
5.4.3.178 MoveRel()
Parameters
dist The distance to move
Returns
5.4.3.179 PosLoad2User()
uunit PosLoad2User (
int32 pos ) [virtual]
Internal to the amplifier, all positions are stored in units of encoder counts. If user units are not enabled in CML_←-
Settings.h, then user units are also in encoder counts and this function has no effect.
If user units are enabled, then this function converts from amplifier units to user units (defined using Amp::SetCounts←-
PerUnit).
For dual encoder systems the unit conversion used by this function is based on the load encoder resolution. To convert
motor encoder positions, use Amp::PosMtr2User. On single encoder systems either of these functions can be used.
Parameters
pos The position in encoder counts
Returns
Generated by Doxygen
5.4 Amp Class Reference 125
5.4.3.180 PosMtr2User()
uunit PosMtr2User (
int32 pos ) [virtual]
This function converts using motor encoder units on a dual encoder system. Load encoder positions can be converted
using Amp::PosLoad2User.
Parameters
pos The position in encoder counts
Returns
5.4.3.181 PosUser2Load()
int32 PosUser2Load (
uunit pos ) [virtual]
Internal to the amplifier, all positions are stored in units of encoder counts. If user units are not enabled in CML_←-
Settings.h, then user units are also in encoder counts and this function has no effect.
If user units are enabled at compile time, then this function converts from user units (defined using Amp::SetCounts←-
PerUnit) to these internal amplifier units.
For dual encoder systems the unit conversion used by this function is based on the load encoder resolution. To convert
motor encoder positions, use Amp::PosUser2Mtr. On single encoder systems either of these functions can be used.
Parameters
pos The position in user units
Returns
Generated by Doxygen
126 Class Documentation
5.4.3.182 PosUser2Mtr()
int32 PosUser2Mtr (
uunit pos ) [virtual]
This function converts using motor encoder units on a dual encoder system. Load encoder positions can be converted
using Amp::PosUser2Load.
Parameters
pos The position in user units
Returns
5.4.3.183 PvtBufferFlush()
Flushing the buffer in this way will cause any running profile to be aborted.
Parameters
viaSDO If true, use a SDO to download the message. If false, use a PDO. default is true.
Returns
An error object.
5.4.3.184 PvtBufferPop()
Pop the N most recently sent segments off the amplifier's PVT trajectory buffer.
If there are less then N segments on the buffer, then the buffer is cleared. Any profile running on the amplifier will
continue to run (is not aborted) unless a buffer underflow occurs.
Generated by Doxygen
5.4 Amp Class Reference 127
Parameters
Returns
An error object.
5.4.3.185 PvtClearErrors()
Parameters
Returns
An error object.
5.4.3.186 PvtStatusUpdate()
void PvtStatusUpdate (
uint32 status )
Generated by Doxygen
128 Class Documentation
Parameters
buff Points to a buffer of formatted data to be sent. The buffer length must be at least 8 bytes.
viaSDO Only used on CANopen. If true, download using an SDO.
Returns
Parameters
Returns
5.4.3.189 QuickStop()
Returns
Generated by Doxygen
5.4 Amp Class Reference 129
5.4.3.190 ReInit()
Re-initialize an amplifier.
This function simply calls Amp::Init using the same parameters that were initially passed.
Returns
5.4.3.191 Reset()
This function should be used for Amp objects instead of Node::ResetNode(). It resets the amplifier and re-initializes the
amplifier object.
Returns
Upload the passed amplifier configuration to the amplifier's workign memory, and then copy that working memory to
flash.
Parameters
Returns
Generated by Doxygen
130 Class Documentation
Flash memory is a type of non-volatile RAM which allows amplifier parameters to be saved between power cycles.
When this function is called, any amplifier parameters that may be stored to flash will be copied from their working
(RAM) locations to the stored (flash) locations.
For a list of those amplifier parameters which may be saved to flash memory, see the AmpConfig structure. Every
member of that structure represents an amplifier parameter that may be saved to flash.
Returns
5.4.3.194 SendTrajectory()
Upload a PVT move trajectory to the amplifier and optionally start the move.
Parameters
trj Reference to the trajectory that will be feed to the amp. A local pointer to this trajectory will be stored if the
entire profile will not fit in the amplifiers on-board buffer. This pointer will be kept until the entire profile has
been uploaded to the amp. It is therefore important to ensure that the trajectory object will remain valid (i.e.
not be deallocated) until the amplifier object has called the Trajectory.Finish() method on it.
start If true (the default), the profile will be started by this call. If false, the profile will be uploaded, but not started.
Use true if this is a single axis move, false if this is part of a multi-axis move which needs to be synchronized.
Returns
An error object.
Generated by Doxygen
5.4 Amp Class Reference 131
5.4.3.195 SetAlgoPhaseInit()
Parameters
Returns
5.4.3.196 SetAmpConfig()
The AmpConfig structure holds all amplifier parameters that may be stored in the amplifier's non-volatile flash memory.
This function may be used to update all of these parameters in a single call.
Note that this function updates the copies of these variables in working RAM, not directly in the amplifier flash memory.
To copy these parameters to non-volatile memory, call Amp::SaveAmpConfig after updating them.
Parameters
Returns
5.4.3.197 SetAmpMode()
Generated by Doxygen
132 Class Documentation
Parameters
Returns
5.4.3.198 SetAmpName()
Parameters
Returns
5.4.3.199 SetAnalogCommandFilter()
Parameters
Returns
Generated by Doxygen
5.4 Amp Class Reference 133
5.4.3.200 SetAnalogRefConfig()
Note that some amplifier models do not support the analog reference.
Parameters
Returns
5.4.3.201 SetCammingConfig()
Parameters
Returns
5.4.3.202 SetCanNetworkConfig()
Note that the amplifier only uses this parameter at startup or after a reset.
Generated by Doxygen
134 Class Documentation
Parameters
Returns
5.4.3.203 SetControlWord()
The control word is part of the CANopen device profile (DSP-402). It's used to enable/disable the amplifier, start moves,
etc. This function is used internally by the Amp object.
Parameters
value The control word value to set
Returns
Unit conversions may be enabled or disabled at compile time through a setting in CML_Settings.h. If this feature is
disabled, then all position, velocity, acceleration & jerk values are passed as 32-bit integers in the amplifier's native
units:
Generated by Doxygen
5.4 Amp Class Reference 135
• Jerk: 100 counts / second∧ 3 (i.e. 100 would be 10000 counts/sec∧ 3).
If unit conversions are enabled in CML_Settings.h, then these values are passed as double precision floating point
values, and this function may be used to set a scaling factor for these units. The scaling factor is passed to this function
as a number of encoder counts / user distance unit.
Velocity units are always equal to distance units / second. Likewise, acceleration and jerk units are distance units /
second∧ 2 and distance units / second∧ 3.
For example, if the motor in question has a 1 micron encoder, then user units of meters, meters/sec, meters/sec∧ 2, etc
can be selected by passing a value of 1,000,000 to this function (i.e. the number of microns/meter).
When user units are enabled at compile time, the amplifier defaults to units of encoder counts, encoder counts / second,
etc.
Parameters
Returns
A pointer to an error object, or NULL on success. Note that if user units are disabled in CML_Settings.h, then this
function will return an error.
This method provides the same feature as the single encoder version however it takes two scaling parameters; a load
encoder scaler and a motor encoder scaler. These two values are used to scale amplifier parameters based on which
encoder they refer to.
Parameters
load The load encoder scaling factor. This gives the number of load encoder counts / user position unit.
mtr The motor encoder scaling factor. This gives the number of motor encoder counts / user position unit.
Returns
Generated by Doxygen
136 Class Documentation
5.4.3.206 SetCrntLoopConfig()
Parameters
Returns
5.4.3.207 SetCurrentProgrammed()
This parameter is only used when running in the mode AMPMODE_PROG_CRNT. The value programmed through this
variable is the current that the amplifier will attempt to output.
Parameters
Returns
5.4.3.208 SetDAConverterConfig()
Generated by Doxygen
5.4 Amp Class Reference 137
Parameters
Returns
5.4.3.209 SetEncoderErrorConfig()
Parameters
Returns
5.4.3.210 SetFaultMask()
The fault mask identifies which conditions will be treated as latching faults by the amplifier. If such a condition occurs,
the amplifier's output will be disabled immediately, and will not be enabled until the fault condition is cleared.
Parameters
Returns
Generated by Doxygen
138 Class Documentation
5.4.3.211 SetFuncGenConfig()
Parameters
Returns
5.4.3.212 SetGainScheduling()
Parameters
Returns
5.4.3.213 SetHaltMode()
When the amplifier's halt command is issued (Amp::HaltMove) the amplifier will attempt to stop the move in progress
using the method defined by it's halt mode.
Generated by Doxygen
5.4 Amp Class Reference 139
Parameters
mode The mode to set
Returns
5.4.3.214 SetHomeAccel()
This acceleration value will be used for all moves that are part of the home routine.
Parameters
value the value to set
Returns
5.4.3.215 SetHomeConfig()
The passed structure contains all parameters related to performing a home routine.
Parameters
Generated by Doxygen
140 Class Documentation
Returns
5.4.3.216 SetHomeCurrent()
The home current value is only used when homing to a hard stop. This parameter is specified in units of 0.01 Amps (i.e.
a value of 123 would be 1.23 Amps).
Parameters
value the value to set
Returns
5.4.3.217 SetHomeDelay()
The home delay value is only used when homing to a hard stop. This parameter is specified in units of milliseconds.
Parameters
value the value to set
Returns
Generated by Doxygen
5.4 Amp Class Reference 141
5.4.3.218 SetHomeMethod()
Parameters
method The home method to set
extended If the 'method' parameter is set to CHM_EXTENDED, then this value will be written to the extended
homing parameter on the amplifier. For any other homing method this parameter is ignored.
Returns
5.4.3.219 SetHomeOffset()
This offset is the difference between the location of the homing sensor (as defined by the homing method), and the
actual zero position. Once the home location has been found, the amplifier will use this offset to determine where the
zero position location is.
Parameters
value the value to set
Returns
5.4.3.220 SetHomeVelFast()
Generated by Doxygen
142 Class Documentation
This velocity will be used for any move in the home routine that can be done at relatively high speed. A second slower
velocity can also be programed for the parts of the home routine that are speed sensitive.
Parameters
value the value to set
Returns
5.4.3.221 SetHomeVelSlow()
This velocity will be used for any move in the home routine which is speed sensitive. This typically is a move in which
the edge of a sensor is being searched for.
Parameters
value the value to set
Returns
5.4.3.222 SetIloopCommandFilter()
Generated by Doxygen
5.4 Amp Class Reference 143
Parameters
Returns
5.4.3.223 SetIloopCommandFilter2()
Set the coefficients used in the second current loop input filter.
Parameters
Returns
5.4.3.224 SetInputConfig()
Set the input pin configuration for the specified input pin.
Each of the amplifier input pins can be configured to perform some function. This method configures the specified input
to perform the specified function.
Parameters
pin The input pin to configure. Input pins are numbered starting from 0. Check the amplifier datasheet for the
number of input pins available.
cfg The input pin function to be assigned to this pin.
axis The axis to apply this input configuration to. This only applies to multi-axis drives. Default is 0 (first axis/axis
A).
Generated by Doxygen
144 Class Documentation
Returns
5.4.3.225 SetInputDebounce()
Set the input pin debounce time for the specified input pin.
Each of the amplifier input pins can be configured ignore transient states that last less then the debounce time. This
function configures the debounce time for a specific pin.
Parameters
pin The input pin to configure. Input pins are numbered starting from 0. Check the amplifier datasheet for the
number of input pins available.
value The debounce time to use (milliseconds)
Returns
5.4.3.226 SetInputShapingFilter()
Parameters
Returns
Generated by Doxygen
5.4 Amp Class Reference 145
5.4.3.227 SetIoConfig()
Configure the amplifier's programmable I/O pins using the values passed in the config structure.
The inputCt and outputCt values of the config structure should indicate the total number of input & output pins to
configure. If the amplifier has more pins then these values indicate, the configuration of the remaining amplifier pins will
not be changed.
Parameters
Returns
5.4.3.228 SetIOOptions()
This parameter is used to configure the optional features of the general purpose IO. Bits 0-3 describe whether several
IO pins are used as a serial interface for expanded IO features. 0 is normal IO, 1 is AEM/APM development board LEDs
and address switches. 2 is LEDs wired the same as the developers kit board, but using separate red & green LEDs for
network status.
Parameters
Returns
5.4.3.229 SetIoPullup()
Generated by Doxygen
146 Class Documentation
Set the current state of the input pin pull up/down resisters.
Pull up/down resisters control how an undriven input pin will be interpreted by the amplifier. Depending on the model of
amplifier being controlled, there may be zero or more groups of pull up/down resisters attached to some the input pins.
Each bit of this register is used to control one group of pull up/down resisters. Bit 0 controls group 0, etc.
Please refer to the amplifier data sheet for details on the number of groups of pull up/down resisters, and which input
pins are included in each group.
Parameters
value The new value to write to the pull up/down control register.
Returns
5.4.3.230 SetIoPullup32()
This is useful on drives that support more then 16 pull up/down resistors. Please see Amp::SetIoPullup() for more
details.
Parameters
value The new value to write to the pull up/down control register.
Returns
5.4.3.231 SetMicrostepRate()
Generated by Doxygen
5.4 Amp Class Reference 147
Parameters
Returns
5.4.3.232 SetMtrInfo()
Parameters
Returns
5.4.3.233 SetNetworkOptions()
Parameters
cfg Reference to the NetworkOptions structure containing the configuration data to be written to the amp.
Returns
Generated by Doxygen
148 Class Documentation
5.4.3.234 SetOutputConfig()
Each of the amplifier output pins can be configured to perform some function. These functions break down into several
basic modes:
• manual mode: In this mode, the output pin will be controlled through the CANopen network using the Amp::Set←-
Outputs function. Output pins can be configured to be either active high or active low in this mode.
• Status word tracking: In this mode, the output pin is configured to track one or more bits of one of the amplifier's
internal status words. A 32-bit mask is also supplied which identifies which bits are to be tracked. If any of the
selected bits are set in the status word, the output pin will go active.
• Position trigger. In this mode the output pin will be configured to go active based on the position of the motor.
In some cases the output will go active between two programmed positions. In other cases the output will be
triggered by crossing a position and will stay active for a programmed duration.
Parameters
pin The output pin to configure. Output pins are numbered starting from 0. Check the amplifier datasheet for
the number of output pins available.
cfg The pin function to be assigned to this pin.
param1 A 32-bit parameter used in conjunction with the output pin configuration to define the pin behavior. For
most simple output pin modes this parameter is a bitmask that selects bits in a status register that the
output should track. If the output pin is being configured for manual mode, then the mask is not used and
does not need to be specified.
param2 A second 32-bit parameter used in a few output pin configurations.
axis On multi-axis drives this is used to configure which axis this output pin is configured for.
Returns
5.4.3.235 SetOutputs()
Generated by Doxygen
5.4 Amp Class Reference 149
The passed value will be written to the output pin control register. Any of the output pins that have been configured as
manual outputs will be updated based on the value of this register.
Note that only those output pins that have been configured as manual outputs are effected by this command. Output pins
that are configured to perform some other function (such as tracking bits in the event status register) are not effected.
See Amp::SetOutputConfig for details on configuring the amplifier output pins.
Also note that this pin controls the active/inactive state of the outputs, not the high/low state. Each output pin can be
individually configured as active high or active low. Setting a bit in the register to 1 sets the corresponding output pin
active. Active high/low configuration is set using Amp::SetOutputConfig.
Parameters
value The new value to write to the output pin control register.
Returns
5.4.3.236 SetPhaseMode()
Parameters
mode The phasing mode to set
Returns
5.4.3.237 SetPosCaptureCfg()
Generated by Doxygen
150 Class Documentation
The position capture mechanism in the amplifier allows the motor position to be captured by some event. The position
can be captured by a transition on the encoder index signal, or by a transition on a general purpose input pin which has
been configured as a 'home' input.
Parameters
Returns
5.4.3.238 SetPositionActual()
On dual encoder systems, this will set the load encoder position. Amp::SetPositionMotor may be used to set the motor
position on such systems.
Parameters
Returns
5.4.3.239 SetPositionErrorWindow()
If the absolute value of the motor's position error ever exceeds this value, then a tracking error will occur.
Generated by Doxygen
5.4 Amp Class Reference 151
A tracking error causes the amplifier to abort any move in progress, and attempt to bring the motor to a stop using
it's velocity loop. The commanded velocity input to the velocity loop will be driven to zero, subject to the velocity loop
acceleration and deceleration limits.
Generated by Doxygen
152 Class Documentation
Parameters
Returns
5.4.3.240 SetPositionLoad()
For dual encoder systems, this will set the load encoder position. This is also the passive load position when the load
encoder is configured to be in passive mode.
Parameters
Returns
5.4.3.241 SetPositionMotor()
On dual encoder systems, this will set the motor encoder position. Amp::SetPositionActual may be used to set the load
position on such systems.
Generated by Doxygen
5.4 Amp Class Reference 153
Parameters
Returns
5.4.3.242 SetPositionWarnWindow()
If the absolute value of the position error ever exceeds this value, then a tracking warning will result. A tracking warning
causes a bit in the drives status to be set.
Parameters
value the value to set
Returns
5.4.3.243 SetPosLoopConfig()
Parameters
Generated by Doxygen
154 Class Documentation
Returns
5.4.3.244 SetProfileAcc()
the acceleration that the motor will normally attain when starting the move).
Parameters
value The value to set.
Returns
5.4.3.245 SetProfileConfig()
Parameters
Returns
Generated by Doxygen
5.4 Amp Class Reference 155
5.4.3.246 SetProfileDec()
the acceleration that the motor will normally attain when ending the move).
Note that S-curve profiles don't use a separate deceleration value. For S-curve moves, the value programmed in Set←-
ProfileAcc is also used for the deceleration segment at the end of the move.
Parameters
value The value to set.
Returns
5.4.3.247 SetProfileJerk()
Note that this value is only used with S-curve profiles. Trapezoidal profiles do not limit jerk (i.e. they allow instantaneous
changes in acceleration).
Parameters
value The jerk value to set
Returns
Generated by Doxygen
156 Class Documentation
5.4.3.248 SetProfileType()
The motion profile type is only used when running in 'position profile' mode. In this mode, the drive performs point to
point moves using it's internal trajectory generator.
The motion profile type defines the type of trajectory profile that the drive will generate.
Parameters
Returns
5.4.3.249 SetProfileVel()
the velocity that the motor will normally attain during the move).
Parameters
value The value to set.
Returns
5.4.3.250 SetPvtInitialPos()
Generated by Doxygen
5.4 Amp Class Reference 157
This function sends a full 32-bit position value which can be used to start a PVT move beyond the 24-bit limit of normal
segments. It's normally used at the beginning of a PVT trajectory when the starting position is greater then 24-bits and
the commanded position at the time of the move's start is not obvious.
Parameters
pos The 32-bit initial position
viaSDO If true, use a SDO to download the message. If false, use a PDO. default is true.
Returns
An error object
5.4.3.251 SetPwmInConfig()
Note that these settings are only used when the amplifier is controlled by it's PWM (or pulse/direction) input pins, i.e.
not in CANopen mode.
Parameters
Returns
5.4.3.252 SetPwmMode()
Generated by Doxygen
158 Class Documentation
Parameters
mode The PWM output mode to set
Returns
5.4.3.253 SetQuickStop()
When the amplifier's quick stop command is issued (Amp::QuickStop), the amplifier will attempt to stop the move in
progress using the method defined by it's quick stop mode.
Parameters
mode The mode to set
Returns
5.4.3.254 SetQuickStopDec()
the acceleration that the motor will use when doing a quick stop).
Parameters
value The value to set.
Generated by Doxygen
5.4 Amp Class Reference 159
Returns
5.4.3.255 SetRegenConfig()
Note that not all amplifiers support a regen resister. Please see the amplifier datasheet to determine if this feature is
available for the amplifier being used.
Parameters
Returns
5.4.3.256 SetServoLoopConfig()
This parameter allows various parts of the drive servo loops to be enabled/disabled.
Parameters
Returns
Generated by Doxygen
160 Class Documentation
5.4.3.257 SetSettlingTime()
The drive will be considered to be settled in position after a move when it's absolute position error value has been within
the position window for an amount of time greater then the position window time value.
Parameters
value the value to set
Returns
5.4.3.258 SetSettlingWindow()
The drive will be considered to be settled in position after a move when it's absolute position error value has been within
the position window for an amount of time greater then the position window time value.
Parameters
value the value to set
Returns
5.4.3.259 SetSoftLimits()
Generated by Doxygen
5.4 Amp Class Reference 161
The amplifier's software limit settings consist of a positive and negative absolute position. Any time the motors actual
position is greater then the positive limit, or less then the negative limit, a limit event occurs. Software limit events are
treated by the amplifer in the same way that physical limit switches are, no current will be output in the direction of the
limit switch, and any running trajectory will be aborted.
Software limit switches are not used until the amplifier has been homed. Also, if the positive software limit is set to a
value greater then or equal to the negative software limit, then the limits are disabled.
Parameters
Returns
5.4.3.260 SetSpecialFirmwareConfig()
These will use serial binary commands since there are no corresponding CAN objects.
Parameters
Returns
5.4.3.261 SetTargetPos()
Generated by Doxygen
162 Class Documentation
Parameters
value The position to move to
Returns
5.4.3.262 SetTargetVel()
This parameter is only used when the amplifier is set to profile velocity mode (AMPMODE_CAN_VELOCITY). When in
this mode, this parameter defines the target velocity for motion.
Parameters
value The new target velocity.
Returns
5.4.3.263 SetTorqueRated()
The motor's rated torque is the amount of torque that the motor can continuously output without damage.
Parameters
value The motor's rated torque in 0.001 Nm units. For linear motors the units are 0.001 N.
Generated by Doxygen
5.4 Amp Class Reference 163
Returns
5.4.3.264 SetTorqueSlope()
Set the rate of change of torque for use in profile torque mode (AMPMODE_CAN_TORQUE).
Setting this parameter to zero will cause the rate of change to be unlimited.
Parameters
value The rate of change specified in thousandths of the total rated torque per second. For example, setting to
1000 would specify a slope of the full rated torque of the motor every second.
Returns
5.4.3.265 SetTorqueTarget()
This parameter is used in profile torque mode (AMPMODE_CAN_TORQUE) to specify the desired target torque value.
The actual torque commanded by the amplifier will ramp up/down to this value based on the programmed torque slope
(see Amp::SetTorqueSlope).
The units used for this object are based on the CANopen DS402 specification. An applications note is available on Cop-
ley's web site which gives more information on exactly how to convert between these torque units and the commanded
current in the drive. http://www.copleycontrols.com/Motion/pdf/Current-Scaling.pdf
Parameters
value The torque value to be set. This is specified in thousandths of the motor rated torque.
Generated by Doxygen
164 Class Documentation
Returns
5.4.3.266 SetTraceChannel()
Parameters
ndx The trace channel that the variable will be assigned to.
value The trace variable to sample.
Returns
5.4.3.267 SetTracePeriod()
When the trace system is running, the amplifier will sample and store it's internal variables this often.
Note that this parameter specifies time in units of the amplifier's 'reference period'. See Amp::GetTraceRefPeriod for
more information.
Parameters
per The trace period to be set.
Returns
Generated by Doxygen
5.4 Amp Class Reference 165
5.4.3.268 SetTraceTrigger()
The trigger acts something like the trigger on an oscilloscope. It allows some event to be specified which will cause the
trace subsystem to start collecting data. Most trigger types watch one of the trace channels and constantly compare
it's value to a level. The type of comparison made will depend on the type of trigger. For example, the trace can be
triggered on the rising edge of a signal, on the falling edge, etc.
The trigger also allows a delay value to be specified. Trace data will start to be collected N trace periods after the trigger,
where N is the delay value. The delay can also be negative, in which case the data will start to be collected before the
trigger event.
Parameters
type The trigger type.
chan The trace channel to watch. This parameter defaults to 0 if not specified.
level The trigger level. This parameter defaults to 0 if not specified.
delay The trigger delay in trace sample periods. Defaults to 0 if not specified.
Returns
5.4.3.269 SetTrackingWindows()
This function allows all tracking window parameters to be configured with one function call.
Parameters
Generated by Doxygen
166 Class Documentation
Returns
5.4.3.270 SetTrajectoryJrkAbort()
If this is 0, then the abort will be calculated without any jerk limits.
Parameters
value The jerk value to be used.
Returns
The move will use the trapezoidal profile mode, and all parameters will be programmed based on the values passed in
the cfg structure.
Parameters
Returns
Generated by Doxygen
5.4 Amp Class Reference 167
The move will use the S-curve profile mode, and all parameters will be programmed based on the values passed in the
cfg structure.
Parameters
Returns
The move will use the velocity profile mode, and all parameters will be programmed based on the values passed in the
cfg structure.
Parameters
Returns
Generated by Doxygen
168 Class Documentation
5.4.3.274 SetUstepConfig()
Parameters
Returns
5.4.3.275 SetVelLoopConfig()
Parameters
Returns
5.4.3.276 SetVelocityProgrammed()
This parameter is only used when running in the mode AMPMODE_PROG_VEL. The value programmed through this
variable is the velocity that the amplifier will attempt to output.
Generated by Doxygen
5.4 Amp Class Reference 169
Parameters
vel The velocity to output.
Returns
5.4.3.277 SetVelocityWarnTime()
If the velocity error exceeds the velocity warning window, then a bit will be set in the amplifier status word. This bit will
not be cleared until the velocity error has been within the warning window for at least this long.
Parameters
value the value to set
Returns
5.4.3.278 SetVelocityWarnWindow()
If the absolute value of the velocity error exceeds this value, then a velocity warning will result. A velocity warning causes
a bit in the drives status to be set.
Parameters
value the value to set
Generated by Doxygen
170 Class Documentation
Returns
5.4.3.279 SetVloopCommandFilter()
Parameters
Returns
5.4.3.280 SetVloopOutputFilter()
Parameters
Returns
5.4.3.281 SetVloopOutputFilter2()
Set the coefficients used in the second velocity loop output filter.
Generated by Doxygen
5.4 Amp Class Reference 171
Parameters
Returns
5.4.3.282 SetVloopOutputFilter3()
Set the coefficients used in the third velocity loop output filter.
Parameters
Returns
5.4.3.283 StartMove()
This function is primarily intended for internal use, and is called by DoMove and SendTrajectory. Note that the amplifier
mode must have already been setup when this function is called. The mode should be either AMPMODE_CAN_PRO←-
FILE, or AMPMODE_CAN_PVT. This function is not used to start a homing move.
Parameters
relative If true, start a relative move. If false, start an absolute move. Note that this is only used with point to point
moves, interpolated moves should always set relative to false.
Generated by Doxygen
172 Class Documentation
Returns
5.4.3.284 StartPVT()
Returns
5.4.3.285 TraceStart()
Returns
5.4.3.286 TraceStop()
Returns
5.4.3.287 UpdateEvents()
Update the amplifier's event map based on the status information received by a status PDO.
This function is intended for internal use and shouldn't generally be called by user code.
Generated by Doxygen
5.4 Amp Class Reference 173
Parameters
Returns
Parameters
Returns
Generated by Doxygen
174 Class Documentation
Parameters
Returns
Parameters
Returns
Generated by Doxygen
5.4 Amp Class Reference 175
Parameters
Returns
Parameters
Returns
Generated by Doxygen
176 Class Documentation
Parameters
Returns
5.4.3.294 UpldString()
Parameters
Returns
5.4.3.295 Upload()
Generated by Doxygen
5.4 Amp Class Reference 177
Parameters
Returns
5.4.3.296 VelLoad2User()
uunit VelLoad2User (
int32 vel ) [virtual]
Internal to the amplifier, all velocities are stored in units of 0.1 encoder counts / second. If user units are not enabled in
CML_Settings.h, then user units are the same as amplifier units, and this function has no effect.
If user units are enabled, then this function converts from amplifier units to user units (defined using Amp::SetCounts←-
PerUnit).
For dual encoder systems the unit conversion used by this function is based on the load encoder resolution. To convert
motor encoder velocities, use Amp::VelMtr2User. On single encoder systems either of these functions can be used.
Parameters
Returns
5.4.3.297 VelMtr2User()
uunit VelMtr2User (
int32 vel ) [virtual]
Generated by Doxygen
178 Class Documentation
Parameters
Returns
5.4.3.298 VelUser2Load()
int32 VelUser2Load (
uunit vel ) [virtual]
Internal to the amplifier, all velocities are stored in units of 0.1 encoder counts / second. If user units are not enabled in
CML_Settings.h, then user units are the same as amplifier units, and this function has no effect.
If user units are enabled, then this function converts from user units (defined using Amp::SetCountsPerUnit) to these
internal amplifier units.
For dual encoder systems the unit conversion used by this function is based on the load encoder resolution. To convert
motor encoder velocities, use Amp::VelUser2Mtr. On single encoder systems either of these functions can be used.
Parameters
vel The velocity in user units
Returns
5.4.3.299 VelUser2Mtr()
int32 VelUser2Mtr (
uunit vel ) [virtual]
This function converts using motor encoder units on a dual encoder system. Load encoder velocities can be converted
using Amp::VelUser2Load.
Generated by Doxygen
5.4 Amp Class Reference 179
Parameters
vel The velocity in user units
Returns
This function can be used to wait on any generic event associated with the amplifier.
Parameters
e The event to wait on.
timeout The timeout for the wait (milliseconds). If < 0, then wait forever (default).
Returns
This function can be used to wait on any generic event associated with the amplifier.
Parameters
Returns
5.4.3.302 WaitHomeDone()
Wait for the currently running homing move to finish, or for an error to occur.
This is similar to the Amp::WaitMoveDone method, except it does some additional checks after the move finishes to
ensure that the homing operation was successful. This function will fail immediately if the amp is not currently in homing
mode.
Parameters
Returns
5.4.3.303 WaitInputEvent()
The amplifier object maintains an EventMap object which reflects the state of the amplifier's general purpose input pins.
Each bit of this EventMap corresponds to one input pin; bit 0 for input 0, bit 1 for input 1, etc. The bit in the event map is
set when the corresponding input pin is high, and cleared when the input pin is low.
This function provides a very flexible method for waiting on a particular state on the input pins. Event objects may be
created to define a specific state of one or more pins, and these objects may be used in conjunction with this function to
wait for that state to occur.
In addition to this function, two simpler functions are also provided. These functions (WaitInputHigh and WaitInput←-
Low) allow the user to wait on one or more input pins to go high or low respectively. Internally, these function call
WaitInputEvent for their implementation.
Generated by Doxygen
5.4 Amp Class Reference 181
Parameters
e An Event object describing the input pin state to wait on.
timeout The timeout for the wait (milliseconds). If < 0, then wait forever.
match On success, the state of the input pins which caused the match to occur will be returned here.
Returns
5.4.3.304 WaitInputHigh()
Wait for any of the specified general purpose input pins to be set.
The inputs parameter specifies which input(s) to wait on using a bit mask. Bit 0 should be set for input 0, bit 1 for input
1, etc. The function will return when any of the specified input pins goes high.
Parameters
Returns
5.4.3.305 WaitInputLow()
Wait for any of the specified general purpose input pins to be lowered.
The inputs parameter specifies which input(s) to wait on using a bit mask. Bit 0 should be set for input 0, bit 1 for input
1, etc. The function will return when any of the specified input pins goes low.
Generated by Doxygen
182 Class Documentation
Parameters
Returns
5.4.3.306 WaitMoveDone()
Wait for the currently running move to finish, or for an error to occur.
Parameters
Returns
The documentation for this class was generated from the following files:
• CML_Amp.h
• Amp.cpp
• AmpFile.cpp
• AmpParam.cpp
• AmpPDO.cpp
• AmpPVT.cpp
• AmpStruct.cpp
• AmpUnits.cpp
• AmpVersion.cpp
Generated by Doxygen
5.5 AmpConfig Struct Reference 183
servoConfig
ServoLoopConfig
inputShaping
InputShaper
limit
SoftPosLimit
fgen
FuncGenConfig
can
CanNetworkConfig
daConfig
DAConfig
iloopCmdFltr
iloopCmdFltr2
aInCmdFltr
vloopOutFltr2
Filter vloopOutFltr3
vloopCmdFltr
vloopOutFltr
PwmInConfig
pwmIn
VelLoopConfig
vLoop
EncoderErrorConfig
errFilterCfg
CammingConfig
camming
CrntLoopConfig cLoop
AmpConfig
window
TrackingWindows
gainSched
GainScheduling regen
RegenConfig motor
MtrInfo
netOptions
NetworkOptions
home
HomeConfig
io
AmpIoCfg
ustep
UstepConfig
algoPhaseInit
AlgoPhaseInit
ref
AnalogRefConfig
profile
ProfileConfig
pLoop
PosLoopConfig
Generated by Doxygen
184 Class Documentation
Public Attributes
Generated by Doxygen
5.5 AmpConfig Struct Reference 185
This structure contains all user configurable parameters used by an amplifier which may be stored in non-volatile mem-
ory.
Generated by Doxygen
186 Class Documentation
5.5.2.1 capCtrl
uint16 capCtrl
This parameter is not normally used in CANopen mode and is included here for completness only.
5.5.2.2 CME_Config
char CME_Config[COPLEY_MAX_STRING]
String used by CME to save state information This string is reserved and should not be modified.
5.5.2.3 encoderOutCfg
uint16 encoderOutCfg
Some amplifier models provide a secondary encoder connected which can be configured as either an input or output.
5.5.2.4 limitBitMask
EVENT_STATUS limitBitMask
One bit of a standard CANopen status word is user programmable using this setting.
This feature is not used by CML and is only included here for completness.
5.5.2.5 options
uint32 options
Amplifier options.
5.5.2.6 phaseMode
AMP_PHASE_MODE phaseMode
Generated by Doxygen
5.5 AmpConfig Struct Reference 187
5.5.2.7 progCrnt
int16 progCrnt
5.5.2.8 progVel
uunit progVel
5.5.2.9 pwmMode
AMP_PWM_MODE pwmMode
This parameter can be used to configure the pwm output section of the amplifier.
5.5.2.10 stepRate
int16 stepRate
This parameter gives the microstep rate (degrees / second) for use in a special diagnostic microstepping mode. The
parameter is not used in normal CANopen modes, and is only include here for completness.
The documentation for this struct was generated from the following file:
• CML_AmpStruct.h
Generated by Doxygen
188 Class Documentation
This class represents error conditions that can occur in the Copley Amplifier object.
Error
NodeError
AmpError
AmpFault
Generated by Doxygen
5.6 AmpError Class Reference 189
Internal
Error OK
Unknown
NetworkUnavailable
NodeError
GuardTimeout
NegLim
pvtSegVel
TryingStopMtr
NegSoftLim
PhaseErr
AmpError UnderVolt
HomingError
NoUserUnits
TrackErr
PrimaryGone
...
Generated by Doxygen
190 Class Documentation
Generated by Doxygen
5.6 AmpError Class Reference 191
This class represents error conditions that can occur in the Copley Amplifier object.
5.6.2.1 DecodeStatus()
Decode the passed event status word and return an appropriate error object.
Generated by Doxygen
192 Class Documentation
Parameters
Returns
The documentation for this class was generated from the following files:
• CML_Amp.h
• Amp.cpp
Error
NodeError
AmpError
AmpFault
Generated by Doxygen
5.7 AmpFault Class Reference 193
Internal
Error OK
Unknown
NetworkUnavailable
NodeError
GuardTimeout
NegLim
pvtSegVel
TryingStopMtr
NegSoftLim
PhaseErr
AmpError UnderVolt
HomingError
NoUserUnits
TrackErr
PrimaryGone
...
I2TLimit
PhaseErr
UnderVolt
TrackErr
EncoderPower
AmpFault OverVolt
MotorTemp
AmpTemp
ADC
ShortCircuit
...
Generated by Doxygen
194 Class Documentation
5.7.2.1 DecodeFault()
Generated by Doxygen
5.8 AmpFileError Class Reference 195
Parameters
Returns
The documentation for this class was generated from the following files:
• CML_Amp.h
• Amp.cpp
This class represents error conditions that can occur when loading amplifer data from a data file.
Error
AmpFileError
Generated by Doxygen
196 Class Documentation
Internal
Error OK
Unknown
FPGAtooOld
range
tooOld
format
AmpFileError
noFileAccess
fileOpen
axisCt
axis
Generated by Doxygen
5.9 AmpInfo Struct Reference 197
This class represents error conditions that can occur when loading amplifer data from a data file.
The documentation for this class was generated from the following file:
• CML_AmpStruct.h
Public Attributes
Generated by Doxygen
198 Class Documentation
• uint16 tempMax
Max temperature (deg C)
• uint16 tempHyst
Temperature hysteresis for over temp shutdown (deg C)
• uint16 pwmPeriod
PWM period (10 nanosecond units)
• uint16 servoPeriod
Servo period (multiples of PWM period)
• int16 crntScale
Current scaling factor.
• int16 voltScale
Voltage scaling factor.
• int16 refScale
Reference scaling factor.
• int16 aencScale
Analog encoder scaling factor.
• int16 type
Amp type.
• int16 pwm_off
PWM off time.
• int16 pwm_dbzero
PWM deadband @ zero current.
• int16 pwm_dbcont
PWM deadband @ continuous current.
• int16 regenPeak
Internal regen resister peak limit.
• int16 regenCont
Internal regen resister continuous limit.
• int16 regenTime
Internal regen resister peak time.
This structure is used to hold information about the amplifier such as it's model number, serial number, peak current
rating, etc.
The amplifier characteristics defined in this structure can not be changed. They are defined by Copley Controls when
the amplifier is designed and/or manufactured.
Use the Amp::GetAmpInfo method to retrieve this information from the amplifier.
The documentation for this struct was generated from the following file:
• CML_AmpStruct.h
Generated by Doxygen
5.10 AmpIoCfg Struct Reference 199
• AmpIoCfg (void)
Default constructor for AmpIoCfg structure.
Public Attributes
• uint8 inputCt
Number of programmable inputs available on this amplifier.
• uint8 outputCt
Number of programmable outputs available on this amplifier.
• uint16 inPullUpCfg
Input pin pull-up / pull-down resister configuration.
• int32 inPullUpCfg32
Input pin pull-up / pull-down resister configuration.
• INPUT_PIN_CONFIG inCfg [COPLEY_MAX_INPUTS]
Input pin configuration for each pin.
• int16 inDebounce [COPLEY_MAX_INPUTS]
Input pin debounce time (milliseconds)
• OUTPUT_PIN_CONFIG outCfg [COPLEY_MAX_OUTPUTS]
Output pin configuration for each output pin See Amp::SetOutputConfig for more information.
• uint32 outMask [COPLEY_MAX_OUTPUTS]
Output pin configuration mask for each pin.
• uint32 outMask1 [COPLEY_MAX_OUTPUTS]
Output pin configuration mask for each pin.
• int32 ioOptions
IO Options, used to configure the optional features of the general purpose IO.
Generated by Doxygen
200 Class Documentation
5.10.2.1 AmpIoCfg()
AmpIoCfg (
void )
5.10.3.1 inCfg
INPUT_PIN_CONFIG inCfg[COPLEY_MAX_INPUTS]
5.10.3.2 inPullUpCfg
uint16 inPullUpCfg
5.10.3.3 inPullUpCfg32
int32 inPullUpCfg32
5.10.3.4 inputCt
uint8 inputCt
Generated by Doxygen
5.11 AmpSettings Class Reference 201
5.10.3.5 outMask
uint32 outMask[COPLEY_MAX_OUTPUTS]
5.10.3.6 outMask1
uint32 outMask1[COPLEY_MAX_OUTPUTS]
5.10.3.7 outputCt
uint8 outputCt
The documentation for this struct was generated from the following files:
• CML_AmpStruct.h
• AmpStruct.cpp
• AmpSettings ()
Create a settings object with all default values.
Generated by Doxygen
202 Class Documentation
Public Attributes
• uint32 synchPeriod
Synch object period in microseconds.
• uint32 synchID
Synch object CAN message ID.
• bool synchUseFirstAmp
Use first initialized amplifier as synch producer.
• bool synchProducer
Synch producer (true/false) If true, this node will produce synch messages.
• uint32 timeStampID
High resolution time stamp CAN ID.
• uint16 heartbeatPeriod
The CANopen heartbeat protocol is one of two standard methods used to constantly watch for network or device problems.
• uint16 heartbeatTimeout
Additional time to wait before generating a heartbeat error (milliseconds) If the heartbeat protocol is used, then this value,
combined with the heartbeatTime will determine how long the network master waits for the node's heartbeat message
before it generates a heartbeat error.
• uint16 guardTime
Node guarding guard time (milliseconds)
• uint8 lifeFactor
Node guarding life time factor.
• bool enableOnInit
Enable amplifier at init time.
• AMP_MODE initialMode
Initial mode of operation.
• bool resetOnInit
Reset the amplifier on init.
• uint8 maxPvtSendCt
Max PVT segments to send in response to a PVT status update.
This object is passed to the Init() method of the Copley amp. It holds the various customizable settings used by the
amplifier.
Generated by Doxygen
5.11 AmpSettings Class Reference 203
5.11.2.1 AmpSettings()
AmpSettings (
void )
The default values for each member of this class are defined below.
5.11.3.1 enableOnInit
bool enableOnInit
If this is true, then the amplifier will be enabled at the end of a successful init(). If false, the amplifier will be disabled
when init() returns.
Default: true
5.11.3.2 guardTime
uint16 guardTime
The CANopen node guarding protocol is a second method (the first being the heartbeat protocol) for devices on the
network to watch for network problems. In this protocol, the master controller sends a request message out to the slave
device at a specified interval. The slave device responds to this request with a message indicating it's state.
The main difference between this protocol and the heartbeat protocol is that both the slave node and the master are able
to recognize network errors. With the heartbeat protocol only the network master is able to identify network problems.
Note that only one of these two protocols can be active in a node device at any time. If the heartbeat period is non-zero,
then the heartbeat protocol will be used.
This parameter gives the node guarding period for use with this node. This is the period between node guarding request
messages sent by the master controller.
Note that both this parameter, and the life time factor must be non-zero for node guarding to be used.
For EtherCAT networks, this parameter specifies the process data heartbeat timeout. This is similar to the CANopen
node guarding timeout. If the drive is operational, and goes this long without receiving process data from the master,
then it will identify a timeout condition.
Generated by Doxygen
204 Class Documentation
5.11.3.3 heartbeatPeriod
uint16 heartbeatPeriod
The CANopen heartbeat protocol is one of two standard methods used to constantly watch for network or device prob-
lems.
When the heartbeat protocol is used, each device on the CANopen network transmits a 'heartbeat' message at a
specified interval. The network master watches for these messages, and is able to detect a device error if it's heartbeat
message is not received within the expected time.
This parameter configures the heartbeat period (milliseconds) that will be used by this amplifier to transmit it's heartbeat
message.
If this parameter is set to zero, then the heartbeat protocol is disabled on this node.
5.11.3.4 heartbeatTimeout
uint16 heartbeatTimeout
Additional time to wait before generating a heartbeat error (milliseconds) If the heartbeat protocol is used, then this
value, combined with the heartbeatTime will determine how long the network master waits for the node's heartbeat
message before it generates a heartbeat error.
Note that setting this to zero does not disable the heartbeat protocol. set the heartbeatPeriod value to zero to disable
heartbeat.
5.11.3.5 initialMode
AMP_MODE initialMode
This defines the mode of operation that the amplifier will be placed in when it is initialized.
Default: AMPMODE_CAN_HOMING
Generated by Doxygen
5.11 AmpSettings Class Reference 205
5.11.3.6 lifeFactor
uint8 lifeFactor
When the node guarding protocol is used, this parameter is used by the slave device to determine how long to wait for
a node guarding request from the master controller before signaling an error condition.
If this parameter and the node guard time are both non-zero, and the heartbeatTime is zero, then node guarding will be
setup for the amplifier.
5.11.3.7 maxPvtSendCt
uint8 maxPvtSendCt
This parameter may be used to limit the number of new PVT segments to send in response to a PVT status update.
Normally, this parameter may be safely left at it's default setting.
Default 6
5.11.3.8 resetOnInit
bool resetOnInit
Note that resetting nodes on an EtherCAT network will make it impossible to access anything on the network while the
reset is occuring. Resetting EtherCAT nodes is therefore not recommended.
Default: false
5.11.3.9 synchID
uint32 synchID
This is the message ID used for the synch message. Default is 0x00000080
Generated by Doxygen
206 Class Documentation
5.11.3.10 synchPeriod
uint32 synchPeriod
The synch object is a message that is transmitted by one node on a CANopen network at a fixed interval. This message
is used to synchronize the devices on the network.
5.11.3.11 synchProducer
bool synchProducer
Synch producer (true/false) If true, this node will produce synch messages.
Default: false
Note: If the 'synchUseFirstAmp' setting of this object is true, then the passed value of this settings will not be used, and
will be overwritten during initialization.
5.11.3.12 synchUseFirstAmp
bool synchUseFirstAmp
If this setting is true (default), then the first amplifier to be initialized will be set as the synch producer, and all other
amplifier's will be setup as synch consumers. This causes the value of the 'synchProducer' setting to be updated during
init to indicate whether the amp is producing synch messages or not.
5.11.3.13 timeStampID
uint32 timeStampID
The high resolution time stamp is a PDO that is generated by the synch producer and consumed by the other amplifiers
on the network. It is used to synchronize the clocks of the amplifiers. This parameter defines the CAN ID that will be
used for this message. Setting to zero will disable the time stamp message. Default 0x0180
The documentation for this class was generated from the following files:
• CML_Amp.h
• Amp.cpp
Generated by Doxygen
5.12 AnalogRefConfig Struct Reference 207
• AnalogRefConfig (void)
Default constructor. Simply sets all members to zero.
Public Attributes
• int16 calibration
Calibration offset.
• int16 offset
Offset in millivolts.
• int16 deadband
Deadband in millivolts.
• int32 scale
Scaling factor.
These parameters are used when the amplifier is being driven from it's analog reference input pin. Note that not all
amplifier have an analog input reference, and that this is not a standard CANopen mode of operation.
5.12.2.1 calibration
int16 calibration
Calibration offset.
This offset is set at the factory and should normally not be modified. Units are millivolts
Generated by Doxygen
208 Class Documentation
5.12.2.2 deadband
int16 deadband
Deadband in millivolts.
The analog input will be treated as zero when it's absolute value is less then this.
5.12.2.3 scale
int32 scale
Scaling factor.
Units are dependent on the mode of operation: 0.01 Amp when driving current. 0.1 Encoder counts/second when driving
velocity
The documentation for this struct was generated from the following file:
• CML_AmpStruct.h
Read by position in network (aka Auto Increment Physical Read) The read is performed on the node who's position
matches the passed address.
EcatDgram
APRD
Generated by Doxygen
5.14 APWR Struct Reference 209
EcatDgram
APRD
Read by position in network (aka Auto Increment Physical Read) The read is performed on the node who's position
matches the passed address.
Pass 0 for the node closest to the master, 1 for the next node, etc. In the datagram sent out, the ADP field will hold -N for
a passed address of N. Each node increments the ADP value as it passes, and the node that receives a zero responds
to the read.
The documentation for this struct was generated from the following file:
• CML_EtherCAT.h
Write by position in network (Auto Increment Physical Write) Like the APRD datagram, but a write version.
EcatDgram
APWR
Generated by Doxygen
210 Class Documentation
EcatDgram
APWR
Write by position in network (Auto Increment Physical Write) Like the APRD datagram, but a write version.
The documentation for this struct was generated from the following file:
• CML_EtherCAT.h
Read by position in network and write to the same address of all following nodes.
EcatDgram
ARMW
Generated by Doxygen
5.16 Array< C > Class Template Reference 211
EcatDgram
ARMW
Read by position in network and write to the same address of all following nodes.
The read is performed on the node who's position matches the passed address. Pass 0 for the node closest to the
master, 1 for the next node, etc. All nodes after that position will have the data read from the earlier node written to the
same address
The documentation for this struct was generated from the following file:
• CML_EtherCAT.h
Array< C >
Generated by Doxygen
212 Class Documentation
template<class C>
class Array< C >
5.16.2.1 Array()
Array (
int init = 32,
int step = -1 ) [inline]
Parameters
Generated by Doxygen
5.16 Array< C > Class Template Reference 213
5.16.3.1 add()
void add (
C val ) [inline]
Parameters
val Value to append.
5.16.3.2 length()
int length (
void ) [inline]
Returns
5.16.3.3 operator[]()
C& operator[ ] (
int ndx ) [inline]
Parameters
Generated by Doxygen
214 Class Documentation
Returns
5.16.3.4 rem()
void rem (
int ndx ) [inline]
Parameters
The documentation for this class was generated from the following file:
• CML_Array.h
Broadcast read.
EcatDgram
BRD
Generated by Doxygen
5.18 BWR Struct Reference 215
EcatDgram
BRD
Broadcast read.
This type of datagram reads data from the same location on every node in the network. Returned data is ORed, so any
bit set in any node will be set in the accumulated response. The ADP address is sent out from the master as zero and
incremented by every slave that responds to the read.
The documentation for this struct was generated from the following file:
• CML_EtherCAT.h
Broadcast write. This type of datagram writes data to the same location on every node in the network.
EcatDgram
BWR
Generated by Doxygen
216 Class Documentation
EcatDgram
BWR
Broadcast write. This type of datagram writes data to the same location on every node in the network.
The documentation for this struct was generated from the following file:
• CML_EtherCAT.h
• CammingConfig (void)
Default constructor.
Public Attributes
• uint16 cammingModeConfig
Camming Mode configuration. See documentation for details.
• uint16 cammingDelayForward
Camming delay forward.(Units:master command counts)
• uint16 cammingDelayReverse
Camming delay forward.(Units:master command counts)
• int32 cammingMasterVel
Camming master velocity.
Generated by Doxygen
5.19 CammingConfig Struct Reference 217
These settings may be up/download from the amplifier using the functions Amp::SetCammingConfig and Amp::Get←-
CammingConfig.
5.19.2.1 CammingConfig()
CammingConfig (
void ) [inline]
Default constructor.
5.19.3.1 cammingMasterVel
int32 cammingMasterVel
The documentation for this struct was generated from the following file:
• CML_AmpStruct.h
Generated by Doxygen
218 Class Documentation
Class used to represent an error condition returned from a CAN interface function.
Error
CanError
CanOpenError
Internal
Error OK
Unknown
InvalidID
Alloc
NoDriver
Timeout
Driver
CanError AlreadyOpen
BadParam
BadPortName
NotOpen
Permission
...
Generated by Doxygen
5.21 CanFrame Struct Reference 219
Class used to represent an error condition returned from a CAN interface function.
The documentation for this class was generated from the following file:
• CML_Can.h
Generated by Doxygen
220 Class Documentation
Public Attributes
• CAN_FRAME_TYPE type
Identifies the frame type.
• int32 id
The CAN message ID.
• uint32 timestamp
Timestamp of received frame if supported by CAN interface.
• byte length
Gives the number of bytes of data included in the frame.
• byte data [8]
Holds any data sent with the frame.
This class is used to represent the basic frame of information that is passed over the CAN network.
A frame of CAN data consists of a message ID value (either 11 or 29 bits depending on whether standard or extended
frames are in use), 0 to 8 bytes of data, and some special attributes.
Frame objects are passed to the CanInterface::Xmit() function, and filled in by the CanInterface::Recv() function.
5.21.2.1 data
byte data[8]
5.21.2.2 id
int32 id
If bit 29 is clear, this is a standard 11 bit ID (bits 0-10 hold the ID). If bit 29 is set, this is an extended 29 bit ID (bits 0-28
hold the ID). Bits 30 and 31 are not presently used.
Generated by Doxygen
5.22 CanInterface Class Reference 221
5.21.2.3 length
byte length
The documentation for this struct was generated from the following file:
• CML_Can.h
Abstract class used for low level interaction with CAN hardware.
RefObj
CanInterface
RefObj
CanInterface
Generated by Doxygen
222 Class Documentation
• CanInterface (void)
Default constructor for a CAN interface object.
• CanInterface (const char ∗port)
Standard constructor for the CAN interface object.
• virtual ∼CanInterface ()
Standard destructor for base CanInterface object.
• virtual const Error ∗ SetName (const char ∗name)
Set the name of the port.
• virtual const Error ∗ Open (void)
Open the CAN interface.
• virtual const Error ∗ Close (void)
Close the CAN interface.
• virtual const Error ∗ SetBaud (int32 baud)
Set the CAN interface baud rate.
• const Error ∗ Recv (CanFrame &frame, Timeout timeout=-1)
Receive the next CAN frame.
• const Error ∗ Xmit (CanFrame &frame, Timeout timeout=0)
Write a CAN frame to the CAN network.
• virtual bool SupportsTimestamps (void)
Return true if the CAN interface supports timestamps on received frames.
Protected Attributes
• char ∗ portName
This string is initialized by the default constructor.
Generated by Doxygen
5.22 CanInterface Class Reference 223
Abstract class used for low level interaction with CAN hardware.
This class contains methods that are used to open and close the CAN network adapter, as well as transmit and receive
frames over the CAN network.
The base CanInterface class defines a standard minimal interface to the CAN network. This base class does not actually
provide support for any hardware, rather it should be extended by a class that provides access to the actual CAN network
adapter being used.
5.22.2.1 CanInterface()
CanInterface (
const char ∗ port ) [inline]
The only thing that the constructor does is initialize the portName member variable to the value passed.
Parameters
5.22.3.1 ChkID()
To be valid, a message ID must either be an 11 bit standard ID, or a 28-bit extended ID. By convention, all extended ID's
must have bit 29 set to identify them as such.
Generated by Doxygen
224 Class Documentation
Parameters
id The ID to be checked
Returns
5.22.3.2 Close()
Returns
5.22.3.3 Open()
Returns
5.22.3.4 Recv()
This is the public function used to read CAN messages from the network.
Generated by Doxygen
5.22 CanInterface Class Reference 225
Parameters
frame A reference to the frame object that will be filled by the read.
timeout The timeout (ms) to wait for the frame. A timeout of 0 will return immediately if no data is available. A
timeout of < 0 will wait forever.
Returns
5.22.3.5 RecvFrame()
This is called by the public Recv function, and must be implemented by the actual CanInterace class. It handles the
hardware specific details of reading a message from the network.
Parameters
frame A reference to the frame object that will be filled by the read.
timeout The timeout (ms) to wait for the frame. A timeout of 0 will return immediately if no data is available. A
timeout of < 0 will wait forever.
Returns
5.22.3.6 SetBaud()
Generated by Doxygen
226 Class Documentation
Parameters
Returns
5.22.3.7 SetName()
Parameters
name The port name.
Returns
5.22.3.8 SupportsTimestamps()
Returns
Reimplemented in CopleyCAN.
5.22.3.9 Xmit()
Generated by Doxygen
5.22 CanInterface Class Reference 227
Parameters
Returns
5.22.3.10 XmitFrame()
This is called by the public Xmit function, and must be implemented by the actual CanInterface class. It handles the
hardware specific details of writing a message to the network.
Parameters
Returns
Generated by Doxygen
228 Class Documentation
5.22.4.1 portName
• CML_Can.h
• Can.cpp
Public Attributes
• uint8 numInPins
Number of general purpose input pins to read on startup for node ID selection.
• bool useSwitch
If true, use the CAN address switch as part of the node ID calculation.
• uint8 offset
Offset added to the value read from the input pins & address switch.
• CAN_BIT_RATE bitRate
CANopen network bit rate to use.
• uint32 pinMapping
Input pin mapping for node ID selection.
• uint16 quickStop
CANopen quick stop option code.
• uint16 shutDownOption
CANopen shutdown option code.
• uint16 disableOption
CANopen disable option code.
• uint16 haltOption
CANopen halt option code.
• uint16 heartbeat
CANopen heartbeat time.
• uint16 nodeGuard
CANopen Node Guard time.
• uint16 nodeGuardLife
CANopen Node Guarding Life time factor.
Generated by Doxygen
5.23 CanNetworkConfig Struct Reference 229
The amplifier's CANopen node ID and network bit rate can be configured using the members of this structure. Note that
the ID and bit rate are only set on power-up or reset, so after programming a new configuration the amplifier must be
reset for the configuration to become active.
The CANopen node ID is a 7 bit number in the range 1 to 128. The value 0 is reserved and is not considered a valid
node ID. Selecting a node ID of 0 will cause the amplifier to stop communicating over the CANopen network.
On startup, the input pins are read first. The inputs that will be used for CAN address selection are the highest numbered
pins available. For example, on an amplifier with 12 input pins (0 to 11), if 3 inputs are used for CANopen node ID
selection, then the pins used will be 9, 10 and 11. These three pins will result in a base node address between 0 and 7.
If the CAN address switch is being used, then the value read from the input pins will be shifted up four bits (multiplied
by 16) and the value of the input switch will be added to it.
Finally, the programmed offset will be added to the value read from the input pins and address switch. The lowest 7 bits
of this sum will be used as the CANopen node ID. If this value results in an ID of zero, the CANopen interface will be
disabled.
For example, to program an amplifier to ignore input pins and the address switch, and just set a fixed ID of 7, set the
number of input pins to zero, turn off the address switch, and set the offset to 7.
5.23.2.1 FromAmpFormat()
void FromAmpFormat (
uint16 a )
Parameters
a A 16-bit value encoding the network configuration. See the amplifier documentation for details on the format.
Generated by Doxygen
230 Class Documentation
5.23.2.2 ToAmpFormat()
uint16 ToAmpFormat (
void )
Encode the contents of the structure into a 16-bit word in the format used by the amplifier.
Returns
5.23.3.1 heartbeat
uint16 heartbeat
The frequency at which the amp will produce heartbeat messages. This parameter may be set to zero to disable
heartbeat production.
5.23.3.2 nodeGuard
uint16 nodeGuard
This parameter gives the time between nodeguarding requests that are sent form the CANopen master to this amplifier
5.23.3.3 nodeGuardLife
uint16 nodeGuardLife
Generated by Doxygen
5.23 CanNetworkConfig Struct Reference 231
5.23.3.4 numInPins
uint8 numInPins
Number of general purpose input pins to read on startup for node ID selection.
5.23.3.5 offset
uint8 offset
Offset added to the value read from the input pins & address switch.
5.23.3.6 pinMapping
uint32 pinMapping
When network node id indicates that 1 or more input pins will be used to select the node ID, this parameter is used to
map input pins to ID bits. Availabel after 3.35 firmware. See documentation
5.23.3.7 useSwitch
bool useSwitch
If true, use the CAN address switch as part of the node ID calculation.
Note that on amplifiers which do not support this switch this parameter is ignored.
The documentation for this struct was generated from the following files:
• CML_AmpStruct.h
• AmpStruct.cpp
Generated by Doxygen
232 Class Documentation
The CanOpen class is the top level interface into the CANopen network.
RefObj
Network Thread
CanOpen
RefObj
Network Thread
CanOpen
• CanOpen (void)
Generated by Doxygen
5.24 CanOpen Class Reference 233
Default constructor.
• virtual ∼CanOpen (void)
CanOpen Destructor.
• const Error ∗ Open (CanInterface &can)
Open the CANopen network.
• const Error ∗ Open (CanInterface &can, CanOpenSettings &settings)
Open the CANopen network.
• void Close (void)
Close the CANopen network.
• NetworkType GetNetworkType (void)
Return the network type.
• const Error ∗ AttachNode (Node ∗n)
Attach the passed node to this network.
• const Error ∗ DetachNode (Node ∗n)
Detach the passed node from this network.
• const Error ∗ SetNodeGuard (Node ∗n, GuardProtocol type, Timeout timeout=50, uint8 life=3)
Configure the node guarding protocol for a CANopen node.
• const Error ∗ ResetNode (Node ∗n)
Send a network management message to reset the specified node.
• const Error ∗ ResetComm (Node ∗n)
Send a network management message to reset the communications of the specified node.
• const Error ∗ PreOpNode (Node ∗n)
Send a network management message to put the specified node in pre-operational state.
• const Error ∗ StartNode (Node ∗n)
Send a network management message to start the specified node.
• const Error ∗ StopNode (Node ∗n)
Send a network management message to stop the specified node.
• const Error ∗ BootModeNode (Node ∗n)
For CANopen networks, this is the same as CanOpen::StopNode();.
• const Error ∗ Xmit (CanFrame &frame, Timeout timeout=2000)
Transmit a frame over the CANopen network.
• const Error ∗ XmitSDO (Node ∗n, uint8 ∗data, uint16 len, uint16 ∗ret, Timeout timeout=2000)
Transmit an SDO message over the CANopen network and wait for a response.
• const Error ∗ XmitPDO (class PDO ∗pdo, Timeout timeout=2000)
Transmit a PDO over the CANopen network.
• int16 GetSynchProducer (void)
Return the node ID of the synch producer for this network.
• void SetSynchProducer (int16 nodeID)
Set the node ID of the synch producer for this network.
• int32 GetErrorFrameCounter (void)
Return the number of error frames received over then CAN network since the last time the counter was cleared.
• void ClearErrorFrameCounter (void)
Clear the error frame counter.
• const Error ∗ EnableReceiver (uint32 canMsgID, class Receiver ∗rcvr)
Enable reception handling of the message identified by this Receiver object.
• const Error ∗ DisableReceiver (uint32 canMsgID)
Disable reception handling of a particular CANopen message type.
Generated by Doxygen
234 Class Documentation
The CanOpen class is the top level interface into the CANopen network.
There should be at least one object of this class in every CANopen based application. Normally, only one object will
be necessary, however if more then one independent CANopen network is in use, then more then one object will be
necessary.
On startup, a low level CAN interface object should be created. This object should be passed to the CANopen object's
Open() method.
5.24.2.1 CanOpen()
CanOpen (
void )
Default constructor.
5.24.2.2 ∼CanOpen()
∼CanOpen (
void ) [virtual]
CanOpen Destructor.
5.24.3.1 AttachNode()
This function is called by the node object when it's initialized. It connects the node to the CANopen network object so
that messages bound for the node can be properly delivered.
Generated by Doxygen
5.24 CanOpen Class Reference 235
Parameters
n Pointer to the node to attach to the network.
Returns
Implements Network.
5.24.3.2 BootModeNode()
Parameters
n Pointer to the node to stop.
Returns
Implements Network.
5.24.3.3 Close()
void Close (
void )
This disables all receivers and stops the thread that listens on the CAN network.
5.24.3.4 DetachNode()
This function is called by the node object when it's uninitialized. It removes the connection between the node and the
CANopen network object.
Generated by Doxygen
236 Class Documentation
Parameters
Returns
Implements Network.
5.24.3.5 DisableReceiver()
Parameters
Returns
5.24.3.6 EnableReceiver()
The receiver is enabled by adding it to a binary tree of receiver objects maintained by the CanOpen object.
Parameters
Generated by Doxygen
5.24 CanOpen Class Reference 237
Returns
5.24.3.7 GetErrorFrameCounter()
int32 GetErrorFrameCounter (
void ) [inline]
Return the number of error frames received over then CAN network since the last time the counter was cleared.
Returns
The number of error frames received since the last call to CanOpen::ClearErrorFrameCounter();
5.24.3.8 GetNetworkType()
NetworkType GetNetworkType (
void ) [inline], [virtual]
Returns
Implements Network.
5.24.3.9 GetSynchProducer()
int16 GetSynchProducer (
void ) [inline]
Returns
The synch producer node ID, or 0 if no synch producer has been registered.
Generated by Doxygen
238 Class Documentation
Parameters
can A reference to the CAN interface object that will be used for all low level communication over the network.
Returns
This function performs the one time initialization necessary to communication via the CANopen network. It should be
the first function called for the CANopen object.
This version of the Open function takes a CanOpenSettings object reference as it's second parameter. The data mem-
bers of the settings object may be used to configure some of the CanOpen object's behavior.
Parameters
ci A reference to the CAN interface object that will be used for all low level communication over the network.
settings A reference to a CanOpenSettings object. This object is used to customize the behavior of the CanOpen
object.
Returns
5.24.3.12 PreOpNode()
Send a network management message to put the specified node in pre-operational state.
Parameters
n Pointer to the node.
Generated by Doxygen
5.24 CanOpen Class Reference 239
Returns
Implements Network.
5.24.3.13 ResetComm()
Send a network management message to reset the communications of the specified node.
All nodes have their communications reset if the passed node ID is zero.
Parameters
n A pointer to the node to reset
Returns
Implements Network.
5.24.3.14 ResetNode()
Parameters
n A pointer to the node to reset
Returns
Implements Network.
Generated by Doxygen
240 Class Documentation
5.24.3.15 SetNodeGuard()
Parameters
Returns
Implements Network.
5.24.3.16 SetSynchProducer()
void SetSynchProducer (
int16 nodeID ) [inline]
Parameters
5.24.3.17 StartNode()
Generated by Doxygen
5.24 CanOpen Class Reference 241
Parameters
n Pointer to the node to start.
Returns
Implements Network.
5.24.3.18 StopNode()
Parameters
n Pointer to the node to stop.
Returns
Implements Network.
5.24.3.19 Xmit()
Parameters
Generated by Doxygen
242 Class Documentation
Returns
5.24.3.20 XmitPDO()
If the PDO is a transmit PDO (i.e. the type of PDO that's normally sent from the node and received by the master), then
a remote request is sent.
Parameters
Returns
Implements Network.
5.24.3.21 XmitSDO()
Transmit an SDO message over the CANopen network and wait for a response.
The SDO should have alrady been formatted into the passed array. This function assigns the standard CAN message
ID and transmits the resulting CAN frame.
Parameters
Returns
Implements Network.
The documentation for this class was generated from the following files:
• CML_CanOpen.h
• CanOpen.cpp
This class holds the error codes that describe CANopen error conditions.
Error
CanError
CanOpenError
Generated by Doxygen
244 Class Documentation
Internal
Error OK
Unknown
InvalidID
Alloc
NoDriver
Timeout
Driver
CanError AlreadyOpen
BadParam
BadPortName
NotOpen
Permission
...
SDO_BadMsgRcvd
SDO_BadMuxRcvd
MonitorRunning
SDO_Busy
RcvrPresent
CanOpenError BadParam
BadNodeID
ThreadStart
Closed
IllegalFieldCt
...
Generated by Doxygen
5.25 CanOpenError Class Reference 245
This class holds the error codes that describe CANopen error conditions.
5.25.2.1 IllegalFieldCt
The node returned an illegal field count for the object being requested in it's object dictionary.
Generated by Doxygen
246 Class Documentation
5.25.2.2 Initialized
An attempt was made to initialize an object that has already been initialized, and doesn't allow multiple initialization.
5.25.2.3 MonitorRunning
Monitor already running - An attempt is made to start the heartbeat or node guarding and it's already running.
5.25.2.4 NotInitialized
This error indicates a coding error, i.e. trying to use a Receiver object without initializing it.
5.25.2.5 SDO_BadMuxRcvd
The mux (index/sub-index) received in a SDO message is inconsistent with the object being accessed.
The documentation for this class was generated from the following file:
• CML_CanOpen.h
Generated by Doxygen
5.26 CanOpenNodeInfo Struct Reference 247
The CanOpenNodeInfo structure holds some data required by the CANopen network interface which is present in every
node it manages.
NetworkNodeInfo
CanOpenNodeInfo
RefObj SDO
sdo
sdoSemPtr
me
semPtr
prev
CanOpenNodeInfo
next
Public Attributes
• uint32 eventTime
Time (milliseconds) when next guarding event is due.
Generated by Doxygen
248 Class Documentation
• int16 guardToggle
This value keeps track of the toggle bit used with node guarding.
• int32 guardTimeout
This variable gives the guard time in milliseconds.
• uint8 lifeTime
Max number of guard timeouts before an error is generated.
• uint8 lifeCounter
Counter used to track guard timeouts.
• GuardProtocol guardType
This variable identifies the type of guard protocol being used by this node.
• NodeState desired
State I'm waiting for.
• Semaphore ∗ semPtr
Pointer to semaphore used when waiting for state change.
• Semaphore ∗ sdoSemPtr
Pointer to semaphore used when waiting for an SDO response.
• uint8 ∗ sdoBuff
Pointer to SDO data buffer.
The CanOpenNodeInfo structure holds some data required by the CANopen network interface which is present in every
node it manages.
The contents of this structure should be considered the private property of the CANopen class.
5.26.2.1 guardTimeout
int32 guardTimeout
5.26.2.2 guardToggle
int16 guardToggle
This value keeps track of the toggle bit used with node guarding.
Generated by Doxygen
5.27 CanOpenSettings Class Reference 249
5.26.2.3 guardType
GuardProtocol guardType
This variable identifies the type of guard protocol being used by this node.
The documentation for this struct was generated from the following files:
• CML_CanOpen.h
• CanOpen.cpp
Configuration object used to customize global settings for the CANopen network.
• CanOpenSettings ()
Default constructor for CanOpenSettings object.
Public Attributes
• int readThreadPriority
Defines the read thread priority.
• bool useAsTimingReference
If true, the master (i.e.
• uint32 syncID
CAN message ID of the SYNC message.
• uint32 timeID
CAN message ID of the timestamp message.
Configuration object used to customize global settings for the CANopen network.
An object of this type may be passed to the CanOpen::Open() method when the network is first opened.
If no CanOpenSettings object is passed to the CanOpen::Open() method, then the behavior is exactly the same as
passing a CanOpenSettings object with the default settings.
Generated by Doxygen
250 Class Documentation
5.27.2.1 CanOpenSettings()
CanOpenSettings (
void )
This constructor simply sets all the settings to their default values.
5.27.3.1 readThreadPriority
int readThreadPriority
The read thread is started when the CanOpen object is first opened (using CanOpen::Open()). This thread is responsible
for reading messages from the CANopen network and calling the message handlers associated with them. It should be
run at a relatively high priority. Default: 9
5.27.3.2 syncID
uint32 syncID
This is only used if the CanOpen object wll act as the timing reference in the system. If so, this ID must match the
corresponding value passed in the AmpSettings object. Default 0x80
5.27.3.3 timeID
uint32 timeID
This is only used if the CanOpen object wll act as the timing reference in the system. If so, this ID must match the
corresponding value passed in the AmpSettings object. Default 0x180
Generated by Doxygen
5.28 CopleyCAN Class Reference 251
5.27.3.4 useAsTimingReference
bool useAsTimingReference
the computer that CML is running on) will generate sync timing messages used to synchronize the clocks of the nodes
on the CANopen network. This is only possible if the CAN interface being used is able to capture accurate PC timer
based time stamps of the received CAN frames. Since this isn't supported by most CAN interfaces, the default setting
for this is false. If false, one of the nodes on the CANopen network will generate the time stamps. Default: false
The documentation for this class was generated from the following files:
• CML_CanOpen.h
• CanOpen.cpp
This class extends the generic CanInterface class into a working interface for the Copley can device driver.
RefObj
CanInterface
CopleyCAN
Generated by Doxygen
252 Class Documentation
RefObj
CanInterface
CopleyCAN
• CopleyCAN (void)
Construct a CAN object.
• CopleyCAN (const char ∗port)
Construct a new CAN object.
• virtual ∼CopleyCAN (void)
Destructor for CopleyCAN object.
• const Error ∗ Open (void)
Open the CAN bus.
• const Error ∗ Close (void)
Close the CAN interface.
• const Error ∗ SetBaud (int32 baud)
Set the CAN interface baud rate.
• bool SupportsTimestamps (void)
Return true if the CAN interface supports timestamps on received frames.
Generated by Doxygen
5.28 CopleyCAN Class Reference 253
Protected Attributes
• int open
tracks the state of the interface as open or closed.
• int32 baud
Holds a copy of the last baud rate set.
• void ∗ local
This pointer is used to keep track of private data used by the driver.
This class extends the generic CanInterface class into a working interface for the Copley can device driver.
CopleyCAN (
void )
CopleyCAN (
const char ∗ port )
Generated by Doxygen
254 Class Documentation
5.28.3.1 Close()
Returns
5.28.3.2 Open()
Returns
5.28.3.3 RecvFrame()
Parameters
frame A reference to the frame object that will be filled by the read.
timeout The timeout (ms) to wait for the frame. A timeout of 0 will return immediately if no data is available. A
timeout of < 0 will wait forever.
Generated by Doxygen
5.28 CopleyCAN Class Reference 255
Returns
5.28.3.4 SetBaud()
Parameters
b The baud rate to set.
Returns
5.28.3.5 SupportsTimestamps()
bool SupportsTimestamps (
void ) [inline], [virtual]
Returns
5.28.3.6 XmitFrame()
Generated by Doxygen
256 Class Documentation
Parameters
Returns
5.28.4.1 local
This pointer is used to keep track of private data used by the driver.
The documentation for this class was generated from the following files:
• can_copley.h
• can_copley.cpp
Generated by Doxygen
5.29 CopleyIO Class Reference 257
RefObj
Node
IOModule
CopleyIO
sdo map
Node PDO
RPDO TPDO
IOModule
CopleyIO
Generated by Doxygen
258 Class Documentation
It extendes the standard I/O module with methods that can be used to restore from a CME generated I/O settings file.
Generated by Doxygen
5.29 CopleyIO Class Reference 259
CopleyIO (
Network & net,
int16 nodeID )
Parameters
net The Network object that this module is associated with.
nodeID The node ID of the module on the network.
CopleyIO (
Network & net,
int16 nodeID,
IOModuleSettings & settings )
Parameters
net The Network object that this module is associated with.
nodeID The node ID of the module on the network.
settings The settings to use when configuring the module
5.29.3.1 GetIOAnlg()
Generated by Doxygen
260 Class Documentation
Parameters
anlg A structure that will be filled with the analog I/O values
Returns
5.29.3.2 GetIOCfg()
Read the complete I/O configuration from the module and return it in the passed structure.
This structure holds every module parameter that can be stored to the module's internal flash memory. The contents of
the structure represent the complete I/O configuration.
Parameters
Returns
5.29.3.3 GetIODigi()
Parameters
digi A structure that will be filled with the digital I/O values
Returns
Generated by Doxygen
5.29 CopleyIO Class Reference 261
5.29.3.4 GetIOInfo()
Parameters
info A structure that will be filled with the I/O module info
Returns
5.29.3.5 GetIOPWM()
Parameters
pwm A structure that will be filled with the PWM I/O values
info A structure containing additional information about the module.
Returns
This function associates the object with the CANopen network it will be used on.
Generated by Doxygen
262 Class Documentation
Parameters
net The Network object that this module is associated with.
nodeID The node ID of the module on the network.
Returns
This function associates the object with the CANopen network it will be used on.
Parameters
net The Network object that this module is associated with.
nodeID The node ID of the module on the network.
settings The settings to use when configuring the module
Returns
5.29.3.8 LoadFromFile()
This function presently supports loading ∗.cci files created by the CME-2 program, version 1 and later.
Generated by Doxygen
5.29 CopleyIO Class Reference 263
Parameters
Returns
Flash memory is a type of non-volatile RAM which allows module parameters to be saved between power cycles. When
this function is called, any module parameters that may be stored to flash will be copied from their working (RAM)
locations to the stored (flash) locations.
For a list of those I/O parameters which may be saved to flash memory, see the IOConfig structure. Every member of
that structure represents an io module parameter that may be saved to flash.
Returns
Upload the passed io module configuration to the module's working memory, and then copy that working memory to
flash.
Parameters
Generated by Doxygen
264 Class Documentation
Returns
5.29.3.11 SerialCmd()
Send a serial port message to a Copley device over the CANopen network.
Copley devices use serial ports for some basic configuration purposes. Most of the functions available over the serial
interface are also available in the CANopen object dictionary, but not everything.
This function allows a native serial port command to be sent over the CANopen network. It allows any remaining features
of the device to be accessed when only a CANopen connection is available.
Parameters
Returns
5.29.3.12 SetIOAnlg()
Parameters
anlg A structure that will be filled with the analog I/O values
Generated by Doxygen
5.29 CopleyIO Class Reference 265
Returns
5.29.3.13 SetIOConfig()
Write the complete I/O configuration from the module and return it in the passed structure.
This structure holds every I/O parameter that can be stored to the module's internal flash memory. The contents of the
structure represent the complete I/O configuration.
Parameters
Returns
5.29.3.14 SetIODigi()
Parameters
digi A structure that will be filled with the digital I/O values
Returns
5.29.3.15 SetIOInfo()
Generated by Doxygen
266 Class Documentation
Parameters
info A structure that will be filled with the I/O module info
Returns
5.29.3.16 SetIOPWM()
Parameters
pwm A structure that will be filled with the PWM I/O values
info A structure containing additional information about the module.
Returns
The documentation for this class was generated from the following files:
• CML_CopleyIO.h
• CopleyIO.cpp
• CopleyIOFile.cpp
This structure is used to return information about the analog inputs of a Copley I/O module.
Generated by Doxygen
5.31 CopleyIOCfg Struct Reference 267
Public Attributes
• uint16 iRaw [COPLEYIO_NUM_AIN]
Analog input raw value.
• uint32 iScaled [COPLEYIO_NUM_AIN]
Analog input scaled value.
• uint32 iFactor [COPLEYIO_NUM_AIN]
Analog input scaling factor.
• uint32 iOffset [COPLEYIO_NUM_AIN]
Analog input offset.
• uint32 iUpLimit [COPLEYIO_NUM_AIN]
Analog input upper limit for interrupt.
• uint32 iLoLimit [COPLEYIO_NUM_AIN]
Analog input lower limit for interrupt.
• uint32 iAbsDelta [COPLEYIO_NUM_AIN]
Analog input absolute delta value for interrrupt.
• uint32 iPosDelta [COPLEYIO_NUM_AIN]
Analog input positive delta value for interrrupt.
• uint32 iNegDelta [COPLEYIO_NUM_AIN]
Analog input negative delta value for interrrupt.
• uint16 iFlags [COPLEYIO_NUM_AIN]
Analog input interrrupt flags.
• uint16 iMask [COPLEYIO_NUM_AIN]
Analog input interrrupt mask.
This structure is used to return information about the analog inputs of a Copley I/O module.
The documentation for this struct was generated from the following file:
• CML_CopleyIO.h
CopleyIOCfg
Generated by Doxygen
268 Class Documentation
Public Attributes
• CopleyIOInfo info
Global IO Module parameters.
• CopleyIODigi digi
Digital IO parameters.
• CopleyIOAnlg anlg
Analog input parameters.
• CopleyIOPWM pwm
PWM output parameters.
This structure contains all user configurable parameters used by an IO module which may be stored in non-volatile
memory.
The documentation for this struct was generated from the following file:
• CML_CopleyIO.h
This structure is used to return information about the digital I/O of a Copley I/O module.
Public Attributes
Generated by Doxygen
5.33 CopleyIOInfo Struct Reference 269
This structure is used to return information about the digital I/O of a Copley I/O module.
The documentation for this struct was generated from the following file:
• CML_CopleyIO.h
Public Attributes
• uint32 serial
Serial number.
• char model [COPLEYIO_MAX_STRING]
Model number string.
• char mfgInfo [COPLEYIO_MAX_STRING]
Amplifier's manufacturing information string.
• uint16 hwType
Hardware type code.
Generated by Doxygen
270 Class Documentation
• uint16 loopRate
Main loop update rate (Hz)
• uint16 fwVersion
Firmware version number.
• uint32 baud
Serial port baud rate (bps)
• uint16 maxWords
Maximum number of words sent with any command.
• char name [COPLEYIO_MAX_STRING]
I/O module name.
• char hostCfg [COPLEYIO_MAX_STRING]
Host configuration state (CME use only)
• int16 nodeCfg
CAN node ID configuration.
• uint16 rateCfg
CAN bit rate configuration.
• uint16 nodeID
CAN node ID.
• uint16 status
CAN network status word.
• uint16 rate
CAN network bit rate.
• uint16 anlgInt
Active analog interrupts.
• uint16 anlgIntEna
Analog input global interrupt enable.
• uint16 digiIntEna
Digital input global interrupt enable.
• uint32 pwmPeriodA
PWM bank A period.
• uint32 pwmPeriodB
PWM bank B period.
This structure is used to hold information about the IO Module such as it's model number, serial number, etc.
Use the IOModule::GetIOInfo method to retrieve this information from the module.
The documentation for this struct was generated from the following file:
• CML_CopleyIO.h
Generated by Doxygen
5.34 CopleyIOPWM Struct Reference 271
This structure is used to return information about the PWM outputs of a Copley I/O module.
Public Attributes
This structure is used to return information about the PWM outputs of a Copley I/O module.
The documentation for this struct was generated from the following file:
• CML_CopleyIO.h
• CopleyMotionLibrary ()
Default constructor for the CopleyMotionLibrary object.
• ∼CopleyMotionLibrary ()
Destructor for CopleyMotionLibrary object.
• const char ∗ GetVersionString ()
Get the CML library version string.
• void SetDebugLevel (CML_LOG_LEVEL level)
Set the debug message level.
• void SetFlushLog (bool flush)
Enable/Disable the flushing of the log file after each write.
• void SetMaxLogSize (int32 max)
Set the max CML log file size.
• void FlushLog (void)
Generated by Doxygen
272 Class Documentation
This object defines a number of handy methods related to the libraries as a whole.
5.35.2.1 ∼CopleyMotionLibrary()
∼CopleyMotionLibrary ( )
Generated by Doxygen
5.35 CopleyMotionLibrary Class Reference 273
5.35.3.1 Debug()
void Debug (
const char ∗ fmt,
... )
The debug level must be set >= LOG_DEBUG for this message to be written.
Note that message logging is only available if file support is enabled in the CML_Settings.h file.
Parameters
5.35.3.2 Error()
void Error (
const char ∗ fmt,
... )
The debug level must be set >= LOG_ERRORS for this message to be written.
Note that message logging is only available if file support is enabled in the CML_Settings.h file.
Parameters
5.35.3.3 FlushLog()
void FlushLog (
void )
This forces the log contents to be written to disk, thus preventing it from being lost if the program exits without calling
the CML object destructor.
Generated by Doxygen
274 Class Documentation
5.35.3.4 GetDebugLevel()
CML_LOG_LEVEL GetDebugLevel (
void ) [inline]
Returns
5.35.3.5 GetFlushLog()
bool GetFlushLog (
void ) [inline]
Returns
true if enabled.
5.35.3.6 GetLogFile()
Returns
5.35.3.7 GetMaxLogSize()
int32 GetMaxLogSize (
void ) [inline]
Returns
Generated by Doxygen
5.35 CopleyMotionLibrary Class Reference 275
5.35.3.8 GetVersionString()
Returns
5.35.3.9 LogCAN()
void LogCAN (
bool recv,
struct CanFrame & frame )
Parameters
recv True if this was a received message, false for transmit messages
frame The frame to log
5.35.3.10 SetDebugLevel()
void SetDebugLevel (
CML_LOG_LEVEL level )
The library code includes some debug messages that may be enabled by setting the debug level to a value greater then
LOG_NONE.
If the level was previously set higher then LOG_NONE, and is then set to LOG_NONE, any open log file will be closed.
Parameters
level The log level.
Generated by Doxygen
276 Class Documentation
5.35.3.11 SetFlushLog()
void SetFlushLog (
bool flush )
This can be useful if debug messages are being lost due to a crash, however it can increase the time necessary to write
to the file.
Parameters
5.35.3.12 SetLogFile()
void SetLogFile (
const char ∗ fname )
This file will be used to log debug messages. The file will be created (or truncated if it alread exists) when the first
message is written to the file. Note that the debug level must be set > LOG_NONE for any messages to be written.
Also note that file access must be enabled in CML_Settings.h for the log file to be used.
If the log file is already open when this method is called, it will be closed and a new log file with the specified name will
be open on the next write to it.
Parameters
5.35.3.13 SetMaxLogSize()
void SetMaxLogSize (
int32 max )
Generated by Doxygen
5.36 CopleyNode Class Reference 277
This option can be used to prevent a debug log file from getting so large it uses all available disk space on long runs.
Once the log file exceeds this size, it will be renamed logfilename.bak (where logfilename is replaced by the log file
name), and a new log file will be started. Any old backup log file will be overwritten.
Parameters
5.35.3.14 Warn()
void Warn (
const char ∗ fmt,
... )
The debug level must be set >= LOG_WARNINGS for this message to be written.
Note that message logging is only available if file support is enabled in the CML_Settings.h file.
Parameters
The documentation for this class was generated from the following files:
• CML.h
• CML.cpp
Generated by Doxygen
278 Class Documentation
RefObj
Node
CopleyNode
Amp
RefObj SDO
sdo
Node
CopleyNode
Generated by Doxygen
5.36 CopleyNode Class Reference 279
Objects of this class represent Copley products attached to the CANopen bus.
5.36.2.1 FirmwareUpdate()
Note that this is not part of normal operation, but rather a special utility function which allows the device firmware to be
updated if necessary.
Only firmware files produced by Copley Controls Corp. should be used to update Copley devices. Attempting to update
a device with incorrectly formatted firmware files will render the it inoperable.
If an error occurs during the download of new firmware, it may be necessary to reprogram the device through it's serial
port. The CME-2 software can be used to recover an device in this case.
Parameters
Returns
Generated by Doxygen
280 Class Documentation
5.36.2.2 SerialCmd()
Send a serial port message to a Copley device over the CANopen network.
Copley devices use serial ports for some basic configuration purposes. Most of the functions available over the serial
interface are also available in the CANopen object dictionary, but not everything.
This function allows a native serial port command to be sent over the CANopen network. It allows any remaining features
of the device to be accessed when only a CANopen connection is available.
Parameters
Returns
The documentation for this class was generated from the following files:
• CML_Copley.h
• AmpFW.cpp
• CopleyNode.cpp
This class represents errors that can be returned by the CopleyNode class.
Generated by Doxygen
5.37 CopleyNodeError Class Reference 281
Error
NodeError
CopleyNodeError
Internal
Error OK
Unknown
NetworkUnavailable
NodeError
GuardTimeout
SerialMsgLen
CopleyNodeError
SerialError
Generated by Doxygen
282 Class Documentation
This class represents errors that can be returned by the CopleyNode class.
There is one static member for each defined error.
The documentation for this class was generated from the following file:
• CML_Copley.h
Public Attributes
• int16 kp
Proportional gain.
• int16 ki
Integral gain.
• int16 offset
Current offset.
• int16 peakLim
Peak current limit (0.01 amp units) This is the maximum current that can be applied to the motor at any time Also used as
Boost current in stepper mode.
• int16 contLim
Continuous current limit (0.01 amp units) This is the maximum current that can continuously be applied to the load.
• int16 peakTime
Time at peak current limit (milliseconds) If peak current is requested, it will fall back to the continuous limit within this
amount of time.
• uint16 stepHoldCurrent
Stepper hold current (0.01 amps).
• uint16 stepRun2HoldTime
Run to hold time(milliseconds) The period of time, beginning when a move is complete, to when output current switched
to hold current.
• uint16 stepVolControlDelayTime
Voltage control mode time delay (milliseconds) Time delay to enter into a special voltage control mode.
• int32 slope
Rate of change of current command (milliamps/sec).
Generated by Doxygen
5.38 CrntLoopConfig Struct Reference 283
The current loop is one of three servo control loops used by the amplifier to control a motor. The configuration parame-
ters used by this control loop allow the servo performance to be 'tuned' for various motors and loads.
This structure also holds the parameters used to control current limiting. The current limiting acts on the commanded
current before it is sent to the current loop.
The amplifier member functions Amp::GetCrntLoopConfig and Amp::SetCrntLoopConfig are used to read and write this
data to the amplifier.
5.38.2.1 CrntLoopConfig()
CrntLoopConfig (
void ) [inline]
Default constructor.
5.38.3.1 contLim
int16 contLim
Continuous current limit (0.01 amp units) This is the maximum current that can continuously be applied to the load.
5.38.3.2 peakTime
int16 peakTime
Time at peak current limit (milliseconds) If peak current is requested, it will fall back to the continuous limit within this
amount of time.
Generated by Doxygen
284 Class Documentation
5.38.3.3 slope
int32 slope
This parameter is only used when running in the low level programmed current mode (AMPMODE_PROG_CRNT), or in
the CANopen profile torque mode (AMPMODE_CAN_TORQUE). In other modes this parameter is ignored and no limit
is placed on the slope of the current command.
If this parameter is set to zero (default) it is not used in any mode of operation.
Note that this parameter is internally the same as the torque slope parameter which can be set using the function Amp←-
::SetTorqueSlope. The units are different however as this parameter controls slope in units of current and the torque
slope function adjusts in units of torque.
5.38.3.4 stepHoldCurrent
uint16 stepHoldCurrent
Current used to hold the motor at rest. Used in stepper mode only.
5.38.3.5 stepRun2HoldTime
uint16 stepRun2HoldTime
Run to hold time(milliseconds) The period of time, beginning when a move is complete, to when output current switched
to hold current.
5.38.3.6 stepVolControlDelayTime
uint16 stepVolControlDelayTime
Voltage control mode time delay (milliseconds) Time delay to enter into a special voltage control mode.
If set to zero this feature is disabled. Used for stepper mode only.
The documentation for this struct was generated from the following file:
• CML_AmpStruct.h
Generated by Doxygen
5.39 DAConfig Struct Reference 285
Configuration structure used to hold the settings for a drive's D/A converter.
• DAConfig (void)
Default constructor Initialize all elements to zero.
Public Attributes
• int32 daConverterConfig
D/A converter configuration.
Configuration structure used to hold the settings for a drive's D/A converter.
These settings may be up/download from the amplifier using the functions Amp::SetDAConverterConfig and Amp::←-
GetDAConverterConfig
5.39.2.1 daConverterConfig
int32 daConverterConfig
This paramter sets the mode for the D/A converter on drives so equipped. See CAN ID 0x21E0 for details.
The documentation for this struct was generated from the following file:
• CML_AmpStruct.h
Generated by Doxygen
286 Class Documentation
RefObj
PDO
TPDO
IOModule::DigInPDO
Generated by Doxygen
5.40 IOModule::DigInPDO Class Reference 287
RefObj Pmap
map
PDO
TPDO
IOModule::DigInPDO
This class represents the standard transmit PDO into which up to 64 digital inputs may be mapped.
Generated by Doxygen
288 Class Documentation
5.40.2.1 GetBitVal()
bool GetBitVal (
uint16 id,
bool & value )
Parameters
id The output ID to be updatad.
value The new value for the output.
Returns
true if the value was updated, false if the output isn't mapped to this PDO.
5.40.2.2 GetInVal()
bool GetInVal (
uint8 id,
uint8 & value )
Read the specified input bank from the PDO's cached data.
The value returned will be the last value received via PDO for this input bank.
Parameters
id The input block ID to be checked.
value The input value for the block will be returned here.
Returns
true if the value was returned, false if the block isn't mapped to this PDO.
5.40.2.3 Init()
Generated by Doxygen
5.41 IOModule::DigOutPDO Class Reference 289
uint8 ct,
uint8 id[ ],
IOMODULE_EVENTS event )
Parameters
Returns
5.40.2.4 Received()
void Received (
void ) [virtual]
This method is called by the CANopen reader thread when a new PDO message is received. It causes this PDO object
to post it's event to the IOModule object's event map. This will cause any waiting threads to wake up.
The documentation for this class was generated from the following files:
• CML_IO.h
• IOmodule.cpp
Generated by Doxygen
290 Class Documentation
RefObj
PDO
RPDO
IOModule::DigOutPDO
RefObj Pmap
map
PDO
RPDO
IOModule::DigOutPDO
Generated by Doxygen
5.41 IOModule::DigOutPDO Class Reference 291
• const Error ∗ Init (class IOModule ∗io, uint32 cobID, uint8 ct, uint8 id[ ])
Initialize a digital output PDO object.
• bool Update (uint8 id, uint8 value)
Update the locally stored value of one of the 8-bit digital output blocks associated with this PDO.
• bool UpdateBit (uint16 id, bool value)
Update the locally stored value of one bit in this PDO.
• const Error ∗ Transmit (void)
Transmit this PDO.
This class represents the standard receive PDO into which up to 64 digital output pins may be mapped.
5.41.2.1 Init()
Parameters
Returns
Generated by Doxygen
292 Class Documentation
5.41.2.2 Transmit()
Returns
5.41.2.3 Update()
bool Update (
uint8 id,
uint8 value )
Update the locally stored value of one of the 8-bit digital output blocks associated with this PDO.
Parameters
id The output block ID to be updatad.
value The new value for the output block.
Returns
true if the value was updated, false if the block isn't mapped to this PDO.
5.41.2.4 UpdateBit()
bool UpdateBit (
uint16 id,
bool value )
Parameters
id The output ID to be updatad.
value The new value for the output.
Generated by Doxygen
5.42 EcatDgram Class Reference 293
Returns
true if the value was updated, false if the output isn't mapped to this PDO.
The documentation for this class was generated from the following files:
• CML_IO.h
• IOmodule.cpp
EcatDgram
• EcatDgram (uint8 cmd, int16 adp, int16 ado, int16 len, void ∗ptr=0)
Construct a datagram with a variable data length.
• EcatDgram (uint8 cmd, int16 adp, int16 ado, int16 len, int32 val)
Construct a datagram with up to 4 bytes of data.
• virtual ∼EcatDgram ()
Default destructor for an EtherCAT datagram.
• void Init (uint8 cmd, int16 adp, int16 ado, int16 len, int32 val)
Initialize a datagram with up to 4 bytes of data.
• void Init (uint8 cmd, int16 adp, int16 ado, int16 len, void ∗ptr=0)
Initialize a datagram with an arbitrary amount of data.
• void Reset (void)
Reset the datagram.
• void setNext (EcatDgram ∗n)
Add a new datagram after this one.
• EcatDgram ∗ getNext (void)
Get a pointer to the next datagram stored in the frame.
• virtual const Error ∗ Load (void ∗buff, int16 &off)
Pack this datagram into a memory buffer that's large enough to hold an entire EtherCAT frame.
Generated by Doxygen
294 Class Documentation
At the lowest levels, an EtherCAT packet is made up of one or more reads and/or writes to memory locations on the
slave nodes. Each of these memory accesses is called a datagram.
There are several different types of datagrams; reads/writes to a node based on it's location in the network, reads/writes
to a node based on it's address, broadcast accesses to all nodes on the network, etc.
In general, CML uses don't need to concern themselves with EtherCAT datagrams. This class is used internally in the
libary to support low level communications over the EtherCAT network.
EcatDgram (
uint8 cmd,
int16 adp,
int16 ado,
int16 len,
void ∗ ptr = 0 )
Parameters
EcatDgram (
uint8 cmd,
int16 adp,
int16 ado,
int16 len,
int32 val )
Parameters
5.42.3.1 checkNdx()
bool checkNdx (
void )
Compare the index stored in the frame that this datagram is part of to the expected value.
This can be used to help verify that the frame received over the EtherCAT network contains the expected datagrams.
Returns
true if the index stored in the frame holds the expected value.
Generated by Doxygen
296 Class Documentation
5.42.3.2 getDgramLen()
int16 getDgramLen (
void )
Returns
5.42.3.3 getNdx()
uint8 getNdx (
void )
Returns
5.42.3.4 getNext()
EcatDgram ∗ getNext (
void )
Returns
void Init (
uint8 cmd,
int16 adp,
int16 ado,
int16 len,
int32 val )
Generated by Doxygen
5.42 EcatDgram Class Reference 297
Parameters
void Init (
uint8 cmd,
int16 adp,
int16 ado,
int16 len,
void ∗ ptr = 0 )
Parameters
5.42.3.7 Load()
Pack this datagram into a memory buffer that's large enough to hold an entire EtherCAT frame.
Parameters
Generated by Doxygen
298 Class Documentation
Returns
void setData (
void ∗ ptr )
Parameters
ptr Pointer to the data to store. The data referenced by this pointer should be at least as long as the length of the
datagram.
void setData (
int32 val )
Parameters
val The value to be stored in the datagram. The datagram is expected to be no longer then 4 bytes.
5.42.3.10 setNdx()
void setNdx (
uint8 ndx )
Parameters
ndx The new index value to store.
Generated by Doxygen
5.43 EcatFrame Class Reference 299
5.42.3.11 setNext()
void setNext (
EcatDgram ∗ n )
Parameters
n Pointer to the next datagram. A local copy of this pointer will be stored
The documentation for this class was generated from the following files:
• CML_EtherCAT.h
• EtherCAT.cpp
RefObj
EcatFrame
Generated by Doxygen
300 Class Documentation
RefObj
EcatFrame
This is used internally to represent a single frame of data sent over the EtherCAT network. The frame consists of a
header structure followed by a series of datagrams.
The documentation for this class was generated from the following files:
• CML_EtherCAT.h
• EtherCAT.cpp
This structure holds configuration info about the encoder error filter.
Public Attributes
• uint32 encoderErrorConfig
Encoder Error Filter Configuration This parameter it set up as follows: Bits 0-3: Maximum number of consecutice bad
samples to allow.
This structure holds configuration info about the encoder error filter.
Generated by Doxygen
5.45 Error Class Reference 301
5.44.2.1 encoderErrorConfig
uint32 encoderErrorConfig
Encoder Error Filter Configuration This parameter it set up as follows: Bits 0-3: Maximum number of consecutice bad
samples to allow.
Bits 4-15: Reserved for future use. Bits 16-28: Maximum difference between the actual and extrapolated reading before
treating reading as bad. Bits 29-31: Reserved for future use.
The documentation for this struct was generated from the following file:
• CML_AmpStruct.h
This class is the root class for all error codes returned by functions defined within the Motion Library.
Generated by Doxygen
302 Class Documentation
AmpFileError
CanError CanOpenError
EtherCatError
EventError
FirmwareError
IOFileError
LinkError
PathError IOError
PDO_Error
PvtConstAccelTrjError
PvtTrjError
ScurveError
SDO_Error
ThreadError
TrjError
Generated by Doxygen
5.45 Error Class Reference 303
Internal
Error OK
Unknown
Generated by Doxygen
304 Class Documentation
This class is the root class for all error codes returned by functions defined within the Motion Library.
Every error condition defined in the library has a constant, static error object associated with it. Pointers to these objects
are returned from the various function calls.
All library functions that return an error object pointer will return a NULL pointer in the case of no error. This allows one
to simply test the error pointer returned to determine if it indicates an error.
For example:
if( err )
printf( "Error: %%s\\n", err->toString() );
else
printf( "no error\\n" );
To test for a specific error condition, the following code can be used:
Note that the constructor used to create a new unique error code is protected, therefore only sub-classes of the Error
object are allowed to create new unique error codes.
5.45.2.1 Error()
Error (
uint16 i,
const char ∗ desc ) [inline], [protected]
This constructor is protected, so only sub-classes of the Error class can construct objects in this manner.
A unique ID coded and a description string must be provided with the new object.
Generated by Doxygen
5.45 Error Class Reference 305
Parameters
i The unique error ID value
desc A description of the error
5.45.3.1 GetID()
uint16 GetID (
void ) const [inline]
Each error code in the system has a unique 16-bit integer identifier associated with it. This function can be used to
return this identifier.
These ID codes are primarily intended for internal use by the Error object, they are only provided externally for use in
system which require an integer error ID code to interface with other parts of the system. The function Error::Lookup
can be used to convert the ID value back into an error object.
Returns
5.45.3.2 Lookup()
Lookup the constant error object associated with the passed ID code.
If the passed ID doesn't correspond to any known Error object, then the address of the Error::Unknown will be returned.
Parameters
Generated by Doxygen
306 Class Documentation
Returns
5.45.3.3 toString()
Return a C style string describing the error condition represented by this error object.
Returns
The documentation for this class was generated from the following files:
• CML_Error.h
• Error.cpp
The EtherCAT class is the top level interface into the EtherCAT network.
RefObj
Network
EtherCAT
Generated by Doxygen
5.46 EtherCAT Class Reference 307
RefObj
Network
EtherCAT
Generated by Doxygen
308 Class Documentation
Friends
• class Linkage
• class Node
The EtherCAT class is the top level interface into the EtherCAT network.
There should be at least one object of this class in every EtherCAT based application.
5.46.2.1 AddToFrame()
If the frame is too large to add the datagram, then first send the frame, reset it and add the datagram.
Parameters
Generated by Doxygen
5.46 EtherCAT Class Reference 309
Returns
5.46.2.2 FoE_DnldData()
Download a block of file data to a node using the File over EtherCAT (FoE) protocol.
The transfer should have been previously initialized by calling the EtherCAT::FoE_DnldStart function.
Parameters
n Pointer to the node to download to
len Length of data to download in bytes
data Buffer holding the data to download
to A timeout value.
end True if this is the last block of data to be sent
Returns
5.46.2.3 FoE_DnldStart()
Initiate a new file download using the File over EtherCAT (FoE) protocol.
This function should be used to start a new file download. On success, the EtherCAT::FoE_DnldData function can be
used to pass the file data.
Generated by Doxygen
310 Class Documentation
Parameters
n Points to the node who will receive this download
filename Name of the file to be sent. May be null if no file name is to be passed.
password Optional password value to be sent to the slave device (0 if not used)
to Timeout to wait for response.
Returns
5.46.2.4 FoE_LastErrInfo()
int32 FoE_LastErrInfo (
Node ∗ n,
char ∗ msg,
int maxMsg )
Return the detailed error code and message for the most recent FoE error response on this node.
Parameters
n Points to the node in question
msg Buffer where error message should be stored (can be null)
maxMsg Size of the message buffer
Returns
5.46.2.5 FoE_UpldData()
Upload a block of file data from a node using the File over EtherCAT (FoE) protocol.
The transfer should have been previously initialized by calling the EtherCAT::FoE_UpldStart function.
Generated by Doxygen
5.46 EtherCAT Class Reference 311
Parameters
Returns
5.46.2.6 FoE_UpldStart()
Initiate a new file upload using the File over EtherCAT (FoE) protocol.
This function should be used to start a new file upload. On success, the EtherCAT::FoE_UpldData function can be used
to read the file data.
Parameters
Returns
5.46.2.7 GetIdFromEEPROM()
Generated by Doxygen
312 Class Documentation
Read the node ID info that was pullsed from EEPROM on startup.
This can be useful on nodes that don't support the CoE protocol and therefor can't use the more standard Node::Get←-
Identity method.
Parameters
n Points to the node to access
id Structure where identiy info will be returned
Returns
5.46.2.8 GetNetworkType()
NetworkType GetNetworkType (
void ) [inline], [virtual]
Returns
Implements Network.
5.46.2.9 GetNodeAddress()
When each node is added to an EtherCAT network, the network object assigns it a unique address. This address is
then used by the master to communicate with the node over the network.
Parameters
n Pointer to the node object
addr The assigned address will be returned here
Generated by Doxygen
5.46 EtherCAT Class Reference 313
Returns
5.46.2.10 getNodeCount()
uint16 getNodeCount (
void ) [inline]
Returns
5.46.2.11 InitDistClk()
Returns
Write a block of data to the mailbox of an EtherCAT node and wait for a response.
Note that the mailbox mutex should be held when this is called.
The input and output data used by this function is stored in the previously allocated sync buffers
Generated by Doxygen
314 Class Documentation
Parameters
n The node to access.
len The number of bytes of data to send
ret returns the actual number of bytes returned.
timeout The maximum time to wait for a response.
Returns
Write a block of data to the mailbox of an EtherCAT node and wait for a response.
Note that the mailbox mutex should be held when this is called.
Parameters
n The node to access.
send Buffer holding the data to send to the node
len The number of bytes of data to send
recv Buffer where the received data will be returned
ret returns the actual number of bytes returned.
max Maximum number of bytes to return
timeout The maximum time to wait for a response.
getMtx True if the mailbox mutex should be acquired by this function. False if the mutex is already held by the
calling function.
Returns
Generated by Doxygen
5.46 EtherCAT Class Reference 315
5.46.2.14 maxSdoFromNode()
int32 maxSdoFromNode (
Node ∗ n ) [virtual]
Return the maximum number of bytes that can be received in an SDO message.
For CANopen this is always 8 (the max size of a CAN frame). For EtherCAT it's the size of the mailbox buffer, and is
node specific
Parameters
n The node to query
Returns
5.46.2.15 maxSdoToNode()
int32 maxSdoToNode (
Node ∗ n ) [virtual]
Return the maximum number of bytes that can be sent in an SDO message.
For CANopen this is always 8 (the max size of a CAN frame). For EtherCAT it's the size of the mailbox buffer, and is
node specific
Parameters
n The node to query
Returns
Generated by Doxygen
316 Class Documentation
5.46.2.16 SetNodeGuard()
This sets the heartbeat timeout used for process data on the EtherCAT node.
Parameters
Returns
Implements Network.
5.46.2.17 SetSync0Period()
Set the period of the SYNC0 signal used on nodes with a distributed clock.
Parameters
Returns
Generated by Doxygen
5.47 EtherCatError Class Reference 317
5.46.2.18 WaitCycleUpdate()
Parameters
Returns
The documentation for this class was generated from the following files:
• CML_EtherCAT.h
• ecatdc.cpp
• EtherCAT.cpp
This class holds the error codes that describe EtherCAT error conditions.
Error
EtherCatError
Generated by Doxygen
318 Class Documentation
Internal
Error OK
Unknown
ReadHardware
MboxHeader
OpenHardware
MboxSyntax
EcatMsgCorrupt
EtherCatError HardwareNotInit
PdoNotEnabled
NodeStateChange
EcatNotInit
Sync0Config
...
Generated by Doxygen
5.47 EtherCatError Class Reference 319
This class holds the error codes that describe EtherCAT error conditions.
The documentation for this class was generated from the following file:
• CML_EtherCAT.h
Generated by Doxygen
320 Class Documentation
RefObj
EtherCatHardware
LinuxEcatHardware WinUdpEcatHardware
RefObj
EtherCatHardware
This pure virtual class is the base for an OS specific class which implements the interface to the Ethernet hardware.
The documentation for this class was generated from the following file:
• CML_EtherCAT.h
Generated by Doxygen
5.49 EtherCatSettings Class Reference 321
Configuration object used to customize global settings for the EtherCAT network.
• EtherCatSettings ()
Default constructor for EtherCatSettings object.
Public Attributes
• int readThreadPriority
Defines the EtherCAT read thread priority.
• int cycleThreadPriority
Defines the EtherCAT cycle thread priority.
• Timeout cyclePeriod
EtherCAT cycle period.
Configuration object used to customize global settings for the EtherCAT network.
An object of this type may be passed to the EtherCAT::Open() method when the network is first opened.
If no settings object is passed to the EtherCAT::Open() method, then the behavior is exactly the same as passing a
EtherCatSettings object with the default settings.
5.49.2.1 EtherCatSettings()
EtherCatSettings ( ) [inline]
Generated by Doxygen
322 Class Documentation
5.49.3.1 cyclePeriod
Timeout cyclePeriod
This parameter defines the update rate at which the EtherCAT network is polled. Default: 1 ms.
5.49.3.2 cycleThreadPriority
int cycleThreadPriority
The cycle thread is started when the EtherCAT object is first opened (using EtherCAT::Open()). This thread is respon-
sible for polling the EtherCAT network at a set frequency. It should be run at a relatively high priority. Default: 9
5.49.3.3 readThreadPriority
int readThreadPriority
The read thread is started when the EtherCAT object is first opened (using EtherCAT::Open()). This thread is responsible
for reading Ethernet messages from the hardware and processing them as they arrive. It should be run at a relatively
high priority. Default: 9
The documentation for this class was generated from the following file:
• CML_EtherCAT.h
Event
Generated by Doxygen
5.50 Event Class Reference 323
Protected Attributes
• uint32 value
This is the value that the event is waiting for.
Friends
• class EventMap
Every EventMap object has a 32-bit mask register which describes it's state. Event objects may be attached to an
EventMap to wait for any combination of bits in the mask to become active.
The base Event class is a virtual class, and therefore shouldn't be used directly. It is extended by a number of sub-
classes which are used to wait for certain map bits to be set, cleared, etc.
An Event object may only be assigned to one EventMap at a time. An attempt to attach it to multiple EventMap objects
will result in an error. Further, Event objects are not thread safe. Only one thread should access a particular Event
object at a time. EventMap objects however are thread safe, so any number of threads may attach their own Event
objects to the same EventMap object without issue.
Generated by Doxygen
324 Class Documentation
Event (
uint32 val = 0 )
Parameters
val The value that the event will wait for. If not specified, defaults to zero.
5.50.2.2 ∼Event()
∼Event (
void ) [virtual]
Event distructor.
This makes sure the event isn't mapped when it's destroyed
Event (
const Event & e )
Parameters
e Another event that this will copy.
Generated by Doxygen
5.50 Event Class Reference 325
5.50.3.1 delChain()
void delChain (
void )
This undoes any chaining that was setup using the Event::setChain method.
5.50.3.2 getMask()
uint32 getMask (
void ) [inline]
Return the most recent mask value that caused the event to succeed.
After a successful Wait, this can be used to return the mask that caused the successful match.
Returns
5.50.3.3 getValue()
uint32 getValue (
void ) [inline]
Returns
5.50.3.4 isTrue()
This method should be implemented in the sub-class to define the type of event matching used. The base class always
returns false.
Generated by Doxygen
326 Class Documentation
Parameters
mask The EventMap mask compare to.
Returns
5.50.3.5 operator=()
This uses the value of the passed event object to update this event's value. Note that it's not legal to change an events
value while the event is attached to an EventMap object. If this is attempted, then this assignment will silently fail. The
preferred method for changing an event's value is through the Event::setValue method.
Parameters
e Another event that will be used to initialize this one.
Returns
5.50.3.6 setChain()
void setChain (
class EventMap & map,
uint32 mask )
Each time the event is updated, it will either set or clear the bits specified by mask in the referenced EventMap object.
The bits will be set if the update causes the event to be true, and cleared otherwise.
WARNING: a local reference to the passed map object is held by this event after this method is called. The event
map may not be deleted until the Event::delChain method has been used to remove this reference. This is not handled
automatically by the EventMap destructor.
Generated by Doxygen
5.50 Event Class Reference 327
Parameters
map The map to chain.
mask The bit(s) to set/clear in the chained map based on the state of this event.
5.50.3.7 setValue()
The event's value can not be changed while it is attached to an EventMap object. If this is attempted, then &Event←-
Error::AlreadyOwned will be returned.
Parameters
val The new event value
Returns
5.50.3.8 Wait()
Wait on an event.
This function causes the calling thread to pend until the event is true, or the timeout expires.
Note that the event should not be owned by any event map when this is called.
Parameters
Generated by Doxygen
328 Class Documentation
Returns
The documentation for this class was generated from the following files:
• CML_EventMap.h
• EventMap.cpp
This is an event that matches if all of a group of bits are set in the EventMap mask.
Event
EventAll
Event
EventAll
Generated by Doxygen
5.51 EventAll Class Reference 329
This is an event that matches if all of a group of bits are set in the EventMap mask.
EventAll (
uint32 v = 0 ) [inline]
Parameters
v The bit mask that the event will wait on. Default is zero
EventAll (
const EventAll & e ) [inline]
Parameters
e Another event object who's value will be used to initialize this one.
Generated by Doxygen
330 Class Documentation
5.51.3.1 isTrue()
If all of the selected bits are set in the mask, then the event is satisfied.
Parameters
mask The mask to test against
Returns
The documentation for this class was generated from the following file:
• CML_EventMap.h
This is an event that matches if any of a group of bits are set in the EventMap mask.
Event
EventAny
Generated by Doxygen
5.52 EventAny Class Reference 331
Event
EventAny
This is an event that matches if any of a group of bits are set in the EventMap mask.
EventAny (
uint32 v = 0 ) [inline]
Generated by Doxygen
332 Class Documentation
Parameters
v The bit mask that the event will wait on. Default is zero
EventAny (
const EventAny & e ) [inline]
Parameters
e Another event object who's value will be used to initialize this one.
5.52.3.1 isTrue()
The event is satisfied if any of the selected bits are set in the mask.
Parameters
Returns
The documentation for this class was generated from the following file:
• CML_EventMap.h
Generated by Doxygen
5.53 EventAnyClear Class Reference 333
This is an event that matches if any of a group of bits are clear in the EventMap mask.
Event
EventAnyClear
Event
EventAnyClear
Generated by Doxygen
334 Class Documentation
This is an event that matches if any of a group of bits are clear in the EventMap mask.
EventAnyClear (
uint32 v = 0 ) [inline]
Parameters
v The bit mask that the event will wait on. Default is zero
EventAnyClear (
const EventAnyClear & e ) [inline]
Parameters
e Another event object who's value will be used to initialize this one.
5.53.3.1 isTrue()
Generated by Doxygen
5.54 EventError Class Reference 335
The event is satisfied if any of the selected bits are clear in the mask.
Parameters
Returns
The documentation for this class was generated from the following file:
• CML_EventMap.h
Error
EventError
Generated by Doxygen
336 Class Documentation
Internal
Error OK
Unknown
NotMapped
EventError
AlreadyOwned
The documentation for this class was generated from the following file:
• CML_EventMap.h
An event map is a mechanism that allows one or more threads to wait on some pre-defined event, or group of events.
Generated by Doxygen
5.55 EventMap Class Reference 337
Friends
• class Event
An event map is a mechanism that allows one or more threads to wait on some pre-defined event, or group of events.
For a particular event map, there are one or more events that are grouped with that map. Any number of threads may
pend on the state of these events.
5.55.2.1 ∼EventMap()
∼EventMap (
void ) [virtual]
Removes any attached events Note that it is an error to destroy an EventMap if it is currently pointed to by any events
using 'setChain'. Make sure to remove any such chaining before the event map is destroyed.
Generated by Doxygen
338 Class Documentation
5.55.3.1 Add()
Add the passed event to the list of events pending on this map.
If the event is already mapped to a map (this one or another) then this function will return &EventError::AlreadyOwned.
Parameters
Returns
5.55.3.2 changeBits()
void changeBits (
uint32 bits,
uint32 value ) [inline]
Change the value of specified bits in the mask for this event.
The bits to change are identified by one parameter, and the new value for these bits is specified in the other parameter.
Parameters
bits Identifies which bits in the mask to change. Only those bits which are set in this parameter will be effected
in the event mask.
value The new value for the bits identified in the first parameter.
5.55.3.3 clrBits()
void clrBits (
uint32 bits ) [inline]
Generated by Doxygen
5.55 EventMap Class Reference 339
Parameters
bits Any bit set in this parameter will be cleared in the event mask.
5.55.3.4 getMask()
uint32 getMask (
void ) [inline]
Get the current value of the mask for this event map.
Returns
5.55.3.5 Remove()
Remove the passed event from the list of events pending on this map.
If the event is not presently attached to this map, then this function will return &EventError::NotMapped.
Parameters
e Points to the event to remove
Returns
5.55.3.6 setBits()
void setBits (
uint32 bits ) [inline]
Generated by Doxygen
340 Class Documentation
Parameters
bits Any bit set in this parameter will be set in the event mask.
5.55.3.7 setMask()
void setMask (
uint32 mask ) [inline]
Parameters
mask The new mask value.
The documentation for this class was generated from the following files:
• CML_EventMap.h
• EventMap.cpp
This is an event that matches if none of a group of bits are set in the EventMap mask.
Event
EventNone
Generated by Doxygen
5.56 EventNone Class Reference 341
Event
EventNone
This is an event that matches if none of a group of bits are set in the EventMap mask.
EventNone (
uint32 v = 0 ) [inline]
Generated by Doxygen
342 Class Documentation
Parameters
v The bit mask that the event will wait on. Default is zero
EventNone (
const EventNone & e ) [inline]
Parameters
e Another event object who's value will be used to initialize this one.
5.56.3.1 isTrue()
If none of the selected bits are set in the mask, then the event is satisfied.
Parameters
mask The mask to test against
Returns
The documentation for this class was generated from the following file:
• CML_EventMap.h
Generated by Doxygen
5.57 Filter Class Reference 343
This structure holds the coefficients used by the amplifier in various configurable filters.
5.57.2.1 Filter()
Filter (
void )
5.57.3.1 LoadFromCCX()
Load the filter coefficients from an array of integer values read from a .ccx file.
For DSP based amps the ccx file contains an array of 9 short integers holding the coefficient data. For FPGA based
amps the ccx file holds an array of 7 long integer values.
Generated by Doxygen
344 Class Documentation
Parameters
coef The array of coefficient data read from the ccx file
ct The number of coefficients (should be either 7 or 9)
Returns
The documentation for this class was generated from the following files:
• CML_Filter.h
• Filter.cpp
• uint16 getFileVersion ()
Returns the firmware file version number.
• uint16 getAmpType ()
Returns the amplifier type for this firmware.
• uint32 getStart ()
Returns the firmware starting address.
• uint32 getLength ()
Returns the firmware length (in words)
• uint16 ∗ getData (void)
Returns the firmware binary data.
• virtual void progress (uint32 addr)
This virtual function is called repeatedly during an amplifier firmware update.
This object is used to represent a firmware file which can be uploaded to an amplifier.
Note that uploading firmware to the amplifier is not part of normal operation. The amplifier firmware is stored in internal
Flash memory, and only needs to be updated if a new version with new features or bug fixes is produced by Copley
Controls Corporation.
Generated by Doxygen
5.58 Firmware Class Reference 345
5.58.2.1 getAmpType()
Returns
5.58.2.2 getData()
uint16∗ getData (
void ) [inline]
Returns
5.58.2.3 getFileVersion()
Returns
Generated by Doxygen
346 Class Documentation
5.58.2.4 getLength()
Returns
5.58.2.5 getStart()
Returns
5.58.2.6 progress()
It can be overloaded to display the progress of the download. This version does nothing.
Parameters
addr The address currently being downloaded.
The documentation for this class was generated from the following file:
• CML_Firmware.h
This class represents error conditions that can occur while accessing a Copley Controls amplifier firmware object.
Generated by Doxygen
5.59 FirmwareError Class Reference 347
Error
FirmwareError
Internal
Error OK
Unknown
alloc
format
read
FirmwareError
notSupported
open
crc
Generated by Doxygen
348 Class Documentation
This class represents error conditions that can occur while accessing a Copley Controls amplifier firmware object.
The documentation for this class was generated from the following file:
• CML_Firmware.h
Read by assigned node ID (Configured Address Physical Read) The master assigns each node a unique 16-bit address
at startup.
EcatDgram
FPRD
ALstatDG
Generated by Doxygen
5.61 FPWR Struct Reference 349
EcatDgram
FPRD
Read by assigned node ID (Configured Address Physical Read) The master assigns each node a unique 16-bit address
at startup.
This datagram reads from memory locations within the slave based on these assigned addresses
The documentation for this struct was generated from the following file:
• CML_EtherCAT.h
EcatDgram
FPWR
Generated by Doxygen
350 Class Documentation
EcatDgram
FPWR
The documentation for this struct was generated from the following file:
• CML_EtherCAT.h
• FuncGenConfig (void)
Default constructor, sets all members to zero.
Public Attributes
• int16 cfg
Configuration.
• int16 duty
Duty cycle in 0.1% (i.e. 0 to 1000)
• int16 freq
Frequency (Hz)
• int32 amp
Amplitude.
Generated by Doxygen
5.63 GainScheduling Struct Reference 351
5.62.2.1 amp
int32 amp
Amplitude.
Units depend on what the function generator is driving 0.01 Amps for current. 0.1 encoder counts/sec for veloctiy.
Encoder counts for position.
The documentation for this struct was generated from the following file:
• CML_AmpStruct.h
• GainScheduling (void)
Default constructor.
Public Attributes
• uint32 gainSchedulingConfig
Gain Scheduling configuration. See documentation for details.
These settings may be up/download from the amplifier using the functions Amp::SetGainScheduling and Amp::Get←-
GainScheduling.
Generated by Doxygen
352 Class Documentation
5.63.2.1 GainScheduling()
GainScheduling (
void ) [inline]
Default constructor.
The documentation for this struct was generated from the following file:
• CML_AmpStruct.h
• HomeConfig (void)
Default constructor, just set the method to none and the other parameters to zero.
Public Attributes
• COPLEY_HOME_METHOD method
Homing method to use.
• uint16 extended
Extended home method.
• uunit velFast
Velocity to use for fast moves during the home procedure.
• uunit velSlow
Velocity to use when seeking a sensor edge.
• uunit accel
Acceleration to use for the home procuedure.
• uunit offset
Offset from located home position to zero position.
• int16 current
Home current limit.
• int16 delay
Home delay.
Generated by Doxygen
5.64 HomeConfig Struct Reference 353
This structure allows all homing parameters to be grouped together and passed to the amplifier for convenience.
5.64.2.1 HomeConfig()
HomeConfig (
void ) [inline]
Default constructor, just set the method to none and the other parameters to zero.
5.64.3.1 accel
uunit accel
5.64.3.2 current
int16 current
This parameter is only used when running in one of the 'home to hard stop' homing modes. In all other modes this
parameter may be left uninitialized. The current should be specified in units of 0.01 Amps (i.e. 100 for 1.0 Amp)
5.64.3.3 delay
int16 delay
Home delay.
This parameter is only used when running in one of the 'home to hard stop' homing modes. In all other modes this
parameter may be left uninitialized. The delay is specified in units of milliseconds.
Generated by Doxygen
354 Class Documentation
5.64.3.4 extended
uint16 extended
If the main home method is set to any value other then 'CHM_EXTENDED' then this parameter is ignored. If the home
method is set to this value, then this value will be used to define the low level homing routine used by the amplifier.
For the most part this parameter can be ignored. It's intended to allow access to some low level features of the amplifier's
homing state machine which are otherwise not available through the more generic home methods.
Encodings for this parameter can be found in the CANopen programmers guide for CANopen object 0x2352, or in the
serial port programmers guide for variable 0xC2.
5.64.3.5 offset
uunit offset
After the home position is found as defined by the home method, this offset will be added to it and the resulting position
will be considered the zero position. This parameter is specified in "user units". See Amp::SetCountsPerUnit for details.
5.64.3.6 velFast
uunit velFast
5.64.3.7 velSlow
uunit velSlow
The documentation for this struct was generated from the following file:
• CML_AmpStruct.h
Generated by Doxygen
5.65 InputShaper Class Reference 355
This structure holds the amplitudes and times of the impulse functions used to create the input shaper, as well as the
info used by CME2 to indentify the filter type and settings.
5.65.2.1 InputShaper()
InputShaper (
void )
5.65.3.1 LoadFromCCX()
Load the filter coefficients from an array of integer values read from a .ccx file.
The .ccx file holds an array of 20 long integer values for the input shaping filter.
Generated by Doxygen
356 Class Documentation
Parameters
inputShaping The array of input shaping data read from the ccx file
ct The number of coefficients (should be 20)
Returns
The documentation for this class was generated from the following files:
• CML_InputShaper.h
• InputShaper.cpp
Error
NodeError
IOError
Generated by Doxygen
5.66 IOError Class Reference 357
Internal
Error OK
Unknown
NetworkUnavailable
NodeError
GuardTimeout
BadID
IOError
BadIOCount
This class is used to represent errors that may be returned by a standard I/O module.
The documentation for this class was generated from the following file:
• CML_IO.h
Generated by Doxygen
358 Class Documentation
This class represents error conditions that can occur when loading IO module data from a data file.
Error
IOFileError
Internal
Error OK
Unknown
IOFileError bankInvalid
Generated by Doxygen
5.68 IOModule Class Reference 359
This class represents error conditions that can occur when loading IO module data from a data file.
The documentation for this class was generated from the following file:
• CML_CopleyIO.h
RefObj
Node
IOModule
CopleyIO
Generated by Doxygen
360 Class Documentation
sdo map
Node PDO
RPDO TPDO
IOModule
Classes
• class AlgInPDO
Transmit PDO for mapping analog inputs.
• class AlgOutPDO
Receive PDO for mapping analog outputs.
• class DigInPDO
Transmit PDO for mapping digital inputs.
• class DigOutPDO
Receive PDO for mapping digital output pins.
• IOModule (void)
Default constructor for an I/O module.
• IOModule (Network &net, int16 nodeID)
Construct an IOModule object and initialize it using default settings.
• IOModule (Network &net, int16 nodeID, IOModuleSettings &settings)
Construct an IOModule object and initialize it using custom settings.
• virtual ∼IOModule ()
Virtual destructor for the IOModule object.
• virtual const Error ∗ Init (Network &net, int16 nodeID)
Initialize an I/O module using default settings.
• virtual const Error ∗ Init (Network &net, int16 nodeID, IOModuleSettings &settings)
Initialize an I/O module using custom settings.
Generated by Doxygen
5.68 IOModule Class Reference 361
Generated by Doxygen
362 Class Documentation
Generated by Doxygen
5.68 IOModule Class Reference 363
Set the current filter constant setting for a group of 32 digital inputs.
• virtual const Error ∗ Din32GetMaskAny (uint8 id, uint32 &value)
Get the 'any transition' interrupt mask settings for a group of 32 digital inputs.
• virtual const Error ∗ Din32SetMaskAny (uint8 id, uint32 value)
Set the 'any transition' interrupt mask settings for a group of 32 digital inputs.
• virtual const Error ∗ Din32GetMaskLow2High (uint8 id, uint32 &value)
Get the 'low to high' interrupt mask settings for a group of 32 digital inputs.
• virtual const Error ∗ Din32SetMaskLow2High (uint8 id, uint32 value)
Set the 'low to high' interrupt mask settings for a group of 32 digital inputs.
• virtual const Error ∗ Din32GetMaskHigh2Low (uint8 id, uint32 &value)
Get the 'high to low' interrupt mask settings for a group of 32 digital inputs.
• virtual const Error ∗ Din32SetMaskHigh2Low (uint8 id, uint32 value)
Set the 'high to low' interrupt mask settings for a group of 32 digital inputs.
Generated by Doxygen
364 Class Documentation
Generated by Doxygen
5.68 IOModule Class Reference 365
Generated by Doxygen
366 Class Documentation
Generated by Doxygen
5.68 IOModule Class Reference 367
Get the analog input negative delta value as a floating point value.
• virtual const Error ∗ AinFltSetNegativeDelta (uint8 id, float value)
Set the analog input negative delta value as a floating point value.
• virtual const Error ∗ AinFltGetPositiveDelta (uint8 id, float &value)
Get the analog input positive delta value as a floating point value.
• virtual const Error ∗ AinFltSetPositiveDelta (uint8 id, float value)
Set the analog input positive delta value as a floating point value.
Generated by Doxygen
368 Class Documentation
Protected Attributes
• DigOutPDO doutPDO
Default PDO used to transmit digital output info.
This class represents and I/O module device conforming to the DS401 CANopen specification. The class may be
extended to provide additional manufacturer specific features.
Note that the CANopen standard defines a very large number of parameters that may be used with a standard I/O
module. Of these, only a small subset are requred by the spec. In practice, it seems that most of the major manufacturers
of CANopen I/O modules only implement the minimum required by the spec. The result is that many of the optional
functions have not been tested with real hardware due to the lack of availability. Please contact Copley Controls if you
believe that you have found a problem with any of these functions.
For the typical I/O module, you can expect the following functionality to be supported based on the type of I/O the module
supports:
Digital Inputs: Reading the inputs via PDO or SDO in groups of 8 should be supported. Other features are optional.
Digital Outputs: Writing to the outputs via PDO or SDO in groups of 8 should be supported. Other features are optional.
Analog Inputs: Reading 16-bit analog inputs via PDO or SDO is normally supported. Other input sizes and features are
optional.
Analog Outputs: Writing 16-bit analog outputs via PDO or SDO is normally supported. Other output sizes and features
are optional.
Generated by Doxygen
5.68 IOModule Class Reference 369
IOModule (
void )
Any object created using this constructor must be initialized by a call to IOModule::Init before it is used.
IOModule (
Network & net,
int16 nodeID )
Parameters
net The Network object that this module is associated with.
nodeID The node ID of the module on the network.
IOModule (
Network & net,
int16 nodeID,
IOModuleSettings & settings )
Parameters
net The Network object that this module is associated with.
nodeID The node ID of the module on the network.
settings The settings to use when configuring the module
Generated by Doxygen
370 Class Documentation
5.68.3.1 Ain16GetCt()
Parameters
ct The count is returned here. Zero is returned on error.
Returns
5.68.3.2 Ain16GetLowerLimit()
The lower limit defines the value at which an interrupt will be generated if it is enabled.
Parameters
id The analog input channel ID
value The value is returned here.
Returns
5.68.3.3 Ain16GetNegativeDelta()
Generated by Doxygen
5.68 IOModule Class Reference 371
The negative delta defines the amount of change at which an interrupt will be generated if it is enabled.
Parameters
id The analog input channel ID
value The value is returned here.
Returns
5.68.3.4 Ain16GetPositiveDelta()
The positive delta defines the amount of change at which an interrupt will be generated if it is enabled.
Parameters
id The analog input channel ID
value The value is returned here.
Returns
5.68.3.5 Ain16GetUnsignedDelta()
The unsigned delta defines the amount of change at which an interrupt will be generated if it is enabled.
Generated by Doxygen
372 Class Documentation
Parameters
id The analog input channel ID
value The value is returned here.
Returns
5.68.3.6 Ain16GetUpperLimit()
The upper limit defines the value at which an interrupt will be generated if it is enabled.
Parameters
id The analog input channel ID
value The value is returned here.
Returns
5.68.3.7 Ain16Read()
Parameters
id The analog input channel ID
value The analog input value
viaSDO If true, read the input using SDO transfers. If false (default) use the most recently received PDO data if
this input is mapped to a transmit PDO and the PDO is active.
Generated by Doxygen
5.68 IOModule Class Reference 373
Returns
5.68.3.8 Ain16SetLowerLimit()
The lower limit defines the value at which an interrupt will be generated if it is enabled.
Parameters
id The analog input channel ID
value The value to be set.
Returns
5.68.3.9 Ain16SetNegativeDelta()
The negative delta defines the amount of change at which an interrupt will be generated if it is enabled.
Parameters
id The analog input channel ID
value The value to be set.
Returns
Generated by Doxygen
374 Class Documentation
5.68.3.10 Ain16SetPositiveDelta()
The positive delta defines the amount of change at which an interrupt will be generated if it is enabled.
Parameters
id The analog input channel ID
value The value to be set.
Returns
5.68.3.11 Ain16SetUnsignedDelta()
The unsigned delta defines the amount of change at which an interrupt will be generated if it is enabled.
Parameters
id The analog input channel ID
value The value to be set.
Returns
5.68.3.12 Ain16SetUpperLimit()
Generated by Doxygen
5.68 IOModule Class Reference 375
The upper limit defines the value at which an interrupt will be generated if it is enabled.
Parameters
id The analog input channel ID
value The value to be set.
Returns
5.68.3.13 Ain32GetCt()
Parameters
ct The count is returned here. Zero is returned on error.
Returns
5.68.3.14 Ain32GetLowerLimit()
The lower limit defines the value at which an interrupt will be generated if it is enabled.
Parameters
id The analog input channel ID
value The value is returned here.
Generated by Doxygen
376 Class Documentation
Returns
5.68.3.15 Ain32GetNegativeDelta()
The negative delta defines the amount of change at which an interrupt will be generated if it is enabled.
Parameters
id The analog input channel ID
value The value is returned here.
Returns
5.68.3.16 Ain32GetOffset()
Parameters
id The analog input channel ID
value The value is returned here.
Returns
Generated by Doxygen
5.68 IOModule Class Reference 377
5.68.3.17 Ain32GetPositiveDelta()
The positive delta defines the amount of change at which an interrupt will be generated if it is enabled.
Parameters
id The analog input channel ID
value The value is returned here.
Returns
5.68.3.18 Ain32GetScaling()
Parameters
id The analog input channel ID
value The value is returned here.
Returns
5.68.3.19 Ain32GetUnsignedDelta()
Generated by Doxygen
378 Class Documentation
Parameters
id The analog input channel ID
value The value is returned here.
Returns
5.68.3.20 Ain32GetUpperLimit()
The upper limit defines the value at which an interrupt will be generated if it is enabled.
Parameters
id The analog input channel ID
value The value is returned here.
Returns
5.68.3.21 Ain32Read()
Parameters
id The analog input channel ID
value The analog input value
Generated by Doxygen
5.68 IOModule Class Reference 379
Returns
5.68.3.22 Ain32SetLowerLimit()
The lower limit defines the value at which an interrupt will be generated if it is enabled.
Parameters
id The analog input channel ID
value The value to be set.
Returns
5.68.3.23 Ain32SetNegativeDelta()
The negative delta defines the amount of change at which an interrupt will be generated if it is enabled.
Parameters
id The analog input channel ID
value The value to be set.
Returns
Generated by Doxygen
380 Class Documentation
5.68.3.24 Ain32SetOffset()
Parameters
id The analog input channel ID
value The value to be set.
Returns
5.68.3.25 Ain32SetPositiveDelta()
The positive delta defines the amount of change at which an interrupt will be generated if it is enabled.
Parameters
id The analog input channel ID
value The value to be set.
Returns
5.68.3.26 Ain32SetScaling()
Generated by Doxygen
5.68 IOModule Class Reference 381
Parameters
id The analog input channel ID
value The value to be set.
Returns
5.68.3.27 Ain32SetUnsignedDelta()
The unsigned delta defines the amount of change at which an interrupt will be generated if it is enabled.
Parameters
id The analog input channel ID
value The value to be set.
Returns
5.68.3.28 Ain32SetUpperLimit()
The upper limit defines the value at which an interrupt will be generated if it is enabled.
Parameters
id The analog input channel ID
value The value to be set.
Generated by Doxygen
382 Class Documentation
Returns
5.68.3.29 Ain8GetCt()
Parameters
ct The count is returned here. Zero is returned on error.
Returns
5.68.3.30 Ain8Read()
Parameters
id The analog input channel ID
value The analog input value
Returns
5.68.3.31 AinFltGetCt()
Generated by Doxygen
5.68 IOModule Class Reference 383
Return the number of floating point analog inputs available on this device.
Generated by Doxygen
384 Class Documentation
Parameters
ct The count is returned here. Zero is returned on error.
Returns
5.68.3.32 AinFltGetLowerLimit()
Get the analog input lower limit value as a floating point value.
The lower limit defines the value at which an interrupt will be generated if it is enabled.
Parameters
id The analog input channel ID
value The value is returned here.
Returns
5.68.3.33 AinFltGetNegativeDelta()
Get the analog input negative delta value as a floating point value.
The negative delta defines the amount of change at which an interrupt will be generated if it is enabled.
Parameters
id The analog input channel ID
value The value is returned here.
Generated by Doxygen
5.68 IOModule Class Reference 385
Returns
5.68.3.34 AinFltGetOffset()
Parameters
id The analog input channel ID
value The value is returned here.
Returns
5.68.3.35 AinFltGetPositiveDelta()
Get the analog input positive delta value as a floating point value.
The positive delta defines the amount of change at which an interrupt will be generated if it is enabled.
Parameters
id The analog input channel ID
value The value is returned here.
Returns
Generated by Doxygen
386 Class Documentation
5.68.3.36 AinFltGetScaling()
Parameters
id The analog input channel ID
value The value is returned here.
Returns
5.68.3.37 AinFltGetUnsignedDelta()
Get the analog input unsigned delta value as a floating point value.
The unsigned delta defines the amount of change at which an interrupt will be generated if it is enabled.
Parameters
id The analog input channel ID
value The value is returned here.
Returns
5.68.3.38 AinFltGetUpperLimit()
Get the analog input upper limit value as a floating point value.
The upper limit defines the value at which an interrupt will be generated if it is enabled.
Generated by Doxygen
5.68 IOModule Class Reference 387
Parameters
id The analog input channel ID
value The value is returned here.
Returns
5.68.3.39 AinFltRead()
Parameters
id The analog input channel ID
value The analog input value
Returns
5.68.3.40 AinFltSetLowerLimit()
Set the analog input lower limit value as a floating point value.
The lower limit defines the value at which an interrupt will be generated if it is enabled.
Parameters
id The analog input channel ID
value The value to be set.
Generated by Doxygen
388 Class Documentation
Returns
5.68.3.41 AinFltSetNegativeDelta()
Set the analog input negative delta value as a floating point value.
The negative delta defines the amount of change at which an interrupt will be generated if it is enabled.
Parameters
id The analog input channel ID
value The value to be set.
Returns
5.68.3.42 AinFltSetOffset()
Parameters
id The analog input channel ID
value The value to be set.
Returns
Generated by Doxygen
5.68 IOModule Class Reference 389
5.68.3.43 AinFltSetPositiveDelta()
Set the analog input positive delta value as a floating point value.
The positive delta defines the amount of change at which an interrupt will be generated if it is enabled.
Parameters
id The analog input channel ID
value The value to be set.
Returns
5.68.3.44 AinFltSetScaling()
Parameters
id The analog input channel ID
value The value to be set.
Returns
5.68.3.45 AinFltSetUnsignedDelta()
Set the analog input unsigned delta value as a floating point value.
The unsigned delta defines the amount of change at which an interrupt will be generated if it is enabled.
Generated by Doxygen
390 Class Documentation
Parameters
id The analog input channel ID
value The value to be set.
Returns
5.68.3.46 AinFltSetUpperLimit()
Set the analog input upper limit value as a floating point value.
The upper limit defines the value at which an interrupt will be generated if it is enabled.
Parameters
id The analog input channel ID
value The value to be set.
Returns
5.68.3.47 AinGetIntEna()
Get the current setting of the global interrupt enable for analog inputs.
A return value of true indicates that interrupts are enabled, false disabled.
Parameters
value The current interrupt enable setting is returned here.
Generated by Doxygen
5.68 IOModule Class Reference 391
Returns
5.68.3.48 AinGetIntSource()
This variable may be used to determine which analog input has produced an interrupt. There are eight banks of interrupt
source registers, each of which covers 32 analog inputs in it's 32 bits. Bank 0 identifies analog inputs 0 to 31, Bank 1
identifies analog inputs 32 to 63, etc. The bit associated with the analog input generating the latest interrupt will be set
in the value returned by this read. Reading this variable causes all it's bit to be automatically reset.
Parameters
Returns
5.68.3.49 AinGetTrigType()
Get the analog input trigger type associated with the input channel.
Parameters
id The analog input channel ID
value The value is returned here.
Returns
Generated by Doxygen
392 Class Documentation
5.68.3.50 AinSetIntEna()
Set the current setting of the global interrupt enable for analog inputs.
Parameters
value The interrupt enable setting.
Returns
5.68.3.51 AinSetTrigType()
Set the analog input trigger type associated with the input channel.
Parameters
id The analog input channel ID
value The value to set
Returns
5.68.3.52 Aout16GetCt()
Generated by Doxygen
5.68 IOModule Class Reference 393
Parameters
ct The count is returned here. Zero is returned on error.
Returns
5.68.3.53 Aout16GetErrValue()
The error value is the value that the analog output will assume on device error, if it's error mode is set to true.
Parameters
id The analog output channel ID
value The value is returned here.
Returns
5.68.3.54 Aout16SetErrValue()
The error value is the value that the analog output will assume on device error, if it's error mode is set to true.
Parameters
id The analog output channel ID
value The value to be set.
Generated by Doxygen
394 Class Documentation
Returns
5.68.3.55 Aout16Write()
Since 16-bit outputs are mapped to the default PDOs of the I/O module, these outputs may be written using either PDOs
or SDOs.
Parameters
id The analog input channel ID
value The value to write.
viaSDO If true, the outputs will be written using SDO messages. If false (default), then a PDO will be used if
possible.
Returns
5.68.3.56 Aout32GetCt()
Parameters
ct The count is returned here. Zero is returned on error.
Returns
Generated by Doxygen
5.68 IOModule Class Reference 395
5.68.3.57 Aout32GetErrValue()
The error value is the value that the analog output will assume on device error, if it's error mode is set to true.
Parameters
id The analog output channel ID
value The value is returned here.
Returns
5.68.3.58 Aout32GetOffset()
Parameters
id The analog output channel ID
value The value is returned here.
Returns
5.68.3.59 Aout32GetScaling()
Generated by Doxygen
396 Class Documentation
Parameters
id The analog output channel ID
value The value is returned here.
Returns
5.68.3.60 Aout32SetErrValue()
The error value is the value that the analog output will assume on device error, if it's error mode is set to true.
Parameters
id The analog output channel ID
value The value to be set.
Returns
5.68.3.61 Aout32SetOffset()
Parameters
id The analog output channel ID
value The value to be set.
Generated by Doxygen
5.68 IOModule Class Reference 397
Returns
5.68.3.62 Aout32SetScaling()
Parameters
id The analog output channel ID
value The value to be set.
Returns
5.68.3.63 Aout32Write()
Parameters
id The analog input channel ID
value The value to write.
Returns
Generated by Doxygen
398 Class Documentation
5.68.3.64 Aout8GetCt()
Parameters
ct The count is returned here. Zero is returned on error.
Returns
5.68.3.65 Aout8Write()
Parameters
id The analog input channel ID
value The value to write.
Returns
5.68.3.66 AoutFltGetCt()
Return the number of floating point analog outputs available on this device.
Parameters
ct The count is returned here. Zero is returned on error.
Generated by Doxygen
5.68 IOModule Class Reference 399
Returns
5.68.3.67 AoutFltGetErrValue()
The error value is the value that the analog output will assume on device error, if it's error mode is set to true.
Parameters
id The analog output channel ID
value The value is returned here.
Returns
5.68.3.68 AoutFltGetOffset()
Parameters
id The analog output channel ID
value The value is returned here.
Returns
Generated by Doxygen
400 Class Documentation
5.68.3.69 AoutFltGetScaling()
Parameters
id The analog output channel ID
value The value is returned here.
Returns
5.68.3.70 AoutFltSetErrValue()
The error value is the value that the analog output will assume on device error, if it's error mode is set to true.
Parameters
id The analog output channel ID
value The value to be set.
Returns
5.68.3.71 AoutFltSetOffset()
Generated by Doxygen
5.68 IOModule Class Reference 401
Parameters
id The analog output channel ID
value The value to be set.
Returns
5.68.3.72 AoutFltSetScaling()
Parameters
id The analog output channel ID
value The value to be set.
Returns
5.68.3.73 AoutFltWrite()
Parameters
id The analog input channel ID
value The value to write.
Generated by Doxygen
402 Class Documentation
Returns
5.68.3.74 AoutGetErrMode()
If the error mode is true, then the analog output will change it's value to the programmed error value in the case of a
device failure. If false, a device failure will not cause a change in the analog output value.
Parameters
id The analog output channel ID
value The value is returned here.
Returns
5.68.3.75 AoutSetErrMode()
If the error mode is true, then the analog output will change it's value to the programmed error value in the case of a
device failure. If false, a device failure will not cause a change in the analog output value.
Parameters
id The analog output channel ID
value The value to be set.
Generated by Doxygen
5.68 IOModule Class Reference 403
Returns
5.68.3.76 BitCount()
Parameters
Returns
5.68.3.77 BitDnld()
The object dictionary index/sub-index is calculated from the pin ID and a passed base address.
Parameters
Returns
Generated by Doxygen
404 Class Documentation
5.68.3.78 BitUpld()
The object dictionary entry is calculated based on the pin ID and the base object dictionary ID passed.
Parameters
Returns
5.68.3.79 Din16GetCt()
Parameters
ct The count is returned here. Zero is returned on error.
Returns
5.68.3.80 Din16GetFilt()
Get the current filter constant settings for a group of 16 digital inputs.
For each input in the group, a value of 1 enables the filter, 0 disables.
Generated by Doxygen
5.68 IOModule Class Reference 405
Parameters
Returns
5.68.3.81 Din16GetMaskAny()
Get the 'any transition' interrupt mask settings for a group of 16 digital inputs.
For each input in the group, a value of 1 enables interrupts on any change, and a value of 0 disables the interrupt.
Parameters
Returns
5.68.3.82 Din16GetMaskHigh2Low()
Get the 'high to low' interrupt mask settings for a group of 16 digital inputs.
For each input in the group, a value of 1 enables interrupts on a high to low transition, and a value of 0 disables the
interrupt.
Parameters
Returns
5.68.3.83 Din16GetMaskLow2High()
Get the 'low to high' interrupt mask settings for a group of 16 digital inputs.
For each input in the group, a value of 1 enables interrupts on a low to high transition, and a value of 0 disables the
interrupt.
Parameters
Returns
5.68.3.84 Din16GetPol()
For each input in the group, a value of 1 enables inversion and 0 disables.
Parameters
Returns
Generated by Doxygen
5.68 IOModule Class Reference 407
5.68.3.85 Din16Read()
Parameters
Returns
5.68.3.86 Din16SetFilt()
Set the current filter constant setting for a group of 16 digital inputs.
For each input in the group, a value of 1 enables the filter, 0 disables.
Parameters
Returns
Generated by Doxygen
408 Class Documentation
5.68.3.87 Din16SetMaskAny()
Set the 'any transition' interrupt mask settings for a group of 16 digital inputs.
For each input in the group, a value of 1 enables interrupts on any transition, and a value of 0 disables.
Parameters
Returns
5.68.3.88 Din16SetMaskHigh2Low()
Set the 'high to low' interrupt mask settings for a group of 16 digital inputs.
For each input in the group, a value of 1 enables interrupts on high to low transitions, and a value of 0 disables.
Parameters
Returns
5.68.3.89 Din16SetMaskLow2High()
Generated by Doxygen
5.68 IOModule Class Reference 409
Set the 'low to high' interrupt mask settings for a group of 16 digital inputs.
For each input in the group, a value of 1 enables interrupts on low to high transitions, and a value of 0 disables.
Parameters
Returns
5.68.3.90 Din16SetPol()
For each input in the group, a value of 1 enables inversion and 0 disables.
Parameters
Returns
5.68.3.91 Din32GetCt()
Parameters
ct The count is returned here. Zero is returned on error.
Generated by Doxygen
410 Class Documentation
Returns
5.68.3.92 Din32GetFilt()
Get the current filter constant settings for a group of 32 digital inputs.
For each input in the group, a value of 1 enables the filter, 0 disables.
Parameters
Returns
5.68.3.93 Din32GetMaskAny()
Get the 'any transition' interrupt mask settings for a group of 32 digital inputs.
For each input in the group, a value of 1 enables interrupts on any change, and a value of 0 disables the interrupt.
Parameters
Returns
Generated by Doxygen
5.68 IOModule Class Reference 411
5.68.3.94 Din32GetMaskHigh2Low()
Get the 'high to low' interrupt mask settings for a group of 32 digital inputs.
For each input in the group, a value of 1 enables interrupts on a high to low transition, and a value of 0 disables the
interrupt.
Parameters
Returns
5.68.3.95 Din32GetMaskLow2High()
Get the 'low to high' interrupt mask settings for a group of 32 digital inputs.
For each input in the group, a value of 1 enables interrupts on a low to high transition, and a value of 0 disables the
interrupt.
Parameters
Returns
Generated by Doxygen
412 Class Documentation
5.68.3.96 Din32GetPol()
For each input in the group, a value of 1 enables inversion and 0 disables.
Parameters
Returns
5.68.3.97 Din32Read()
Parameters
Returns
5.68.3.98 Din32SetFilt()
Generated by Doxygen
5.68 IOModule Class Reference 413
Set the current filter constant setting for a group of 32 digital inputs.
For each input in the group, a value of 1 enables the filter, 0 disables.
Parameters
Returns
5.68.3.99 Din32SetMaskAny()
Set the 'any transition' interrupt mask settings for a group of 32 digital inputs.
For each input in the group, a value of 1 enables interrupts on any transition, and a value of 0 disables.
Parameters
Returns
5.68.3.100 Din32SetMaskHigh2Low()
Set the 'high to low' interrupt mask settings for a group of 32 digital inputs.
For each input in the group, a value of 1 enables interrupts on high to low transitions, and a value of 0 disables.
Generated by Doxygen
414 Class Documentation
Parameters
Returns
5.68.3.101 Din32SetMaskLow2High()
Set the 'low to high' interrupt mask settings for a group of 32 digital inputs.
For each input in the group, a value of 1 enables interrupts on low to high transitions, and a value of 0 disables.
Parameters
Returns
5.68.3.102 Din32SetPol()
For each input in the group, a value of 1 enables inversion and 0 disables.
Parameters
Generated by Doxygen
5.68 IOModule Class Reference 415
Returns
5.68.3.103 Din8GetCt()
Parameters
ct The count is returned here. Zero is returned on error.
Returns
5.68.3.104 Din8GetFilt()
Get the current filter constant settings for a group of 8 digital inputs.
For each input in the group, a value of 1 enables the filter, 0 disables.
Parameters
Returns
Generated by Doxygen
416 Class Documentation
5.68.3.105 Din8GetMaskAny()
Get the 'any transition' interrupt mask settings for a group of 8 digital inputs.
For each input in the group, a value of 1 enables interrupts on any change, and a value of 0 disables the interrupt.
Parameters
Returns
5.68.3.106 Din8GetMaskHigh2Low()
Get the 'high to low' interrupt mask settings for a group of 8 digital inputs.
For each input in the group, a value of 1 enables interrupts on a high to low transition, and a value of 0 disables the
interrupt.
Parameters
Returns
5.68.3.107 Din8GetMaskLow2High()
Generated by Doxygen
5.68 IOModule Class Reference 417
Get the 'low to high' interrupt mask settings for a group of 8 digital inputs.
For each input in the group, a value of 1 enables interrupts on a low to high transition, and a value of 0 disables the
interrupt.
Parameters
Returns
5.68.3.108 Din8GetPol()
For each input in the group, a value of 1 enables inversion and 0 disables.
Parameters
Returns
5.68.3.109 Din8Read()
Generated by Doxygen
418 Class Documentation
Parameters
Returns
5.68.3.110 Din8SetFilt()
Set the current filter constant setting for a group of 8 digital inputs.
For each input in the group, a value of 1 enables the filter, 0 disables.
Parameters
Returns
5.68.3.111 Din8SetMaskAny()
Set the 'any transition' interrupt mask settings for a group of 8 digital inputs.
For each input in the group, a value of 1 enables interrupts on any transition, and a value of 0 disables.
Generated by Doxygen
5.68 IOModule Class Reference 419
Parameters
Returns
5.68.3.112 Din8SetMaskHigh2Low()
Set the 'high to low' interrupt mask settings for a group of 8 digital inputs.
For each input in the group, a value of 1 enables interrupts on high to low transitions, and a value of 0 disables.
Parameters
Returns
5.68.3.113 Din8SetMaskLow2High()
Set the 'low to high' interrupt mask settings for a group of 8 digital inputs.
For each input in the group, a value of 1 enables interrupts on low to high transitions, and a value of 0 disables.
Parameters
Generated by Doxygen
420 Class Documentation
Returns
5.68.3.114 Din8SetPol()
For each input in the group, a value of 1 enables inversion and 0 disables.
Parameters
Returns
5.68.3.115 DinGetCt()
Parameters
ct The count is returned here. Zero is returned on error.
Returns
Generated by Doxygen
5.68 IOModule Class Reference 421
5.68.3.116 DinGetFilt()
Parameters
Returns
5.68.3.117 DinGetIntEna()
Get the current setting of the global interrupt enable for digital inputs.
A return value of true indicates that interrupts are enabled, false disabled.
Parameters
value The current interrupt enable setting is returned here.
Returns
5.68.3.118 DinGetMaskAny()
Get the 'any transition' interrupt mask settings for a digital input.
If true, any transition on the input will generate an interrupt.
Generated by Doxygen
422 Class Documentation
Parameters
Returns
5.68.3.119 DinGetMaskHigh2Low()
Get the 'high to low' interrupt mask settings for a digital input.
Parameters
Returns
5.68.3.120 DinGetMaskLow2High()
Get the 'low to high' interrupt mask settings for a digital input.
Parameters
Generated by Doxygen
5.68 IOModule Class Reference 423
Returns
5.68.3.121 DinGetPol()
Parameters
Returns
5.68.3.122 DinRead()
Parameters
Returns
Generated by Doxygen
424 Class Documentation
5.68.3.123 DinSetFilt()
Parameters
Returns
5.68.3.124 DinSetIntEna()
Set the current setting of the global interrupt enable for digital inputs.
Parameters
value The interrupt enable setting.
Returns
5.68.3.125 DinSetMaskAny()
Generated by Doxygen
5.68 IOModule Class Reference 425
Set the 'any transition' interrupt mask settings for a digital input.
Parameters
Returns
5.68.3.126 DinSetMaskHigh2Low()
Set the 'high to low' interrupt mask settings for a digital input.
Parameters
Returns
5.68.3.127 DinSetMaskLow2High()
Set the 'low to high' interrupt mask settings for a digital input.
Generated by Doxygen
426 Class Documentation
Parameters
Returns
5.68.3.128 DinSetPol()
Parameters
Returns
5.68.3.129 Dout16GetCt()
Parameters
ct The count is returned here. Zero is returned on error.
Generated by Doxygen
5.68 IOModule Class Reference 427
Returns
5.68.3.130 Dout16GetErrMode()
Get the current error mode settings for a group of 16 digital outputs.
For each output in the group, a value of 1 will cause the output to take it's programmed error value on a device failure.
Setting the mode to 0 will cause the output to hold it's programmed value on failure.
Parameters
Returns
5.68.3.131 Dout16GetErrValue()
Get the current error value settings for a group of 16 digital outputs.
Error values define the state of the output if a device failure occurs. The error value will only be set for those output pins
which have an error mode set to 1. Those with error mode set to zero will not be changed by a device failure.
Parameters
Generated by Doxygen
428 Class Documentation
Returns
5.68.3.132 Dout16GetFilt()
Get the current filter constant settings for a group of 16 digital outputs.
For each output in the group, a value of 1 enables the filter, 0 disables.
Parameters
Returns
5.68.3.133 Dout16GetPol()
For each output in the group, a value of 1 enables inversion and 0 disables.
Parameters
Returns
Generated by Doxygen
5.68 IOModule Class Reference 429
5.68.3.134 Dout16Read()
Read back the last value written to this bank of 16 digital outputs.
Parameters
Returns
5.68.3.135 Dout16SetErrMode()
Set the current error mode settings for a group of 16 digital outputs.
For each output in the group, a value of 1 will cause the output to take it's programmed error value on a device failure.
Setting the mode to 0 will cause the output to hold it's programmed value on failure.
Parameters
Returns
5.68.3.136 Dout16SetErrValue()
Generated by Doxygen
430 Class Documentation
Set the current error value settings for a group of 16 digital outputs.
Error values define the state of the output if a device failure occurs. The error value will only be set for those output pins
which have an error mode set to 1. Those with error mode set to zero will not be changed by a device failure.
Parameters
Returns
5.68.3.137 Dout16SetFilt()
Set the current filter constant setting for a group of 16 digital outputs.
For each output in the group, a value of 1 enables the filter, 0 disables.
Parameters
Returns
5.68.3.138 Dout16SetPol()
For each output in the group, a value of 1 enables inversion and 0 disables.
Generated by Doxygen
5.68 IOModule Class Reference 431
Parameters
Returns
5.68.3.139 Dout16Write()
The outputs may be written either by SDO or by PDO. The PDO method is faster since it only requires a single message
to be sent. SDO transfers additionally require a response from the module.
If a PDO transfer is requested, but is not possible because the module is not in an operational state, or because the
output block isn't mapped to the PDO, then an SDO transfer will be used.
Parameters
Returns
5.68.3.140 Dout32GetCt()
Generated by Doxygen
432 Class Documentation
Parameters
ct The count is returned here. Zero is returned on error.
Returns
5.68.3.141 Dout32GetErrMode()
Get the current error mode settings for a group of 32 digital outputs.
For each output in the group, a value of 1 will cause the output to take it's programmed error value on a device failure.
Setting the mode to 0 will cause the output to hold it's programmed value on failure.
Parameters
Returns
5.68.3.142 Dout32GetErrValue()
Get the current error value settings for a group of 32 digital outputs.
Error values define the state of the output if a device failure occurs. The error value will only be set for those output pins
which have an error mode set to 1. Those with error mode set to zero will not be changed by a device failure.
Parameters
Returns
5.68.3.143 Dout32GetFilt()
Get the current filter constant settings for a group of 32 digital outputs.
For each output in the group, a value of 1 enables the filter, 0 disables.
Parameters
Returns
5.68.3.144 Dout32GetPol()
For each output in the group, a value of 1 enables inversion and 0 disables.
Parameters
Returns
Generated by Doxygen
434 Class Documentation
5.68.3.145 Dout32Read()
Read back the last value written to this bank of 32 digital outputs.
Parameters
Returns
5.68.3.146 Dout32SetErrMode()
Set the current error mode settings for a group of 32 digital outputs.
For each output in the group, a value of 1 will cause the output to take it's programmed error value on a device failure.
Setting the mode to 0 will cause the output to hold it's programmed value on failure.
Parameters
Returns
5.68.3.147 Dout32SetErrValue()
Generated by Doxygen
5.68 IOModule Class Reference 435
Set the current error value settings for a group of 32 digital outputs.
Error values define the state of the output if a device failure occurs. The error value will only be set for those output pins
which have an error mode set to 1. Those with error mode set to zero will not be changed by a device failure.
Parameters
Returns
5.68.3.148 Dout32SetFilt()
Set the current filter constant setting for a group of 32 digital outputs.
For each output in the group, a value of 1 enables the filter, 0 disables.
Parameters
Returns
5.68.3.149 Dout32SetPol()
For each output in the group, a value of 1 enables inversion and 0 disables.
Generated by Doxygen
436 Class Documentation
Parameters
Returns
5.68.3.150 Dout32Write()
The outputs may be written either by SDO or by PDO. The PDO method is faster since it only requires a single message
to be sent. SDO transfers additionally require a response from the module.
If a PDO transfer is requested, but is not possible because the module is not in an operational state, or because the
output block isn't mapped to the PDO, then an SDO transfer will be used.
Parameters
Returns
5.68.3.151 Dout8GetCt()
Generated by Doxygen
5.68 IOModule Class Reference 437
Parameters
ct The count is returned here. Zero is returned on error.
Returns
5.68.3.152 Dout8GetErrMode()
Get the current error mode settings for a group of 8 digital outputs.
For each output in the group, a value of 1 will cause the output to take it's programmed error value on a device failure.
Setting the mode to 0 will cause the output to hold it's programmed value on failure.
Parameters
Returns
5.68.3.153 Dout8GetErrValue()
Get the current error value settings for a group of 8 digital outputs.
Error values define the state of the output if a device failure occurs. The error value will only be set for those output pins
which have an error mode set to 1. Those with error mode set to zero will not be changed by a device failure.
Parameters
Returns
5.68.3.154 Dout8GetFilt()
Get the current filter constant settings for a group of 8 digital outputs.
For each output in the group, a value of 1 enables the filter, 0 disables.
Parameters
Returns
5.68.3.155 Dout8GetPol()
For each output in the group, a value of 1 enables inversion and 0 disables.
Parameters
Returns
Generated by Doxygen
5.68 IOModule Class Reference 439
5.68.3.156 Dout8Read()
Read back the last value written to this bank of 8 digital outputs.
Parameters
Returns
5.68.3.157 Dout8SetErrMode()
Set the current error mode settings for a group of 8 digital outputs.
For each output in the group, a value of 1 will cause the output to take it's programmed error value on a device failure.
Setting the mode to 0 will cause the output to hold it's programmed value on failure.
Parameters
Returns
5.68.3.158 Dout8SetErrValue()
Generated by Doxygen
440 Class Documentation
Set the current error value settings for a group of 8 digital outputs.
Error values define the state of the output if a device failure occurs. The error value will only be set for those output pins
which have an error mode set to 1. Those with error mode set to zero will not be changed by a device failure.
Parameters
Returns
5.68.3.159 Dout8SetFilt()
Set the current filter constant setting for a group of 8 digital outputs.
For each output in the group, a value of 1 enables the filter, 0 disables.
Parameters
Returns
5.68.3.160 Dout8SetPol()
For each output in the group, a value of 1 enables inversion and 0 disables.
Generated by Doxygen
5.68 IOModule Class Reference 441
Parameters
Returns
5.68.3.161 Dout8Write()
The outputs may be written either by SDO or by PDO. The PDO method is faster since it only requires a single message
to be sent. SDO transfers additionally require a response from the module.
If a PDO transfer is requested, but is not possible because the module is not in an operational state, or because the
output block isn't mapped to the PDO, then an SDO transfer will be used.
Parameters
Returns
5.68.3.162 DoutGetCt()
Generated by Doxygen
442 Class Documentation
Parameters
ct The count is returned here. Zero is returned on error.
Returns
5.68.3.163 DoutGetErrMode()
Get the current error mode setting for an individual digital output.
A value of true will cause the output to take it's programmed error value on a device failure. Setting the mode to false
will cause the output to hold it's programmed value on failure.
Parameters
Returns
5.68.3.164 DoutGetErrValue()
Get the current error value setting for an individual digital output.
Error values define the state of the output if a device failure occurs. The error value will only be set for those output pins
which have an error mode set to true. Those with error mode set to false will not be changed by a device failure.
Parameters
Returns
5.68.3.165 DoutGetFilt()
Get the current filter constant setting for an individual digital output.
Parameters
Returns
5.68.3.166 DoutGetPol()
Parameters
Returns
Generated by Doxygen
444 Class Documentation
5.68.3.167 DoutSetErrMode()
Set the current error mode setting for an individual digital output.
A value of true will cause the output to take it's programmed error value on a device failure. Setting the mode to false
will cause the output to hold it's programmed value on failure.
Parameters
Returns
5.68.3.168 DoutSetErrValue()
Set the current error value setting for an individual digital output.
Error values define the state of the output if a device failure occurs. The error value will only be set for those output pins
which have an error mode set to true. Those with error mode set to false will not be changed by a device failure.
Parameters
Returns
Generated by Doxygen
5.68 IOModule Class Reference 445
5.68.3.169 DoutSetFilt()
Set the current filter constant setting for an individual digital output.
Parameters
Returns
5.68.3.170 DoutSetPol()
Parameters
Returns
5.68.3.171 DoutWrite()
Generated by Doxygen
446 Class Documentation
bool value,
bool viaSDO = false ) [virtual]
The output may be written either by SDO or by PDO. The PDO method is faster since it only requires a single message
to be sent. SDO transfers additionally require a response from the module.
If a PDO transfer is requested, but is not possible because the module is not in an operational state, or because the
output isn't mapped to the PDO, then an SDO transfer will be used.
Parameters
Returns
This function associates the object with the CANopen network it will be used on.
Parameters
net The Network object that this module is associated with.
nodeID The node ID of the module on the network.
Returns
Reimplemented in CopleyIO.
Generated by Doxygen
5.68 IOModule Class Reference 447
This function associates the object with the CANopen network it will be used on.
Parameters
net The Network object that this module is associated with.
nodeID The node ID of the module on the network.
settings The settings to use when configuring the module
Returns
Reimplemented in CopleyIO.
5.68.3.174 PostIOEvent()
This method is used internally by the various standard transmit PDOs when a new PDO message is received.
Parameters
Generated by Doxygen
448 Class Documentation
The standard events are used to indicate that a new transmit PDO has been received. A thread may wait on such an
event by calling this function.
Parameters
event The event(s) to wait on. Multiple events may be ORed together and in this case this function will return
when any of them occur.
timeout The timeout for the wait (milliseconds). Negative values indicate that no timeout should be used (wait
forever). The default value is -1.
Returns
This function can be used to wait on any generic event associated with the I/O module.
Parameters
e The event to wait on.
timeout The timeout for the wait (milliseconds). If < 0, then wait forever.
match Returns the matching event condition.
Returns
The documentation for this class was generated from the following files:
• CML_IO.h
• IOmodule.cpp
Generated by Doxygen
5.69 IOModuleSettings Struct Reference 449
Public Attributes
• uint16 heartbeatPeriod
The CANopen heartbeat protocol is one of two standard methods used to constantly watch for network or device problems.
• uint16 heartbeatTimeout
Additional time to wait before generating a heartbeat error (milliseconds) If the heartbeat protocol is used, then this value,
combined with the heartbeatTime will determine how long the network master waits for the node's heartbeat message
before it generates a heartbeat error.
• uint16 guardTime
Node guarding guard time (milliseconds)
• uint8 lifeFactor
Node guarding life time factor.
• bool useStandardDinPDO
Use the standard digital input PDO object.
• bool useStandardDoutPDO
Use the standard digital output PDO object.
• bool useStandardAinPDO
Use the standard analog input PDO objects.
• bool useStandardAoutPDO
Use the standard analog output PDO objects.
This structure may be passed to an I/O module object during initialization. It allows custom settings to be assigned to
the module.
5.69.2.1 guardTime
uint16 guardTime
The CANopen node guarding protocol is a second method (the first being the heartbeat protocol) for devices on the
network to watch for network problems. In this protocol, the master controller sends a request message out to the slave
device at a specified interval. The slave device responds to this request with a message indicating it's state.
The main difference between this protocol and the heartbeat protocol is that both the slave node and the master are able
to recognize network errors. With the heartbeat protocol only the network master is able to identify network problems.
Note that only one of these two protocols can be active in a node device at any time. If the heartbeat period is non-zero,
then the heartbeat protocol will be used.
This parameter gives the node guarding period for use with this node. This is the period between node guarding request
messages sent by the master controller.
Note that both this parameter, and the life time factor must be non-zero for node guarding to be used.
Default 0 (ms)
Generated by Doxygen
450 Class Documentation
5.69.2.2 heartbeatPeriod
uint16 heartbeatPeriod
The CANopen heartbeat protocol is one of two standard methods used to constantly watch for network or device prob-
lems.
When the heartbeat protocol is used, each device on the CANopen network transmits a 'heartbeat' message at a
specified interval. The network master watches for these messages, and is able to detect a device error if it's heartbeat
message is not received within the expected time.
This parameter configures the heartbeat period (milliseconds) that will be used by this module to transmit it's heartbeat
message.
If this parameter is set to zero, then the heartbeat protocol is disabled on this node.
5.69.2.3 heartbeatTimeout
uint16 heartbeatTimeout
Additional time to wait before generating a heartbeat error (milliseconds) If the heartbeat protocol is used, then this
value, combined with the heartbeatTime will determine how long the network master waits for the node's heartbeat
message before it generates a heartbeat error.
Note that setting this to zero does not disable the heartbeat protocol. set the heartbeatPeriod value to zero to disable
heartbeat.
5.69.2.4 lifeFactor
uint8 lifeFactor
When the node guarding protocol is used, this parameter is used by the slave device to determine how long to wait for
a node guarding request from the master controller before signaling an error condition.
If this parameter and the node guard time are both non-zero, and the heartbeatTime is zero, then node guarding will be
setup for the amplifier.
Generated by Doxygen
5.69 IOModuleSettings Struct Reference 451
5.69.2.5 useStandardAinPDO
bool useStandardAinPDO
If true (default) then up to three standard PDO objects will be configured to read the first 12 16-bit analog input pins
when they generate events. If false, then these PDOs will not be configured.
5.69.2.6 useStandardAoutPDO
bool useStandardAoutPDO
If true (default) then up to three standard PDO objects will be configured to transmit the analog output data for up to 12
16-bit analog outputs. If false, then these PDOs will not be configured.
5.69.2.7 useStandardDinPDO
bool useStandardDinPDO
If true (default) then a standard PDO object will be configured to read up to 64 digital inputs any time one of them
changes. If false, then this PDO will not be configured.
5.69.2.8 useStandardDoutPDO
bool useStandardDoutPDO
If true (default) then a standard PDO object will be configured to transmit updated settings for the first 64 digital output
pins when any of them are changed. If false, no such PDO will be configured.
The documentation for this struct was generated from the following file:
• CML_IO.h
Generated by Doxygen
452 Class Documentation
RefObj
CanInterface
IxxatCAN
RefObj
rxSem mutex rx
IxxatCAN
• IxxatCAN (void)
Construct a new Ixxat CAN interface object.
Generated by Doxygen
5.70 IxxatCAN Class Reference 453
Protected Attributes
• int open
tracks the state of the interface as open or closed.
• uint8 channel
Which CAN channel to use (on multi-channel boards).
• int32 baud
Holds a copy of the last baud rate set.
• int handle
File handle used to access the CAN channel.
This class extends the generic CanInterface class into a working interface for the Ixxat can device driver.
Generated by Doxygen
454 Class Documentation
IxxatCAN (
void )
This simply sets the default baud rate and marks the card as not open.
IxxatCAN (
const char ∗ port )
Construct a new Ixxat CAN interface object for the specified port.
The port name should be of the form CANx or IXXATx where x is the port number. The port numbers start at 0, so the
first port would be identified by the port name CAN0.
Parameters
5.70.2.3 ∼IxxatCAN()
∼IxxatCAN (
void ) [virtual]
5.70.3.1 Close()
Returns
Generated by Doxygen
5.70 IxxatCAN Class Reference 455
5.70.3.2 ConvertError()
Convert error codes defined by the Vector CAN library into the standard error codes used by the motion library.
Parameters
err The Vector style status code
Returns
5.70.3.3 Open()
The card should have been identified by setting it's name either in the constructor, or by using the method CanInterface←-
::SetName.
If no port name was set, then the default Ixxat card will be used.
If the port name is set to "select", then a dialog box will be shown allowing the card to be selected from any installed
Ixxat cards.
Otherwise, the port name should be of the form "CANx" where x is the Ixxat hardware key number (i.e. CAN1 for
hardware key 1).
Returns
5.70.3.4 RecvFrame()
Generated by Doxygen
456 Class Documentation
Parameters
frame A reference to the frame object that will be filled by the read.
timeout The timeout (ms) to wait for the frame. A timeout of 0 will return immediately if no data is available. A
timeout of < 0 will wait forever.
Returns
5.70.3.5 rxInt()
void rxInt (
int16 ct,
void ∗ ptr )
This is an internal function that should not be called except by the driver. It's used to add one or more CAN frames to
the receive buffer when they are received.
Parameters
5.70.3.6 SetBaud()
Parameters
b The baud rate to set.
Generated by Doxygen
5.70 IxxatCAN Class Reference 457
Returns
5.70.3.7 XmitFrame()
Parameters
Returns
5.70.4.1 channel
The documentation for this class was generated from the following files:
• can_ixxat.h
• can_ixxat.cpp
Generated by Doxygen
458 Class Documentation
RefObj
CanInterface
IxxatCANV3
RefObj
CanInterface Mutex
mutex
IxxatCANV3
Generated by Doxygen
5.71 IxxatCANV3 Class Reference 459
Protected Attributes
• int open
tracks the state of the interface as open or closed.
• uint8 channel
Which CAN channel to use (on multi-channel boards).
• int32 baud
Holds a copy of the last baud rate set.
• int handle
File handle used to access the CAN channel.
This class extends the generic CanInterface class into a working interface for the Ixxat can device driver.
Generated by Doxygen
460 Class Documentation
5.71.2.1 Close()
Returns
5.71.2.2 ConvertError()
Convert error codes defined by the Vector CAN library into the standard error codes used by the motion library.
Parameters
err The Vector style status code
Returns
5.71.2.3 Open()
Returns
Generated by Doxygen
5.71 IxxatCANV3 Class Reference 461
5.71.2.4 RecvFrame()
Parameters
frame A reference to the frame object that will be filled by the read.
timeout The timeout (ms) to wait for the frame. A timeout of 0 will return immediately if no data is available. A
timeout of < 0 will wait forever.
Returns
5.71.2.5 SetBaud()
Parameters
b The baud rate to set.
Returns
5.71.2.6 XmitFrame()
Generated by Doxygen
462 Class Documentation
Parameters
Returns
5.71.3.1 channel
• can_ixxat_v3.h
• can_ixxat_v3.cpp
RefObj
CanInterface
KvaserCAN
Generated by Doxygen
5.72 KvaserCAN Class Reference 463
RefObj
CanInterface Mutex
mutex
KvaserCAN
• KvaserCAN (void)
Construct a default CAN object.
• KvaserCAN (const char ∗port)
Construct a CAN object with a specified port name.
• virtual ∼KvaserCAN (void)
Destructor.
• const Error ∗ Open (void)
Open the Kvaser CAN port.
• const Error ∗ Close (void)
Close the CAN interface.
• const Error ∗ SetBaud (int32 baud)
Set the CAN interface baud rate.
Generated by Doxygen
464 Class Documentation
Protected Attributes
• int open
tracks the state of the interface as open or closed.
• int32 baud
Holds a copy of the last baud rate set.
• int kvBaud
Holds a value the Kvaser driver uses to identify bit rate.
• int Handle_Rd
File handle used to configure and read from the CAN channel.
• int Handle_Wr
File handle used to write to the CAN channel.
This class extends the generic CanInterface class into a working interface for the Kvaser can device driver.
KvaserCAN (
void )
KvaserCAN (
const char ∗ port )
The port name should be of the form CANx or KVASERx where x is the port number. The port numbers start at 0, so
the first port would be identified by the port name CAN0.
Generated by Doxygen
5.72 KvaserCAN Class Reference 465
Parameters
5.72.2.3 ∼KvaserCAN()
∼KvaserCAN (
void ) [virtual]
Destructor.
5.72.3.1 Close()
Returns
5.72.3.2 ConvertError()
Convert error codes defined by the Vector CAN library into the standard error codes used by the motion library.
Parameters
err The Vector style status code
Generated by Doxygen
466 Class Documentation
Returns
5.72.3.3 Open()
Before Open is called, the desired baud rate must have been specified by calling SetBaud, and the port name must
have been set. If the baud was not specified, it will default to 1,000,000 BPS. If the port name is not set, it will default to
CAN0.
Returns
5.72.3.4 RecvFrame()
Parameters
frame A reference to the frame object that will be filled by the read.
timeout The timeout (ms) to wait for the frame. A timeout of 0 will return immediately if no data is available. A
timeout of < 0 will wait forever.
Returns
Generated by Doxygen
5.72 KvaserCAN Class Reference 467
5.72.3.5 SetBaud()
Parameters
b The baud rate to set.
Returns
5.72.3.6 XmitFrame()
Parameters
Returns
The documentation for this class was generated from the following files:
• can_kvaser.h
• can_kvaser.cpp
Generated by Doxygen
468 Class Documentation
Thread RefObj
Linkage
eventMap
Linkage
• Linkage ()
Default constructor.
• virtual ∼Linkage ()
Linkage object destructor.
• const Error ∗ Init (uint16 ct, Amp a[ ])
Initialize a new linkage object.
• const Error ∗ Init (uint16 ct, Amp ∗a[ ])
Initialize a new linkage object.
• const Error ∗ Configure (LinkSettings &settings)
Generated by Doxygen
5.73 Linkage Class Reference 469
Configure a linkage.
• Amp & GetAmp (uint16 i)
Get a reference to the amplifier object at the specified location in the linkage.
• uint32 GetAmpRef (uint16 i)
Return a CML reference number for the amp object at the specified location in the linkage.
• const Error ∗ MoveTo (PointN &p, uunit vel, uunit acc, uunit dec, uunit jrk, bool start=true)
Move to a point in space.
• const Error ∗ MoveToRel (PointN &p, uunit vel, uunit acc, uunit dec, uunit jrk, bool start=true)
Move to a point in space using relative distances.
• const Error ∗ SetMoveLimits (uunit vel, uunit acc, uunit dec, uunit jrk)
Set limits used for multi-axis point-to-point moves.
• const Error ∗ GetMoveLimits (uunit &vel, uunit &acc, uunit &dec, uunit &jrk)
Return the move limits currently set for this linkage.
• const Error ∗ MoveTo (PointN &p, bool start=true)
Move to a specified position.
• const Error ∗ MoveToRel (PointN &p, bool start=true)
Move to a point in space using relative distances.
• const Error ∗ StartMove (void)
Start the moves that have already been programmed into all axes of this linkage.
• const Error ∗ WaitMoveDone (Timeout timeout=-1)
Wait for the currently running move to finish, or for an error to occur.
• const Error ∗ WaitEvent (Event &e, Timeout timeout, LINK_EVENT &match, EventMap &map)
Wait for a linkage event condition.
• const Error ∗ WaitEvent (Event &e, Timeout timeout, LINK_EVENT &match)
Wait for a linkage event condition.
• const Error ∗ WaitEvent (Event &e, Timeout timeout=-1)
Wait for a linkage event condition.
• const Error ∗ HaltMove (void)
Halt the current move.
• const Error ∗ SendTrajectory (LinkTrajectory &trj, bool start=true)
Upload a multi-axis PVT move trajectory to the linkage and optionally start the move.
• const Error ∗ GetLatchedError (int &)
Return any latched error codes held by the linkage object.
• void ClearLatchedError (void)
Clear any latched errors.
• Amp & operator[ ] (uint16 i)
Return a reference to the specified amplifier object in this linkage.
• uint16 GetAmpCount (void)
Return the number of amplifiers associated with this linkage.
• virtual uint16 GetAxesCount (void)
Return the number of independent axes associated with this linkage.
• const Error ∗ GetPositionCommand (PointN &p)
Get the current commanded position of the linkage.
• virtual const Error ∗ ConvertAmpToAxisPos (uunit pos[ ])
Convert the linkage position from the amplifier frame to the axis frame.
• virtual const Error ∗ ConvertAxisToAmpPos (uunit pos[ ])
Convert the linkage position from the axis frame to the amplifier frame.
Generated by Doxygen
470 Class Documentation
Public Attributes
• EventMap eventMap
This is an event map that is used to track linkage events and state changes.
Friends
• class Amp
5.73.2.1 Linkage()
Linkage (
void )
Default constructor.
Generated by Doxygen
5.73 Linkage Class Reference 471
5.73.3.1 ClearLatchedError()
void ClearLatchedError (
void ) [inline]
This function clears the latched error information returned by Linkage::GetLatchedError(). Latched errors are automat-
ically cleared at the start of a new move. This call may be used to clear latched error information at any other time.
5.73.3.2 Configure()
Configure a linkage.
The linkage object will be configured to use the various settings passed in the LinkSettings object.
When a new Linkage object is created, it will be configured using a default set of settings. These settings can be
modified through this call. Set the documentation of the LinkSettings object for details of the available settings and their
default values.
Parameters
settings The new settings to be used. A local copy of this object will be made by the linkage.
Returns
5.73.3.3 ConvertAmpToAxis()
Convert position & velocity information from the amplifier frame to the axis frame.
The passed arrays contain a position and velocity for each amplifer on entry. These values should be converted to axis
positions & velocities in this function.
By default, this function doesn't do anything, however it is a virtual function to allow it to be extended in sub-classes.
Generated by Doxygen
472 Class Documentation
Parameters
Returns
5.73.3.4 ConvertAmpToAxisPos()
Convert the linkage position from the amplifier frame to the axis frame.
The passed array contains a position for each amplifer on entry. These positions should be converted to axis positions
in this function. By default, this function doesn't do anything, however it is a virtual function to allow it to be extended in
sub-classes.
Parameters
Returns
5.73.3.5 ConvertAxisToAmp()
Convert position & velocity information from the axis frame to the amplifier frame.
The passed arrays contain a position and velocity for each axis on entry. These values should be converted to amp
positions & velocities in this function.
By default, this function doesn't do anything, however it is a virtual function to allow it to be extended in sub-classes.
Generated by Doxygen
5.73 Linkage Class Reference 473
Parameters
Returns
5.73.3.6 ConvertAxisToAmpPos()
Convert the linkage position from the axis frame to the amplifier frame.
The passed array contains a position for each axis on entry. These positions should be converted to amplifier positions
in this function. By default, this function doesn't do anything, however it is a virtual function to allow it to be extended in
sub-classes.
Parameters
Returns
5.73.3.7 GetAmp()
Get a reference to the amplifier object at the specified location in the linkage.
Note that if CML_DEBUG_ASSERT is defined, then the standard C assert function will be used to check for an invalid
index.
NOTE: This function is unsafe and has been depreciated. Use Linkage::GetAmpRef() as a safer alternative.
Generated by Doxygen
474 Class Documentation
Parameters
Returns
5.73.3.8 GetAmpCount()
uint16 GetAmpCount (
void ) [inline]
Returns
5.73.3.9 GetAmpRef()
uint32 GetAmpRef (
uint16 i )
Return a CML reference number for the amp object at the specified location in the linkage.
RefObj::LockRef() can then be used to safely obtain a pointer to the actual Amp object.
Parameters
Returns
5.73.3.10 GetAxesCount()
Generated by Doxygen
5.73 Linkage Class Reference 475
For a standard Linkage object, this will be the same as the amp count, however, this function is virtual to allow more
complex structures to be represented in sub-classes.
Returns
5.73.3.11 GetLatchedError()
When an error occurs during a move, the linkage latches the first error to occur and the index of the amplifier that caused
it.
Note that the latched error information will be reset automatically at the start of any new move.
Parameters
amp The index of the amplifier producing the latched error will be returned. -1 will be returned if the amplifier is
unknown.
Returns
5.73.3.12 GetMoveLimits()
Parameters
vel Returns maximum velocity
acc Returns maximum acceleration
dec by
Generated Returns
Doxygenmaximum deceleration
jrk Returns maximum jerk
476 Class Documentation
Returns
5.73.3.13 GetPositionCommand()
Note that this function queries the position of each amplifier sequentially and therefore the returned position information
will only be accurate if the linkage is at rest when the function is called.
Parameters
p A point that will be filled in with the current Linkage commanded position.
Returns
5.73.3.14 HaltMove()
The exact type of halt can be programmed individually for each axis using the Amp::SetHaltMode function.
Returns
Generated by Doxygen
5.73 Linkage Class Reference 477
If the object has already been initialized, this will fail with an error.
All amplifiers attached to a linkage must be initialized, and must share the same network object. Also, amplifiers may
only be attached to one linkage at a time, so this function will fail if any of the passed amplifier objects is already attached
to a Linkage.
The linkage object will maintain pointers to each of the amplifier objects passed to this function. The amplifiers may not
be destroyed until after the linkage object is.
Parameters
ct The number of amplifiers to be used with this linkage. Note that this must be between 1 and
CML_MAX_AMPS_PER_LINK.
a An array of amplifiers to be assigned to this linkage. There must be at least ct amplifiers in this array.
Returns
If the object has already been initialized, this will fail with an error.
All amplifiers attached to a linkage must be initialized, and must share the same network object. Also, amplifiers may
only be attached to one linkage at a time, so this function will fail if any of the passed amplifier objects is already attached
to a Linkage.
The linkage object will maintain pointers to each of the amplifier objects passed to this function. The amplifiers may not
be destroyed until after the linkage object is.
Generated by Doxygen
478 Class Documentation
Parameters
ct The number of amplifiers to be used with this linkage. Note that this must be between 1 and
CML_MAX_AMPS_PER_LINK.
a An array of pointer to amplifier objects to be assigned to this linkage. There must be at least ct pointers in this
array.
Returns
The number of dimensions of the point must equal the number of axes controlled by the Linkage (as returned by
Linkage::GetAxesCount).
This method causes the linkage to perform a straight line move in N space from the present position to the specified
point. The move will be limited in velocity, acceleration & jerk to the passed values.
The linkage is assumed to be at rest when this method is called. If this isn't the case, then an error will result.
Note that this function causes a trajectory to be calculated and passed to the amplifiers as a series of PVT points. This
calculation requires floating point math, so this function is not available if floating point support has not been enabled in
CML_Settings.h.
Parameters
p The point in N space to move to.
vel Maximum velocity
acc Maximum acceleration
dec Maximum deceleration
jrk Maximum jerk
start If true (the default), the profile will be started by this call. If false, the profile will be uploaded, but not started.
In that case the move may be later started by a call to Linkage::StartMove.
Generated by Doxygen
5.73 Linkage Class Reference 479
Returns
Parameters
p The point to move to.
start If true (the default), the profile will be started by this call. If false, the profile will be uploaded, but not started.
In that case the move may be later started by a call to Linkage::StartMove.
Returns
The number of dimensions of the point must equal the number of axes controlled by the Linkage (as returned by
Linkage::GetAxesCount).
This method causes the linkage to perform a straight line move in N space from the present position to the specified
point using relative distances. The move will be limited in velocity, acceleration & jerk to the passed values.
The linkage is assumed to be at rest when this method is called. If this isn't the case, then an error will result.
Note that this function causes a trajectory to be calculated and passed to the amplifiers as a series of PVT points. This
calculation requires floating point math, so this function is not available if floating point support has not been enabled in
CML_Settings.h.
Generated by Doxygen
480 Class Documentation
Parameters
p The relative distances to the desired point in N space.
vel Maximum velocity
acc Maximum acceleration
dec Maximum deceleration
jrk Maximum jerk
start If true (the default), the profile will be started by this call. If false, the profile will be uploaded, but not started.
In that case the move may be later started by a call to Linkage::StartMove.
Returns
Parameters
p The relative distances to the desired point in N space.
start If true (the default), the profile will be started by this call. If false, the profile will be uploaded, but not started.
In that case the move may be later started by a call to Linkage::StartMove.
Returns
5.73.3.21 operator[]()
Amp& operator[ ] (
uint16 i ) [inline]
NOTE: This function is unsafe and has been depreciated. Use Linkage::GetAmpRef() as a safer alternative.
Generated by Doxygen
5.73 Linkage Class Reference 481
Parameters
Returns
5.73.3.22 SendTrajectory()
Upload a multi-axis PVT move trajectory to the linkage and optionally start the move.
Parameters
trj Reference to the linkage trajectory to be used. A local reference to this trajectory will be stored if the entire
profile will not fit in the amplifiers on-board buffer. This pointer will be kept until the entire profile has been
uploaded to the linkage. It is therefore important to ensure that the trajectory object passed here will remain
valid (i.e. not be deallocated) until the linkage has called the LinkTrajectory.Finish() method.
start If true (the default), the profile will be started by this call. If false, the profile will be uploaded, but not started.
In that case the move may be later started by a call to Linkage::StartMove.
Returns
An error object.
5.73.3.23 SetMoveLimits()
Parameters
vel Maximum velocity
acc Maximum acceleration
dec by
Generated Maximum
Doxygen deceleration
Returns
5.73.3.24 StartMove()
Start the moves that have already been programmed into all axes of this linkage.
Returns
This function additionally polls the drive status while waiting to ensure a lost message won't cause a timeout
Parameters
e The event to wait on.
timeout The timeout for the wait (milliseconds). If < 0, then wait forever.
match Returns the matching event condition.
map Event map to wait on
Returns
Generated by Doxygen
5.73 Linkage Class Reference 483
This function can be used to wait on any generic event associated with the linkage.
Parameters
e The event to wait on.
timeout The timeout for the wait (milliseconds). If < 0, then wait forever.
match Returns the matching event condition.
Returns
This function can be used to wait on any generic event associated with the linkage.
Parameters
e The event to wait on.
timeout The timeout for the wait (milliseconds). If < 0, then wait forever (default).
Returns
Generated by Doxygen
484 Class Documentation
5.73.3.28 WaitMoveDone()
Wait for the currently running move to finish, or for an error to occur.
Parameters
Returns
The documentation for this class was generated from the following files:
• CML_Linkage.h
• Linkage.cpp
This class represents error conditions that can occur in the Linkage class.
Error
LinkError
Generated by Doxygen
5.74 LinkError Class Reference 485
Internal
Error OK
Unknown
BadAmpCount
AmpTrjNotRunning
AmpAlreadyLinked
AmpRemoved
AmpTrjOverflow
LinkError StartMoveTO
AlreadyInit
NoActiveTrj
NetworkMismatch
BadMoveLimit
...
Generated by Doxygen
486 Class Documentation
This class represents error conditions that can occur in the Linkage class.
5.74.2.1 NetworkMismatch
The amplifier objects used to init the linkage are not all attached to the same CanOpen network.
5.74.2.2 NotSupported
Returned if Linkage::MoveTo is called on a system where floating point math was not enabled at compile time.
The documentation for this class was generated from the following file:
• CML_Linkage.h
Generated by Doxygen
5.75 LinkSettings Class Reference 487
• LinkSettings ()
Default constructor.
Public Attributes
• Timeout moveAckTimeout
This setting gives the amount of time (milliseconds) to wait for all amplifiers to acknowedge the start of a new move before
reporting an error.
• bool haltOnPosWarn
If this setting is set to true, then the linkage object will automatically issue a halt to all axes if any of them reports a position
warning window condition during a move.
• bool haltOnVelWin
If this setting is set to true, then the linkage object will automatically issue a halt to all axes if any of them reports a velocity
tracking window condition during a move.
An object of this type may be passed to the Linkage::Configure function to define the settings used by that linkage.
5.75.2.1 LinkSettings()
LinkSettings ( )
Default constructor.
Generated by Doxygen
488 Class Documentation
5.75.3.1 haltOnPosWarn
bool haltOnPosWarn
If this setting is set to true, then the linkage object will automatically issue a halt to all axes if any of them reports a
position warning window condition during a move.
Default: false
5.75.3.2 haltOnVelWin
bool haltOnVelWin
If this setting is set to true, then the linkage object will automatically issue a halt to all axes if any of them reports a
velocity tracking window condition during a move.
Default: false
5.75.3.3 moveAckTimeout
Timeout moveAckTimeout
This setting gives the amount of time (milliseconds) to wait for all amplifiers to acknowedge the start of a new move
before reporting an error.
When a new move is started on the linkage, each amplifier will respond with an acknowledgment. If all of these re-
sponses are not received in this amount of time then an error will be reported.
Default: 200 ms
The documentation for this class was generated from the following files:
• CML_Linkage.h
• Linkage.cpp
Generated by Doxygen
5.76 LinkTrajectory Class Reference 489
Linkage trajectory.
RefObj
LinkTrajectory
RefObj
LinkTrajectory
• LinkTrajectory (void)
LinkTrajectory default constructor.
• virtual ∼LinkTrajectory ()
Virtual destructor.
• virtual const Error ∗ StartNew (void)
Start a new trajectory.
• virtual void Finish (void)
Generated by Doxygen
490 Class Documentation
Trajectory finished.
• virtual int GetDim (void)=0
Get the dimension of the trajectory.
• virtual bool UseVelocityInfo (void)
This function indicates whether the velocity information returned by NextSegment should be used.
• virtual int MaximumBufferPointsToUse (void)
This function allows a trajectory object to effectively reduce the size of the amplifier's internal trajectory buffer.
• virtual const Error ∗ NextSegment (uunit pos[ ], uunit vel[ ], uint8 &time)=0
Get the next segment of position, velocity & time info.
Linkage trajectory.
This class is similar to the Trajectory class, except that it is used to pass multi-axis trajectory information to a linkage
rather then single axis trajectory information to a single amplifier.
Like the base Trajectory class, the base LinkTrajectory class is pure virtual. This class should be extended by actual
trajectory implementations.
5.76.2.1 Finish()
Trajectory finished.
This function is called by the Linkage object when it is finished with the trajectory and no longer holding a reference to
it. Typically, this will happen after the LinkTrajectory::NextSegment function has returned a zero time value, although it
can also occur when some external event causes the trajectory to be aborted.
Once the Linkage object calls LinkTrajectory::Finish it will clear it's reference to the trajectory object. No further access
to the trajectory object will be made after Finish is called.
Reimplemented in LinkTrjScurve.
Generated by Doxygen
5.76 LinkTrajectory Class Reference 491
5.76.2.2 GetDim()
The trajectory dimension gives the number of axes defined for the trajectory. This can not change from the time Start←-
New() is called to the time Finish() is called. The position and velocity arrays passed to NextSegment will be of at least
this size.
Returns
5.76.2.3 MaximumBufferPointsToUse()
This function allows a trajectory object to effectively reduce the size of the amplifier's internal trajectory buffer.
Normally it's desirable to download as many points as possible to the amplifier at once. For some applicaitons however,
the trajectory information is calculated in real time and the amplifier's buffer causes unacceptable latency. For such
applications this function may be used to reduce the delay between calculating trajectory points and the amplifier's
acting on them.
Note that the amplifier requires some buffering of points in order to interpolate between them. This function should never
return a value less then 2 or a trajectory underflow will certainly occur.
Returns
The maximum number of trajectory points that should be stored in the amplifier at any time. By default this returns
a very large number which ensures that the amplifier's full buffer will be used.
5.76.2.4 NextSegment()
Note that this function will be called from the high priority CANopen receiver task. Therefore, no lengthy processing
should be done here.
Generated by Doxygen
492 Class Documentation
Parameters
pos An array where the position values will be returned. This array will be at least D elements long, where D is
the trajectory dimension as returned by LinkTrajectory::GetDim()
vel An array where the velocity values will be returned. These values are ignored if the function
UseVelocityInfo() returns false.
time The segment time is returned here. This is in milliseconds and ranges from 1 to 255. If zero is returned, this
is the last frame in the profile.
Returns
5.76.2.5 StartNew()
This function is called before the first call to LinkTrajectory::NextSegment. It gives the trajectory object a chance to
return an error indicating that it isn't ready to be sent.
Returns
An error pointer if the trajectory object is not available, or NULL if it is ready to be sent.
5.76.2.6 UseVelocityInfo()
This function indicates whether the velocity information returned by NextSegment should be used.
If this returns true, then the amplifier will operate in PVT mode and use cubic polynomial interpolation between trajectory
segments. If this returns false, then the velocity returned by NextSegment will be ignored, and the amplifier will run in
PT mode using linear interpolation between sets of points.
Returns
true if velocity information should be used (default), or false if velocities should be ignored.
The documentation for this class was generated from the following file:
• CML_Trajectory.h
Generated by Doxygen
5.77 LinkTrjScurve Class Reference 493
RefObj
LinkTrajectory
LinkTrjScurve
RefObj
LinkTrajectory
LinkTrjScurve
• LinkTrjScurve ()
Generated by Doxygen
494 Class Documentation
This extends the single axis TrjScurve object for use in multi-axis linkage moves.
5.77.2.1 Calculate()
This function calculates the straight line move between the two passed positions.
Parameters
s The starting position
e The ending position
vel The max velocity
acc The max acceleration
dec The max deceleration
jrk The max jerk (rate of change of velocity)
Generated by Doxygen
5.77 LinkTrjScurve Class Reference 495
Returns
5.77.2.2 GetDim()
int GetDim (
void ) [inline], [virtual]
The trajectory dimension gives the number of axes defined for the trajectory. This can not change from the time Start←-
New() is called to the time Finish() is called. The position and velocity arrays passed to NextSegment will be of at least
this size.
Returns
Implements LinkTrajectory.
5.77.2.3 NextSegment()
The positions & velocities for all axes are returned in the passed arrays.
Parameters
Returns
Implements LinkTrajectory.
Generated by Doxygen
496 Class Documentation
5.77.2.4 StartNew()
The trajectory must have already been calculated when this function is called.
Returns
The documentation for this class was generated from the following files:
• CML_TrjScurve.h
• TrjScurve.cpp
RefObj
EtherCatHardware
LinuxEcatHardware
Generated by Doxygen
5.79 LSS Class Reference 497
RefObj
EtherCatHardware
LinuxEcatHardware
The documentation for this class was generated from the following files:
• ecat_linux.h
• ecat_linux.cpp
Generated by Doxygen
498 Class Documentation
RefObj
Receiver
LSS
RefObj
Receiver
LSS
Generated by Doxygen
5.79 LSS Class Reference 499
The Layer Setting Services (LSS) protocol is part of the CANopen network standard. The intent of LSS is to allow low
level network settings, such as the network bit rate and device node ID numbers to be configured over the network.
The CANopen protocol requires each device on the network to have a unique node ID number in the range 1 to 127. In
general, it's not possible to communicate with a device using CANopen if it doesn't have a unique node ID in this range.
The LSS protocol allows some limited communication with any device on the network even if it doesn't have a node ID
set. This allows node ID numbers to be assigned to devices over the network.
This object implements the LSS protocol and allows devices on the network to be queried and configured.
For more detailed information on the LSS protocol please see the CANopen standard document DSP305.
Generated by Doxygen
500 Class Documentation
5.79.2.1 LSS()
LSS (
CanOpen & co )
Parameters
co A reference to the CANopen network object over which this protocol will run.
5.79.3.1 ActivateBitRate()
Activate the new bit rate previously set on all devices using the LSS::SetBitRate function.
Note that this function doesn't change the bit rate of the local CAN port, it simply returns after requesting the new rate
on the LSS slave devices. It's the responsibility of the calling function to change the local bit rate.
After calling this function the master should stop transmitting on the CAN bus. After a delay of the specified time, the
master should change it's bit rate. After a second delay of the specified time, the master can start transmitting on the
bus at the new bit rate.
Parameters
delay Delay in milliseconds which the LSS devices will use to ensure that they all switch their bit rates at a time
when no device is transmitting. This delay will be used twice, once before the change and once after.
Returns
Generated by Doxygen
5.79 LSS Class Reference 501
5.79.3.2 Enquire()
This internal function is used to enquire one field from the single selected drive using LSS.
Parameters
Returns
5.79.3.3 EnquireInfo()
Parameters
Returns
Generated by Doxygen
502 Class Documentation
5.79.3.4 FindAmplifiers()
int FindAmplifiers (
int max,
uint32 serial[ ] )
This function uses the CANopen Layer Setting Services (LSS) protocol to find amplifiers on the network. All Copley
amplifiers on the CANopen network can be identified using this protocol, even if they do not have a valid CANopen node
ID number configured.
On return from this function, the passed array will have been filled with the serial numbers of all the amplifiers found.
These serial numbers may then be passed to LSS::SetAmpNodeID to assign a node ID number to the amplifier.
Note that firmware support for the LSS protocol was added starting with version 4.04. Any amplifier on the network with
earlier firmware will not be discovered using this technique.
Parameters
Returns
The number of amplifiers actually found. This is not limited to the max parameter value
5.79.3.5 FindAmpSerial()
uint32 FindAmpSerial (
uint32 low,
uint32 high ) [protected]
Find the serial number of the first amplifier in the passed range.
Parameters
Returns
Generated by Doxygen
5.79 LSS Class Reference 503
5.79.3.6 GetAmpNodeID()
Parameters
Returns
5.79.3.7 getTimeout()
Timeout getTimeout (
void ) [inline]
Returns
5.79.3.8 NewFrame()
int NewFrame (
CanFrame & frame ) [protected], [virtual]
This method is called by the main CAN network listener when a new LSS response frame is received.
Parameters
Generated by Doxygen
504 Class Documentation
Returns
5.79.3.9 SelectAmp()
All other amplifiers on the network are switched into LSS operational mode.
Parameters
Returns
5.79.3.10 SetAmpNodeID()
Parameters
Returns
Generated by Doxygen
5.79 LSS Class Reference 505
Send an LSS command to program the selected devices CAN bit rate given the table number and index within the table.
When this is called, only one device should be in LSS config mode.
Note that the new bit rate doesn't become active immedately, it must be activated first by calling LSS::ActivateBitRate.
Parameters
tableID Specifies which table of bit rates to use (0 for standard table)
index Specifies the index within the table of the desired bit rate.
Returns
Send an LSS command to program the selected devices CAN bit rate given the table number and index within the table.
When this is called, only one device should be in LSS config mode.
Note that the new bit rate doesn't become active immedately, it must be activated first by calling LSS::ActivateBitRate.
Parameters
Returns
5.79.3.13 SetNodeID()
Generated by Doxygen
506 Class Documentation
When this is called, exactly one deivce on the network should be in LSS configuration mode.
Parameters
Returns
5.79.3.14 setTimeout()
void setTimeout (
Timeout to ) [inline]
Parameters
5.79.3.15 StoreConfig()
Save the current node ID and bit rate info to non-volatile memory on the selected drive.
When this is called, exactly one drive should be in LSS configuration mode.
Returns
5.79.3.16 SwitchModeGlobal()
Set all devices on the network into either LSS configuration mode or LSS operational mode.
Generated by Doxygen
5.80 MtrInfo Struct Reference 507
Parameters
config If true, put all devices into configuration mode. Otherwise, put everything into operational mode.
Returns
5.79.3.17 Xmit()
Parameters
Returns
The documentation for this class was generated from the following files:
• CML_CanOpen.h
• LSS.cpp
• MtrInfo (void)
Motor info structure default constructor.
Generated by Doxygen
508 Class Documentation
Public Attributes
• uint16 type
Motor type.
• char mfgName [COPLEY_MAX_STRING]
Name of the motor manufacturer.
• char model [COPLEY_MAX_STRING]
Motor model number.
• int16 poles
Number of pole pairs (i.e.
• uint16 resistance
Motor resistance (10 milliohm units)
• uint16 inductance
Motor inductance (10 microhenry units)
• uint32 trqPeak
Peak torque (0.01 Newton millimeters)
• uint32 trqCont
Continuous torque (0.01 Newton millimeters)
• uint32 trqConst
Torque constant (0.01 Newton millimeters / Amp)
• uunit velMax
Max velocity.
• uint32 backEMF
Back EMF constant (10 millivolts / KRPM)
• uint32 inertia
Inertia.
• bool tempSensor
Motor has a temperature sensor (true/false)
• bool mtrReverse
Reverse motor wiring if true.
• bool encReverse
Reverse encoder direction if true.
• int16 hallType
Type of hall sensors on motor. See documentation for details.
• int16 hallWiring
Hall wiring code, see documentation for details.
• int16 hallOffset
Hall offset (degrees)
• bool hasBrake
Motor has a brake if true.
• int16 stopTime
Delay (milliseconds) between disabling amp & applying brake During this time the amp will attempt to actively stop motor.
• int16 brakeDelay
Delay (milliseconds) between applying brake & disabling PWM.
• uunit brakeVel
Velocity below which brake will be applied.
• int16 encType
Generated by Doxygen
5.80 MtrInfo Struct Reference 509
This structure holds information about the motor connected to the amplifier.
The amplifier uses the information in this structure when controlling the motor. It is very important that the information
provided to the amplifier be as accurate as possible for proper motor control.
Use the methods Amp::GetMtrInfo and Amp::SetMtrInfo to upload / download the information contained in this structure.
Note that unlike many amplifier parameters, motor parameters are always stored in non-volatile flash memory.
Generated by Doxygen
510 Class Documentation
5.80.2.1 MtrInfo()
MtrInfo (
void )
5.80.3.1 gearRatio
int32 gearRatio
This parameter is used by the CME software and gives a ratio of motor encoder counts to load encoder counts.
5.80.3.2 hallVelShift
int16 hallVelShift
This parameter is only used on servo systems where there is no encoder and digital hall sensors are used for velocity
feedback. In that case, this shift value can be used to scale up the calculated velocity.
5.80.3.3 loadEncOptions
uint32 loadEncOptions
This bitmapped parameter is used to specify various configuration options for the load encoder. See documentation.
Generated by Doxygen
5.80 MtrInfo Struct Reference 511
5.80.3.4 loadEncRes
int32 loadEncRes
This is encoder counts/rev for rotory encoders, or nanometers/count for linear encoders.
5.80.3.5 loadEncType
int16 loadEncType
5.80.3.6 mtrEncOptions
uint32 mtrEncOptions
This bitmapped parameter is used to specify various configuration options for the motor encoder. See documentation.
5.80.3.7 poles
int16 poles
number of electrical phases) per rotation. Used for rotory motors only.
5.80.3.8 resolverCycles
uint16 resolverCycles
This parameter gives the number of resolver cycles / motor rev. It's only used on systems that use a resolver for position
feedback. Default is 1 cycle/rev.
The documentation for this struct was generated from the following files:
• CML_AmpStruct.h
• AmpStruct.cpp
Generated by Doxygen
512 Class Documentation
This class represents an object that can be used by multiple threads to gain safe access to a shared resource.
• Mutex (void)
Create a new mutex object.
• virtual ∼Mutex ()
Free any system resources associated with the mutex.
• const Error ∗ Lock (void)
Lock the mutex.
• const Error ∗ Unlock (void)
Unlock the mutex.
This class represents an object that can be used by multiple threads to gain safe access to a shared resource.
If an attempt is made to lock a mutex that is currently locked by another thread, the thread attempting the lock will be
suspended until the thread holding the lock releases it. Mutex objects are not required to allow recursive access.
5.81.2.1 Lock()
This function causes the calling function to gain exclusive access to the mutex object. If some other thread has the
mutex locked when this method is called, the calling thread will block until the mutex is unlocked.
Returns
An error object.
Generated by Doxygen
5.82 MutexLocker Class Reference 513
5.81.2.2 Unlock()
Returns
An error object.
The documentation for this class was generated from the following file:
• CML_Threads.h
This is a utility class that locks a mutex in it's constructor, and unlocks it in it's destructor.
This is a utility class that locks a mutex in it's constructor, and unlocks it in it's destructor.
It can be used to ensure that a mutex is properly unlocked when a function returns. Just create a temporary Mutex←-
Locker object and pass it the mutex to lock in it's constructor. The mutex will be automatically unlocked when the function
returns and the MutexLocker is deleted.
5.82.2.1 MutexLocker()
MutexLocker (
Mutex & m ) [inline]
Generated by Doxygen
514 Class Documentation
Parameters
m The mutex to lock.
5.82.3.1 Lock()
void Lock (
Mutex & m ) [inline]
The mutex will be unlocked in the destructor if not explicitely unlocked first. If another mutex was previously locked then
it will be forgotten.
Parameters
m The mutex to lock.
The documentation for this class was generated from the following file:
• CML_Threads.h
Generated by Doxygen
5.83 Network Class Reference 515
RefObj
Network
CanOpen EtherCAT
RefObj
Network
Generated by Doxygen
516 Class Documentation
This class forms the root of all the different networks that are supported by CML. Every device managed by CML is as-
sociated with exactly one network object. The network object manages some high level aspects of the communications
with the device.
5.83.2.1 DescribeState()
Parameters
state The state to describe
Returns
5.83.2.2 GetNodeInfo()
NetworkNodeInfo ∗ GetNodeInfo (
Node ∗ n ) [static], [protected]
Generated by Doxygen
5.83 Network Class Reference 517
Parameters
n Pointer to the node object
Returns
5.83.2.3 maxSdoFromNode()
int32 maxSdoFromNode (
Node ∗ n ) [virtual]
Return the maximum number of bytes that can be received in an SDO message.
For CANopen this is always 8 (the max size of a CAN frame). For EtherCAT it's the size of the mailbox buffer, and is
node specific
Parameters
n The node to query
Returns
Reimplemented in EtherCAT.
5.83.2.4 maxSdoToNode()
int32 maxSdoToNode (
Node ∗ n ) [virtual]
Return the maximum number of bytes that can be sent in an SDO message.
For CANopen this is always 8 (the max size of a CAN frame). For EtherCAT it's the size of the mailbox buffer, and is
node specific
Parameters
n The node to query
Generated by Doxygen
518 Class Documentation
Returns
Reimplemented in EtherCAT.
5.83.2.5 SetNodeInfo()
void SetNodeInfo (
Node ∗ n,
NetworkNodeInfo ∗ ni ) [static], [protected]
Parameters
n Pointer to the node to update
ni Pointer to the node information
The documentation for this class was generated from the following files:
• CML_Network.h
• Network.cpp
This class holds the error codes that describe various Netowrk error conditions.
Error
NetworkError
Generated by Doxygen
5.85 NetworkNodeInfo Class Reference 519
Internal
Error OK
Unknown
NetworkError NodeIdUsed
This class holds the error codes that describe various Netowrk error conditions.
The documentation for this class was generated from the following file:
• CML_Network.h
NetworkNodeInfo
CanOpenNodeInfo EtherCatNodeInfo
Generated by Doxygen
520 Class Documentation
The documentation for this class was generated from the following file:
• CML_Network.h
• NetworkOptions (void)
Default constructor.
Public Attributes
• uint16 canBusConfig
Network Options. The details fo this parameter depend on the type.
These settings may be up/download from the amplifier using the functions Amp::SetNetworkOptions and Amp::Get←-
NetworkOptions.
5.86.2.1 NetworkOptions()
NetworkOptions (
void ) [inline]
Default constructor.
The documentation for this struct was generated from the following file:
• CML_AmpStruct.h
Generated by Doxygen
5.87 Node Class Reference 521
Node class.
RefObj
Node
CopleyNode IOModule
Amp CopleyIO
RefObj SDO
sdo
Node
• Node ()
Generated by Doxygen
522 Class Documentation
Generated by Doxygen
5.87 Node Class Reference 523
Public Attributes
• SDO sdo
This SDO may be used to get/set values in the node's object dictionary.
Generated by Doxygen
524 Class Documentation
Friends
• class Network
• class CanOpen
• class EtherCAT
Node class.
Objects of this class represent individual nodes on the CANopen or EtherCAT network.
Node ( )
This constructor simple marks the object as uninitialized. The Init() function must be called before this object can be
used.
Node (
Network & net,
int16 nodeID )
Parameters
net The network object that this node is associated with.
nodeID The node's ID.
Generated by Doxygen
5.87 Node Class Reference 525
5.87.3.1 ClearErrorHistory()
Clear the error history (object 0x1003) array for this node.
Returns
An error object.
5.87.3.2 GetDeviceType()
Parameters
devType Where the device type is returned
Returns
An error object
5.87.3.3 GetErrorHistory()
Generated by Doxygen
526 Class Documentation
Parameters
ct When the function is first called, this variable holds the maximum number of errors that can be stored in the
err array (i.e. the length of the array). On return, the actual number of errors uploaded will be stored here.
array An array of 32-bit integers that will be used to return the list of errors.
Returns
5.87.3.4 GetErrorRegister()
Parameters
Returns
An error object
5.87.3.5 GetIdentity()
Get the CANopen identity object for this node (object dictionary entry 0x1018).
Note that only the VendorID field is mandatory. Any unsupported fields will be returned as zero.
Parameters
Generated by Doxygen
5.87 Node Class Reference 527
Returns
5.87.3.6 GetMfgDeviceName()
Read the manufacturer's device name string from the object dictionary.
Parameters
len Holds the size of the buffer on entry, and the length of the downloaded data on return.
str An array of characters used to upload the string.
Returns
An error object
5.87.3.7 GetMfgHardwareVer()
Read the manufacturer's Hardware version string from the object dictionary.
Parameters
len Holds the size of the buffer on entry, and the length of the downloaded data on return.
str An array of characters used to upload the string.
Returns
An error object
Generated by Doxygen
528 Class Documentation
5.87.3.8 GetMfgSoftwareVer()
Read the manufacturer's software version string from the object dictionary.
Parameters
len Holds the size of the buffer on entry, and the length of the downloaded data on return.
str An array of characters used to upload the string.
Returns
An error object
5.87.3.9 GetMfgStatus()
Parameters
Returns
An error object
5.87.3.10 GetNetworkRef()
uint32 GetNetworkRef (
void ) [virtual]
Returns
Reimplemented in Amp.
Generated by Doxygen
5.87 Node Class Reference 529
5.87.3.11 GetNetworkType()
NetworkType GetNetworkType (
void ) [virtual]
Return a value that identifies the type of network the node is currently attached to.
Returns
A network type value, or NET_TYPE_INVALID if the node isn't attached to any network.
5.87.3.12 GetNodeID()
Returns
The node ID
5.87.3.13 GetState()
Returns
Reimplemented in Amp.
5.87.3.14 GetSynchId()
Note that if this node is producing the synch message, bit 30 will be set.
Generated by Doxygen
530 Class Documentation
Parameters
Returns
An error object.
5.87.3.15 GetSynchPeriod()
Parameters
per Period will be returned here
Returns
An error object.
5.87.3.16 HandleEmergency()
Parameters
5.87.3.17 HandleStateChange()
Generated by Doxygen
5.87 Node Class Reference 531
NodeState from,
NodeState to ) [inline], [protected], [virtual]
Note that the state member variable will have been changed to the new state before this function is called.
Parameters
Reimplemented in Amp.
5.87.3.18 Init()
Note that a CANopen node object must be initialized once and only once. This function should be used to initialize the
object if it was created using the default constructor.
Parameters
network The network object that this node is associated with.
nodeID The node's ID. A value that identifies this node on the network.
Returns
5.87.3.19 maxSdoFromNode()
int32 maxSdoFromNode (
void ) [virtual]
Return the maximum number of bytes that can be received in an SDO message.
For CANopen this is always 8 (the max size of a CAN frame). For EtherCAT it's the size of the mailbox buffer, and is
node specific
Generated by Doxygen
532 Class Documentation
Returns
5.87.3.20 maxSdoToNode()
int32 maxSdoToNode (
void ) [virtual]
Return the maximum number of bytes that can be sent in an SDO message.
For CANopen this is always 8 (the max size of a CAN frame). For EtherCAT it's the size of the mailbox buffer, and is
node specific
Returns
5.87.3.21 PdoDisable()
Parameters
Returns
An error object
5.87.3.22 PdoEnable()
Generated by Doxygen
5.87 Node Class Reference 533
Parameters
Returns
An error object
5.87.3.23 PdoSet()
Parameters
Returns
5.87.3.24 PreOpNode()
Returns
Generated by Doxygen
534 Class Documentation
5.87.3.25 ResetComm()
Returns
5.87.3.26 ResetNode()
Returns
An error object
5.87.3.27 RpdoDisable()
Parameters
Returns
An error object
Generated by Doxygen
5.87 Node Class Reference 535
5.87.3.28 SavePDOMapping()
Parameters
saveProfile If true, the device profile parameters will be saved. If false, the device profile parameters will not be
saved.
Returns
An error object
5.87.3.29 SetSynchId()
If bit 30 of the ID is set, then this node will be the synch producer.
Parameters
id COB-ID to set
Returns
An error object
5.87.3.30 SetSynchPeriod()
Generated by Doxygen
536 Class Documentation
Parameters
per The period in microseconds.
Returns
An error object.
5.87.3.31 StartHeartbeat()
Enable heartbeat messages from this node, and start a thread to monitor them.
Parameters
period The producer timeout value (milliseconds). The node will be configured to produce a heartbeat message
at this interval.
timeout The additional number of milliseconds that the monitor thread will wait before indicating an error. Thus,
the consumer heartbeat interval will be (period + timeout).
Returns
5.87.3.32 StartNode()
Returns
Generated by Doxygen
5.87 Node Class Reference 537
5.87.3.33 StartNodeGuard()
When node guarding is enabled, a new thread is created which will send a remote request to this node every (guard←-
Time) milliseconds. The node must respond to this message within the guard time. If the node does not respond then
the thread will notify the node of a state change.
Parameters
guardTime The period in milliseconds of the guard messages sent to the node. It can range from 1 to 65535.
lifeFactor A multiplier used by the node to determine how long to wait for a node guarding message from the
host before indicating a local error. The nodes timeout (life time) is guardTime ∗ lifeFactor. This
parameter must be between 0 and 255. If it's zero, then life guarding on the node is disabled.
Returns
5.87.3.34 StopGuarding()
Returns
5.87.3.35 StopNode()
Returns
Generated by Doxygen
538 Class Documentation
5.87.3.36 SynchStart()
Returns
An error object.
5.87.3.37 SynchStop()
Returns
An error object.
5.87.3.38 TpdoDisable()
Parameters
Returns
An error object
Generated by Doxygen
5.88 NodeError Class Reference 539
5.87.3.39 UnInit()
Returns
5.87.4.1 sdo
SDO sdo
This SDO may be used to get/set values in the node's object dictionary.
The documentation for this class was generated from the following files:
• CML_Node.h
• Node.cpp
Generated by Doxygen
540 Class Documentation
Error
NodeError
AmpFault
Internal
Error OK
Unknown
NetworkUnavailable
NodeError
GuardTimeout
Generated by Doxygen
5.89 NodeIdentity Struct Reference 541
The documentation for this class was generated from the following file:
• CML_Node.h
Public Attributes
• uint32 vendorID
A unique vendor ID assigned by CiA (Can in Automation)
• uint32 productCode
Manufacturer's product code.
• uint32 revision
Revision number which identifies CANopen functionality.
• uint32 serial
Product serial number.
Each node is required to include an identity object on it's object dictionary at location 0x1018. The only required
parameter is the vendorID. All others are included at the manufacturer's discretion.
The documentation for this struct was generated from the following file:
• CML_Node.h
Generated by Doxygen
542 Class Documentation
RefObj
LinkTrajectory
Path
RefObj
LinkTrajectory Mutex
mtx
Path
• Path (uint d)
Generated by Doxygen
5.90 Path Class Reference 543
The object may be used to construct one or two dimensional trajectories built out of line segments and arcs.
Generated by Doxygen
544 Class Documentation
5.90.2.1 Path()
Path (
uint d )
The number of dimensions for the path must be passed. This object currently supports one and two dimensional (i.e.
one and two axis) path construction.
Parameters
d The number of dimensions for the path. Must be either one or two for now.
The arc will start at the current position and will move in either a clockwise (positive angle), or counter-clockwise (nega-
tive angle) direction.
Parameters
Returns
Generated by Doxygen
5.90 Path Class Reference 545
Add an arc with the specified center point and angle (radians).
The arc will start at the current position and will move in clockwise (positive angle), or counter-clockwise (negative angle)
direction.
Parameters
Returns
Add a line segment from the current position to the specified point.
The direction of motion required to move from the current position to the given point will be compared to the direction
of motion at the end of the last segment. If these directions change then the addition of this new point will require an
abrupt change of direction. In this case, the initial velocity will be set to zero.
Parameters
p The point to move to.
Returns
The direction of motion will remain the same as it was at the end of the last added segment. If this is the first segment
added to the path, then the direction will be positive motion in the first axis.
Generated by Doxygen
546 Class Documentation
Parameters
Returns
5.90.3.5 GetDim()
Returns
Implements LinkTrajectory.
5.90.3.6 NextSegment()
This method is called by the Linkage object when as it passes the trajectory informatoin up to the amplifiers.
Parameters
pos An array where the position values will be returned. This array will be at least D elements long, where D is
the trajectory dimension as returned by LinkTrajectory::GetDim()
vel An array where the velocity values will be returned.
time The segment time is returned here. This is in milliseconds and ranges from 1 to 255. If zero is returned, this
is the last frame in the profile.
Generated by Doxygen
5.90 Path Class Reference 547
Returns
Implements LinkTrajectory.
5.90.3.7 Pause()
Set the current velocity to 0 and pause for the specified amount of time.
Parameters
sec The time to pause (must be >= 0). Time is specified in seconds.
Returns
5.90.3.8 PlayPath()
bool PlayPath (
double timeInc,
double pos[ ],
double vel[ ] )
This method may be used to itterate through a path for display purposes.
Before starting a path playback, the path should be reset using the method Path::Reset.
Each call to this function will return position and velocity information for the current playback position in the path. It will
then increment the playback position by the time value passed. When the end of the path is reached, the method will
return true.
Parameters
timeInc The amount of time (seconds) to increment the playback position after reading out the position & velocity
values.
pos An array where the position information will be returned. This array must be long enough to store DIM
elements, where DIM is the path dimension.
vel An array where the velocity information will be returned. This array must be long enough to store DIM
elements,
Generated by Doxygen where DIM is the path dimension.
548 Class Documentation
Returns
true if the end of the path has been reached, false if not.
5.90.3.9 Reset()
This should be called before the path is passed to the Linkage object as a trajectory to run.
5.90.3.10 SetAcc()
Parameters
Returns
5.90.3.11 SetDec()
Note that setting the deceleration limit less then or equal to zero will cause the acceleration value to be used for
deceleration also.
Generated by Doxygen
5.90 Path Class Reference 549
Parameters
Returns
5.90.3.12 SetJrk()
Note that setting the jerk limit to a value less then or equal to zero will cause the path to be calculated with no jerk
limiting.
Parameters
Returns
5.90.3.13 SetStartPos()
This method may be used to start a path at a position other then (0,0) which is the default if no staring position is set.
The starting position may be set at any time, either before or after adding segments to the path. Internally, the segments
are all stored as relative positions.
Parameters
Generated by Doxygen
550 Class Documentation
Returns
5.90.3.14 SetVel()
Parameters
Returns
5.90.3.15 StartNew()
This function is called before the first call to LinkTrajectory::NextSegment. It will result in a call to Path::Reset
Returns
An error pointer if the trajectory object is not available, or NULL if it is ready to be sent.
The documentation for this class was generated from the following file:
• CML_Path.h
Generated by Doxygen
5.91 PathError Class Reference 551
Error
PathError
Internal
Error OK
Unknown
NonPositiveRadius
Alloc
BadLength
BadPoint
VelNotInit
PathError BadDimensions
BadVel
Empty
AccNotInit
BadAcc
...
Generated by Doxygen
552 Class Documentation
The documentation for this class was generated from the following file:
• CML_Path.h
Generated by Doxygen
5.92 PDO Class Reference 553
AlgOutPDO
DigOutPDO
RPDO_Ctrl
RPDO RPDO_HighResTime
RPDO_LinkCtrl
RPDO_PvtCtrl
RefObj PDO
AlgInPDO
DigInPDO
TPDO
TPDO_HighResTime
TPDO_PvtStat
TPDO_Status
Generated by Doxygen
554 Class Documentation
RefObj Pmap
map
PDO
• PDO (void)
Default constructor. Simply initializes some variables.
• virtual ∼PDO ()
Virtual destructor.
• virtual bool IsTxPDO (void)=0
Return true for transmit PDOs and false for receive PDOs.
• virtual const Error ∗ SetID (uint32 i)
Set the CAN message ID associated with the PDO.
• virtual uint32 GetID (void)
Get the CAN message ID associated with the PDO.
• virtual const Error ∗ SetType (byte t)
Set the PDO transmission type code.
• virtual byte GetType (void)
Return the PDO transmission type associated with this PDO.
• virtual const Error ∗ ClearMap (void)
Clear the variable map associated with this PDO.
• virtual const Error ∗ AddVar (Pmap &var)
Add the passed variable to the end of the variable map associated with this PDO.
• virtual int GetRtrOk (void)
Return non-zero if RTR requests are OK for this PDO.
• virtual int GetMapCodes (uint32 codes[ ])
Fill the array of 32-bit ints with the PDO mapping codes used by this PDO.
• virtual int GetBitCt (void)
Return the length (in bits) of the data mapped to this PDO.
Generated by Doxygen
5.92 PDO Class Reference 555
Protected Attributes
• byte flags
Misc flags associated with the PDO.
• byte type
Transmission type code.
• int mapCt
Number of elements in the variable map.
• int bitCt
Number of bits mapped so far.
• Pmap ∗ map [PDO_MAP_LEN]
Array of pointers to Pmap objects that describe the variables transmitted by this PDO.
• uint32 id
The CAN message ID associated with this PDO.
Friends
• class EtherCAT
5.92.2.1 AddVar()
Add the passed variable to the end of the variable map associated with this PDO.
Parameters
var The variable to be added.
Generated by Doxygen
556 Class Documentation
Returns
An error object.
5.92.2.2 ClearMap()
Returns
An error code
5.92.2.3 GetID()
Returns
5.92.2.4 GetMapCodes()
Fill the array of 32-bit ints with the PDO mapping codes used by this PDO.
Parameters
codes An array of at least PDO_MAP_LEN 32-bit ints. The mapping codes will be stored here
Generated by Doxygen
5.92 PDO Class Reference 557
Returns
5.92.2.5 GetRtrOk()
Note that this only really makes sense for transmit PDOs
Returns
5.92.2.6 GetType()
Returns
5.92.2.7 SetID()
Parameters
i The ID value.
Generated by Doxygen
558 Class Documentation
Returns
5.92.2.8 SetType()
Parameters
t Transmission type code
Returns
An error object.
5.92.3.1 map
Array of pointers to Pmap objects that describe the variables transmitted by this PDO.
The documentation for this class was generated from the following files:
• CML_PDO.h
• PDO.cpp
Generated by Doxygen
5.93 PDO_Error Class Reference 559
Error
PDO_Error
Internal
Error OK
Unknown
MapFull
PDO_Error BitOverflow
BitSizeError
Generated by Doxygen
560 Class Documentation
5.93.2.1 BitOverflow
Adding the variable to the map would cause the map to be too long (more then 64 bits).
The documentation for this class was generated from the following file:
• CML_PDO.h
Pmap
Generated by Doxygen
5.94 Pmap Class Reference 561
• Pmap ()
Default constructor for a generic PDO mapping variable.
• Pmap (uint16 index, byte sub, byte bits)
Construct a generic PDO mapping variable and initialize it's size and object ID.
• virtual ∼Pmap ()
Virtual destructor.
• virtual const Error ∗ Init (uint16 index, byte sub, byte bits)
Initialize a generic PDO mapping variable.
• virtual void Get (byte ∗cptr)
Called when a receive PDO is about to be transmitted.
• virtual void Set (byte ∗cptr)
Called when a transmit PDO is received.
• virtual uint32 GetMapCode ()
Return the 32-bit code used to identify this variable in the CANopen node's PDO mapping block.
• uint16 GetIndex ()
Get the object index associated with this variable.
• byte GetSub ()
Get the object sub-index associated with this variable.
• byte GetBits ()
Get the number of bits in this variable.
Protected Attributes
• uint16 index
The 16-bit index of the object in the object dictionary.
• byte sub
The 8-bit sub-index of the object in the object dictionary.
• byte bits
The number of bits that this object takes up.
This class can be used directly for transmit PDOs if the received data is not of interest (it will simply be discarded by the
Set() function. Using this for receive PDOs is not recommended since the Get() function doesn't add any data to the
output stream and therefore the data transmitted to the node will be undefined.
Generated by Doxygen
562 Class Documentation
5.94.2.1 Pmap()
Pmap (
uint16 index,
byte sub,
byte bits ) [inline]
Construct a generic PDO mapping variable and initialize it's size and object ID.
Generated by Doxygen
5.94 Pmap Class Reference 563
Parameters
5.94.3.1 Get()
This virtual function does nothing and therefore objects of this generic type shouldn't be used when actually transmitting
PDOs
Parameters
5.94.3.2 GetBits()
Returns
Generated by Doxygen
564 Class Documentation
5.94.3.3 GetIndex()
Returns
5.94.3.4 GetSub()
Returns
5.94.3.5 Init()
Parameters
Returns
An error object
Generated by Doxygen
5.95 Pmap16 Class Reference 565
5.94.3.6 Set()
This virtual function doesn't do anything and therefore objects of this base class should only be used for variables that
are not of interest and can therefore be ignored.
Parameters
The documentation for this class was generated from the following file:
• CML_PDO.h
This is a PDO variable mapping class that extends the virtual Pmap class to handle 16-bit integers.
Pmap
Pmap16
Generated by Doxygen
566 Class Documentation
Pmap
Pmap16
This is a PDO variable mapping class that extends the virtual Pmap class to handle 16-bit integers.
5.95.2.1 Pmap16()
Pmap16 (
uint16 index,
byte sub = 0 ) [inline]
Generated by Doxygen
5.95 Pmap16 Class Reference 567
Parameters
5.95.3.1 Get()
Copy the current value of this variable into the passed character array.
Parameters
cptr A character pointer that references a char array of at least 2 bytes. The current value of this variable will be
copied there.
5.95.3.2 Init()
Parameters
Returns
An error object
Generated by Doxygen
568 Class Documentation
5.95.3.3 Read()
Returns
5.95.3.4 Set()
Update the value of this variable based on the data passed in a character array.
This function is called when a transmit PDO that this variable is mapped to is received.
Parameters
cptr A character pointer that references a char array of at least 2 bytes. The value of this variable will be updated
with the data passed in this array.
5.95.3.5 Write()
Parameters
d The new value to write.
The documentation for this class was generated from the following file:
• CML_PDO.h
Generated by Doxygen
5.96 Pmap24 Class Reference 569
This is a PDO variable mapping class that extends the virtual Pmap class to handle 24-bit integers.
Pmap
Pmap24
Pmap
Pmap24
• Pmap24 ()
Default constructor for a 24-bit mapping object.
• Pmap24 (uint16 index, byte sub=0)
Create a new 24-bit mapping object.
• const Error ∗ Init (uint16 index, byte sub=0)
Initialize a 24-bit mapping object.
• virtual void Get (byte ∗cptr)
Copy the current value of this variable into the passed character array.
• virtual void Set (byte ∗cptr)
Generated by Doxygen
570 Class Documentation
Update the value of this variable based on the data passed in a character array.
• virtual int32 Read (void)
Read the current value of this variable.
• virtual void Write (int32 d)
Write a new value to this variable.
This is a PDO variable mapping class that extends the virtual Pmap class to handle 24-bit integers.
5.96.2.1 Pmap24()
Pmap24 (
uint16 index,
byte sub = 0 ) [inline]
Parameters
5.96.3.1 Get()
Copy the current value of this variable into the passed character array.
Generated by Doxygen
5.96 Pmap24 Class Reference 571
Parameters
cptr A character pointer that references a char array of at least 4 bytes. The current value of this variable will be
copied there.
5.96.3.2 Init()
Parameters
Returns
An error object
5.96.3.3 Read()
Returns
5.96.3.4 Set()
Update the value of this variable based on the data passed in a character array.
This function is called when a transmit PDO that this variable is mapped to is received.
Generated by Doxygen
572 Class Documentation
Parameters
cptr A character pointer that references a char array of at least 4 bytes. The value of this variable will be updated
with the data passed in this array.
5.96.3.5 Write()
Parameters
d The new value to write.
The documentation for this class was generated from the following file:
• CML_PDO.h
This is a PDO variable mapping class that extends the virtual Pmap class to handle 32-bit integers.
Pmap
Pmap32
Generated by Doxygen
5.97 Pmap32 Class Reference 573
Pmap
Pmap32
This is a PDO variable mapping class that extends the virtual Pmap class to handle 32-bit integers.
5.97.2.1 Pmap32()
Pmap32 (
uint16 index,
byte sub = 0 ) [inline]
Generated by Doxygen
574 Class Documentation
Parameters
5.97.3.1 Get()
Copy the current value of this variable into the passed character array.
Parameters
cptr A character pointer that references a char array of at least 4 bytes. The current value of this variable will be
copied there.
5.97.3.2 Init()
Parameters
Returns
An error object
Generated by Doxygen
5.97 Pmap32 Class Reference 575
5.97.3.3 Read()
Returns
5.97.3.4 Set()
Update the value of this variable based on the data passed in a character array.
This function is called when a transmit PDO that this variable is mapped to is received.
Parameters
cptr A character pointer that references a char array of at least 4 bytes. The value of this variable will be updated
with the data passed in this array.
5.97.3.5 Write()
Parameters
d The new value to write.
The documentation for this class was generated from the following file:
• CML_PDO.h
Generated by Doxygen
576 Class Documentation
This is a PDO variable mapping class that extends the virtual Pmap class to handle 8-bit integers.
Pmap
Pmap8
Pmap
Pmap8
• Pmap8 ()
Default constructor for a 8-bit mapping object.
• Pmap8 (uint16 index, byte sub=0)
Create a new 8-bit mapping object.
• const Error ∗ Init (uint16 index, byte sub=0)
Initialize a 8-bit mapping object.
• virtual void Get (byte ∗cptr)
Copy the current value of this variable into the passed character array.
• virtual void Set (byte ∗cptr)
Generated by Doxygen
5.98 Pmap8 Class Reference 577
Update the value of this variable based on the data passed in a character array.
• virtual byte Read (void)
Read the current value of this variable.
• virtual void Write (byte d)
Write a new value to this variable.
This is a PDO variable mapping class that extends the virtual Pmap class to handle 8-bit integers.
5.98.2.1 Pmap8()
Pmap8 (
uint16 index,
byte sub = 0 ) [inline]
Parameters
5.98.3.1 Get()
Copy the current value of this variable into the passed character array.
Generated by Doxygen
578 Class Documentation
Parameters
cptr A character pointer that references a char array of at least 1 bytes. The current value of this variable will be
copied there.
5.98.3.2 Init()
Parameters
Returns
An error object
5.98.3.3 Read()
Returns
5.98.3.4 Set()
Update the value of this variable based on the data passed in a character array.
This function is called when a transmit PDO that this variable is mapped to is received.
Generated by Doxygen
5.99 PmapRaw Class Reference 579
Parameters
cptr A character pointer that references a char array of at least 1 bytes. The value of this variable will be updated
with the data passed in this array.
5.98.3.5 Write()
Parameters
d The new value to write.
The documentation for this class was generated from the following file:
• CML_PDO.h
Pmap
PmapRaw
Generated by Doxygen
580 Class Documentation
Pmap
PmapRaw
5.99.2.1 PmapRaw()
PmapRaw (
uint16 index,
byte sub,
byte bits ) [inline]
Generated by Doxygen
5.99 PmapRaw Class Reference 581
Parameters
5.99.3.1 Get()
Copy the current value of this variable into the passed character array.
Parameters
cptr A character pointer that references a char array large enough to hold this objects data.
5.99.3.2 Set()
Update the value of this variable based on the data passed in a character array.
This function is called when a transmit PDO that this variable is mapped to is received.
Parameters
cptr A pointer to the received data.
• CML_PDO.h
Generated by Doxygen
582 Class Documentation
PointN
Point< N >
< CML_MAX_AMPS_PER
< PATH_MAX_DIMENSIONS >
_LINK >
Point< CML_MAX_AMPS
Point< PATH_MAX_DIMENSIONS >
_PER_LINK >
PointN
Point< N >
Generated by Doxygen
5.100 Point< N > Class Template Reference 583
template<int N>
class Point< N >
This template may be used to generate point objects for some fixed number of dimensions.
5.100.2.1 getDim()
int getDim (
void ) const [inline], [virtual]
Returns
Implements PointN.
5.100.2.2 getMax()
int getMax (
void ) const [inline], [virtual]
Returns
Implements PointN.
5.100.2.3 setDim()
void setDim (
int d ) [inline], [virtual]
Generated by Doxygen
584 Class Documentation
Parameters
d The new point dimension
Implements PointN.
The documentation for this class was generated from the following file:
• CML_Geometry.h
An N axis point.
PointN
Point< N >
< CML_MAX_AMPS_PER
< PATH_MAX_DIMENSIONS >
_LINK >
Point< CML_MAX_AMPS
Point< PATH_MAX_DIMENSIONS >
_PER_LINK >
• virtual ∼PointN ()
Virtual destructor.
• virtual int getDim (void) const =0
Get the number of dimensions of this point.
• virtual void setDim (int d)=0
Set the number of dimensions of this point.
• virtual int getMax (void) const =0
Get the max dimensions that this point can handle.
Generated by Doxygen
5.101 PointN Class Reference 585
An N axis point.
This is a pure virtual base class of the more specific Point classes.
5.101.2.1 getDim()
Returns
Implemented in Point< N >, Point< CML_MAX_AMPS_PER_LINK >, and Point< PATH_MAX_DIMENSIONS >.
5.101.2.2 getMax()
Returns
Implemented in Point< N >, Point< CML_MAX_AMPS_PER_LINK >, and Point< PATH_MAX_DIMENSIONS >.
5.101.2.3 setDim()
Generated by Doxygen
586 Class Documentation
Parameters
d The new point dimension
Implemented in Point< N >, Point< CML_MAX_AMPS_PER_LINK >, and Point< PATH_MAX_DIMENSIONS >.
The documentation for this class was generated from the following files:
• CML_Geometry.h
• Geometry.cpp
This structure holds the position loop configuration parameters specific to the Copley amplifier.
• PosLoopConfig (void)
Default constructor.
Public Attributes
• int16 kp
Proportional gain.
• int16 kvff
Velocity feed forward.
• int16 kaff
Acceleration feed forward.
• int16 ki
Integral gain.
• int16 kd
Derivative gain.
• int16 scale
Scaling factor.
• int16 xKd
cross coupling derivative gain
• int16 xKi
cross coupling integral gain
• int16 xKp
cross coupling proportional gain
• int16 kiDrain
Position loop drain value for integral sum. Set to 0 to disable.
Generated by Doxygen
5.103 ProfileConfig Struct Reference 587
This structure holds the position loop configuration parameters specific to the Copley amplifier.
The position loop is one of three servo control loops used by the amplifier to control a motor. The configuration param-
eters used by this control loop allow the servo performance to be 'tuned' for various motors and loads.
The amplifier member functions Amp::GetPosLoopConfig and Amp::SetPosLoopConfig are used to read and write this
data to the amplifier.
5.102.2.1 PosLoopConfig()
PosLoopConfig (
void ) [inline]
Default constructor.
5.102.3.1 scale
int16 scale
Scaling factor.
This is a multiplier that is applied to the output of the position loop. It's scaled up by 100, so setting the scaling factor to
1234 would multiply the output of the loop by 12.34. This parameter was added in firmware version 3.30. For any earlier
version it will default to 100 (scale by 1.0).
The documentation for this struct was generated from the following file:
• CML_AmpStruct.h
Generated by Doxygen
588 Class Documentation
• ProfileConfig (void)
Default constructor. Simply set all parameters to zero.
Public Attributes
• PROFILE_TYPE type
Type of profile to be used.
• uunit pos
For absolute moves this is an absolute position, for relative moves it's a distance to move.
• uunit vel
Velocity limit for move.
• uunit acc
Acceleration limit for move.
• uunit dec
Deceleration limit for move.
• uunit abort
Acceleration value to use when aborting a running trajectory.
• uunit jrk
Jerk limit for move.
This structure holds all the parameters related to point-to-point profile moves.
5.103.2.1 abort
uunit abort
Generated by Doxygen
5.104 ProfileConfigScurve Struct Reference 589
5.103.2.2 pos
uunit pos
For absolute moves this is an absolute position, for relative moves it's a distance to move.
The documentation for this struct was generated from the following file:
• CML_AmpStruct.h
• ProfileConfigScurve (void)
Default constructor. Simply set all parameters to zero.
Public Attributes
• uunit pos
For absolute moves this is an absolute position, for relative moves it's a distance to move.
• uunit vel
Velocity limit for move.
• uunit acc
Acceleration limit for move.
• uunit jrk
Jerk limit for move.
This structure holds all the parameters necessary to perform a s-curve (jerk limited) profile move.
Generated by Doxygen
590 Class Documentation
5.104.2.1 acc
uunit acc
5.104.2.2 jrk
uunit jrk
5.104.2.3 pos
uunit pos
For absolute moves this is an absolute position, for relative moves it's a distance to move.
5.104.2.4 vel
uunit vel
The documentation for this struct was generated from the following file:
• CML_Amp.h
• ProfileConfigTrap (void)
Default constructor. Simply set all parameters to zero.
Generated by Doxygen
5.105 ProfileConfigTrap Struct Reference 591
Public Attributes
• uunit pos
For absolute moves this is an absolute position, for relative moves it's a distance to move.
• uunit vel
Velocity limit for move.
• uunit acc
Acceleration limit for move.
• uunit dec
Deceleration limit for move.
This structure holds all the parameters necessary to perform a trapezoidal profile move.
5.105.2.1 acc
uunit acc
5.105.2.2 dec
uunit dec
Note that if this parameter is not set, then the acceleration value will be used for deceleration.
5.105.2.3 pos
uunit pos
For absolute moves this is an absolute position, for relative moves it's a distance to move.
Generated by Doxygen
592 Class Documentation
5.105.2.4 vel
uunit vel
The documentation for this struct was generated from the following file:
• CML_Amp.h
• ProfileConfigVel (void)
Default constructor. Simply set all parameters to zero.
Public Attributes
• uunit dir
Direction of motion.
• uunit vel
Velocity limit for move.
• uunit acc
Acceleration limit for move.
• uunit dec
Deceleration limit for move.
This structure holds all the parameters necessary to perform a velocity profile move.
Generated by Doxygen
5.106 ProfileConfigVel Struct Reference 593
5.106.2.1 acc
uunit acc
5.106.2.2 dec
uunit dec
5.106.2.3 dir
uunit dir
Direction of motion.
If >= 0, then move in the positive direction If < 0, then move in the negative direction.
5.106.2.4 vel
uunit vel
The documentation for this struct was generated from the following file:
• CML_Amp.h
Generated by Doxygen
594 Class Documentation
RefObj
LinkTrajectory
PvtConstAccelTrj
RefObj
LinkTrajectory
PvtConstAccelTrj
Generated by Doxygen
5.108 PvtConstAccelTrjError Class Reference 595
5.107.1.1 GetDim()
int GetDim (
void ) [virtual]
The trajectory dimension gives the number of axes defined for the trajectory. This can not change from the time Start←-
New() is called to the time Finish() is called. The position and velocity arrays passed to NextSegment will be of at least
this size.
Returns
Implements LinkTrajectory.
The documentation for this class was generated from the following files:
• CML_PvtConstAccelTrj.h
• PvtConstAccelTrj.cpp
Error
PvtConstAccelTrjError
Generated by Doxygen
596 Class Documentation
Internal
Error OK
Unknown
PositionVectorInvalidSize
PvtConstAccelTrjError
InvalidDimension
The documentation for this class was generated from the following file:
• CML_PvtConstAccelTrj.h
Generated by Doxygen
5.109 PvtSegCache Class Reference 597
• PvtSegCache ()
Default constructor. Clears the cache.
• void Clear ()
Clear the cache.
• void AddSegment (uint8 ∗seg, uint16 id, uunit p)
Add the passed segment to the cache.
• bool GetSegment (uint8 ∗seg, uint16 id)
Get the specified segment from the cache.
• bool GetPosition (uunit ∗p, uint16 id)
Get the position corresponding to the specified segment from the cache.
This is used internally by the Amp object to keep track of PVT segments recently sent. It allows the amp object to
recover if a segment is lost in transit by resending the missing segments.
5.109.2.1 AddSegment()
void AddSegment (
uint8 ∗ seg,
uint16 id,
uunit p )
Segments must be passed in order and with no gaps between ID numbers. If this segment doesn't follow those rules
then the cache will be cleared before the segment is added.
Parameters
seg Points to an array of 8 bytes which make up the segment to be added. The segment data is copied into the
cache. No copy of the pointer is kept locally.
id The ID number of the passed segment.
p The position corresponding to this segment.
Generated by Doxygen
598 Class Documentation
5.109.2.2 GetPosition()
bool GetPosition (
uunit ∗ p,
uint16 id )
Get the position corresponding to the specified segment from the cache.
Parameters
Returns
5.109.2.3 GetSegment()
bool GetSegment (
uint8 ∗ seg,
uint16 id )
If the requested segment is available, it's contents will be copied to the passed pointer.
Parameters
seg A pointer to an array of 8 bytes where the segment data will be copied on success.
id The ID number of the segment being requested
Returns
The documentation for this class was generated from the following files:
• CML_Amp.h
• AmpPVT.cpp
Generated by Doxygen
5.110 PvtTrj Class Reference 599
RefObj
LinkTrajectory
PvtTrj
RefObj
LinkTrajectory
PvtTrj
Generated by Doxygen
600 Class Documentation
5.110.1.1 GetDim()
int GetDim (
void ) [virtual]
The trajectory dimension gives the number of axes defined for the trajectory. This can not change from the time Start←-
New() is called to the time Finish() is called. The position and velocity arrays passed to NextSegment will be of at least
this size.
Returns
Implements LinkTrajectory.
The documentation for this class was generated from the following files:
• CML_PvtTrj.h
• PvtTrj.cpp
Error
PvtTrjError
Generated by Doxygen
5.112 PwmInConfig Struct Reference 601
Internal
Error OK
Unknown
PositionVectorInvalidSize
PvtTrjError VelocityVectorInvalidSize
InvalidDimension
The documentation for this class was generated from the following file:
• CML_PvtTrj.h
Generated by Doxygen
602 Class Documentation
• PwmInConfig (void)
Default constructor. Simply sets all members to zero.
Public Attributes
• int16 cfg
PWM input pin configuration.
• int32 uvCfg
PWM input UV configuration.
• int32 scale
Scaling factor.
• int16 freq
PWM input frequency.
• int16 deadBand
PWM input deadband.
These parameters are used when the amplifier is being controlled through it's PWM inputs (current or veloctiy mode), or
pulse/direction input pins (position mode). These parameters have no effect when running in standard CANopen modes
of operation.
5.112.2.1 cfg
int16 cfg
5.112.2.2 deadBand
int16 deadBand
This parameter was added to plus products starting with version 2.75. Previously (and on older products), 0x2322 was
used as a deadband value. The range of 0 to 32k equals deadband of 0% to 100%.
Generated by Doxygen
5.113 Receiver Class Reference 603
5.112.2.3 freq
int16 freq
This parameter is only used when running in UV current mode. For other PWM or step/dir input modes the PWM
frequency is automatically calculated by the amplifier and this parameter is ignored. The frequency is set 10 Hz units.
For example, setting this parameter to 100 indicates that the PWM input frequency is 1kHz.
5.112.2.4 scale
int32 scale
Scaling factor.
Units are dependent on the mode of operation: 0.01 Amp when driving current. 0.1 Encoder counts/second when driving
velocity Encoder counts (upper 16 bits) / pulses (lower 16 bits) ratio for position mode.
5.112.2.5 uvCfg
int32 uvCfg
Used to configure the drive when running in UV mode (desired state 5). See documentation
The documentation for this struct was generated from the following file:
• CML_AmpStruct.h
RefObj
Receiver
Generated by Doxygen
604 Class Documentation
RefObj
Receiver
This class allows the programmer to create routines that are run whenever a CAN frame with a specific ID is received.
To run code when a message is received, create a new class that extends Receiver. The Receiver::Init() function should
be called with the CAN message ID of the frames to be received. Whenever this new class is Enabled(), the member
function NewFrame() will be called once for every frame received with a matching ID.
5.113.2.1 ∼Receiver()
∼Receiver ( ) [virtual]
Generated by Doxygen
5.114 RefObj Class Reference 605
5.113.3.1 NewFrame()
int NewFrame (
CanFrame & frame ) [virtual]
This virtual function is called by the CANopen read thread every time a CAN frame is received over the network with an
ID matching the receivers ID if the receiver is enabled.
Note that this function is called from the CANopen receive thread. No other receive frames will be processed until this
function returns.
Also note that the map object used to associate message IDs with receive objects is locked when this function is called.
The locking is required to prevent a race condition that could occur when a receive object is disabled and it's memory is
deallocated. Since the map is locked, it's illegal to Enable() or Disable() any receive object from within this function.
Parameters
frame The CAN frame to be processed. Note that the memory holding the frame structure may be reused after
the call returns. If the frame contents are to be used after the return the a copy of the frame should be
made.
Returns
non-zero if the frame was handled, zero if the frame type was unknown.
Reimplemented in LSS.
The documentation for this class was generated from the following files:
• CML_CanOpen.h
• CanOpen.cpp
Generated by Doxygen
606 Class Documentation
CopleyCAN
IxxatCAN
IxxatCANV3
CanInterface
KvaserCAN
SiemensCAN
LinuxEcatHardware
EcatFrame
WinUdpEcatHardware
EtherCatHardware
LinkTrjScurve
Path
Linkage
PvtConstAccelTrj
LinkTrajectory
RefObj PvtTrj Amp
EtherCAT AlgOutPDO
IOModule RPDO_Ctrl
RPDO_LinkCtrl
RPDO_PvtCtrl
AlgInPDO
TPDO
DigInPDO
BlockReceiver
TPDO_HighResTime
CoTpdoInfo
Receiver TPDO_PvtStat
FirmwareUpdater
TPDO_Status
LSS
Trajectory TimeStampGenerator
TrjScurve
Generated by Doxygen
5.114 RefObj Class Reference 607
Most CML objects use the RefObj class as a base class. This class assignes an integer ID to the object which can be
used as a safer alternative to keeping a pointer to the object.
5.114.2.1 RefObj()
RefObj (
const char ∗ name = 0 )
This allocates a reference ID which will be associated with this object for as long as any references to the object exist.
This ID can be safely used to find a pointer to the object.
Generated by Doxygen
608 Class Documentation
Parameters
name An optional string that identifies the reference for debugging purposes. If a string is passed it should persist
for the entire life of the reference object.
5.114.2.2 ∼RefObj()
∼RefObj ( ) [virtual]
If this object has been locked then this function won't return until the reference has been unlocked.
uint32 GrabRef (
void )
This function increases the reference count associated with the object. The reference returned can be safely used to
lock and unlock the associated object.
For each call to GrabRef, there should be a corresponding call to RefObj::ReleaseRef to release the reference when it's
no longer needed.
Returns
bool GrabRef (
uint32 id ) [static]
This function increases the reference count associated with the object and can be used if a reference ID needs to be
copied and stored for use by another class.
For each call to GrabRef, there should be a corresponding call to RefObj::ReleaseRef to release the reference when it's
no longer needed.
Generated by Doxygen
5.114 RefObj Class Reference 609
Parameters
Returns
true if the reference count was successfully increased. False if an invalid reference ID was passed.
5.114.3.3 KillRef()
void KillRef (
void ) [protected]
This function should be called at the beginning of the destructor of any object that inherits from RefObj. It removes this
reference from the system and delays until no other threads are actively using a pointer to the referenced object.
This should be the first thing done in a destructor of any class that inherits from a RefObj, even if it inherits indirectly
from the reference. When KillRef is called, the reference class makes sure that no other thread is holding a lock on the
class. This prevents accidental object deletion while an object is still in use by another thread.
5.114.3.4 LockRef()
RefObj ∗ LockRef (
uint32 val ) [static]
Find the object associated with the passed reference number and lock it to prevent the object from being destroyed while
I'm accessing it.
The lock should only be held for a short time because it can prevent other threads from deleting the object. Call Ref←-
Obj::Unlock when finished accessing the object.
Parameters
Returns
A pointer to the referenced object if it still exists, or NULL if it's been destroyed.
Generated by Doxygen
610 Class Documentation
5.114.3.5 LogRefs()
void LogRefs (
void ) [static]
It prints out information on all references that are currently held to the cml.log file
5.114.3.6 ReleaseRef()
void ReleaseRef (
uint32 val ) [static]
Parameters
5.114.3.7 setAutoDelete()
void setAutoDelete (
bool autoDeleteEna )
This function is used to enable or disable the autodelete function for a reference object.
If automatic deletion is enabled, the object will be deleted automatically when it's reference count indicates that there
are no other objects in the system which are still holding a reference to it.
Obviously, this should only be enabled for objects that have been allocated from the heap using the new operator.
Parameters
5.114.3.8 SetRefName()
void SetRefName (
const char ∗ name )
Generated by Doxygen
5.114 RefObj Class Reference 611
Generated by Doxygen
612 Class Documentation
Parameters
name Pointer to the name. Note that a local copy of this pointer will be stored in the reference object.
The documentation for this class was generated from the following files:
• CML_Reference.h
• Reference.cpp
This is a utility class that locks a reference in it's constructor, and unlocks it in it's destructor.
• RefObjLocker (uint32 r)
Lock the passed reference.
• ∼RefObjLocker ()
Unlock the reference.
• RefClass ∗ operator-> (void)
Return a pointer to the referenced object.
• RefClass & operator∗ (void)
Return a C++ reference to the referenced object.
template<class RefClass>
class RefObjLocker< RefClass >
This is a utility class that locks a reference in it's constructor, and unlocks it in it's destructor.
It can be used to ensure that a reference is properly unlocked when a function returns.
5.115.2.1 RefObjLocker()
RefObjLocker (
uint32 r ) [inline]
Generated by Doxygen
5.116 RegenConfig Struct Reference 613
Parameters
5.115.3.1 operator∗()
RefClass& operator∗ (
void ) [inline]
Returns
5.115.3.2 operator->()
RefClass∗ operator-> (
void ) [inline]
Returns
The documentation for this class was generated from the following file:
• CML_Reference.h
Generated by Doxygen
614 Class Documentation
• RegenConfig (void)
Default constructor.
Public Attributes
The regen resister is not available on all amplifier models (currently only on the Xenus offline amplifier).
These settings may be up/download from the amplifier using the functions Amp::SetRegenConfig and Amp::GetRegen←-
Config.
5.116.2.1 RegenConfig()
RegenConfig (
void ) [inline]
Default constructor.
Generated by Doxygen
5.116 RegenConfig Struct Reference 615
5.116.3.1 contPower
uint16 contPower
This is the amount of power that the resister is able to disapate continuously
5.116.3.2 model
char model[COPLEY_MAX_STRING]
Model number / name string for regen resister connected to the amplifier.
5.116.3.3 peakPower
uint16 peakPower
This is the maximum amount of power that the resister is able to dissapate for a limited amount of time.
5.116.3.4 peakTime
uint16 peakTime
This is the amount of time that the regen resister is able to dissapate peak power before it needs to be folded back to
the continuous power limit.
5.116.3.5 vOff
uint16 vOff
When the bus voltage drops below this value, the regen resiter will be disabled.
Generated by Doxygen
616 Class Documentation
5.116.3.6 vOn
uint16 vOn
When the bus voltage rises above this value the regen resister will be enabled.
The documentation for this struct was generated from the following file:
• CML_AmpStruct.h
RefObj
PDO
RPDO
RefObj Pmap
map
PDO
RPDO
Generated by Doxygen
5.117 RPDO Class Reference 617
• RPDO ()
Default constructor.
• bool IsTxPDO (void)
Always return false for transmit PDO objects.
• RPDO (uint32 cobID)
Construct the PDO object and initialize it.
• virtual ∼RPDO ()
Virtual destructor.
• virtual const Error ∗ Init (uint32 cobID)
Initialize the PDO object.
• virtual const Error ∗ Transmit (Network &n)
Transmit this PDO over the passed network.
• int LoadData (uint8 ∗buff, int max)
Load the data from this PDO into the passed buffer.
5.117.2.1 RPDO()
RPDO (
uint32 cobID ) [inline]
Parameters
Generated by Doxygen
618 Class Documentation
5.117.3.1 Init()
Parameters
Returns
5.117.3.2 LoadData()
int LoadData (
uint8 ∗ buff,
int max )
Load the data from this PDO into the passed buffer.
Parameters
Returns
The documentation for this class was generated from the following files:
• CML_PDO.h
• PDO.cpp
Receive PDO used to update the control word of all amplifiers in the linkage.
Generated by Doxygen
5.118 RPDO_LinkCtrl Class Reference 619
RefObj
PDO
RPDO
RPDO_LinkCtrl
RefObj Pmap
map
PDO
RPDO
RPDO_LinkCtrl
Generated by Doxygen
620 Class Documentation
Receive PDO used to update the control word of all amplifiers in the linkage.
5.118.2.1 Init()
Initialize the receive PDO used to control words to each amplifier held by a linkage.
The COB ID used for this PDO is the standard ID used for RPDO 1 of the first axis.
Returns
5.118.2.2 Transmit()
Generated by Doxygen
5.119 ScurveError Class Reference 621
Parameters
Returns
The documentation for this class was generated from the following files:
• CML_Linkage.h
• Linkage.cpp
This class represents error conditions that can occur in the TrjScurve class.
Inheritance diagram for ScurveError:
Error
ScurveError
Internal
Error OK
Unknown
InUse
NoCalc
ScurveError
BadParam
NotInUse
Generated by Doxygen
622 Class Documentation
This class represents error conditions that can occur in the TrjScurve class.
The documentation for this class was generated from the following file:
• CML_TrjScurve.h
• SDO ()
Default SDO object constructor.
• const Error ∗ Init (Node ∗node, Timeout to=2000)
Initialize a CANopen Service Data Object (SDO).
• const Error ∗ Download (int16 index, int16 sub, int32 size, byte ∗data)
Download data using this SDO.
• const Error ∗ Upload (int16 index, int16 sub, int32 &size, byte ∗data)
Upload data using this SDO.
• const Error ∗ BlockDnld (int16 index, int16 sub, int32 size, byte ∗data)
Download data using this SDO.
• const Error ∗ BlockUpld (int16 index, int16 sub, int32 &size, byte ∗data)
Generated by Doxygen
5.120 SDO Class Reference 623
Generated by Doxygen
624 Class Documentation
This class represents the state of a CANopen SDO object. SDO objects are used to access the values in the object
dictionary on a node. This class handles the low level protocol details of an SDO connection.
5.120.2.1 SDO()
SDO (
void )
The SDO must be initialized by calling SDO::Init before it's actually used.
5.120.3.1 BlockDnld()
This function uses a block download protocol which makes sending large blocks of data more efficient. The data passed
to this function is downloaded to the object dictionary of the CANopen node
Generated by Doxygen
5.120 SDO Class Reference 625
Parameters
Returns
5.120.3.2 BlockUpld()
This function uses a block upload protocol which makes sending large blocks of data more efficient. The specified object
is upload from the CANopen node's object dictionary and stored in the array passed to this function.
Parameters
Returns
5.120.3.3 DisableBlkDnld()
Generated by Doxygen
626 Class Documentation
Returns
5.120.3.4 DisableBlkUpld()
Returns
Parameters
Returns
Generated by Doxygen
5.120 SDO Class Reference 627
Parameters
Returns
Parameters
Returns
Parameters
Returns
Parameters
Returns
Parameters
Returns
Generated by Doxygen
5.120 SDO Class Reference 629
5.120.3.11 DnldFlt()
Parameters
Returns
5.120.3.12 DnldString()
Parameters
Returns
Generated by Doxygen
630 Class Documentation
The passed array of data is downloaded to the object dictionary of a node on the network using this SDO.
Parameters
Returns
The passed array of data is downloaded to the object dictionary of a node on the CANopen network using this SDO.
Parameters
Generated by Doxygen
5.120 SDO Class Reference 631
Returns
5.120.3.15 EnableBlkDnld()
Returns
5.120.3.16 EnableBlkUpld()
Returns
5.120.3.17 GetMaxRetry()
uint8 GetMaxRetry (
void ) [inline]
Return the maximum number times that the SDO transfer will be attempted before returning an error.
Returns
Generated by Doxygen
632 Class Documentation
5.120.3.18 GetTimeout()
Timeout GetTimeout (
void ) [inline]
Returns
5.120.3.19 Init()
Parameters
Returns
5.120.3.20 SetTimeout()
void SetTimeout (
Timeout to ) [inline]
Parameters
to The timeout in milliseconds
Generated by Doxygen
5.120 SDO Class Reference 633
Parameters
Returns
Parameters
Returns
Generated by Doxygen
634 Class Documentation
int16 sub,
uint32 & data )
Parameters
Returns
Parameters
Returns
Generated by Doxygen
5.120 SDO Class Reference 635
Parameters
Returns
Parameters
Returns
5.120.3.27 UpldFlt()
Parameters
Returns
5.120.3.28 UpldString()
The only difference between this function and the lower level Upload function is that this function guarantees that there
will be a zero character at the end of the string.
Parameters
Returns
The value of the object is uploaded from the object dictionary of a node on the CANopen network using this SDO. The
results of the upload are stored in the passed buffer.
Parameters
Returns
The value of the object is uploaded from the object dictionary of a node on the CANopen network using this SDO. The
results of the upload are stored in the passed buffer.
Parameters
Returns
The documentation for this class was generated from the following files:
• CML_SDO.h
• SDO.cpp
Generated by Doxygen
638 Class Documentation
Error
SDO_Error
Internal
Error OK
Unknown
Transfer
Min_max
Param_low
NoAbortCode
Incompatible
SDO_Error Pdo_map
Access
Bad_scs
Timeout
Transfer_State
...
Generated by Doxygen
5.121 SDO_Error Class Reference 639
Generated by Doxygen
640 Class Documentation
The documentation for this class was generated from the following file:
• CML_SDO.h
Generated by Doxygen
5.122 Semaphore Class Reference 641
Semaphores can be used to allow multiple threads to share a pool of shared resources. Semaphores can be used like
mutexes, however they also implement timeouts and multiple resource counts.
5.122.2.1 Semaphore()
Semaphore (
int32 count = 0 )
If a count is passed, then the initial semaphore count will be initialized to that value. If no count is passed, then a count
of zero is used.
Parameters
count The initial count of the semaphore. The semaphore's Get method may be called that many times before
any thread will block on it.
5.122.2.2 ∼Semaphore()
5.122.3.1 Get()
Generated by Doxygen
642 Class Documentation
Parameters
timeout The timeout in milliseconds. Any negative value will cause the thread to wait indefinitely. If a timeout of
zero is specified, the calling thread will return a timeout error without blocking if the semaphore is not
available.
Returns
5.122.3.2 Put()
If any threads are pending on the object, then the highest priority one will be made eligible to run.
Returns
An error object
The documentation for this class was generated from the following file:
• CML_Threads.h
This structure holds configuration info about specific parts of the velocity and position loops.
Public Attributes
• int32 servoLoopConfig
Servo Loop Configuration This paramater it set up as follows: Bit 0: If set, disables the velocity loop gains.
This structure holds configuration info about specific parts of the velocity and position loops.
Generated by Doxygen
5.124 SiemensCAN Class Reference 643
5.123.2.1 servoLoopConfig
int32 servoLoopConfig
Servo Loop Configuration This paramater it set up as follows: Bit 0: If set, disables the velocity loop gains.
The velocity loop command feed forward gain is still active as are the velocity loop output filters. Bit 1: If set, this enables
the position loop I and D gains. If clear, these params are treated as zeros. Bit 2-31: Reserved for future use
The documentation for this struct was generated from the following file:
• CML_AmpStruct.h
RefObj
CanInterface
SiemensCAN
Generated by Doxygen
644 Class Documentation
RefObj
CanInterface Mutex
mutex
SiemensCAN
• SiemensCAN (void)
Construct a default CAN object.
• SiemensCAN (const char ∗port)
Construct a CAN object with a specified port name.
• virtual ∼SiemensCAN (void)
Destructor.
• const Error ∗ Open (void)
Open the CAN port.
• const Error ∗ Close (void)
Close the CAN interface.
• const Error ∗ SetBaud (int32 baud)
Set the CAN interface baud rate.
Generated by Doxygen
5.124 SiemensCAN Class Reference 645
Protected Attributes
• int open
tracks the state of the interface as open or closed.
• int32 baud
Holds a copy of the last baud rate set.
• int kvBaud
Holds a value the SiemensPCIeToCan driver uses to identify bit rate.
• int Handle_Rd
File handle used to configure and read from the CAN channel.
• int Handle_Wr
File handle used to write to the CAN channel.
This class extends the generic CanInterface class into a working interface for the SiemensPCIeToCAN can device driver.
SiemensCAN (
void )
SiemensCAN (
const char ∗ port )
The port name should be of the form CANx or KVASERx where x is the port number. The port numbers start at 0, so
the first port would be identified by the port name CAN0.
Generated by Doxygen
646 Class Documentation
Parameters
5.124.2.3 ∼SiemensCAN()
∼SiemensCAN (
void ) [virtual]
Destructor.
5.124.3.1 Close()
Returns
5.124.3.2 ConvertError()
Convert error codes defined by the Vector CAN library into the standard error codes used by the motion library.
Parameters
err The Vector style status code
Generated by Doxygen
5.124 SiemensCAN Class Reference 647
Returns
5.124.3.3 Open()
Before Open is called, the desired baud rate must have been specified by calling SetBaud, and the port name must
have been set. If the baud was not specified, it will default to 1,000,000 BPS. If the port name is not set, it will default to
CAN0.
Returns
5.124.3.4 RecvFrame()
Parameters
frame A reference to the frame object that will be filled by the read.
timeout The timeout (ms) to wait for the frame. A timeout of 0 will return immediately if no data is available. A
timeout of < 0 will wait forever.
Returns
Generated by Doxygen
648 Class Documentation
5.124.3.5 SetBaud()
Parameters
b The baud rate to set.
Returns
5.124.3.6 XmitFrame()
Parameters
Returns
The documentation for this class was generated from the following files:
• can_siemens.h
• can_siemens.cpp
Generated by Doxygen
5.125 SoftPosLimit Struct Reference 649
Public Attributes
• uunit neg
Negative limit position.
• uunit pos
Positive limit position.
• uunit accel
Software limit acceleration.
• uunit motorPosWrap
Motor position wrap value.
• uunit loadPosWrap
Load postion wrap. Same as above except for load encoder.
• uunit macroEncoderCapture
MACRO encoder caputure configuration.
This structure may be used to pass software limit switch settings to an Amp object using the functions Amp::SetSoft←-
Limits and Amp::GetSoftLimits
5.125.2.1 accel
uunit accel
This parameter defines the acceleration value that will be used to stop the motor at the software limit position. Note that
this parameter was added in amplifier firmware version 4.60. Before that version the older current based software limit
processing was used.
If this parameter is set to zero (the default) then the software limits will act like virtual limit switches. If the motor position
exceeds the limit position then the amplifier will refuse to output current in the limit direction.
Generated by Doxygen
650 Class Documentation
5.125.2.2 macroEncoderCapture
uunit macroEncoderCapture
Configures the MACRO amplifier's encoder caputure circuit. Only implemented on MACRO amplifiers.
5.125.2.3 motorPosWrap
uunit motorPosWrap
Actual motor position will wrap back to zero when this value is reached. Setting this value to zero disables thsi feature.
(Units counts). This feature is only implemented on the 8367 hardware with fimware 0.42 or later
5.125.2.4 neg
uunit neg
Any time the motors actual position is less then this value, a negative software limit condition will be in effect on the
amplifier.
5.125.2.5 pos
uunit pos
Any time the motors actual position is greater then this value, a positive software limit condition will be in effect on the
amplifier.
The documentation for this struct was generated from the following file:
• CML_AmpStruct.h
Generated by Doxygen
5.126 Thread Class Reference 651
Thread
• Thread (void)
Create a new thread.
• virtual ∼Thread ()
Clean up any allocated resources.
• const Error ∗ setPriority (int pri)
Set the thread priority.
• const Error ∗ start (void)
Make this thread eligible to run.
• const Error ∗ stop (Timeout to=1000)
Stop this thread.
• virtual void run (void)=0
When a new thread is started, this function will be called.
• void __run (void)
This is an internal function which should not be called directly.
Generated by Doxygen
652 Class Documentation
To add a new thread to a program, create a new class that is derived from Thread. The new thread of execution will start
when the start() member function is called. This new thread of execution will start with the run() member function and
will run concurrently with the rest of the system. When (if) the run method returns, the new thread will be terminated.
5.126.2.1 Thread()
Thread (
void )
The new thread will not start executing until the start member function of this class is called. The default thread priority
will be set to 5.
5.126.3.1 getTimeMS()
The value returned may be offset by a consistent, but arbitrary value. This makes it useful for checking relative times,
but not useful for absolute time calculations.
Returns
Generated by Doxygen
5.126 Thread Class Reference 653
5.126.3.2 getTimeUS()
The value returned may be offset by a consistent, but arbitrary value. This makes it useful for checking relative times,
but not useful for absolute time calculations.
Returns
5.126.3.3 run()
All of the thread specific code should be contained in this function. If the run() method ever returns, the thread will be
destroyed.
5.126.3.4 setPriority()
This function should be called before the thread is started if the default priority (5) is not acceptable.
Parameters
pri The priority for this thread to run at. The range is 0 to 9 where 0 is a very low priority task, and 9 is a critically
high priority.
Returns
Generated by Doxygen
654 Class Documentation
5.126.3.5 sleep()
Parameters
to The time to sleep, in milliseconds.
Returns
5.126.3.6 start()
The new thread will be created if possible and identified to the operating system as eligible to run. When the thread
actually starts, the run() method will be called. Note that depending on the priority of the thread and of the calling task,
the run() function may or may not be called before start() returns.
Returns
5.126.3.7 stop()
The thread will have exited by the time this function returns. If the calling thread is the thread being stopped, then this
function will not return.
Parameters
to The amount of time to wait for the thread to stop before returning an error (default 1 second).
Generated by Doxygen
5.127 ThreadError Class Reference 655
Returns
The documentation for this class was generated from the following file:
• CML_Threads.h
Error
ThreadError
Internal
Error OK
Unknown
Alloc
Timeout
Running
ThreadError
BadParam
General
Start
Generated by Doxygen
656 Class Documentation
The documentation for this class was generated from the following file:
• CML_Threads.h
RefObj
PDO
TPDO
Generated by Doxygen
5.128 TPDO Class Reference 657
RefObj Pmap
map
PDO
TPDO
• TPDO ()
Default constructor.
• bool IsTxPDO (void)
Always return true for transmit PDO objects.
• TPDO (uint32 cobID)
Calls Init() at construction time.
• virtual ∼TPDO ()
Virtual destructor.
• virtual const Error ∗ Init (uint32 cobID)
Initialize the PDO.
• virtual void SetRtrOk (int ok)
Enable or disable RTR requests for this PDO.
• virtual bool HandleRxMsg (void)
Should the network thread call Received() on this object when a message matching the PDO ID is received? Normally
this is true, but could be false if for example we are configuring a PDO to transmit from one node to another and therefore
don't care about handling it ourselves.
• virtual void Received ()
This function is called by the Network read thread when this PDO has been received.
• void ProcessData (uint8 ∗data, int ct, uint32 time)
Process data received from the network.
• virtual const Error ∗ Request (Network &net)
Send a remote request for this PDO if the network supports it.
Generated by Doxygen
658 Class Documentation
Protected Attributes
• uint32 timestamp
Timestamp of received frame if available.
5.128.2.1 HandleRxMsg()
Should the network thread call Received() on this object when a message matching the PDO ID is received? Normally
this is true, but could be false if for example we are configuring a PDO to transmit from one node to another and therefore
don't care about handling it ourselves.
Returns
5.128.2.2 ProcessData()
void ProcessData (
uint8 ∗ data,
int ct,
uint32 time )
This function is called by the network object when new data is received for this PDO. It updates the values of the
variables mapped to the PDO and calls the virtual Received() function.
Generated by Doxygen
5.129 TrackingWindows Struct Reference 659
Parameters
5.128.2.3 Received()
This function is called by the Network read thread when this PDO has been received.
5.128.2.4 SetRtrOk()
Parameters
The documentation for this class was generated from the following files:
• CML_PDO.h
• PDO.cpp
• TrackingWindows (void)
Default constructor for tracking window structure.
Generated by Doxygen
660 Class Documentation
Public Attributes
• uunit trackErr
Tracking error window.
• uunit trackWarn
Position warning window.
• uunit settlingWin
Position tracking & settling window.
• uint16 settlingTime
Position tracking & settling time (ms).
• uunit velWarnWin
Velocity warning window See Amp::SetVelocityWarnWindow for more information.
• uint16 velWarnTime
Velocity warning window time See Amp::SetVelocityWarnTime for more information.
5.129.2.1 TrackingWindows()
TrackingWindows (
void )
This simply sets all tracking window parameter default values of zero.
5.129.3.1 settlingTime
uint16 settlingTime
Generated by Doxygen
5.130 Trajectory Class Reference 661
5.129.3.2 settlingWin
uunit settlingWin
5.129.3.3 trackErr
uunit trackErr
5.129.3.4 trackWarn
uunit trackWarn
The documentation for this struct was generated from the following files:
• CML_AmpStruct.h
• AmpStruct.cpp
RefObj
Trajectory
TrjScurve
Generated by Doxygen
662 Class Documentation
RefObj
Trajectory
• virtual ∼Trajectory ()
Virtual destructor.
• virtual const Error ∗ StartNew (void)
Start a new trajectory.
• virtual void Finish (void)
Trajectory finished.
• virtual bool UseVelocityInfo (void)
This function indicates whether the velocity information returned by NextSegment should be used.
• virtual int MaximumBufferPointsToUse (void)
This function allows a trajectory object to effectively reduce the size of the amplifier's internal trajectory buffer.
• virtual const Error ∗ NextSegment (uunit &pos, uunit &vel, uint8 &time)=0
Get the next segment of position, velocity & time info.
One of the control modes supported by the Copley Controls amplifiers is called interpolated position mode. This allows
complex trajectories to be generated by the CANopen master controller, and streamed to one or more amplifiers in real
time. Each point on the trajectory contains three pieces of information; Position, Velocity, and Time until the next point.
For this reason, these trajectories are also often called PVT profiles.
The Amp object contains support for streaming a PVT trajectory down to the amplifier automatically (see Amp::Send←-
Trajectory). This virtual class provides the interface through which the trajectory data is retrieved by the Amp object.
Note that this pure virtual class provides no actual implementation code. The calculation of the trajectory points is the
responsibility of the inheriting class.
Generated by Doxygen
5.130 Trajectory Class Reference 663
5.130.2.1 Finish()
Trajectory finished.
This function is called by the Amp object when it is finished with the trajectory object and no longer holding a reference
to it. Typically, this will happen after the Trajectory::NextSegment function has returned a zero time value, although it
can also occur when some external event causes the Amp object to abort a running trajectory.
Once the Amp object calls Trajectory::Finish it will clear it's reference to the trajectory object. No further access to the
trajectory object will be made after Finish is called.
Reimplemented in TrjScurve.
5.130.2.2 MaximumBufferPointsToUse()
This function allows a trajectory object to effectively reduce the size of the amplifier's internal trajectory buffer.
Normally it's desirable to download as many points as possible to the amplifier at once. For some applicaitons however,
the trajectory information is calculated in real time and the amplifier's buffer causes unacceptable latency. For such
applications this function may be used to reduce the delay between calculating trajectory points and the amplifier's
acting on them.
Note that the amplifier requires some buffering of points in order to interpolate between them. This function should never
return a value less then 2 or a trajectory underflow will certainly occur.
Returns
The maximum number of trajectory points that should be stored in the amplifier at any time. By default this returns
a very large number which ensures that the amplifier's full buffer will be used.
5.130.2.3 NextSegment()
Note that this function will be called from the high priority CANopen receiver task. Therefore, no lengthy processing
should be done here.
Generated by Doxygen
664 Class Documentation
Parameters
pos The new position value is returned here. This parameter is specified in "user units". See
Amp::SetCountsPerUnit for details.
vel The new velocity value is returned here. This parameter is specified in "user units". See
Amp::SetCountsPerUnit for details. Note that the velocity data will be ignored if the function
UseVelocityInfo() returns false. In this case the amplifier will use linear interpolation between points.
time The segment time is returned here. This is in milliseconds and ranges from 1 to 255. If zero is returned, this
is the last frame in the profile.
Returns
An error object. If this is not Error::OK, then the segment data is assumed to be invalid.
Implemented in TrjScurve.
5.130.2.4 StartNew()
This function is called by Amp::SendTrajectory before the first call to Trajectory::NextSegment. It gives the trajectory
object a chance to return an error indicating that it isn't ready to be sent.
Returns
An error pointer if the trajectory object is not available, or NULL if it is ready to be sent.
Reimplemented in TrjScurve.
5.130.2.5 UseVelocityInfo()
This function indicates whether the velocity information returned by NextSegment should be used.
If this returns true, then the amplifier will operate in PVT mode and use cubic polynomial interpolation between trajectory
segments. If this returns false, then the velocity returned by NextSegment will be ignored, and the amplifier will run in
PT mode using linear interpolation between sets of points.
Returns
true if velocity information should be used (default), or false if velocities should be ignored.
The documentation for this class was generated from the following file:
• CML_Trajectory.h
Generated by Doxygen
5.131 TrjError Class Reference 665
Error
TrjError
Internal
Error OK
Unknown
TrjError NoneAvailable
Generated by Doxygen
666 Class Documentation
5.131.2.1 NoneAvailable
This error code may be returned from Trajectory::NextSegment to limit the amount of trajectory information uploaded to
the amplifier at one time. The Amp object will not treat this as an error condition, but will stop requesting trajectory data
until the next PVT status PDO is received.
The documentation for this class was generated from the following file:
• CML_Trajectory.h
RefObj
Trajectory
TrjScurve
Generated by Doxygen
5.132 TrjScurve Class Reference 667
RefObj
Trajectory
TrjScurve
• TrjScurve ()
S-curve trajectory default constructor.
• void SetStartPos (uunit s)
Set the trajectory starting position.
• uunit GetStartPos (void)
Return the current starting position of the trajectory.
• const Error ∗ Calculate (uunit start, uunit end, uunit vel, uunit acc, uunit dec, uunit jrk)
Calculate a new S-curve profile and also set it's starting position.
• const Error ∗ Calculate (uunit dist, uunit vel, uunit acc, uunit dec, uunit jrk)
Calculate a new S-curve profile.
• const Error ∗ StartNew (void)
Reset this object so it may be passed to an amplifier.
• void Finish (void)
Notify the trajectory object that it is no longer in use.
• const Error ∗ NextSegment (uunit &pos, uunit &vel, uint8 &time)
Get the next PVT segment for this s-curve profile.
A symmetric S-curve profile uses the same constraint for acceleration & deceleration. Asymmetric profiles use different
acceleration & deceleration values. Copley amplifiers are able to calculate symmetric profiles internally, however if
Generated by Doxygen
668 Class Documentation
asymmetric s-curve profiles are required then they must be calculate external to the amplifier, and passed to it using
PVT profile mode.
This class extends the generic Trajectory class, and provides the code necessary to calculate an asymmetric s-curve
profile. Since it extends the Trajectory object, it may be passed to the Amp::SendTrajectory function.
Internally, the s-curve profile is stored as an absolute move from some starting position. This allows the same trajectory
object to be reused for multiple moves of the same distance from different starting positions. The starting position may
be either passed to the TrjScurve::Calculate function, or set using TrjScurve::SetStartPos.
5.132.2.1 TrjScurve()
TrjScurve (
void )
This simply sets the profile to zero length with a starting position of zero.
Calculate a new S-curve profile and also set it's starting position.
Parameters
Returns
The resulting profile may then be sent to an Amp object using the Amp::SendTrajectory method.
Note, all profile parameters are passed in 'user units'. See the documentation for Amp::SetCountsPerUnit for details.
Note also that this function calculates the profile as an absolute move from the starting position that is set using Trj←-
Scurve::SetStartPos. The same profile may be used multiple times with different starting positions without calling the
TrjScurve::Calculate function again.
Parameters
dist The distance to move.
maxVel The maximum allowable velocity for the move.
maxAcc The maximum allowable acceleration for the move.
maxDec The maximum allowable deceleration for the move.
maxJrk The maximum jerk (rate of change of acceleration) for the move.
Returns
The distance will always be met exactly. This may be either positive or negative.
The velocity, acceleration, deceleration and jerk values are constraints and won't be exceeded. These must all be
positive numbers greater than zero.
5.132.3.3 GetStartPos()
uunit GetStartPos (
void )
The starting position will either be the value set using TrjScurve::SetStartPos, or the value set using TrjScurve::Calculate.
If neither has been called since construction, then the starting position will be zero.
Generated by Doxygen
670 Class Documentation
Returns
5.132.3.4 SetStartPos()
void SetStartPos (
uunit s )
S-curve profiles are internally stored as absolute moves of some length. This allows them to be used multiple times with
different starting positions.
This function may be used to update the starting position of the trajectory.
Parameters
s The new starting position
5.132.3.5 StartNew()
This will return an error if the trajectory has not yet been calculated, or if it is currently being sent to another amp.
Returns
The documentation for this class was generated from the following files:
• CML_TrjScurve.h
• TrjScurve.cpp
Generated by Doxygen
5.133 UstepConfig Struct Reference 671
• UstepConfig (void)
Default constructor.
Public Attributes
• uint32 maxVelAdj
Maximum Velocity adjustment.
• uint16 ustepPGainOutLoop
Propertional Gain for stepper outer loop.
• int16 detentCorrectionGain
Detent correction Gain factor.
• uint16 ustepConfigAndStatus
Stepper config and status Bit mapped as follows (Bit 0 Use the encoder input for phase compensation if enabled.
These settings may be up/download from the amplifier using the functions Amp::SetUstepConfig and Amp::GetUstep←-
Config.
5.133.2.1 UstepConfig()
UstepConfig (
void ) [inline]
Default constructor.
Generated by Doxygen
672 Class Documentation
5.133.3.1 maxVelAdj
uint32 maxVelAdj
This is the maximum velocity adjustment made by the stepper outer position loop when enbled. This parameter is only
used when the stepper outer loop ios engaged. ( when bit 1 of ustepConfig ustepConfigAndStatus is set)
5.133.3.2 ustepConfigAndStatus
uint16 ustepConfigAndStatus
Stepper config and status Bit mapped as follows (Bit 0 Use the encoder input for phase compensation if enabled.
Pure stepper if disabled (Bit 1 Use encoder outer loop to adjust the stepper position based on position error. When this
bit is set, the gain value maximum velocity adjustment is multiplied by the position error, and the result is a velocity that
is added to the microstepping position bits 2 - 15 reserved
5.133.3.3 ustepPGainOutLoop
uint16 ustepPGainOutLoop
This parameter gives the gain used for calculating a velocity adjustment based on position error. This parameter is only
used when stepper outer loop is engaged ( when bit 1 of ustepConfig ustepConfigAndStatus is set)
The documentation for this struct was generated from the following file:
• CML_AmpStruct.h
This structure holds the velocity loop configuration parameters specific to the Copley amplifier.
• VelLoopConfig (void)
Default constructor.
Generated by Doxygen
5.134 VelLoopConfig Struct Reference 673
Public Attributes
• int16 kp
Proportional gain.
• int16 ki
Integral gain.
• int16 kaff
Acceleration feed forward.
• int16 velCmdff
Velocity loop command feed forward The input command (after limiting) to the velocity loop is scaled by this value and
added to the output of the velocity loop.
• int16 shift
Output shift value.
• int16 viDrain
Velocity loop drain value for integral sum. Set to 0 to disable.
• uunit maxVel
Maximum allowed velocity.
• uunit maxAcc
Maximum allowed acceleration.
• uunit maxDec
Maximum allowed deceleration This value limits the rate of change of the velocity command input to the velocity loop.
• uunit estopDec
Deceleration used for emergency stop When the position loop is driving the velocity loop this value is only used for tracking
error conditions.
This structure holds the velocity loop configuration parameters specific to the Copley amplifier.
The velocity loop is one of three servo control loops used by the amplifier to control a motor. The configuration parame-
ters used by this control loop allow the servo performance to be 'tuned' for various motors and loads.
The amplifier member functions Amp::GetVelLoopConfig and Amp::SetVelLoopConfig are used to read and write this
data to the amplifier.
5.134.2.1 VelLoopConfig()
VelLoopConfig (
void ) [inline]
Default constructor.
Generated by Doxygen
674 Class Documentation
5.134.3.1 estopDec
uunit estopDec
Deceleration used for emergency stop When the position loop is driving the velocity loop this value is only used for
tracking error conditions.
If a tracking error occurs, the velocity loop takes over control and drives to zero velocity using this deceleration value.
5.134.3.2 maxAcc
uunit maxAcc
This value limits the rate of change of the velocity command input to the velocity loop. It is used when the magnitude of
the command is increasing.
Note that the acceleration & deceleration limits are NOT used when the position loop is driving the velocity loop.
5.134.3.3 maxDec
uunit maxDec
Maximum allowed deceleration This value limits the rate of change of the velocity command input to the velocity loop.
Note that the acceleration & deceleration limits are not used when the position loop is driving the velocity loop.
Generated by Doxygen
5.135 WinUdpEcatHardware Class Reference 675
5.134.3.4 maxVel
uunit maxVel
5.134.3.5 shift
int16 shift
5.134.3.6 velCmdff
int16 velCmdff
Velocity loop command feed forward The input command (after limiting) to the velocity loop is scaled by this value and
added to the output of the velocity loop.
The documentation for this struct was generated from the following file:
• CML_AmpStruct.h
RefObj
EtherCatHardware
WinUdpEcatHardware
Generated by Doxygen
676 Class Documentation
RefObj
EtherCatHardware
WinUdpEcatHardware
Windows doesn't allow raw Ethernet packets to be sent, so this class packages the EtherCAT packets into a UDP
wrapper.
Generated by Doxygen
5.135 WinUdpEcatHardware Class Reference 677
5.135.2.1 WinUdpEcatHardware()
WinUdpEcatHardware (
const char ∗ name = 0 )
This is the only type of EtherCAT interface that can be used under Windows without installing special drivers.
The low level EtherCAT protocol normally does not use an IP address, however since this driver transmits EtherCAT
packets over UDP/IP, the Ethernet interface used with this driver must have a valid IP address assigned. In addition, the
network mask associated with the Ethernet interface should be defined in such a way that no other network interface on
the same PC is a member of the same network. That is, if multiple interfaces are installed then they should be allocated
to seperate networks.
i.e. ( IP1 & mask1 ) != (IP2 & mask2) where IP1 and mask1 are the IP address and net mask of the first interface, and
IP2 and mask2 are for the second interface.
For example, the following two interfaces are on different networks: IP: 192.168.1.1 mask: 255.255.255.0 IP: 192.←-
168.2.1 mask: 255.255.255.0
but the following two interfaces are on the same network: IP: 192.168.1.1 mask: 255.255.255.0 IP: 192.168.1.2 mask:
255.255.255.0
This is important because this drive has no direct control of which interface the packets are being sent out. This is
entirely controlled by the upper layer routing algorithms in the windows network stack.
The name parameter passed to this function can be used to identify which interface this object should bind to. It can
take any of the following forms:
• If not specified, then the first valid interface found will be used. This is useful if there's only one interface on the
PC.
• If of the form; eth0, eth1, eth2, etc, then the nth valid interface will be used.
• For more control, the IP address of the desired interface can be passed. This should be sent as a string in dotted
decimal notation. For example: "192.168.1.1"
Parameters
The documentation for this class was generated from the following files:
• ecat_winudp.h
• ecat_winudp.cpp
Generated by Doxygen
678 Class Documentation
Generated by Doxygen
Chapter 6
File Documentation
This file provides most of the implementation for the Copley Amplifier object.
Amp.cpp
CML.h
CML_Network.h CML_EventMap.h
CML_Can.h CML_Geometry.h
CML_Reference.h CML_Trajectory.h
CML_Threads.h CML_Firmware.h
CML_Error.h CML_Array.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
This file provides most of the implementation for the Copley Amplifier object.
Since the Amp object is large and complex, it's member functions have been split into several files:
• AmpParam.cpp: Holds functions used to upload and download various blocks of amplifier parameters.
• AmpPDO.cpp: Contains functions used to implement the various PDO objects used in conjunction with the Amp
object.
680 File Documentation
This file contains code used to read CME-2 .ccx and .ccd amplifier files.
AmpFile.cpp
CML.h
CML_Network.h CML_EventMap.h
CML_Can.h CML_Geometry.h
CML_Reference.h CML_Trajectory.h
CML_Threads.h CML_Firmware.h
CML_Error.h CML_Array.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
Functions
• const Error ∗ WriteCCDToEcatDrive (const char ∗name, EtherCAT &net, Amp &)
Reads the ccd file from the drive using File Access over EtherCAT and creates a file.
• const Error ∗ WriteCCDToCANDrive (const char ∗name, CanOpen &net, Amp &)
Writes the ccd file to the drive using serial binary over CANopen.
• long GetCCDFileSize (FILE ∗fp)
Gets the file size.
This file contains code used to read CME-2 .ccx and .ccd amplifier files.
6.2.2.1 GetCCDFileSize()
long GetCCDFileSize (
FILE ∗ fp )
Generated by Doxygen
6.2 AmpFile.cpp File Reference 681
Parameters
Returns
6.2.2.2 WriteCCDToCANDrive()
Writes the ccd file to the drive using serial binary over CANopen.
Parameters
Returns
6.2.2.3 WriteCCDToEcatDrive()
Reads the ccd file from the drive using File Access over EtherCAT and creates a file.
Parameters
Generated by Doxygen
682 File Documentation
Returns
This file contains code used to update an amplifier's firmware over the CANopen network.
AmpFW.cpp
CML.h
CML_Network.h CML_EventMap.h
CML_Can.h CML_Geometry.h
CML_Reference.h CML_Trajectory.h
CML_Threads.h CML_Firmware.h
CML_Error.h CML_Array.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
This file contains code used to update an amplifier's firmware over the CANopen network.
The firmware update protocol is a non-standard protocol which uses CAN messages with the same IDs as the node's
CANopen SDO protocol. These message IDs were used because they are fixed for a given node ID.
This file contains the AMP object methods used to upload / download various amplifier parameters.
AmpParam.cpp
CML.h
CML_Network.h CML_EventMap.h
CML_Can.h CML_Geometry.h
CML_Reference.h CML_Trajectory.h
CML_Threads.h CML_Firmware.h
CML_Error.h CML_Array.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
Generated by Doxygen
6.5 AmpPDO.cpp File Reference 683
This file contains the AMP object methods used to upload / download various amplifier parameters.
This file contains code that implements PDO objects used by the Copley Controls amplifier object.
AmpPDO.cpp
CML.h
CML_Network.h CML_EventMap.h
CML_Can.h CML_Geometry.h
CML_Reference.h CML_Trajectory.h
CML_Threads.h CML_Firmware.h
CML_Error.h CML_Array.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
Macros
• #define MAX_PENDING_PVT_STATUS 50
This thread is used to handle the PVT status updates for all amps.
This file contains code that implements PDO objects used by the Copley Controls amplifier object.
6.5.2.1 MAX_PENDING_PVT_STATUS
#define MAX_PENDING_PVT_STATUS 50
This thread is used to handle the PVT status updates for all amps.
A separate thread is necessary, because EtherCAT drives need to send SDOs when handling PVT status updates, and
SDOs can't be used from within the context of the network read thread.
Generated by Doxygen
684 File Documentation
This file contains the code used by the Amp object to stream PVT trajectory profiles over the CANopen network.
AmpPVT.cpp
CML.h
CML_Network.h CML_EventMap.h
CML_Can.h CML_Geometry.h
CML_Reference.h CML_Trajectory.h
CML_Threads.h CML_Firmware.h
CML_Error.h CML_Array.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
This file contains the code used by the Amp object to stream PVT trajectory profiles over the CANopen network.
This file contains the AMP object methods used to upload / download structures containing groups of amplifier parame-
ters.
AmpStruct.cpp
CML.h
CML_Network.h CML_EventMap.h
CML_Can.h CML_Geometry.h
CML_Reference.h CML_Trajectory.h
CML_Threads.h CML_Firmware.h
CML_Error.h CML_Array.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
This file contains the AMP object methods used to upload / download structures containing groups of amplifier parame-
ters.
Generated by Doxygen
6.8 AmpUnits.cpp File Reference 685
This file contains the AMP object methods used to handle unit conversions.
AmpUnits.cpp
CML.h
CML_Network.h CML_EventMap.h
CML_Can.h CML_Geometry.h
CML_Reference.h CML_Trajectory.h
CML_Threads.h CML_Firmware.h
CML_Error.h CML_Array.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
This file contains the AMP object methods used to handle unit conversions.
This file contains some rules used by the Amp object to determine if certain features are supported by the amplifier
based on it's model number and firmware version number.
AmpVersion.cpp
CML.h
CML_Network.h CML_EventMap.h
CML_Can.h CML_Geometry.h
CML_Reference.h CML_Trajectory.h
CML_Threads.h CML_Firmware.h
CML_Error.h CML_Array.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
This file contains some rules used by the Amp object to determine if certain features are supported by the amplifier
based on it's model number and firmware version number.
Generated by Doxygen
686 File Documentation
This file handles the initialization of the static variables (error codes) used by the CanError and CanInterface classes.
Can.cpp
CML.h
CML_Network.h CML_EventMap.h
CML_Can.h CML_Geometry.h
CML_Reference.h CML_Trajectory.h
CML_Threads.h CML_Firmware.h
CML_Error.h CML_Array.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
This file handles the initialization of the static variables (error codes) used by the CanError and CanInterface classes.
Generated by Doxygen
6.11 can_copley.h File Reference 687
can_copley.h
CML_Can.h
CML_Reference.h
CML_Threads.h
CML_Error.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
Classes
• class CopleyCAN
This class extends the generic CanInterface class into a working interface for the Copley can device driver.
Generated by Doxygen
688 File Documentation
can_ixxat.h
CML_can.h CML_Threads.h
CML_Error.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
Classes
• class IxxatCAN
Ixxat specific CAN interface.
Macros
• #define IXXAT_RX_QUEUE_SZ 50
This gives the size of the CAN message receive queue used for Ixxat cards.
Generated by Doxygen
6.13 can_ixxat_v3.h File Reference 689
can_ixxat_v3.h
CML_can.h CML_Threads.h
CML_Error.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
Classes
• class IxxatCANV3
Ixxat specific CAN interface.
Generated by Doxygen
690 File Documentation
Macros
• #define IXXAT_RX_QUEUE_SZ 50
This gives the size of the CAN message receive queue used for Ixxat cards.
Generated by Doxygen
6.14 can_kvaser.h File Reference 691
can_kvaser.h
CML_Can.h
CML_Reference.h
CML_Threads.h
CML_Error.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
Classes
• class KvaserCAN
Kvaser specific CAN interface.
Generated by Doxygen
692 File Documentation
can_siemens.h
Classes
• class SiemensCAN
SiemensPCIeToCAN specific CAN interface.
This file holds code for the top level CANopen class.
CanOpen.cpp
CML.h
CML_Network.h CML_EventMap.h
CML_Can.h CML_Geometry.h
CML_Reference.h CML_Trajectory.h
CML_Threads.h CML_Firmware.h
CML_Error.h CML_Array.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
Generated by Doxygen
6.17 CML.cpp File Reference 693
This file holds code for the top level CANopen class.
This class is used for over all control of the CANopen network.
CML.cpp
CML.h
CML_Network.h CML_EventMap.h
CML_Can.h CML_Geometry.h
CML_Reference.h CML_Trajectory.h
CML_Threads.h CML_Firmware.h
CML_Error.h CML_Array.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
Variables
• CopleyMotionLibrary cml
Global CML object.
This file contains the code used to implement the global CML object.
Generated by Doxygen
694 File Documentation
CML.h
CML_Network.h CML_EventMap.h
CML_Can.h CML_Geometry.h
CML_Reference.h CML_Trajectory.h
CML_Threads.h CML_Firmware.h
CML_Error.h CML_Array.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
This graph shows which files directly or indirectly include this file:
CML.h
CML_PvtConstAccelTrj.h CML_PvtTrj.h Amp.cpp AmpFile.cpp AmpFW.cpp AmpParam.cpp AmpPDO.cpp AmpPVT.cpp AmpStruct.cpp AmpUnits.cpp AmpVersion.cpp Can.cpp CanOpen.cpp CML.cpp CopleyIO.cpp CopleyNode.cpp ecatdc.cpp Error.cpp EtherCAT.cpp EventMap.cpp File.cpp Filter.cpp Geometry.cpp InputShaper.cpp IOmodule.cpp Linkage.cpp Node.cpp PDO.cpp Reference.cpp SDO.cpp
PvtConstAccelTrj.cpp PvtTrj.cpp
Classes
• class CopleyMotionLibrary
Copley Motion Libraries utility object.
Enumerations
• enum CML_LOG_LEVEL {
LOG_NONE = 0,
LOG_ERRORS = 1,
LOG_WARNINGS = 2,
LOG_DEBUG = 3,
LOG_FILT_CAN = 5,
LOG_CAN = 6,
LOG_EVERYTHING = 99 }
Copley Motion Libraries debug logging level.
Variables
• CopleyMotionLibrary cml
Global CML object.
Generated by Doxygen
6.19 CML_Amp.h File Reference 695
This file serves two purposes; it includes all the other CML header files and it defines the CML object. The CML object
contains a number of utility methods dealing with the library as a whole.
6.18.2.1 CML_LOG_LEVEL
enum CML_LOG_LEVEL
The CML libraries may be configured to generate a log file for use in debugging system problems. This feature is turned
off by default, but may be enabled by calling the method CopleyMotionLibrary::SetDebugLevel of the global cml object.
cml.SetDebugLevel( LOG_EVERYTHING );
This enumeration gives the logging levels that may be passed to the SetDebugLevel function. Debug logging levels are
cumulative, so enabling a high level of logging will cause all messages that would have been logged at a lower level to
be written to the log as well. For example, setting the log level to LOG_DEBUG will cause all debug messages to be
written to the log, as well as all warnings and errors.
Enumerator
Generated by Doxygen
696 File Documentation
CML_Amp.h
CML_AmpStruct.h CML_Copley.h
CML_Network.h
CML_AmpDef.h CML_Can.h
CML_Reference.h CML_EventMap.h
CML_Error.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
This graph shows which files directly or indirectly include this file:
CML_Amp.h
CML_Linkage.h
CML.h
CML_PvtConstAccelTrj.h CML_PvtTrj.h Amp.cpp AmpFile.cpp AmpFW.cpp AmpParam.cpp AmpPDO.cpp AmpPVT.cpp AmpStruct.cpp AmpUnits.cpp AmpVersion.cpp Can.cpp CanOpen.cpp CML.cpp CopleyIO.cpp CopleyNode.cpp ecatdc.cpp Error.cpp EtherCAT.cpp EventMap.cpp File.cpp Filter.cpp Geometry.cpp InputShaper.cpp IOmodule.cpp Linkage.cpp Node.cpp PDO.cpp Reference.cpp SDO.cpp
PvtConstAccelTrj.cpp PvtTrj.cpp
Classes
• class AmpError
This class represents error conditions that can occur in the Copley Amplifier object.
• class AmpFault
This class represents latching amplifier fault conditions.
• class AmpSettings
Copley amplifier settings object.
• class PvtSegCache
PVT trajectory segment cache object.
• struct ProfileConfigTrap
Trapezoidal profile parameters.
• struct ProfileConfigScurve
S-curve profile parameters.
• struct ProfileConfigVel
Velocity profile parameters.
• class Amp
Copley Controls amplifier object.
This object may be used to interface to an amplifier over the CANopen network.
Generated by Doxygen
6.20 CML_AmpDef.h File Reference 697
CML_AmpDef.h
CML_Settings.h
assert.h
This graph shows which files directly or indirectly include this file:
CML_AmpDef.h
CML_Amp.h
CML_Linkage.h CML_File.h
CML.h
AmpFW.cpp CML_PvtTrj.h Amp.cpp AmpFile.cpp AmpParam.cpp AmpPDO.cpp AmpPVT.cpp AmpStruct.cpp AmpUnits.cpp AmpVersion.cpp Can.cpp CanOpen.cpp CML.cpp CopleyIO.cpp CopleyNode.cpp ecatdc.cpp Error.cpp EtherCAT.cpp EventMap.cpp File.cpp Filter.cpp Geometry.cpp InputShaper.cpp IOmodule.cpp Linkage.cpp Node.cpp PDO.cpp Reference.cpp SDO.cpp CML_PvtConstAccelTrj.h
PvtTrj.cpp PvtConstAccelTrj.cpp
Enumerations
• enum AMP_OBJID
This enumeration holds the object identifiers of all of the objects in the amplifier's object dictionary.
• enum INPUT_PIN_CONFIG {
INCFG_NONE = 0x0000,
INCFG_RESET_R = 0x0002,
INCFG_RESET_F = 0x0003,
INCFG_POSLIM_H = 0x0004,
INCFG_POSLIM_L = 0x0005,
INCFG_NEGLIM_H = 0x0006,
INCFG_NEGLIM_L = 0x0007,
INCFG_MOTOR_TEMP_H = 0x0008,
INCFG_MOTOR_TEMP_L = 0x0009,
INCFG_CLR_FAULTS_H = 0x000A,
INCFG_CLR_FAULTS_L = 0x000B,
INCFG_RESET_DISABLE_R = 0x000C,
INCFG_RESET_DISABLE_F = 0x000D,
INCFG_HOME_H = 0x000E,
Generated by Doxygen
698 File Documentation
INCFG_HOME_L = 0x000F,
INCFG_DISABLE_H = 0x0010,
INCFG_DISABLE_L = 0x0011,
INCFG_PWM_SYNC_H = 0x0013,
INCFG_MOTION_ABORT_H = 0x0014,
INCFG_MOTION_ABORT_L = 0x0015,
INCFG_SCALE_ADC_H = 0x0016,
INCFG_SCALE_ADC_L = 0x0017,
INCFG_HIGHSPEED_CAPTURE_R = 0x0018,
INCFG_HIGHSPEED_CAPTURE_F = 0x0019,
INCFG_COUNT_EDGES_R = 0x001A,
INCFG_COUNT_EDGES_F = 0x001B,
INCFG_ENCODER_FAULT_H = 0x001C,
INCFG_ENCODER_FAULT_L = 0x001D,
INCFG_ABORT_WINDOW_R = 0x0024,
INCFG_ABORT_WINDOW_F = 0x0025,
INCFG_HV_LOSS_DISABLE_H = 0x0026,
INCFG_HV_LOSS_DISABLE_L = 0x0027,
INCFG_TRJ_UPDATE_R = 0x0028,
INCFG_TRJ_UPDATE_F = 0x0029,
INCFG_CLR_FAULTS_EVENTS_R = 0x002A,
INCFG_CLR_FAULTS_EVENTS_F = 0x002B,
INCFG_DIS_SIM_ENC_L_BURST_R = 0x002C,
INCFG_DIS_SIM_ENC_H_BURST_F = 0x002D }
Input pin configuration settings.
• enum OUTPUT_PIN_CONFIG {
OUTCFG_EVENT_STATUS_L = 0x0000,
OUTCFG_EVENT_STATUS_H = 0x0100,
OUTCFG_EVENT_LATCH_L = 0x0001,
OUTCFG_EVENT_LATCH_H = 0x0101,
OUTCFG_MANUAL_L = 0x0002,
OUTCFG_MANUAL_H = 0x0102,
OUTCFG_TRJ_STATUS = 0x0003,
OUTCFG_POSITION_WINDOW = 0x0004,
OUTCFG_POSITION_TRIG_LOW2HIGH = 0x0005,
OUTCFG_POSITION_TRIG_HIGH2LOW = 0x0006,
OUTCFG_POSITION_TRIG = 0x0007,
OUTCFG_POSITION_TRIG_LIST = 0x0009,
OUTCFG_SYNC_OUTPUT = 0x0200,
OUTCFG_ACTIVE_HIGH = 0x0100 }
Output pin configuration settings.
• enum AMP_MODE {
AMPMODE_CAN_PROFILE = 0x0001,
AMPMODE_CAN_VELOCITY = 0x0003,
AMPMODE_CAN_TORQUE = 0x0004,
AMPMODE_CAN_HOMING = 0x0006,
AMPMODE_CAN_PVT = 0x0007,
AMPMODE_CAN_SERVO = 0x1E00,
AMPMODE_CAN_USTEP = 0x2800,
AMPMODE_DISABLED = 0x0000,
AMPMODE_PROG_CRNT = 0x0100,
AMPMODE_AIN_CRNT = 0x0200,
AMPMODE_DIN_CRNT = 0x0300,
AMPMODE_FGEN_CRNT = 0x0400,
Generated by Doxygen
6.20 CML_AmpDef.h File Reference 699
AMPMODE_PROG_VEL = 0x0B00,
AMPMODE_AIN_VEL = 0x0C00,
AMPMODE_DIN_VEL = 0x0D00,
AMPMODE_FGEN_VEL = 0x0E00,
AMPMODE_DIN_POS = 0x1700,
AMPMODE_FGEN_POS = 0x1800,
AMPMODE_CAM_POS = 0x1900,
AMPMODE_DIN_USTEP = 0x2100,
AMPMODE_FGEN_USTEP = 0x2200,
AMPMODE_DIAG_USTEP = 0x2A00 }
This enumeration is used to specify the mode of operation of the amplifier.
• enum EVENT_STATUS {
ESTAT_SHORT_CRCT = 0x00000001,
ESTAT_AMP_TEMP = 0x00000002,
ESTAT_OVER_VOLT = 0x00000004,
ESTAT_UNDER_VOLT = 0x00000008,
ESTAT_MTR_TEMP = 0x00000010,
ESTAT_ENCODER_PWR = 0x00000020,
ESTAT_PHASE_ERR = 0x00000040,
ESTAT_CRNT_LIM = 0x00000080,
ESTAT_VOLT_LIM = 0x00000100,
ESTAT_POSLIM = 0x00000200,
ESTAT_NEGLIM = 0x00000400,
ESTAT_DISABLE_INPUT = 0x00000800,
ESTAT_SOFT_DISABLE = 0x00001000,
ESTAT_STOP = 0x00002000,
ESTAT_BRAKE = 0x00004000,
ESTAT_PWM_DISABLE = 0x00008000,
ESTAT_SOFTLIM_POS = 0x00010000,
ESTAT_SOFTLIM_NEG = 0x00020000,
ESTAT_TRK_ERR = 0x00040000,
ESTAT_TRK_WARN = 0x00080000,
ESTAT_RESET = 0x00100000,
ESTAT_POSWRAP = 0x00200000,
ESTAT_FAULT = 0x00400000,
ESTAT_VEL_LIMIT = 0x00800000,
ESTAT_ACC_LIMIT = 0x01000000,
ESTAT_TRK_WIN = 0x02000000,
ESTAT_HOME = 0x04000000,
ESTAT_MOVING = 0x08000000,
ESTAT_VEL_WIN = 0x10000000,
ESTAT_PHASE_INIT = 0x20000000,
ESTAT_CMD_INPUT = 0x40000000 }
Amplifier event status word bit definitions.
• enum AMP_EVENT {
AMPEVENT_MOVEDONE = 0x00000001,
AMPEVENT_TRJDONE = 0x00000002,
AMPEVENT_NODEGUARD = 0x00000004,
AMPEVENT_SPACK = 0x00000008,
AMPEVENT_FAULT = 0x00000010,
AMPEVENT_ERROR = 0x00000020,
AMPEVENT_POSWARN = 0x00000040,
AMPEVENT_POSWIN = 0x00000080,
AMPEVENT_VELWIN = 0x00000100,
Generated by Doxygen
700 File Documentation
AMPEVENT_DISABLED = 0x00000200,
AMPEVENT_POSLIM = 0x00000400,
AMPEVENT_NEGLIM = 0x00000800,
AMPEVENT_SOFTLIM_POS = 0x00001000,
AMPEVENT_SOFTLIM_NEG = 0x00002000,
AMPEVENT_QUICKSTOP = 0x00004000,
AMPEVENT_ABORT = 0x00008000,
AMPEVENT_SOFTDISABLE = 0x00010000,
AMPEVENT_HOME_CAPTURE = 0x00020000,
AMPEVENT_PVT_EMPTY = 0x00040000,
AMPEVENT_PHASE_INIT = 0x00080000,
AMPEVENT_TRSTP = 0x00100000,
AMPEVENT_NOT_INIT = 0x80000000 }
Amplifier events.
• enum AMP_FAULT {
FAULT_DATAFLASH = 0x0001,
FAULT_ADCOFFSET = 0x0002,
FAULT_SHORT_CRCT = 0x0004,
FAULT_AMP_TEMP = 0x0008,
FAULT_MTR_TEMP = 0x0010,
FAULT_OVER_VOLT = 0x0020,
FAULT_UNDER_VOLT = 0x0040,
FAULT_ENCODER_PWR = 0x0080,
FAULT_PHASE_ERR = 0x0100,
FAULT_TRK_ERR = 0x0200,
FAULT_I2T_ERR = 0x0400 }
Latching Amplifier faults conditions.
• enum HALT_MODE {
HALT_DISABLE = 0,
HALT_DECEL = 1,
HALT_QUICKSTOP = 2,
HALT_ABRUPT = 3 }
The amplifier's halt mode defines it's action when a halt command is issued (Amp::HaltMove).
• enum QUICK_STOP_MODE {
QSTOP_DISABLE = 0,
QSTOP_DECEL = 1,
QSTOP_QUICKSTOP = 2,
QSTOP_ABRUPT = 3,
QSTOP_DECEL_HOLD = 5,
QSTOP_QUICKSTOP_HOLD = 6,
QSTOP_ABRUPT_HOLD = 7 }
The amplifier's quick stop mode defines it's action when a quick stop command is issued (Amp::QuickStop).
• enum COPLEY_HOME_METHOD {
CHM_NLIM_ONDX = 1,
CHM_PLIM_ONDX = 2,
CHM_PHOME_ONDX = 3,
CHM_PHOME_INDX = 4,
CHM_NHOME_ONDX = 5,
CHM_NHOME_INDX = 6,
CHM_LHOME_ONDX_POS = 7,
CHM_LHOME_INDX_POS = 8,
CHM_UHOME_INDX_POS = 9,
CHM_UHOME_ONDX_POS = 10,
Generated by Doxygen
6.20 CML_AmpDef.h File Reference 701
CHM_UHOME_ONDX_NEG = 11,
CHM_UHOME_INDX_NEG = 12,
CHM_LHOME_INDX_NEG = 13,
CHM_LHOME_ONDX_NEG = 14,
CHM_NLIM = 17,
CHM_PLIM = 18,
CHM_PHOME = 19,
CHM_NHOME = 21,
CHM_LHOME_POS = 23,
CHM_UHOME_POS = 25,
CHM_UHOME_NEG = 27,
CHM_LHOME_NEG = 29,
CHM_NDX_NEG = 33,
CHM_NDX_POS = 34,
CHM_NONE = 35,
CHM_HARDSTOP_POS = 255,
CHM_HARDSTOP_NEG = 254,
CHM_HARDSTOP_ONDX_POS = 253,
CHM_HARDSTOP_ONDX_NEG = 252,
CHM_EXTENDED = 128 }
Home methods supported by the Copley amplifier.
• enum PROFILE_TYPE {
PROFILE_VEL = -1,
PROFILE_TRAP = 0,
PROFILE_SCURVE = 3 }
Point to point profile types.
• enum AMP_PHASE_MODE {
PHASE_MODE_ENCODER = 0,
PHASE_MODE_TRAP = 1,
PHASE_MODE_NOADJUST = 2,
PHASE_MODE_AHALL90 = 3,
PHASE_MODE_BRUSHED = 4,
PHASE_MODE_NOHALL = 5,
PHASE_MODE_ENCPHASE = 6,
PHASE_MODE_TRAPINTERP = 7 }
Amplifier phasing mode.
• enum AMP_PWM_MODE {
PWM_MODE_STANDARD = 0x0000,
PWM_MODE_FORCECLAMP = 0x0001,
PWM_MODE_AUTOCLAMP = 0x0002,
PWM_MODE_HEXLIMIT = 0x0010 }
Amplifier PWM output mode.
• enum AMP_TRACE_VAR {
TRACEVAR_HIGH_VOLT = 6,
TRACEVAR_TEMP = 37,
TRACEVAR_ANALOG_REF = 5,
TRACEVAR_ENC_SIN = 46,
TRACEVAR_ENC_COS = 47,
TRACEVAR_PHASE = 36,
TRACEVAR_HALLS = 40,
TRACEVAR_INPUTS = 48,
TRACEVAR_RAW_INPUTS = 33,
TRACEVAR_EVENTS = 38,
Generated by Doxygen
702 File Documentation
TRACEVAR_EVENTLATCH = 39,
TRACEVAR_CRNT_A = 3,
TRACEVAR_CRNT_B = 4,
TRACEVAR_CRNT_CMD = 7,
TRACEVAR_CRNT_LIM = 8,
TRACEVAR_CRNT_CMD_D = 9,
TRACEVAR_CRNT_CMD_Q = 10,
TRACEVAR_CRNT_ACT_D = 13,
TRACEVAR_CRNT_ACT_Q = 14,
TRACEVAR_CRNT_ERR_D = 15,
TRACEVAR_CRNT_ERR_Q = 16,
TRACEVAR_VOLT_D = 19,
TRACEVAR_VOLT_Q = 20,
TRACEVAR_VEL_MTR = 23,
TRACEVAR_VEL_RAW = 50,
TRACEVAR_VEL_LOAD = 43,
TRACEVAR_VLOOP_CMD = 24,
TRACEVAR_VLOOP_LIM = 25,
TRACEVAR_VLOOP_ERR = 26,
TRACEVAR_LOAD_POS = 28,
TRACEVAR_MTR_POS = 31,
TRACEVAR_POS_ERR = 30,
TRACEVAR_CMD_POS = 29,
TRACEVAR_CMD_VEL = 44,
TRACEVAR_CMD_ACC = 45,
TRACEVAR_DEST_POS = 49 }
Amplifier trace variables.
• enum AMP_TRACE_STATUS
Amplifier trace status bits.
• enum AMP_TRACE_TRIGGER {
TRACETRIG_CHANNEL = 0x000F,
TRACETRIG_TYPE = 0x0F00,
TRACETRIG_NONE = 0x0000,
TRACETRIG_ABOVE = 0x0100,
TRACETRIG_BELOW = 0x0200,
TRACETRIG_RISE = 0x0300,
TRACETRIG_FALL = 0x0400,
TRACETRIG_BITSET = 0x0500,
TRACETRIG_BITCLR = 0x0600,
TRACETRIG_CHANGE = 0x0700,
TRACETRIG_EVENTSET = 0x0800,
TRACETRIG_EVENTCLR = 0x0900,
TRACETRIG_FGEN_CYCLE = 0x0A00,
TRACETRIG_CAP_SET = 0x0B00,
TRACETRIG_BITCHANGE = 0x0C00,
TRACETRIG_NODELAY = 0x4000,
TRACETRIG_SAMPLE = 0x8000 }
Amplifier trace trigger settings.
• enum POS_CAPTURE_CFG {
CAPTURE_INDEX_RISING = 0x0001,
CAPTURE_INDEX_FALLING = 0x0002,
CAPTURE_INDEX_LATCH = 0x0004,
CAPTURE_HOME_LATCH = 0x0040,
Generated by Doxygen
6.20 CML_AmpDef.h File Reference 703
CAPTURE_HIGH_SPEED_INPUT = 0x0100,
CAPTURE_HIGH_SPEED_INPUT_LATCH = 0x0400 }
Position capture configuration.
• enum POS_CAPTURE_STAT {
CAPTURE_INDEX_FULL = 0x0001,
CAPTURE_INDEX_OVER = 0x0008,
CAPTURE_HOME_FULL = 0x0010,
CAPTURE_HOME_OVER = 0x0080 }
Position capture status register value.
• enum AMP_FEATURE { ,
FEATURE_EXTENDED_OUTPUT_PIN_CONFIG,
FEATURE_GEAR_RATIO,
FEATURE_RESOLVER_CYCLES,
FEATURE_HALL_VEL_SHIFT,
FEATURE_PLOOP_SCALE,
FEATURE_STEPPER_CRNT,
FEATURE_CURRENT_SLOPE,
FEATURE_SOFTLIM_ACCEL,
FEATURE_PWMIN_FREQ,
FEATURE_VLOOP_CMD_FILT,
FEATURE_USTEP_OUTER_LOOP,
FEATURE_STEP_DETENT_GAIN,
FEATURE_USTEP_CONFIG_STATUS,
FEATURE_ALGO_PHASE_INIT_CUR,
FEATURE_ALGO_PHASE_INIT_CONFIG,
FEATURE_CAMMING,
FEATURE_POS_WRAP,
FEATURE_ENC_OPTIONS,
FEATURE_GAIN_SCHED,
FEATURE_PIN_MAP,
FEATURE_CAN_OPTIONS,
FEATURE_CAN_SETTINGS,
FEATURE_AIN_FILT,
FEATURE_VLOOP_OUT_FILT,
FEATURE_ILOOP_CMD_FILT,
FEATURE_PWMIN_MIN_PULSE,
FEATURE_PWMIN_MAX_PULSE,
FEATURE_DA_CONV_CONFIG,
FEATURE_SERVO_CONFIG,
FEATURE_MTR_OVERTEMP,
FEATURE_NET_OPTIONS,
FEATURE_PLOOP_KI,
FEATURE_PLOOP_KD,
FEATURE_VLOOP_CMDFF,
FEATURE_BRAKE_ENABLE_DELAY,
FEATURE_INPUT_SHAPING,
FEATURE_FLOAT_FILT_COEF,
FEATURE_IO_OPTIONS,
FEATURE_PWMIN_UVCFG,
FEATURE_AXIS_CT }
This enumeration is used internally by the amplifier object to check for certain features that are not present in every amp
model or firmware version number.
Generated by Doxygen
704 File Documentation
6.20.1.1 AMP_EVENT
enum AMP_EVENT
Amplifier events.
This enumeration provides a list of events that can be used to wait on amplifier conditions.
Enumerator
AMPEVENT_MOVEDONE Set when a move is finished and the amplifier has settled in to position at the
end of the move. Cleared when a new move is started.
AMPEVENT_TRJDONE Set when the trajectory generator finishes a move. The motor may not have
settled into position at this point. Cleared when a new move is started.
AMPEVENT_NODEGUARD A node guarding (or heartbeat) error has occurred. This indicates that the
amplifier failed to respond within the expected amount of time for either a
heartbeat or node guarding message. This could be caused by a network
wiring problem, amplifier power down, amp reset, etc. This bit is set when the
error occurs, and is cleared by a call to the function
Amp::ClearNodeGuardEvent.
AMPEVENT_SPACK This event bit is used internally by the amplifier object. It is set when the amp
acknowledges a new move start.
AMPEVENT_FAULT A latching amplifier fault has occurred. The specifics of what caused the fault
can be obtained by calling Amp::GetFaults, and the fault conditions can be
cleared by calling Amp::ClearFaults.
AMPEVENT_ERROR A non-latching amplifier error has occurred.
AMPEVENT_POSWARN The amplifier's absolute position error is greater then the window set with
Amp::SetPositionWarnWindow.
AMPEVENT_POSWIN The amplifier's absolute position error is greater then the window set with
Amp::SetSettlingWindow.
AMPEVENT_VELWIN The amplifier's absolute velocity error is greater then the window set with
Amp::SetVeliocityWarnWindow.
AMPEVENT_DISABLED The amplifier's outputs are disabled. The reason for the disable can be
determined by Amp::GetEventStatus
AMPEVENT_POSLIM The positive limit switch is currently active.
AMPEVENT_NEGLIM The negative limit switch is currently active.
AMPEVENT_SOFTLIM_POS The positive software limit is currently active.
AMPEVENT_SOFTLIM_NEG The negative software limit is currently active.
AMPEVENT_QUICKSTOP The amplifier is presently performing a quick stop sequence.
AMPEVENT_ABORT The last profile was aborted without finishing.
AMPEVENT_SOFTDISABLE The amplifier is software disabled.
AMPEVENT_HOME_CAPTURE A new home position has been captured. Note that this features requires
firmware version >= 4.77
AMPEVENT_PVT_EMPTY PVT buffer is empty.
Generated by Doxygen
6.20 CML_AmpDef.h File Reference 705
Enumerator
6.20.1.2 AMP_FAULT
enum AMP_FAULT
Once a fault is detected in the amplifier, the amp will be disabled until the fault condition has been cleared.
Use Amp::GetFaults to get a list of any active fault conditions, and Amp::ClearFaults to clear one or more faults.
Enumerator
6.20.1.3 AMP_FEATURE
enum AMP_FEATURE
This enumeration is used internally by the amplifier object to check for certain features that are not present in every amp
model or firmware version number.
Generated by Doxygen
706 File Documentation
Enumerator
FEATURE_EXTENDED_OUTPUT_PIN_CONFIG Can the amplifier firmware accept more then 6 words of data
for it's output pin configuration parameter?
FEATURE_GEAR_RATIO Does the amplifier support the gear ratio parameter?
FEATURE_RESOLVER_CYCLES Does the amplifier support the resolver cycles parameter?
FEATURE_HALL_VEL_SHIFT Does the amplifier support the hall velocity shift parameter?
FEATURE_PLOOP_SCALE Does the amplifier support the position loop scaling factor?
FEATURE_STEPPER_CRNT Does the amp support the stepper current parameters (hold
current, run to hold time, etc)?
FEATURE_CURRENT_SLOPE Does the amp support the current slope limits?
FEATURE_SOFTLIM_ACCEL Does the amp support the software limit acceleration
parameter?
FEATURE_PWMIN_FREQ Does the amp support the pwm input frequency parameter?
FEATURE_VLOOP_CMD_FILT Does the amp support the velocity loop command filter?
FEATURE_USTEP_OUTER_LOOP Does the amp support ustep outer loop.
FEATURE_STEP_DETENT_GAIN Does the amp support ustep Detent gain correction factor.
FEATURE_USTEP_CONFIG_STATUS Does the amp support ustep Stepper config and status.
FEATURE_ALGO_PHASE_INIT_CUR Does the amp support algorithmic phase init max current an
time settings.
FEATURE_ALGO_PHASE_INIT_CONFIG Does the amp support algorithmic phase init config.
FEATURE_CAMMING Does the amp support camming.
FEATURE_POS_WRAP Does the amp support positon wrap.
FEATURE_ENC_OPTIONS Does the amp support encoder options.
FEATURE_GAIN_SCHED Does the amp support gain scheduling.
FEATURE_PIN_MAP Does the amp support input pin mapping.
FEATURE_CAN_OPTIONS Does the amp support can option.
FEATURE_CAN_SETTINGS Does the amp support can option.
FEATURE_AIN_FILT Does the amp support analog reference input filter.
FEATURE_VLOOP_OUT_FILT Does the amp support the velocity loop cmd filter.
FEATURE_ILOOP_CMD_FILT Does the amp support the current loop cmd filter.
FEATURE_PWMIN_MIN_PULSE Does the amp support configuring the min pwm pulse width.
FEATURE_PWMIN_MAX_PULSE Does the amp support configuring the max pwm pulse width.
FEATURE_DA_CONV_CONFIG Does the amp support DA configuration.
FEATURE_SERVO_CONFIG Does the amp support advanced servo loop configurations.
FEATURE_MTR_OVERTEMP Does the amp support analog mtr over temp.
FEATURE_NET_OPTIONS Does the amp support configuring the network.
FEATURE_PLOOP_KI Does the amp support the position loop Ki param.
FEATURE_PLOOP_KD Does the amp support the position loop Kd param.
FEATURE_VLOOP_CMDFF Does the amp support the velocity loop command feed
forward.
FEATURE_BRAKE_ENABLE_DELAY Does the amp support motor brake enable delay time.
FEATURE_INPUT_SHAPING Does the amp support input shaping.
FEATURE_FLOAT_FILT_COEF Are filter coefficients stored at floating point values?
FEATURE_IO_OPTIONS Does the amp support IO configuration.
FEATURE_PWMIN_UVCFG Does the amp support the UV config in UV mode?
Generated by Doxygen
6.20 CML_AmpDef.h File Reference 707
Enumerator
FEATURE_AXIS_CT Does the amp support the paramter containing the number of
axis?
6.20.1.4 AMP_MODE
enum AMP_MODE
The amplifier mode of operation specifies the control method to be used by the amplifier, as well as the source of input
to that control structure.
The amplifier can be controlled in servo mode or in microstepping mode. When running in servo mode the amplifier
uses up to three nested control loops. These loops control current, velocity and position. In microstepping mode the low
level current loop is retained, but the upper level loops are replaced with a simple position command.
The command source of the amplifier will normally be the CANopen network itself. However, the amplifier also supports
several low level control methods in which commands are received through analog or digital input pins, or even from an
internal function generator.
Normally, only the CANopen modes of operation will be used when running over the CANopen network. These modes
are AMPMODE_CAN_PROFILE, AMPMODE_CAN_VELOCITY, AMPMODE_CAN_HOMING, and AMPMODE_CAN←-
_PVT. Each of these modes can be used on either servo or microstepping drives. It's typically not necessary to specify
the type of control method (servo or microstepping) to be used with these modes as it can be determined by the type of
amplifier being used. Servo amplifier's (such as Accelnet) default to servo mode, and microstepping amplifiers (such as
Stepnet) will default to microstepping mode. If this default is not appropriate for the application, then the control method
may be forced by ORing in one of the following two values; AMPMODE_CAN_SERVO and AMPMODE_CAN_USTEP.
Enumerator
AMPMODE_CAN_PROFILE In this mode the CANopen network sends move commands to the amplifier, and
the amplifier uses it's internal trajectory generator to perform the moves. This
mode conforms to the CANopen device profile for motion control (DSP-402)
profile position mode.
AMPMODE_CAN_VELOCITY In this mode the CANopen network commands target velocity values to the
amplifier. The amplifier uses it's programmed acceleration and deceleration
values to ramp the velocity up/down to the target.
Note that support for profile velocity mode was added in amplifier firmware version
3.06. Earlier versions of firmware will report an error if this mode is selected.
AMPMODE_CAN_TORQUE In this mode the CANopen network commands torque values to the amplifier.
Note that support for profile torque mode was added in amplifier firmware version
3.34. Earlier versions of firmware will report an error if this mode is selected.
AMPMODE_CAN_HOMING This mode is used to home the motor (i.e. find the motor zero position) under the
control of the CANopen network. This mode conforms to the CANopen device
profile for motion control (DSP-402) homing mode.
Generated by Doxygen
708 File Documentation
Enumerator
AMPMODE_CAN_PVT In this mode the CANopen master calculates the motor trajectory and streams it
over the CANopen network as a set of points that the amplifier interpolated
between. This mode conforms to the CANopen device profile for motion control
(DSP-402) interpolated position mode.
AMPMODE_CAN_SERVO This value may be combined with one of the standard CAN control modes to
specify that servo control should be used. This is most often specified when a
microstepping amplifier (such as the Stepnet) is to be used in servo mode.
AMPMODE_CAN_USTEP This value may be combined with one of the standard CAN control modes to
specify that microstepping control should be used. This is most often specified
when a servo amplifier (such as the Accelnet) is to be used in microstepping
mode.
AMPMODE_DISABLED Disable the amplifier. In this mode, none of the controls loops are running, and no
voltage will be applied across the motor windings.
AMPMODE_PROG_CRNT Current mode in which the command to the current loop is simply a static value
that may be programmed over the serial port or CANopen network. The
programmed current value can be set with the function
Amp::SetCurrentProgrammed
AMPMODE_AIN_CRNT Current mode in which the command to the current loop is derived from the
analog input. Note that some amplifier models do not support an analog input.
Please refer to the amplifier datasheet to determine if this mode is applicable.
AMPMODE_DIN_CRNT Current mode in which the command to the current loop is derived from the digital
input pins. One or two of the digital inputs are used as a PWM input command
which is interpreted as a current command. Please refer to the amplifier data
sheet to determine which input(s) should be used in this mode.
AMPMODE_FGEN_CRNT Current mode in which the command to the current loop is derived from the
internal function generator.
AMPMODE_PROG_VEL Velocity mode in which the command to the velocity loop is simply a static value
that may be programmed over the serial or CANopen network. The programmed
velocity value can be set with the function Amp::SetVelocityProgrammed
AMPMODE_AIN_VEL Velocity mode in which the command to the velocity loop is derived from the
analog input. Note that some amplifier models do not support an analog input.
Please refer to the amplifier datasheet to determine if this mode is applicable.
AMPMODE_DIN_VEL Velocity mode in which the command to the velocity loop is derived from the
digital input pins. One or two of the digital inputs are used as a PWM input
command which is interpreted as a velocity command. Please refer to the
amplifier data sheet to determine which input(s) should be used in this mode.
AMPMODE_FGEN_VEL Velocity mode in which the command to the velocity loop is derived from the
internal function generator.
AMPMODE_DIN_POS Position mode in which the command to the position loop is derived from the
digital input pins. Two of the digital inputs can be configured as either a master
encoder input (quadrature input), a step & direction input, or a step up / step
down input. Please refer to the amplifier data sheet to determine which inputs
should be used in this mode.
AMPMODE_FGEN_POS Position mode in which the command to the position loop is derived from the
internal function generator.
AMPMODE_CAM_POS Position mode in which the command to the position loop is derived from CAM
tables located in the amplifiers memory.
Generated by Doxygen
6.20 CML_AmpDef.h File Reference 709
Enumerator
AMPMODE_DIN_USTEP Microstepping mode in which the commanded position is derived from the digital
input pins. Two of the digital inputs can be configured as either a master encoder
input (quadrature input), a step & direction input, or a step up / step down input.
Please refer to the amplifier data sheet to determine which inputs should be used
in this mode.
AMPMODE_FGEN_USTEP Microstepping mode in which the commanded position is derived from the internal
function generator.
AMPMODE_DIAG_USTEP Diagnostic microstepping mode. This is a very simple microstepping mode that
can be used for motor setup and testing. A constant motor current is set by the
programmed current value, and the motor phase is microstepped at a fixed rate.
The position and velocity loops are not used in this mode.
6.20.1.5 AMP_PHASE_MODE
enum AMP_PHASE_MODE
This enumeration gives the legal values for the amplifier phasing mode setting. The phasing mode controls what type of
input the amplifier uses to determing the phase angle when commutating a brushless DC motor.
Enumerator
PHASE_MODE_ENCODER Use a combination of hall sensors and encoder input. The hall sensors are used
at startup, and will be used to constantly adjust the phase angle on every hall
transition. This is the default phase mode, and should be used when both hall
sensors and encoder input are present.
PHASE_MODE_TRAP Phase using only the hall sensor inputs. This mode gives rougher operation then
the encoder based mode, however it can be used when no encoder input is
available.
PHASE_MODE_NOADJUST Use both encoder & hall inputs, but only use the hall inputs on startup and
ignore them after that. This mode should normally not be used unless there is a
good reason to ignore the hall inputs after startup.
PHASE_MODE_AHALL90 Use analog hall inputs offset at 90 deg connected to the encoder sine / cosine
inputs.
PHASE_MODE_BRUSHED This phase mode is used to force brushed DC motor output. It should only be
used when the amplifier is connected to a brushed DC motor. NOTE - this mode
is obsolete. The motor type parameter (object 0x2383) should now be used to
indicate a brush motor which will force the correct commutation mode.
PHASE_MODE_NOHALL Phase using the encoder only. In this mode, the amplifier will use an algorithmic
phase initialization on startup. This mode can be used when an encoder is
present, but no halls are available.
PHASE_MODE_ENCPHASE Use phase information obtained from the encoder. This mode is used with
resolvers and most absolute encoders which are able to communicate phasing
information along with the position.
PHASE_MODE_TRAPINTERP Use interpolated trapezoidal commutation. This mode can be used when digital
hall sensors are available on the motor. At high speeds the amp interpolates
Generated by Doxygen between the hall sensor angles and creates a smoother commutation angle.
710 File Documentation
6.20.1.6 AMP_PWM_MODE
enum AMP_PWM_MODE
This enumeration gives the legal values for setting up the amplifier's PWM output mode. The PWM output mode controls
some details of how the amplifier drives it's PWM outputs.
Enumerator
PWM_MODE_STANDARD Standard PWM mode. This mode should be selected for most applications.
PWM_MODE_FORCECLAMP This bit forces the amplifier into PWM bus clamping mode. Bus clamping mode is
a different method of driving the PWM outputs. It can produce less switching loss
at the expense of greater cross over distortion.
PWM_MODE_AUTOCLAMP Automatically switch between bus clamping and normal output mode based on
the PWM duty cycle. Bus clamping mode is used at high duty cycles, normal
mode is used at low duty cycles.
PWM_MODE_HEXLIMIT If this bit is set, the amplifier's output voltage is limited using a method known as
hexagonal limiting. If this bit is clear, circular limiting is used. Hexagonal limiting
gives the maximum voltage output at the expense of some added torque ripple.
Higher top speeds may be attained using hexagonal limiting.
6.20.1.7 AMP_TRACE_STATUS
enum AMP_TRACE_STATUS
The amplifier's trace mechanism reports it's status as a collection of these bits.
6.20.1.8 AMP_TRACE_TRIGGER
enum AMP_TRACE_TRIGGER
Enumerator
TRACETRIG_CHANNEL These bits define which of the trace channels to use for triggering. Not all trigger
types require a trace channel, for those this value is ignored.
TRACETRIG_TYPE These bits define the trace trigger type to use.
Generated by Doxygen
6.20 CML_AmpDef.h File Reference 711
Enumerator
TRACETRIG_NONE Trace trigger type none. The trace is triggered immediately on start.
TRACETRIG_ABOVE Trigger as soon as the value on the selected variable is above the trigger level.
TRACETRIG_BELOW Trigger as soon as the value on the selected variable is below the trigger level.
TRACETRIG_RISE Trigger when the value on the selected variable changes from below the trigger
level to above it.
TRACETRIG_FALL Trigger when the value on the selected variable changes from above the trigger
level to below it.
TRACETRIG_BITSET Treat the trigger level as a bit mask which selects one or more bits on the selected
trace variable. The trigger occurs as soon as any of the selected bits are set.
TRACETRIG_BITCLR Treat the trigger level as a bit mask which selects one or more bits on the selected
trace variable. The trigger occurs as soon as any of the selected bits are clear.
TRACETRIG_CHANGE Trigger any time the selected trace variable value changes.
TRACETRIG_EVENTSET Treat the trigger level as a bit mask which selects one or more bits on the
amplifier's event status register. The trigger occurs as any of the selected bits are
set. Note that this trigger type does not use a trace variable.
TRACETRIG_EVENTCLR Treat the trigger level as a bit mask which selects one or more bits on the
amplifier's event status register. The trigger occurs as any of the selected bits are
clear. Note that this trigger type does not use a trace variable.
TRACETRIG_FGEN_CYCLE Trigger at the start of the next function generator cycle. This trigger type is only
useful when running in function generator mode. It does not use a trace variable
or the trigger level.
TRACETRIG_CAP_SET Treat the trigger level as a bit mask which selects one or more bits on the
amplifier's capture status register. The trigger occurs as any of the selected bits
are set. Note that this trigger type does not use a trace variable.
TRACETRIG_BITCHANGE Treat the trigger level as a bit mask which selects one or more bits on the selected
trace variable. The trigger occurs as soon as any of the selected bits change state.
TRACETRIG_NODELAY If this bit is set, then the trigger is allowed to occur even if the trace setup delay
has not yet occurred. Normally, if a negative trace delay is set then that much time
must expire after the trace has been started before a trigger will be recognized. If
this bit is set, the trigger will be recognized even if the setup delay hasn't been met.
TRACETRIG_SAMPLE Only take a single sample for each trigger. Normally, the occurance of the trigger
causes the trace to begin sampling data and stop when the trace buffer is full. If
this bit is set, each trigger occurance will cause a single sample of trace data.
6.20.1.9 AMP_TRACE_VAR
enum AMP_TRACE_VAR
This enumeration lists the amplifier variables that are available for use with the amplifier's internal trace routine.
Enumerator
Generated by Doxygen
712 File Documentation
Enumerator
6.20.1.10 COPLEY_HOME_METHOD
enum COPLEY_HOME_METHOD
Generated by Doxygen
6.20 CML_AmpDef.h File Reference 713
This enumeration gives more useful names to the various homing methods currently supported by the Copley amplifier.
The names of the members of this enumeration define the type of homing procedure. These names are made up of the
following elements:
2. Sensor: Defines the type of sensor that defines the location of the home position. It will be one of the following:
3. Index: This defines whether an encoder index pulse will be used to mark the exact home location in conjunction
with the sensor. If so, it identifies which index position will be used. It will be one of the following:
• none: If not specified, then no index is used. The edge of the sensor will define the home position.
• ONDX: Outter index switch. This is an index on the inactive side of the sensor
• INDX: Inner index switch. This is the first index on the active side of the sensor.
4. Initial move direction: For some home methods, this is provided and defines the initial move direction. The initial
move direction is only specified if it isn't already obvious based on the home type.
• none: The initial move direction is always obvious and does not need to be specified.
• NEG: Move in the negative direction if the home position is not obvious. If the negative limit switch is
encountered before the home region is found, then the move direction will be reversed.
• POS: Move in the negative direction if the home position is not obvious. If the positive limit switch is encoun-
tered before the home region is found, then the move direction will be reversed.
Enumerator
CHM_NLIM_ONDX Move into the negative limit switch, then back out to the first encoder index
pulse beyond it. The index position is home.
CHM_PLIM_ONDX Move into the positive limit switch, then back out to the first encoder index
pulse beyond it. The index position is home.
CHM_PHOME_ONDX Move to a positive home switch, then back out of it to the first encoder index
outside the home region. The index position is home.
CHM_PHOME_INDX Move to a positive home switch, and continue into it to the first encoder index
inside the home region. The index position is home.
CHM_NHOME_ONDX Move to a negative home switch, then back out of it to the first encoder index
outside the home region. The index position is home.
Generated by Doxygen
714 File Documentation
Enumerator
CHM_NHOME_INDX Move to a negative home switch, and continue into it to the first encoder index
inside the home region. The index position is home.
CHM_LHOME_ONDX_POS Move to the lower side of a momentary home switch. Then find the first
encoder index pulse outside the home region. If the home switch is not active
when the home sequence starts, then the initial move will be positive.
CHM_LHOME_INDX_POS Move to the lower side of a momentary home switch. Then find the first
encoder index pulse inside the home region. If the home switch is not active
when the home sequence starts, then the initial move will be positive.
CHM_UHOME_INDX_POS Move to the upper side of a momentary home switch. Then find the first
encoder index pulse inside the home region. If the home switch is not active
when the home sequence starts, then the initial move will be positive.
CHM_UHOME_ONDX_POS Move to the upper side of a momentary home switch. Then find the first
encoder index pulse outside the home region. If the home switch is not active
when the home sequence starts, then the initial move will be positive.
CHM_UHOME_ONDX_NEG Move to the upper side of a momentary home switch. Then find the first
encoder index pulse outside the home region. If the home switch is not active
when the home sequence starts, then the initial move will be negative.
CHM_UHOME_INDX_NEG Move to the upper side of a momentary home switch. Then find the first
encoder index pulse inside the home region. If the home switch is not active
when the home sequence starts, then the initial move will be negative.
CHM_LHOME_INDX_NEG Move to the lower side of a momentary home switch. Then find the first
encoder index pulse inside the home region. If the home switch is not active
when the home sequence starts, then the initial move will be negative.
CHM_LHOME_ONDX_NEG Move to the lower side of a momentary home switch. Then find the first
encoder index pulse outside the home region. If the home switch is not active
when the home sequence starts, then the initial move will be negative.
CHM_NLIM Move into the negative limit switch. The edge of the limit is home.
CHM_PLIM Move into the positive limit switch. The edge of the limit is home.
CHM_PHOME Move to a positive home switch. The edge of the home region is home.
CHM_NHOME Move to a negative home switch. The edge of the home region is home.
CHM_LHOME_POS Move to the lower side of a momentary home switch. The edge of the home
region is home. If the home switch is not active when the home sequence
starts, then the initial move will be positive.
CHM_UHOME_POS Move to the upper side of a momentary home switch. The edge of the home
region is home. If the home switch is not active when the home sequence
starts, then the initial move will be positive.
CHM_UHOME_NEG Move to the upper side of a momentary home switch. The edge of the home
region is home. If the home switch is not active when the home sequence
starts, then the initial move will be negative.
CHM_LHOME_NEG Move to the lower side of a momentary home switch. The edge of the home
region is home. If the home switch is not active when the home sequence
starts, then the initial move will be negative.
CHM_NDX_NEG Move in the negative direction until the first encoder index pulse is found. The
index position is home.
CHM_NDX_POS Move in the positive direction until the first encoder index pulse is found. The
index position is home.
CHM_NONE Set the current position to home.
Generated by Doxygen
6.20 CML_AmpDef.h File Reference 715
Enumerator
CHM_HARDSTOP_POS Home to a hard stop. The motor will start running in the positive direction until
the homing current has been reached. It will hold this current until the homing
delay has expired. The actual position after that delay is home.
CHM_HARDSTOP_NEG Home to a hard stop. The motor will start running in the negative direction until
the homing current has been reached. It will hold this current until the homing
delay has expired. The actual position after that delay is home.
CHM_HARDSTOP_ONDX_POS Home to a hard stop. The motor will start running in the positive direction until
the homing current has been reached. It will hold this current until the homing
delay has expired. It will them move away from the hard stop until an index
mark is located. The index position is home.
CHM_HARDSTOP_ONDX_NEG Home to a hard stop. The motor will start running in the negative direction until
the homing current has been reached. It will hold this current until the homing
delay has expired. It will them move away from the hard stop until an index
mark is located. The index position is home.
CHM_EXTENDED Home using an extended home method. This is not a real home method, but
instead a flag that is used by the Amp::GoHome function to indicate that a
non-standard homing method is to be used. When this value is passed it
instructs the GoHome function to execute the home sequence through the use
of a special low-level homing parameter implemented in the amplifier firmware.
This allows a bit more flexibility on the home sequencer.
6.20.1.11 EVENT_STATUS
enum EVENT_STATUS
Enumerator
Generated by Doxygen
716 File Documentation
Enumerator
6.20.1.12 HALT_MODE
enum HALT_MODE
The amplifier's halt mode defines it's action when a halt command is issued (Amp::HaltMove).
When the halt command is issued, the move in progress will be terminated using the method defined in this mode.
Unless the HALT_DISABLE method is selected, the amplifier will remain enabled and holding position at the end of the
halt sequence.
Enumerator
6.20.1.13 INPUT_PIN_CONFIG
enum INPUT_PIN_CONFIG
Generated by Doxygen
6.20 CML_AmpDef.h File Reference 717
The digital input pins located on an amplifier can be programmed to perform some action. This enumeration provides a
list of the possible settings for an input pin.
Note that it is perfectly legal to program more then one input pin to perform the same action. It's often useful to have two
hardware disable inputs for example. If either of these inputs becomes active, the amplifier will be disabled.
Note: Bits 12-13 of the input config specify the axis the input configuration will be applied to.
Whether the inputs are configured to perform some action or not, it's still possible to read them directly using the Amp←-
::GetInputs function.
Enumerator
Generated by Doxygen
718 File Documentation
Enumerator
6.20.1.14 OUTPUT_PIN_CONFIG
enum OUTPUT_PIN_CONFIG
The digital output pins located on the amplifier can be programmed to follow one or more bits in one of the amplifier's
status words.
This enumeration is used to specify which status word a particular output pin will follow, and whether the output will be
active high or active low.
Each output pin has a configuration value associated with it (which should be programmed using one of the values of
this enumeration), and a 32-bit mask value. If the output pin is configured to follow a status register, the mask identifies
which bit(s) of the status register should be used to control the output pin. If any of the masked bits in the status register
are set, then the output pin will go active.
Enumerator
OUTCFG_EVENT_STATUS_L The output pin follows the amplifier's event status register and is
active Low.
OUTCFG_EVENT_STATUS_H The output pin follows the amplifier's event status register and is
active High.
OUTCFG_EVENT_LATCH_L The output pin follows the latched version of the amplifier's event
status register and is active Low.
OUTCFG_EVENT_LATCH_H The output pin follows the latched version of the amplifier's event
status register and is active High.
OUTCFG_MANUAL_L The output pin is manually controlled using the Amp::SetOutputs
function, and the output is active Low.
OUTCFG_MANUAL_H The output pin is manually controlled using the Amp::SetOutputs
function, and the output is active High.
OUTCFG_TRJ_STATUS The output pin follows bits in the trajectory status register.
OUTCFG_POSITION_WINDOW The output pin will go active when the actual motor position is greater
then the first output parameter, and less then the second output
parameter.
Generated by Doxygen
6.20 CML_AmpDef.h File Reference 719
Enumerator
OUTCFG_POSITION_TRIG_LOW2HIGH The output pin will go active when the motor actual position crosses
through a programmed value in the low to high direction. The pin will
stay active for a programmed amount of time. The first output
parameter specifies the position, and the second output parameter
specifies the time to remain active in milliseconds.
OUTCFG_POSITION_TRIG_HIGH2LOW The output pin will go active when the motor actual position crosses
through a programmed value in the high to low direction. The pin will
stay active for a programmed amount of time. The first output
parameter specifies the position, and the second output parameter
specifies the time to remain active in milliseconds.
OUTCFG_POSITION_TRIG The output pin will go active when the motor actual position crosses
through a programmed value in either direction. The pin will stay
active for a programmed amount of time. The first output parameter
specifies the position, and the second output parameter specifies the
time to remain active in milliseconds.
OUTCFG_POSITION_TRIG_LIST The output pin will go active when the motor actual position crosses
through any one of a series of programmed values in either direction.
The pin will stay active for a programmed amount of time. The list of
output positions to trigger on must be uploaded into an area of trace
memory. The first output parameter gives a 16-bit word offset into
trace memory in it's upper half, and the number of positions in it's
lower half. The second parameter specifies the time to remain active
in milliseconds.
OUTCFG_SYNC_OUTPUT If set the output pin is used as Sync output. This bit can only be used
with output pin 0.
OUTCFG_ACTIVE_HIGH This bit may be ORed with any of the other output pin configuration
values to make them active high.
6.20.1.15 POS_CAPTURE_CFG
enum POS_CAPTURE_CFG
The amplifier is able to capture the encoder position on one of two events; either the encoder index signal, or a general
purpose input pin which has been configured as a home switch.
This enumeration gives the values that my be used to configure this capture mechanism using the Amp::SetPos←-
CaptureCfg method.
Enumerator
CAPTURE_INDEX_RISING If this bit is set, the rising edge of the encoder index signal will be
used to capture the index position.
CAPTURE_INDEX_FALLING If this bit is set, the falling edge of the encoder index signal will be
used to capture the index position.
Generated by Doxygen
720 File Documentation
Enumerator
CAPTURE_INDEX_LATCH If this bit is set, then index capture values will not be overwritten if a
new index edge is received before the previously captured value has
been read.
CAPTURE_HOME_LATCH If this bit is set, then captured home sensor positions will not be
overwritten if a new home input edge is received before the previous
captured value was read.
CAPTURE_HIGH_SPEED_INPUT If this bit is set, then the high speed input based position capture is
enabled. Note that this features requires firmware versions >= 5.12
to work.
CAPTURE_HIGH_SPEED_INPUT_LATCH If this bit is set, then captured high speed input positions will not be
overwritten if a new input is received before the previous position
was read.
6.20.1.16 POS_CAPTURE_STAT
enum POS_CAPTURE_STAT
The current status of the position capture mechanism may be read from the amplifier using the method Amp::GetPos←-
CaptureCfg.
This status value is bitmapped as described by this enumeration. Any bits not described here should be ignored. Bits
not described here are reserved and may be either 1 or 0.
Enumerator
CAPTURE_INDEX_FULL If this bit is set it indicates that a new encoder index position has been captured. This
position may be read using the method Amp::GetIndexCapture. Reading the
captured position will cause this bit to be cleared.
CAPTURE_INDEX_OVER If this bit is set it indicates that a new encoder index was received before the previous
captured index position was read from the amplifier. The setting of the
CAPTURE_INDEX_LATCH bit in the capture control register determines whether or
not the new captured position was stored. If the CAPTURE_INDEX_LATCH
configuration bit is set, then the new captured position will be lost. If this bit is clear
then the newly captured position will overwrite the previous position.
Reading the captured position will cause this bit to be cleared.
CAPTURE_HOME_FULL If this bit is set it indicates that a new home sensor position has been captured. This
position may be read using the method Amp::GetHomeCapture. Reading the
captured position will cause this bit to be cleared.
CAPTURE_HOME_OVER If this bit is set it indicates that a new home sensor transition was received before the
previous captured home position was read from the amplifier. The setting of the
CAPTURE_HOME_LATCH bit in the capture control register determines whether or
not the new captured position was stored. If the CAPTURE_HOME_LATCH
configuration bit is set, then the new captured position will be lost. If this bit is clear
then the newly captured position will overwrite the previous position.
Reading the captured position will cause this bit to be cleared.
Generated by Doxygen
6.20 CML_AmpDef.h File Reference 721
6.20.1.17 PROFILE_TYPE
enum PROFILE_TYPE
This enumeration gives the various profile types supported by the Copley amplifiers. These profile types are used when
running in profile position mode (point to point moves).
Enumerator
PROFILE_VEL Velocity profile. In this profile mode the velocity, acceleration and deceleration values are
used. The position value is also used, but it only defines the direction of motion ( positive is
position is >= 0, negative if position is < 0 ).
PROFILE_TRAP Trapezoidal profile. In this profile mode a position, velocity, acceleration and deceleration
may be specified. This profile mode allows any of it's parameters (position, vel, accel,
decel) to be changed during the course of a move.
PROFILE_SCURVE Jerk limited (S-curve) profile. In this mode, position, velocity, acceleration, and jerk (rate of
change of acceleration) may be specified.
6.20.1.18 QUICK_STOP_MODE
enum QUICK_STOP_MODE
The amplifier's quick stop mode defines it's action when a quick stop command is issued (Amp::QuickStop).
The quick stop command differs from the halt command in that the amplifier is always disabled at the end of the
sequence. For some modes, the amplifier automatically disables after halting the move. For others, the amplifier
halts the move and holds in the quick stop state. No new moves may be started until the amplifier has manually been
disabled.
Enumerator
Generated by Doxygen
722 File Documentation
This file contains a number of structures used to pass configuration parameters to an Amp object.
CML_AmpStruct.h
CML_Filter.h CML_InputShaper.h
CML_SDO.h
CML_Network.h
CML_Can.h
CML_Reference.h
CML_Threads.h
CML_Error.h
CML_Utils.h
limits.h CML_Settings.h
assert.h
This graph shows which files directly or indirectly include this file:
CML_AmpStruct.h
CML_Amp.h
CML_Linkage.h
CML.h
CML_PvtConstAccelTrj.h CML_PvtTrj.h Amp.cpp AmpFile.cpp AmpFW.cpp AmpParam.cpp AmpPDO.cpp AmpPVT.cpp AmpStruct.cpp AmpUnits.cpp AmpVersion.cpp Can.cpp CanOpen.cpp CML.cpp CopleyIO.cpp CopleyNode.cpp ecatdc.cpp Error.cpp EtherCAT.cpp EventMap.cpp File.cpp Filter.cpp Geometry.cpp InputShaper.cpp IOmodule.cpp Linkage.cpp Node.cpp PDO.cpp Reference.cpp SDO.cpp
PvtConstAccelTrj.cpp PvtTrj.cpp
Classes
• class AmpFileError
This class represents error conditions that can occur when loading amplifer data from a data file.
• struct AmpInfo
Generated by Doxygen
6.21 CML_AmpStruct.h File Reference 723
Generated by Doxygen
724 File Documentation
Macros
• #define COPLEY_MAX_INPUTS 26
Maximum available on any amplifier.
Enumerations
• enum CAN_BIT_RATE {
CAN_RATE_1MEG = 0x0000,
CAN_RATE_800K = 0x1000,
CAN_RATE_500K = 0x2000,
CAN_RATE_250K = 0x3000,
CAN_RATE_125K = 0x4000,
CAN_RATE_50K = 0x5000,
CAN_RATE_20K = 0x6000,
CAN_RATE_100K = 0x8000 }
CANopen network bit rate enumeration.
This file contains a number of structures used to pass configuration parameters to an Amp object.
6.21.2.1 CAN_BIT_RATE
enum CAN_BIT_RATE
Enumerator
Generated by Doxygen
6.22 CML_Array.h File Reference 725
CML_Array.h
CML_Settings.h
assert.h
This graph shows which files directly or indirectly include this file:
CML_Array.h
CML.h
CML_PvtConstAccelTrj.h CML_PvtTrj.h Amp.cpp AmpFile.cpp AmpFW.cpp AmpParam.cpp AmpPDO.cpp AmpPVT.cpp AmpStruct.cpp AmpUnits.cpp AmpVersion.cpp Can.cpp CanOpen.cpp CML.cpp CopleyIO.cpp CopleyNode.cpp ecatdc.cpp Error.cpp EtherCAT.cpp EventMap.cpp File.cpp Filter.cpp Geometry.cpp InputShaper.cpp IOmodule.cpp Linkage.cpp Node.cpp PDO.cpp Reference.cpp SDO.cpp
PvtConstAccelTrj.cpp PvtTrj.cpp
Classes
Generated by Doxygen
726 File Documentation
This file contains the base classes used to define the low level interface to the CAN network hardware.
CML_Can.h
CML_Reference.h
CML_Threads.h
CML_Error.h
CML_Utils.h
limits.h CML_Settings.h
assert.h
This graph shows which files directly or indirectly include this file:
CML_Can.h
CML_Node.h CML_InputShaper.h
CML_Amp.h CML_CopleyIO.h
CML_Linkage.h CML_Filter.h
CML.h
AmpFW.cpp CML_PvtTrj.h CML_PvtConstAccelTrj.h Amp.cpp AmpFile.cpp AmpParam.cpp AmpPDO.cpp AmpPVT.cpp AmpStruct.cpp AmpUnits.cpp AmpVersion.cpp Can.cpp CanOpen.cpp CML.cpp CopleyIO.cpp CopleyNode.cpp ecatdc.cpp Error.cpp EtherCAT.cpp EventMap.cpp File.cpp Filter.cpp Geometry.cpp InputShaper.cpp IOmodule.cpp Linkage.cpp Node.cpp PDO.cpp Reference.cpp SDO.cpp
PvtTrj.cpp PvtConstAccelTrj.cpp
Generated by Doxygen
6.24 CML_CanOpen.h File Reference 727
Classes
• struct CanFrame
Low level CAN data frame.
• class CanError
Class used to represent an error condition returned from a CAN interface function.
• class CanInterface
Abstract class used for low level interaction with CAN hardware.
Enumerations
• enum CAN_FRAME_TYPE {
CAN_FRAME_DATA,
CAN_FRAME_REMOTE,
CAN_FRAME_ERROR }
This enumeration is used to identify the type of CAN frame.
This file contains the base classes used to define the low level interface to the CAN network hardware.
6.23.2.1 CAN_FRAME_TYPE
enum CAN_FRAME_TYPE
Enumerator
This header file defines the classes used for the top level of the CANopen network.
Generated by Doxygen
728 File Documentation
CML_CanOpen.h
CML_Network.h
CML_Can.h
CML_EventMap.h CML_Reference.h
CML_Threads.h
CML_Error.h
CML_Utils.h
limits.h CML_Settings.h
assert.h
This graph shows which files directly or indirectly include this file:
CML_CanOpen.h
CML_Node.h
CML_Amp.h CML_CopleyIO.h
CML_Linkage.h
CML.h
AmpFW.cpp CML_PvtTrj.h CML_PvtConstAccelTrj.h Amp.cpp AmpFile.cpp AmpParam.cpp AmpPDO.cpp AmpPVT.cpp AmpStruct.cpp AmpUnits.cpp AmpVersion.cpp Can.cpp CanOpen.cpp CML.cpp CopleyIO.cpp CopleyNode.cpp ecatdc.cpp Error.cpp EtherCAT.cpp EventMap.cpp File.cpp Filter.cpp Geometry.cpp InputShaper.cpp IOmodule.cpp Linkage.cpp Node.cpp PDO.cpp Reference.cpp SDO.cpp
PvtTrj.cpp PvtConstAccelTrj.cpp
Classes
• class CanOpenError
This class holds the error codes that describe CANopen error conditions.
• class CanOpenSettings
Configuration object used to customize global settings for the CANopen network.
• struct CanOpenNodeInfo
The CanOpenNodeInfo structure holds some data required by the CANopen network interface which is present in every
node it manages.
• class CanOpen
Generated by Doxygen
6.25 CML_Copley.h File Reference 729
The CanOpen class is the top level interface into the CANopen network.
• class Receiver
CANopen receiver object.
• class LSS
CANopen Layer Setting Services object.
This header file defines the classes used for the top level of the CANopen network.
CML_Copley.h
CML_Node.h
CML_Network.h
CML_Can.h
CML_EventMap.h CML_Reference.h
CML_Firmware.h CML_Threads.h
CML_Error.h
CML_Utils.h
limits.h CML_Settings.h
assert.h
This graph shows which files directly or indirectly include this file:
CML_Copley.h
CML_Amp.h
CML_Linkage.h
CML.h
CML_PvtConstAccelTrj.h CML_PvtTrj.h Amp.cpp AmpFile.cpp AmpParam.cpp AmpPDO.cpp AmpPVT.cpp AmpStruct.cpp AmpUnits.cpp AmpVersion.cpp Can.cpp CanOpen.cpp CML.cpp CopleyIO.cpp CopleyNode.cpp ecatdc.cpp Error.cpp EtherCAT.cpp EventMap.cpp File.cpp Filter.cpp Geometry.cpp InputShaper.cpp IOmodule.cpp Linkage.cpp Node.cpp PDO.cpp Reference.cpp SDO.cpp AmpFW.cpp
PvtConstAccelTrj.cpp PvtTrj.cpp
Generated by Doxygen
730 File Documentation
Classes
• class CopleyNodeError
This class represents errors that can be returned by the CopleyNode class.
• class CopleyNode
Copley CANopen Node class.
This is the base class of all CANopen devices produced by Copley Controls Corp.
CML_CopleyIO.h
CML_IO.h
CML_Node.h
CML_Network.h
CML_Can.h
CML_EventMap.h CML_Reference.h
CML_Threads.h
CML_Error.h
CML_Utils.h
limits.h CML_Settings.h
assert.h
This graph shows which files directly or indirectly include this file:
CML_CopleyIO.h
CML.h
CML_PvtConstAccelTrj.h CML_PvtTrj.h Amp.cpp AmpFile.cpp AmpFW.cpp AmpParam.cpp AmpPDO.cpp AmpPVT.cpp AmpStruct.cpp AmpUnits.cpp AmpVersion.cpp Can.cpp CanOpen.cpp CML.cpp CopleyIO.cpp CopleyNode.cpp ecatdc.cpp Error.cpp EtherCAT.cpp EventMap.cpp File.cpp Filter.cpp Geometry.cpp InputShaper.cpp IOmodule.cpp Linkage.cpp Node.cpp PDO.cpp Reference.cpp SDO.cpp
PvtConstAccelTrj.cpp PvtTrj.cpp
Generated by Doxygen
6.26 CML_CopleyIO.h File Reference 731
Classes
• struct CopleyIOInfo
IO Module characteristics data structure.
• struct CopleyIODigi
This structure is used to return information about the digital I/O of a Copley I/O module.
• struct CopleyIOAnlg
This structure is used to return information about the analog inputs of a Copley I/O module.
• struct CopleyIOPWM
This structure is used to return information about the PWM outputs of a Copley I/O module.
• struct CopleyIOCfg
IO Module configuration structure.
• class CopleyIO
This class represents a Copley CANopen I/O module.
• class IOFileError
This class represents error conditions that can occur when loading IO module data from a data file.
Enumerations
• enum CIO_OBJID {
CIOOBJID_INFO_SERIAL = 0x3000,
CIOOBJID_INFO_MODEL = 0x3001,
CIOOBJID_INFO_MFGINFO = 0x3002,
CIOOBJID_INFO_HWTYPE = 0x3003,
CIOOBJID_INFO_LOOPRATE = 0x3004,
CIOOBJID_INFO_FWVERSION = 0x3010,
CIOOBJID_INFO_BAUD = 0x3011,
CIOOBJID_INFO_MAXWORDS = 0x3012,
CIOOBJID_INFO_NAME = 0x3013,
CIOOBJID_INFO_HOSTCFG = 0x3014,
CIOOBJID_INFO_NODECFG = 0x3015,
CIOOBJID_INFO_RATECFG = 0x3016,
CIOOBJID_INFO_NODEID = 0x3017,
CIOOBJID_INFO_STATUS = 0x3018,
CIOOBJID_INFO_RATE = 0x3019,
CIOOBJID_INFO_ANLGINT = 0x301A,
CIOOBJID_INFO_ANLGINTENA = 0x301B,
CIOOBJID_INFO_DIGIINTENA = 0x301C,
CIOOBJID_INFO_PWMPERIODA = 0x301E,
CIOOBJID_INFO_PWMPERIODB = 0x301F,
CIOOBJID_DIGI_BANKMODE = 0x3020,
CIOOBJID_DIGI_PULLUPMSK = 0x3021,
CIOOBJID_DIGI_TYPEMSK = 0x3022,
CIOOBJID_DIGI_FAULTMSK = 0x3023,
CIOOBJID_DIGI_INVMSK = 0x3024,
CIOOBJID_DIGI_VALUEMSK = 0x3025,
CIOOBJID_DIGI_MODEMSK = 0x3026,
CIOOBJID_DIGI_RAWMSK = 0x3027,
CIOOBJID_DIGI_HILOMSK = 0x3028,
CIOOBJID_DIGI_LOHIMSK = 0x3029,
CIOOBJID_DIGI_DEBOUNCE0 = 0x3030,
Generated by Doxygen
732 File Documentation
CIOOBJID_DIGI_DEBOUNCE1 = 0x3031,
CIOOBJID_DIGI_DEBOUNCE2 = 0x3032,
CIOOBJID_DIGI_DEBOUNCE3 = 0x3033,
CIOOBJID_DIGI_DEBOUNCE4 = 0x3034,
CIOOBJID_DIGI_DEBOUNCE5 = 0x3035,
CIOOBJID_DIGI_DEBOUNCE6 = 0x3036,
CIOOBJID_DIGI_DEBOUNCE7 = 0x3037,
CIOOBJID_ANLG_IRAW = 0x3040,
CIOOBJID_ANLG_ISCALED = 0x3041,
CIOOBJID_ANLG_IFACTOR = 0x3042,
CIOOBJID_ANLG_IOFFSET = 0x3043,
CIOOBJID_ANLG_IUPLIMIT = 0x3044,
CIOOBJID_ANLG_ILOLIMIT = 0x3045,
CIOOBJID_ANLG_IABSDELTA = 0x3046,
CIOOBJID_ANLG_IPOSDELTA = 0x3047,
CIOOBJID_ANLG_INEGDELTA = 0x3048,
CIOOBJID_ANLG_IFLAGS = 0x3049,
CIOOBJID_ANLG_IMASK = 0x304A,
CIOOBJID_PWM_ORAW = 0x3050,
CIOOBJID_PWM_OSCALED = 0x3051,
CIOOBJID_PWM_OFACTOR = 0x3052,
CIOOBJID_PWM_OOFFSET = 0x3053 }
Object dictionary ID values used on Copley I/O modules.
6.26.2.1 CIO_OBJID
enum CIO_OBJID
Enumerator
Generated by Doxygen
6.26 CML_CopleyIO.h File Reference 733
Enumerator
Generated by Doxygen
734 File Documentation
Enumerator
This file defines the top level error class used throughout the library.
CML_Error.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
This graph shows which files directly or indirectly include this file:
CML_Error.h
CML_Threads.h
CML_AmpStruct.h CML_Can.h
CML_Firmware.h CML_Node.h
CML_TrjScurve.h CML_Amp.h
CML.h
AmpFW.cpp CML_PvtTrj.h Amp.cpp AmpFile.cpp AmpParam.cpp AmpPDO.cpp AmpPVT.cpp AmpStruct.cpp AmpUnits.cpp AmpVersion.cpp Can.cpp CanOpen.cpp CML.cpp CopleyIO.cpp CopleyNode.cpp ecatdc.cpp Error.cpp EtherCAT.cpp EventMap.cpp File.cpp Filter.cpp Geometry.cpp InputShaper.cpp CML_PvtConstAccelTrj.h
Generated by Doxygen
6.28 CML_EtherCAT.h File Reference 735
Classes
• class Error
This class is the root class for all error codes returned by functions defined within the Motion Library.
This file defines the top level error class used throughout the library.
This header file defines the classes used to represent the top level of the EtherCAT network interface.
CML_EtherCAT.h
CML_Network.h
CML_Can.h
CML_Reference.h
CML_Threads.h
CML_Error.h
CML_Utils.h
limits.h CML_Settings.h
assert.h
Generated by Doxygen
736 File Documentation
This graph shows which files directly or indirectly include this file:
CML_EtherCAT.h
CML_Node.h
CML_Amp.h CML_CopleyIO.h
CML_Linkage.h
CML.h
AmpFW.cpp CML_PvtTrj.h CML_PvtConstAccelTrj.h Amp.cpp AmpFile.cpp AmpParam.cpp AmpPDO.cpp AmpPVT.cpp AmpStruct.cpp AmpUnits.cpp AmpVersion.cpp Can.cpp CanOpen.cpp CML.cpp CopleyIO.cpp CopleyNode.cpp ecatdc.cpp Error.cpp EtherCAT.cpp EventMap.cpp File.cpp Filter.cpp Geometry.cpp InputShaper.cpp IOmodule.cpp Linkage.cpp Node.cpp PDO.cpp Reference.cpp SDO.cpp
PvtTrj.cpp PvtConstAccelTrj.cpp
Classes
• class EtherCatError
This class holds the error codes that describe EtherCAT error conditions.
• class EtherCatSettings
Configuration object used to customize global settings for the EtherCAT network.
• class EtherCatHardware
Low level Ethernet hardware interface.
• class EtherCAT
The EtherCAT class is the top level interface into the EtherCAT network.
• class EcatDgram
Generic EtherCAT datagram class.
• struct BRD
Broadcast read.
• struct BWR
Broadcast write. This type of datagram writes data to the same location on every node in the network.
• struct APRD
Read by position in network (aka Auto Increment Physical Read) The read is performed on the node who's position
matches the passed address.
• struct APWR
Write by position in network (Auto Increment Physical Write) Like the APRD datagram, but a write version.
• struct ARMW
Read by position in network and write to the same address of all following nodes.
• struct FPRD
Read by assigned node ID (Configured Address Physical Read) The master assigns each node a unique 16-bit address
at startup.
• struct FPWR
Write by assigned node ID (Configured Address Physical Write)
• class EcatFrame
EtherCAT frame class.
This header file defines the classes used to represent the top level of the EtherCAT network interface.
Generated by Doxygen
6.29 CML_EventMap.h File Reference 737
CML_EventMap.h
CML_Threads.h
CML_Error.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
This graph shows which files directly or indirectly include this file:
CML_EventMap.h
CML_CanOpen.h
CML_Node.h
CML_Amp.h CML_CopleyIO.h
CML_Linkage.h
CML.h
CML_PvtConstAccelTrj.h CML_PvtTrj.h Amp.cpp AmpFile.cpp AmpParam.cpp AmpPDO.cpp AmpPVT.cpp AmpStruct.cpp AmpUnits.cpp AmpVersion.cpp Can.cpp CanOpen.cpp CML.cpp CopleyIO.cpp CopleyNode.cpp ecatdc.cpp Error.cpp EtherCAT.cpp EventMap.cpp File.cpp Filter.cpp Geometry.cpp InputShaper.cpp IOmodule.cpp Linkage.cpp Node.cpp PDO.cpp Reference.cpp SDO.cpp AmpFW.cpp
PvtConstAccelTrj.cpp PvtTrj.cpp
Classes
• class EventError
Generated by Doxygen
738 File Documentation
CML_File.h
CML_AmpDef.h
CML_Settings.h
assert.h
Generated by Doxygen
6.31 CML_Filter.h File Reference 739
This graph shows which files directly or indirectly include this file:
CML_File.h
CML.h
CML_PvtConstAccelTrj.h CML_PvtTrj.h Amp.cpp AmpFile.cpp AmpFW.cpp AmpParam.cpp AmpPDO.cpp AmpPVT.cpp AmpStruct.cpp AmpUnits.cpp AmpVersion.cpp Can.cpp CanOpen.cpp CML.cpp CopleyIO.cpp CopleyNode.cpp ecatdc.cpp Error.cpp EtherCAT.cpp EventMap.cpp File.cpp Filter.cpp Geometry.cpp InputShaper.cpp IOmodule.cpp Linkage.cpp Node.cpp PDO.cpp Reference.cpp SDO.cpp
PvtConstAccelTrj.cpp PvtTrj.cpp
Generated by Doxygen
740 File Documentation
CML_Filter.h
CML_SDO.h
CML_Network.h
CML_Can.h
CML_Reference.h
CML_Threads.h
CML_Error.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
This graph shows which files directly or indirectly include this file:
CML_Filter.h
CML_AmpStruct.h
CML_Amp.h
CML_Linkage.h
CML.h
CML_PvtConstAccelTrj.h CML_PvtTrj.h Amp.cpp AmpFile.cpp AmpFW.cpp AmpParam.cpp AmpPDO.cpp AmpPVT.cpp AmpStruct.cpp AmpUnits.cpp AmpVersion.cpp Can.cpp CanOpen.cpp CML.cpp CopleyIO.cpp CopleyNode.cpp ecatdc.cpp Error.cpp EtherCAT.cpp EventMap.cpp File.cpp Filter.cpp Geometry.cpp InputShaper.cpp IOmodule.cpp Linkage.cpp Node.cpp PDO.cpp Reference.cpp SDO.cpp
PvtConstAccelTrj.cpp PvtTrj.cpp
Generated by Doxygen
6.32 CML_Firmware.h File Reference 741
Classes
• class Filter
Generic filter structure.
This file defines classes related to the Copley amplifier Firmware object.
Include dependency graph for CML_Firmware.h:
CML_Firmware.h
CML_Error.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
This graph shows which files directly or indirectly include this file:
CML_Firmware.h
CML_Copley.h Firmware.cpp
CML_Amp.h
CML_Linkage.h
CML.h
AmpFW.cpp CML_PvtTrj.h Amp.cpp AmpFile.cpp AmpParam.cpp AmpPDO.cpp AmpPVT.cpp AmpStruct.cpp AmpUnits.cpp AmpVersion.cpp Can.cpp CanOpen.cpp CML.cpp CopleyIO.cpp CopleyNode.cpp ecatdc.cpp Error.cpp EtherCAT.cpp EventMap.cpp File.cpp Filter.cpp Geometry.cpp InputShaper.cpp IOmodule.cpp Linkage.cpp Node.cpp PDO.cpp Reference.cpp SDO.cpp CML_PvtConstAccelTrj.h
PvtTrj.cpp PvtConstAccelTrj.cpp
Generated by Doxygen
742 File Documentation
Classes
• class FirmwareError
This class represents error conditions that can occur while accessing a Copley Controls amplifier firmware object.
• class Firmware
Copley Controls amplifier firmware object.
This file defines classes related to the Copley amplifier Firmware object.
The firmware object is used to update the program within the amplifier. An object of this type must be passed to the
Amp::FirmwareUpdate method to perform this task.
Note that firmware updates are likely to be rare, and are not part of normal operation.
This file contains class definitions used to define multi-axis trajectory paths.
CML_Geometry.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
This graph shows which files directly or indirectly include this file:
CML_Geometry.h
CML_Linkage.h
CML.h
CML_PvtConstAccelTrj.h CML_PvtTrj.h Amp.cpp AmpFile.cpp AmpFW.cpp AmpParam.cpp AmpPDO.cpp AmpPVT.cpp AmpStruct.cpp AmpUnits.cpp AmpVersion.cpp Can.cpp CanOpen.cpp CML.cpp CopleyIO.cpp CopleyNode.cpp ecatdc.cpp Error.cpp EtherCAT.cpp EventMap.cpp File.cpp Filter.cpp Geometry.cpp InputShaper.cpp IOmodule.cpp Linkage.cpp Node.cpp PDO.cpp Reference.cpp SDO.cpp
PvtConstAccelTrj.cpp PvtTrj.cpp
Generated by Doxygen
6.34 CML_InputShaper.h File Reference 743
Classes
• class PointN
An N axis point.
This file contains class definitions used to define multi-axis trajectory paths.
Generated by Doxygen
744 File Documentation
CML_InputShaper.h
CML_SDO.h
CML_Network.h
CML_Can.h
CML_Reference.h
CML_Threads.h
CML_Error.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
This graph shows which files directly or indirectly include this file:
CML_InputShaper.h
CML_AmpStruct.h
CML_Amp.h
CML_Linkage.h
CML.h
CML_PvtConstAccelTrj.h CML_PvtTrj.h Amp.cpp AmpFile.cpp AmpFW.cpp AmpParam.cpp AmpPDO.cpp AmpPVT.cpp AmpStruct.cpp AmpUnits.cpp AmpVersion.cpp Can.cpp CanOpen.cpp CML.cpp CopleyIO.cpp CopleyNode.cpp ecatdc.cpp Error.cpp EtherCAT.cpp EventMap.cpp File.cpp Filter.cpp Geometry.cpp InputShaper.cpp IOmodule.cpp Linkage.cpp Node.cpp PDO.cpp Reference.cpp SDO.cpp
PvtConstAccelTrj.cpp PvtTrj.cpp
Generated by Doxygen
6.35 CML_IO.h File Reference 745
Classes
• class InputShaper
Generic input shaper structure.
The InputShaper represents a series of impulse functions convolved with an input function.
CML_IO.h
CML_Node.h
CML_Network.h
CML_Can.h
CML_EventMap.h CML_Reference.h
CML_Threads.h
CML_Error.h
CML_Utils.h
limits.h CML_Settings.h
assert.h
This graph shows which files directly or indirectly include this file:
CML_IO.h
CML_CopleyIO.h
CML.h
CML_PvtConstAccelTrj.h CML_PvtTrj.h Amp.cpp AmpFile.cpp AmpFW.cpp AmpParam.cpp AmpPDO.cpp AmpPVT.cpp AmpStruct.cpp AmpUnits.cpp AmpVersion.cpp Can.cpp CanOpen.cpp CML.cpp CopleyIO.cpp CopleyNode.cpp ecatdc.cpp Error.cpp EtherCAT.cpp EventMap.cpp File.cpp Filter.cpp Geometry.cpp InputShaper.cpp IOmodule.cpp Linkage.cpp Node.cpp PDO.cpp Reference.cpp SDO.cpp
PvtConstAccelTrj.cpp PvtTrj.cpp
Generated by Doxygen
746 File Documentation
Classes
• class IOError
I/O module errors.
• struct IOModuleSettings
Standard CANopen I/O module settings.
• class IOModule
Standard CANopen I/O module.
• class IOModule::DigOutPDO
Receive PDO for mapping digital output pins.
• class IOModule::AlgOutPDO
Receive PDO for mapping analog outputs.
• class IOModule::DigInPDO
Transmit PDO for mapping digital inputs.
• class IOModule::AlgInPDO
Transmit PDO for mapping analog inputs.
Enumerations
• enum IO_OBJID {
IOOBJID_DIN_8_VALUE = 0x6000,
IOOBJID_DIN_8_POL = 0x6002,
IOOBJID_DIN_8_FILT = 0x6003,
IOOBJID_DIN_INTENA = 0x6005,
IOOBJID_DIN_8_MASK_ANY = 0x6006,
IOOBJID_DIN_8_MASK_L2H = 0x6007,
IOOBJID_DIN_8_MASK_H2L = 0x6008,
IOOBJID_DIN_1_VALUE = 0x6020,
IOOBJID_DIN_1_POL = 0x6030,
IOOBJID_DIN_1_FILT = 0x6038,
IOOBJID_DIN_1_MASK_ANY = 0x6050,
IOOBJID_DIN_1_MASK_L2H = 0x6060,
IOOBJID_DIN_1_MASK_H2L = 0x6070,
IOOBJID_DIN_16_VALUE = 0x6100,
IOOBJID_DIN_16_POL = 0x6102,
IOOBJID_DIN_16_FILT = 0x6103,
IOOBJID_DIN_16_MASK_ANY = 0x6106,
IOOBJID_DIN_16_MASK_L2H = 0x6107,
IOOBJID_DIN_16_MASK_H2L = 0x6108,
IOOBJID_DIN_32_VALUE = 0x6120,
IOOBJID_DIN_32_POL = 0x6122,
IOOBJID_DIN_32_FILT = 0x6123,
IOOBJID_DIN_32_MASK_ANY = 0x6126,
IOOBJID_DIN_32_MASK_L2H = 0x6127,
IOOBJID_DIN_32_MASK_H2L = 0x6128,
IOOBJID_DOUT_8_VALUE = 0x6200,
IOOBJID_DOUT_8_POL = 0x6202,
IOOBJID_DOUT_8_ERRMODE = 0x6206,
IOOBJID_DOUT_8_ERRVAL = 0x6207,
IOOBJID_DOUT_8_FILT = 0x6208,
IOOBJID_DOUT_1_VALUE = 0x6220,
Generated by Doxygen
6.35 CML_IO.h File Reference 747
IOOBJID_DOUT_1_POL = 0x6240,
IOOBJID_DOUT_1_ERRMODE = 0x6250,
IOOBJID_DOUT_1_ERRVAL = 0x6260,
IOOBJID_DOUT_1_FILT = 0x6270,
IOOBJID_DOUT_16_VALUE = 0x6300,
IOOBJID_DOUT_16_POL = 0x6302,
IOOBJID_DOUT_16_ERRMODE = 0x6306,
IOOBJID_DOUT_16_ERRVAL = 0x6307,
IOOBJID_DOUT_16_FILT = 0x6308,
IOOBJID_DOUT_32_VALUE = 0x6320,
IOOBJID_DOUT_32_POL = 0x6322,
IOOBJID_DOUT_32_ERRMODE = 0x6326,
IOOBJID_DOUT_32_ERRVAL = 0x6327,
IOOBJID_DOUT_32_FILT = 0x6328,
IOOBJID_AIN_8_VALUE = 0x6400,
IOOBJID_AIN_16_VALUE = 0x6401,
IOOBJID_AIN_32_VALUE = 0x6402,
IOOBJID_AIN_FLT_VALUE = 0x6403,
IOOBJID_AIN_MFG_VALUE = 0x6404,
IOOBJID_AOUT_8_VALUE = 0x6410,
IOOBJID_AOUT_16_VALUE = 0x6411,
IOOBJID_AOUT_32_VALUE = 0x6412,
IOOBJID_AOUT_FLT_VALUE = 0x6413,
IOOBJID_AOUT_MFG_VALUE = 0x6414,
IOOBJID_AIN_TRIG = 0x6421,
IOOBJID_AIN_INTSRC = 0x6422,
IOOBJID_AIN_INTENA = 0x6423,
IOOBJID_AIN_32_UPLIM = 0x6424,
IOOBJID_AIN_32_LWLIM = 0x6425,
IOOBJID_AIN_32_UDELTA = 0x6426,
IOOBJID_AIN_32_NDELTA = 0x6427,
IOOBJID_AIN_32_PDELTA = 0x6428,
IOOBJID_AIN_FLT_UPLIM = 0x6429,
IOOBJID_AIN_FLT_LWLIM = 0x642A,
IOOBJID_AIN_FLT_UDELTA = 0x642B,
IOOBJID_AIN_FLT_NDELTA = 0x642C,
IOOBJID_AIN_FLT_PDELTA = 0x642D,
IOOBJID_AIN_FLT_OFFSET = 0x642E,
IOOBJID_AIN_FLT_SCALE = 0x642F,
IOOBJID_AIN_UNIT = 0x6430,
IOOBJID_AIN_32_OFFSET = 0x6431,
IOOBJID_AIN_32_SCALE = 0x6432,
IOOBJID_AOUT_FLT_OFFSET = 0x6441,
IOOBJID_AOUT_FLT_SCALE = 0x6442,
IOOBJID_AOUT_ERRMODE = 0x6443,
IOOBJID_AOUT_32_ERRVAL = 0x6444,
IOOBJID_AOUT_FLT_ERRVAL = 0x6445,
IOOBJID_AOUT_32_OFFSET = 0x6446,
IOOBJID_AOUT_32_SCALE = 0x6447,
IOOBJID_AOUT_UNIT = 0x6450 }
Object dictionary ID values used on standard I/O modules.
• enum IO_AIN_TRIG_TYPE {
IOAINTRIG_UPPER_LIM = 0x0001,
IOAINTRIG_LOWER_LIM = 0x0002,
Generated by Doxygen
748 File Documentation
IOAINTRIG_UDELTA = 0x0004,
IOAINTRIG_NDELTA = 0x0008,
IOAINTRIG_PDELTA = 0x0010 }
This enumeration is used to define the types of events that may cause an analog input to generate an interrupt event.
• enum IOMODULE_EVENTS {
IOEVENT_DIN_PDO0 = 0x00000001,
IOEVENT_AIN_PDO0 = 0x00010000,
IOEVENT_AIN_PDO1 = 0x00020000,
IOEVENT_AIN_PDO2 = 0x00040000 }
This enumeration gives the various events that can be waited on.
6.35.2.1 IO_AIN_TRIG_TYPE
enum IO_AIN_TRIG_TYPE
This enumeration is used to define the types of events that may cause an analog input to generate an interrupt event.
Enumerator
6.35.2.2 IO_OBJID
enum IO_OBJID
Enumerator
Generated by Doxygen
6.35 CML_IO.h File Reference 749
Enumerator
Generated by Doxygen
750 File Documentation
Enumerator
6.35.2.3 IOMODULE_EVENTS
enum IOMODULE_EVENTS
Generated by Doxygen
6.36 CML_Linkage.h File Reference 751
This enumeration gives the various events that can be waited on.
The default events are simply the reception of one of the standard transmit PDO objects.
Enumerator
IOEVENT_DIN_PDO0 Digital input PDO 0 was received. By default, this PDO is transmitted by the module
when any of the first 64 digital inputs changes state.
IOEVENT_AIN_PDO0 Analog input PDO 0 was received. By default, this PDO is transmitted by the module
when any of the first 4 16-bit analog inputs generates an event.
There are many different types of events that are programmable for analog inputs,
however not all I/O module manufacturers support all (or any) of these events. The
function IOmodule::AinSetTrigType can be used to set the type of event associated with
an analog input.
Consult the documentation provided with the I/O module to determine what types of
analog input events are available for your module.
IOEVENT_AIN_PDO1 Analog input PDO 1 was received. This PDO is similar to analog input PDO 0, however it
maps the second group of 4 16-bit analog inputs.
IOEVENT_AIN_PDO2 Analog input PDO 2 was received. This PDO is similar to analog input PDO 0, however it
maps the third group of 4 16-bit analog inputs.
CML_Linkage.h
CML_Amp.h
CML_Copley.h CML_AmpStruct.h
CML_EventMap.h CML_Network.h
CML_Can.h CML_AmpDef.h
CML_Reference.h CML_TrjScurve.h
CML_Error.h CML_Geometry.h
CML_Utils.h
limits.h CML_Settings.h
assert.h
This graph shows which files directly or indirectly include this file:
CML_Linkage.h
CML.h
CML_PvtConstAccelTrj.h CML_PvtTrj.h Amp.cpp AmpFile.cpp AmpFW.cpp AmpParam.cpp AmpPDO.cpp AmpPVT.cpp AmpStruct.cpp AmpUnits.cpp AmpVersion.cpp Can.cpp CanOpen.cpp CML.cpp CopleyIO.cpp CopleyNode.cpp ecatdc.cpp Error.cpp EtherCAT.cpp EventMap.cpp File.cpp Filter.cpp Geometry.cpp InputShaper.cpp IOmodule.cpp Linkage.cpp Node.cpp PDO.cpp Reference.cpp SDO.cpp
PvtConstAccelTrj.cpp PvtTrj.cpp
Generated by Doxygen
752 File Documentation
Classes
• class LinkError
This class represents error conditions that can occur in the Linkage class.
• class RPDO_LinkCtrl
Receive PDO used to update the control word of all amplifiers in the linkage.
• class LinkSettings
Linkage object settings.
• class Linkage
Linkage object, used for controlling a group of coordinated amplifiers.
Enumerations
• enum LINK_EVENT {
LINKEVENT_MOVEDONE = 0x00000001,
LINKEVENT_TRJDONE = 0x00000002,
LINKEVENT_NODEGUARD = 0x00000004,
LINKEVENT_FAULT = 0x00000010,
LINKEVENT_ERROR = 0x00000020,
LINKEVENT_POSWARN = 0x00000040,
LINKEVENT_POSWIN = 0x00000080,
LINKEVENT_VELWIN = 0x00000100,
LINKEVENT_DISABLED = 0x00000200,
LINKEVENT_POSLIM = 0x00000400,
LINKEVENT_NEGLIM = 0x00000800,
LINKEVENT_SOFTLIM_POS = 0x00001000,
LINKEVENT_SOFTLIM_NEG = 0x00002000,
LINKEVENT_QUICKSTOP = 0x00004000,
LINKEVENT_ABORT = 0x00008000,
LINKEVENT_TRSTP = 0x00100000 }
Linkage events.
6.36.2.1 LINK_EVENT
enum LINK_EVENT
Linkage events.
This enumeration provides a list of events that can be used to wait on linkage conditions.
In general, linkage events parallel the amplifier events of all of the amplifiers attached to the linkage. For example, if any
of the amplifiers is reporting an error event, then the linkage will be reporting an error event.
Generated by Doxygen
6.37 CML_Network.h File Reference 753
Enumerator
LINKEVENT_MOVEDONE Set when all amplifiers attached to this linkage have finished their moves and
have settled in to position at the end of the move. Cleared when a new move is
started on any amplifier.
LINKEVENT_TRJDONE Set when all amplifiers attached to the linkage have finished their moves, but have
not yet settled into position at the end of the move. Cleared when a new move is
on any amplifier started.
LINKEVENT_NODEGUARD A node guarding (or heartbeat) error has occurred. This indicates that one of the
amplifiers failed to respond within the expected amount of time for either a
heartbeat or node guarding message.
LINKEVENT_FAULT A latching fault has occurred on one of the amplifiers attached to this linkage.
LINKEVENT_ERROR A non-latching error has occurred on one of the amplifiers.
LINKEVENT_POSWARN One of the the amplifiers is reporting a position warning event.
LINKEVENT_POSWIN One of the amplifiers is reporting a position window event.
LINKEVENT_VELWIN One of the amplifiers is reporting a velocity window event.
LINKEVENT_DISABLED One of the amplifiers is currently disabled.
LINKEVENT_POSLIM The positive limit switch of one or more amplifier is currently active.
LINKEVENT_NEGLIM The negative limit switch of one or more amplifier is currently active.
LINKEVENT_SOFTLIM_POS The positive software limit of one or more amplifier is currently active.
LINKEVENT_SOFTLIM_NEG The negative software limit of one or more amplifier is currently active.
LINKEVENT_QUICKSTOP One of the linkage amplifiers is presently performing a quick stop sequence or is
holding in quick stop mode. The amplifier must be disabled to clear this.
LINKEVENT_ABORT One or more amplifier aborted the last profile without finishing.
LINKEVENT_TRSTP One or more amplifier is trying to stop the motor.
This header file defines the classes used for the generic top level network interface.
Generated by Doxygen
754 File Documentation
CML_Network.h
CML_Can.h
CML_Reference.h
CML_Threads.h
CML_Error.h
CML_Utils.h
limits.h CML_Settings.h
assert.h
This graph shows which files directly or indirectly include this file:
CML_Network.h
CML_Amp.h CML_CopleyIO.h
CML_Linkage.h
CML.h
CML_PvtTrj.h CML_PvtConstAccelTrj.h Amp.cpp AmpFile.cpp AmpParam.cpp AmpPDO.cpp AmpPVT.cpp AmpStruct.cpp AmpUnits.cpp AmpVersion.cpp Can.cpp CanOpen.cpp CML.cpp CopleyIO.cpp CopleyNode.cpp ecatdc.cpp Error.cpp EtherCAT.cpp EventMap.cpp File.cpp Filter.cpp Geometry.cpp InputShaper.cpp IOmodule.cpp Linkage.cpp Node.cpp PDO.cpp Reference.cpp SDO.cpp AmpFW.cpp
PvtTrj.cpp PvtConstAccelTrj.cpp
Generated by Doxygen
6.37 CML_Network.h File Reference 755
Classes
• class NetworkError
This class holds the error codes that describe various Netowrk error conditions.
• class NetworkNodeInfo
Private data owned by the network object attached to every node.
• class Network
Abstract network class.
Enumerations
• enum NodeState {
NODESTATE_INVALID,
NODESTATE_UNKNOWN,
NODESTATE_GUARDERR,
NODESTATE_STOPPED,
NODESTATE_PRE_OP,
NODESTATE_OPERATIONAL,
NODESTATE_SAFE_OP }
Enumeration used to identify a network node state.
• enum NetworkType {
NET_TYPE_CANOPEN,
NET_TYPE_ETHERCAT,
NET_TYPE_INVALID }
Enumeration used to identify a type of network architecture.
• enum GuardProtocol {
GUARDTYPE_NONE,
GUARDTYPE_HEARTBEAT,
GUARDTYPE_NODEGUARD }
Enumeration used to identify the various types of node guarding protocols.
This header file defines the classes used for the generic top level network interface.
6.37.2.1 GuardProtocol
enum GuardProtocol
Generated by Doxygen
756 File Documentation
Enumerator
6.37.2.2 NetworkType
enum NetworkType
Enumerator
6.37.2.3 NodeState
enum NodeState
Enumerator
This header file defines the classes that define a generic node on the network.
Generated by Doxygen
6.38 CML_Node.h File Reference 757
CML_Node.h
CML_Network.h
CML_Can.h
CML_EventMap.h CML_Reference.h
CML_Threads.h
CML_Error.h
CML_Utils.h
limits.h CML_Settings.h
assert.h
This graph shows which files directly or indirectly include this file:
CML_Node.h
CML_Amp.h CML_CopleyIO.h
CML_Linkage.h
CML.h
AmpFW.cpp CML_PvtTrj.h Amp.cpp AmpFile.cpp AmpParam.cpp AmpPDO.cpp AmpPVT.cpp AmpStruct.cpp AmpUnits.cpp AmpVersion.cpp Can.cpp CanOpen.cpp CML.cpp CopleyIO.cpp CopleyNode.cpp ecatdc.cpp Error.cpp EtherCAT.cpp EventMap.cpp File.cpp Filter.cpp Geometry.cpp InputShaper.cpp IOmodule.cpp Linkage.cpp Node.cpp PDO.cpp Reference.cpp SDO.cpp CML_PvtConstAccelTrj.h
PvtTrj.cpp PvtConstAccelTrj.cpp
Classes
• class NodeError
This class represents node errors.
• struct NodeIdentity
CANopen identity object.
• class Node
Node class.
This header file defines the classes that define a generic node on the network.
Generated by Doxygen
758 File Documentation
This header file defines the classes used to communicate to CANopen nodes using Process Data Objects (PDOs).
Include dependency graph for CML_PDO.h:
CML_PDO.h
CML_Network.h
CML_Can.h
CML_Reference.h
CML_Threads.h
CML_Error.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
This graph shows which files directly or indirectly include this file:
CML_PDO.h
CML_Node.h
CML_Amp.h CML_CopleyIO.h
CML_Linkage.h
CML.h
AmpFW.cpp Amp.cpp AmpFile.cpp AmpParam.cpp AmpPDO.cpp AmpPVT.cpp AmpStruct.cpp AmpUnits.cpp AmpVersion.cpp Can.cpp CanOpen.cpp CML.cpp CopleyIO.cpp CopleyNode.cpp ecatdc.cpp Error.cpp EtherCAT.cpp EventMap.cpp File.cpp Filter.cpp Geometry.cpp InputShaper.cpp IOmodule.cpp Linkage.cpp Node.cpp PDO.cpp Reference.cpp SDO.cpp CML_PvtTrj.h CML_PvtConstAccelTrj.h
PvtTrj.cpp PvtConstAccelTrj.cpp
Generated by Doxygen
6.40 CML_PvtConstAccelTrj.h File Reference 759
Classes
• class PDO_Error
This class represents error conditions related to PDOs.
• class Pmap
This class allows variables to be mapped into a PDO.
• class PmapRaw
This is the most generic PDO variable mapping class.
• class Pmap32
This is a PDO variable mapping class that extends the virtual Pmap class to handle 32-bit integers.
• class Pmap24
This is a PDO variable mapping class that extends the virtual Pmap class to handle 24-bit integers.
• class Pmap16
This is a PDO variable mapping class that extends the virtual Pmap class to handle 16-bit integers.
• class Pmap8
This is a PDO variable mapping class that extends the virtual Pmap class to handle 8-bit integers.
• class PDO
PDO (Process Data Object) base class.
• class TPDO
Transmit PDO (transmitted by node, received by this software).
• class RPDO
Receive PDO (received by node, transmitted by this software).
Macros
• #define PDO_MAP_LEN 32
Number of variables that may be added to a PDO's map.
• #define FLG_RTR_OK 0x01
Flag used by transmit PDOs to indicate that RTR requests are allowed.
This header file defines the classes used to communicate to CANopen nodes using Process Data Objects (PDOs).
This header file defines the classes that define the PvtConstAccelTrj class.
Generated by Doxygen
760 File Documentation
CML_PvtConstAccelTrj.h
CML.h
CML_PvtTrj.h CML_Linkage.h
CML_Network.h CML_EventMap.h
CML_Geometry.h CML_Can.h
CML_Trajectory.h CML_Reference.h
CML_Firmware.h CML_Threads.h
CML_Error.h CML_Array.h
CML_Utils.h
limits.h CML_Settings.h
assert.h
This graph shows which files directly or indirectly include this file:
CML_PvtConstAccelTrj.h
CML.h
CML_PvtTrj.h Amp.cpp AmpFile.cpp AmpFW.cpp AmpParam.cpp AmpPDO.cpp AmpPVT.cpp AmpStruct.cpp AmpUnits.cpp AmpVersion.cpp Can.cpp CanOpen.cpp CML.cpp CopleyIO.cpp CopleyNode.cpp ecatdc.cpp Error.cpp EtherCAT.cpp EventMap.cpp File.cpp Filter.cpp Geometry.cpp InputShaper.cpp IOmodule.cpp Linkage.cpp Node.cpp PDO.cpp Reference.cpp SDO.cpp PvtConstAccelTrj.cpp
PvtTrj.cpp
Classes
• class PvtConstAccelTrjError
• class PvtConstAccelTrj
This header file defines the classes that define the PvtConstAccelTrj class.
The class is derived from the Linkage Trajectory class and is used to calculate a set of velocities that produce constant
acceleration from a given set of positions and time constants.
This header file defines the classes that define the PvtTrj class.
CML_PvtTrj.h
CML.h
CML_PvtConstAccelTrj.h CML_Linkage.h
CML_Network.h CML_EventMap.h
CML_Geometry.h CML_Can.h
CML_Trajectory.h CML_Reference.h
CML_Firmware.h CML_Threads.h
CML_Error.h CML_Array.h
CML_Utils.h
limits.h CML_Settings.h
assert.h
Generated by Doxygen
6.42 CML_Reference.h File Reference 761
This graph shows which files directly or indirectly include this file:
CML_PvtTrj.h
CML.h
CML_PvtConstAccelTrj.h Amp.cpp AmpFile.cpp AmpFW.cpp AmpParam.cpp AmpPDO.cpp AmpPVT.cpp AmpStruct.cpp AmpUnits.cpp AmpVersion.cpp Can.cpp CanOpen.cpp CML.cpp CopleyIO.cpp CopleyNode.cpp ecatdc.cpp Error.cpp EtherCAT.cpp EventMap.cpp File.cpp Filter.cpp Geometry.cpp InputShaper.cpp IOmodule.cpp Linkage.cpp Node.cpp PDO.cpp Reference.cpp SDO.cpp PvtTrj.cpp
PvtConstAccelTrj.cpp
Classes
• class PvtTrjError
• class PvtTrj
This header file defines the classes that define the PvtTrj class.
The class is derived from the Linkage Trajectory class and is send velocity, position, and time data to the trajectory
generator.
This header file defines a set of classes used to handle reference counting within the CML library.
Generated by Doxygen
762 File Documentation
CML_Reference.h
CML_Threads.h
CML_Error.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
This graph shows which files directly or indirectly include this file:
CML_Reference.h
CML_Can.h
CML_InputShaper.h CML_Node.h
CML.h
AmpFW.cpp Amp.cpp AmpFile.cpp AmpParam.cpp AmpPDO.cpp AmpPVT.cpp AmpStruct.cpp AmpUnits.cpp AmpVersion.cpp Can.cpp CanOpen.cpp CML.cpp CopleyIO.cpp CopleyNode.cpp ecatdc.cpp Error.cpp EtherCAT.cpp EventMap.cpp File.cpp Filter.cpp Geometry.cpp InputShaper.cpp IOmodule.cpp Linkage.cpp Node.cpp PDO.cpp Reference.cpp SDO.cpp CML_PvtTrj.h CML_PvtConstAccelTrj.h
PvtTrj.cpp PvtConstAccelTrj.cpp
Classes
• class RefObj
This class is used to track object references in the CML library.
• class RefObjLocker< RefClass >
This is a utility class that locks a reference in it's constructor, and unlocks it in it's destructor.
Generated by Doxygen
6.43 CML_SDO.h File Reference 763
This header file defines a set of classes used to handle reference counting within the CML library.
This header file defines the classes used to communicate to CANopen nodes using Service Data Objects (SDOs).
Generated by Doxygen
764 File Documentation
CML_SDO.h
CML_Network.h
CML_Can.h
CML_Reference.h
CML_Threads.h
CML_Error.h
CML_Utils.h
limits.h CML_Settings.h
assert.h
Generated by Doxygen
6.43 CML_SDO.h File Reference 765
This graph shows which files directly or indirectly include this file:
CML_SDO.h
CML_Amp.h CML_CopleyIO.h
CML_Linkage.h
CML.h
CML_PvtConstAccelTrj.h CML_PvtTrj.h Amp.cpp AmpFile.cpp AmpParam.cpp AmpPDO.cpp AmpPVT.cpp AmpStruct.cpp AmpUnits.cpp AmpVersion.cpp Can.cpp CanOpen.cpp CML.cpp CopleyIO.cpp CopleyNode.cpp ecatdc.cpp Error.cpp EtherCAT.cpp EventMap.cpp File.cpp Filter.cpp Geometry.cpp InputShaper.cpp IOmodule.cpp Linkage.cpp Node.cpp PDO.cpp Reference.cpp SDO.cpp AmpFW.cpp
PvtConstAccelTrj.cpp PvtTrj.cpp
Classes
• class SDO_Error
This class represents SDO errors.
• class SDO
CANopen Service Data Object (SDO).
Macros
• #define SDO_BLK_DNLD_THRESHOLD 15
SDO downloads of this size (byte) or greater are more efficiently handled using a block download.
• #define SDO_BLK_UPLD_THRESHOLD 15
SDO uploads of this size (byte) or greater are more efficiently handled using a block upload.
This header file defines the classes used to communicate to CANopen nodes using Service Data Objects (SDOs).
6.43.2.1 SDO_BLK_DNLD_THRESHOLD
#define SDO_BLK_DNLD_THRESHOLD 15
SDO downloads of this size (byte) or greater are more efficiently handled using a block download.
6.43.2.2 SDO_BLK_UPLD_THRESHOLD
#define SDO_BLK_UPLD_THRESHOLD 15
SDO uploads of this size (byte) or greater are more efficiently handled using a block upload.
Generated by Doxygen
766 File Documentation
This file provides some configuration options used to customize the Copley Motion Libraries.
CML_Settings.h
assert.h
This graph shows which files directly or indirectly include this file:
CML_Settings.h
CML_Utils.h
CML_Linkage.h CML_Array.h
CML.h
Geometry.cpp AmpFile.cpp AmpParam.cpp AmpPDO.cpp AmpPVT.cpp AmpStruct.cpp AmpUnits.cpp AmpVersion.cpp Can.cpp CanOpen.cpp CML.cpp CopleyIO.cpp CopleyNode.cpp CML_PvtConstAccelTrj.h CML_PvtTrj.h Amp.cpp AmpFW.cpp
Macros
Generated by Doxygen
6.44 CML_Settings.h File Reference 767
This defines the maximum number of amplifiers that may be controlled by a single linkage object.
• #define CML_LINKAGE_TRJ_BUFFER_SIZE 50
This parameter controls the size of the trajectory buffer used by the linkage object.
• #define CML_ERROR_HASH_SIZE 64
Size of the hash table used by the Error::Lookup method.
• #define CML_ERROR_MESSAGES
The CML::Error object includes a text message for each error type.
• #define CML_ENABLE_IOMODULE_PDOS
This setting enables/disables the use of PDO objects within the IOModule class.
• #define CML_MAX_ECAT_FRAMES 100
Size of extra private data for the Thread object.
• #define CML_NAMESPACE_START() namespace CML_NAMESPACE{
Compiler native type to use for 64-bit integer.
This file provides some configuration options used to customize the Copley Motion Libraries.
6.44.2.1 CML_ALLOW_FLOATING_POINT
#define CML_ALLOW_FLOATING_POINT
If this is defined, double precision floating point math will be used in some areas of the libraries. These areas include
trajectory generation and unit conversions. If not defined, then no floating point math will be used, but some features
will be disabled.
6.44.2.2 CML_DEBUG_ASSERT
#define CML_DEBUG_ASSERT
If this is defined, then some debug code will be added to the library which will use the standard C assert() function to
test for some programming errors. Commenting this out will remove the checks. The standard C header file assert.h
must be available if this feature is used.
Generated by Doxygen
768 File Documentation
6.44.2.3 CML_ENABLE_IOMODULE_PDOS
#define CML_ENABLE_IOMODULE_PDOS
This setting enables/disables the use of PDO objects within the IOModule class.
The IOModule class is used to access standard CANopen I/O modules on the network. Normally, these modules may
be accessed using fast PDO transfers, however in very low memory embedded systems the extra RAM required to
maintain the PDO objects may not be available. In such situations this setting may be commented out to reduce the
memory footprint of the IOModule class.
6.44.2.4 CML_ENABLE_USER_UNITS
#define CML_ENABLE_USER_UNITS
If this is defined, then all position, velocity, acceleration & jerk values will be specified in double precision floating point,
and the units used for these values will be programmable. If not defined, then these parameters will all be specified as
32-bit integers using internal amplifier parameters. This is less convenient, but can be much faster for systems without
a floating point processor.
6.44.2.5 CML_ERROR_HASH_SIZE
#define CML_ERROR_HASH_SIZE 64
This may be set to zero to disable this feature. Most systems will not require this feature and can safely set this parameter
to zero.
6.44.2.6 CML_ERROR_MESSAGES
#define CML_ERROR_MESSAGES
The CML::Error object includes a text message for each error type.
If this setting is commented out then those messages will not be compiled in with the library. This can be useful for
embedded environments where such messages are not used and represent a large amount of wasted memory.
6.44.2.7 CML_FILE_ACCESS_OK
#define CML_FILE_ACCESS_OK
The libraries have some features which require the standard C library functions to open, read, and write files. Some
embedded systems do not support a file system, so these features may be disabled by commenting out the define. For
systems which do support the standard C file access functions, this should be enabled.
Generated by Doxygen
6.44 CML_Settings.h File Reference 769
6.44.2.8 CML_HASH_SIZE
Size of the hash table used to associate CAN messages with their receivers.
The following values have been selected as good options for a typical CANopen system: 2053, 1483, 1097, 683, 409.
6.44.2.9 CML_LINKAGE_TRJ_BUFFER_SIZE
#define CML_LINKAGE_TRJ_BUFFER_SIZE 50
This parameter controls the size of the trajectory buffer used by the linkage object.
The linkage object uses this buffer when streaming multi-axis PVT profiles. If multi-axis PVT profiles are not required
then setting may be commented out. Doing so will significantly reduce the size of the linkage object. If multi-axis PVTs
are required, set this to the length of the buffer. A value of 50 is a reasonable choice.
6.44.2.10 CML_MAX_AMPS_PER_LINK
#define CML_MAX_AMPS_PER_LINK 32
This defines the maximum number of amplifiers that may be controlled by a single linkage object.
The absolute maximum value that this can accept is 32, however it can be lowered to reduce the memory requirements
of the library. This setting also limits the number of independent axes/link. Normally, the number of amps & axes is the
same, but the Linkage object may be extended for conditions where this isn't true. In any case, there can be no more
then this many axes/link.
6.44.2.11 CML_MAX_ECAT_FRAMES
This setting should be left undefined for most systems. It's provided to allow greater flexibility when porting the libraries
to another operating system. Size of extra private data for the Mutex object. This setting should be left undefined for
most systems. It's provided to allow greater flexibility when porting the libraries to another operating system. Size of
extra private data for the Semaphore object. This setting should be left undefined for most systems. It's provided to
allow greater flexibility when porting the libraries to another operating system. Number of EtherCAT frames that each
EtherCAT interface can keep track of at a time.
Generated by Doxygen
770 File Documentation
6.44.2.12 CML_NAMESPACE
Library namespace.
This gives the name of the C++ namespace which will be used to contain the library. If no namespace is desired, just
comment out the define
6.44.2.13 CML_NAMESPACE_START
Normally this doesn't need to be defined, but if you're getting compiler errors related to the int64 type you can set this
Some C++ compilers support the C99 style stdint.h header which defines variables of standard sizes. Uncomment this
line to use that header to define the 64-bit integer type. If this line is uncommented, then CML_INT64_TYPE is ignored.
The classes defined in this file provide an operating system independent way of accessing multi-tasking system features.
CML_Threads.h
CML_Error.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
Generated by Doxygen
6.45 CML_Threads.h File Reference 771
This graph shows which files directly or indirectly include this file:
CML_Threads.h
CML_Can.h
CML_Node.h CML_Amp.h
CML_Linkage.h
CML.h
CML_PvtConstAccelTrj.h CML_PvtTrj.h Amp.cpp AmpFile.cpp AmpFW.cpp AmpParam.cpp AmpPDO.cpp AmpPVT.cpp AmpStruct.cpp AmpUnits.cpp AmpVersion.cpp Can.cpp CanOpen.cpp CML.cpp CopleyIO.cpp CopleyNode.cpp ecatdc.cpp Error.cpp EtherCAT.cpp EventMap.cpp File.cpp Filter.cpp Geometry.cpp InputShaper.cpp IOmodule.cpp Linkage.cpp Node.cpp PDO.cpp Reference.cpp SDO.cpp
PvtConstAccelTrj.cpp PvtTrj.cpp
Classes
• class ThreadError
• class Thread
• class Mutex
This class represents an object that can be used by multiple threads to gain safe access to a shared resource.
• class MutexLocker
This is a utility class that locks a mutex in it's constructor, and unlocks it in it's destructor.
• class Semaphore
The classes defined in this file provide an operating system independent way of accessing multi-tasking system features.
The implementation of these classes will be different for different supported platforms.
Generated by Doxygen
772 File Documentation
CML_Trajectory.h
CML_Error.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
This graph shows which files directly or indirectly include this file:
CML_Trajectory.h
CML_Amp.h CML_TrjScurve.h
CML_Linkage.h
CML.h
CML_PvtConstAccelTrj.h CML_PvtTrj.h Amp.cpp AmpFile.cpp AmpFW.cpp AmpParam.cpp AmpPDO.cpp AmpPVT.cpp AmpStruct.cpp AmpUnits.cpp AmpVersion.cpp Can.cpp CanOpen.cpp CML.cpp CopleyIO.cpp CopleyNode.cpp ecatdc.cpp Error.cpp EtherCAT.cpp EventMap.cpp File.cpp Filter.cpp Geometry.cpp InputShaper.cpp IOmodule.cpp Linkage.cpp Node.cpp PDO.cpp Reference.cpp SDO.cpp
PvtConstAccelTrj.cpp PvtTrj.cpp
Classes
• class TrjError
This class represents error conditions reported by the trajectory classes.
• class Trajectory
Trajectory information class.
• class LinkTrajectory
Linkage trajectory.
Generated by Doxygen
6.47 CML_TrjScurve.h File Reference 773
CML_TrjScurve.h
CML_Trajectory.h
CML_Error.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
This graph shows which files directly or indirectly include this file:
CML_TrjScurve.h
CML_Linkage.h
CML.h
CML_PvtConstAccelTrj.h CML_PvtTrj.h Amp.cpp AmpFile.cpp AmpFW.cpp AmpParam.cpp AmpPDO.cpp AmpPVT.cpp AmpStruct.cpp AmpUnits.cpp AmpVersion.cpp Can.cpp CanOpen.cpp CML.cpp CopleyIO.cpp CopleyNode.cpp ecatdc.cpp Error.cpp EtherCAT.cpp EventMap.cpp File.cpp Filter.cpp Geometry.cpp InputShaper.cpp IOmodule.cpp Linkage.cpp Node.cpp PDO.cpp Reference.cpp SDO.cpp
PvtConstAccelTrj.cpp PvtTrj.cpp
Classes
• class ScurveError
This class represents error conditions that can occur in the TrjScurve class.
Generated by Doxygen
774 File Documentation
• class TrjScurve
Asymmetric S-curve profile generator.
• class LinkTrjScurve
Multi-axis s-curve profile.
This class is used to calculate asymmetric S-curve trajectory profiles for use by the Amp or Linkage objects.
CML_Utils.h
limits.h CML_Settings.h
assert.h
This graph shows which files directly or indirectly include this file:
CML_Utils.h
CML_Node.h
CML_Linkage.h
CML.h
AmpFile.cpp AmpParam.cpp AmpPDO.cpp AmpPVT.cpp AmpStruct.cpp AmpUnits.cpp AmpVersion.cpp Can.cpp CanOpen.cpp CML.cpp CopleyIO.cpp CopleyNode.cpp ecatdc.cpp Error.cpp EtherCAT.cpp EventMap.cpp File.cpp Filter.cpp Geometry.cpp CML_PvtConstAccelTrj.h CML_PvtTrj.h Amp.cpp AmpFW.cpp
Generated by Doxygen
6.48 CML_Utils.h File Reference 775
Macros
Typedefs
Generated by Doxygen
776 File Documentation
6.48.2.1 ByteCast
#define ByteCast(
x ) ((byte)(x))
The ByteCast() macro is used to cast a value to a byte type (unsigned char).
The reason that a macro is used rather then a simple cast is that some processors have characters that are more then
8 bits long. This is particularly common with 16-bit or 32-bit microcontrollers and DSPs. On such systems the ByteCast
macro will strip off any upper bits and then cast the result to a byte. On systems with 8-bit bytes the ByteCast macro
simply casts the passed value to a byte.
6.48.3.1 int16
int16
Note that the actual definition of this type will depend on the compiler being used. The standard C language header file
limits.h will be used to determine how to create the type definition.
6.48.3.2 int32
int32
Note that the actual definition of this type will depend on the compiler being used. The standard C language header file
limits.h will be used to determine how to create the type definition.
6.48.3.3 int64
int64
If this isn't working correctly, check the library configuration in the file CML_Settings.h
Generated by Doxygen
6.49 CopleyIO.cpp File Reference 777
6.48.3.4 uint16
uint16
Note that the actual definition of this type will depend on the compiler being used. The standard C language header file
limits.h will be used to determine how to create the type definition.
6.48.3.5 uint32
uint32
Note that the actual definition of this type will depend on the compiler being used. The standard C language header file
limits.h will be used to determine how to create the type definition.
6.48.3.6 uunit
uunit
If user units are enabled in the CML_Settings.h file, then this type will resolve to double precision floating point. If not,
then this type will resolve to a 32-bit integer.
User units are used for all position, velocity, acceleration, and jerk values passed to/from an Amp object.
This file contains the CopleyIO object methods used to upload / download structures containing groups of module
parameters.
CopleyIO.cpp
CML.h
CML_Network.h CML_EventMap.h
CML_Can.h CML_Geometry.h
CML_Reference.h CML_Trajectory.h
CML_Threads.h CML_Firmware.h
CML_Error.h CML_Array.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
Generated by Doxygen
778 File Documentation
This file contains the CopleyIO object methods used to upload / download structures containing groups of module
parameters.
CopleyNode.cpp
CML.h
CML_Network.h CML_EventMap.h
CML_Can.h CML_Geometry.h
CML_Reference.h CML_Trajectory.h
CML_Threads.h CML_Firmware.h
CML_Error.h CML_Array.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
This file holds some utility code used by the EtherCAT network when initializing it's distributed clock.
ecatdc.cpp
CML_Network.h CML_EventMap.h
CML_Can.h CML_Geometry.h
CML_Reference.h CML_Trajectory.h
CML_Threads.h CML_Firmware.h
CML_Error.h CML_Array.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
Generated by Doxygen
6.52 Error.cpp File Reference 779
This file holds some utility code used by the EtherCAT network when initializing it's distributed clock.
This file handles initializing the static data objects used by the Error class.
Error.cpp
CML.h
CML_Network.h CML_EventMap.h
CML_Can.h CML_Geometry.h
CML_Reference.h CML_Trajectory.h
CML_Threads.h CML_Firmware.h
CML_Error.h CML_Array.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
This file handles initializing the static data objects used by the Error class.
This file holds code for the top level EtherCAT class.
EtherCAT.cpp
string.h CML.h
CML_Network.h CML_EventMap.h
CML_Can.h CML_Geometry.h
CML_Reference.h CML_Trajectory.h
CML_Threads.h CML_Firmware.h
CML_Error.h CML_Array.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
Generated by Doxygen
780 File Documentation
Macros
• #define SM_RXMBX 0
The EtherCatNodeInfo structure holds some data required by the EtherCAT network interface which is present in every
node it manages.
This file holds code for the top level EtherCAT class.
6.53.2.1 SM_RXMBX
#define SM_RXMBX 0
The EtherCatNodeInfo structure holds some data required by the EtherCAT network interface which is present in every
node it manages.
The contents of this structure should be considered the private property of the EtherCAT class.
EventMap.cpp
CML.h
CML_Network.h CML_EventMap.h
CML_Can.h CML_Geometry.h
CML_Reference.h CML_Trajectory.h
CML_Threads.h CML_Firmware.h
CML_Error.h CML_Array.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
Generated by Doxygen
6.55 File.cpp File Reference 781
File.cpp
CML.h
CML_Network.h CML_EventMap.h
CML_Can.h CML_Geometry.h
CML_Reference.h CML_Trajectory.h
CML_Threads.h CML_Firmware.h
CML_Error.h CML_Array.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
Filter.cpp
CML.h
CML_Network.h CML_EventMap.h
CML_Can.h CML_Geometry.h
CML_Reference.h CML_Trajectory.h
CML_Threads.h CML_Firmware.h
CML_Error.h CML_Array.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
Generated by Doxygen
782 File Documentation
Firmware.cpp
stdio.h CML_Firmware.h
CML_Error.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
Generated by Doxygen
6.58 Geometry.cpp File Reference 783
Geometry.cpp
CML.h math.h
CML_Network.h CML_EventMap.h
CML_Can.h CML_Geometry.h
CML_Reference.h CML_Trajectory.h
CML_Threads.h CML_Firmware.h
CML_Error.h CML_Array.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
InputShaper.cpp
CML.h
CML_Network.h CML_EventMap.h
CML_Can.h CML_Geometry.h
CML_Reference.h CML_Trajectory.h
CML_Threads.h CML_Firmware.h
CML_Error.h CML_Array.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
Generated by Doxygen
784 File Documentation
IOmodule.cpp
CML.h
CML_Network.h CML_EventMap.h
CML_Can.h CML_Geometry.h
CML_Reference.h CML_Trajectory.h
CML_Threads.h CML_Firmware.h
CML_Error.h CML_Array.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
This file holds the code used to implement a standard DS401 I/O module.
Linkage.cpp
CML.h
CML_Network.h CML_EventMap.h
CML_Can.h CML_Geometry.h
CML_Reference.h CML_Trajectory.h
CML_Threads.h CML_Firmware.h
CML_Error.h CML_Array.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
Macros
• #define ERROR_EVENTS
Update the status event map used by this linkage.
Generated by Doxygen
6.62 Network.cpp File Reference 785
This file holds code for the top level CANopen class.
Network.cpp
CML_Node.h
CML_Network.h
CML_Can.h
CML_Reference.h CML_EventMap.h
CML_Threads.h
CML_Error.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
This file holds code for the top level CANopen class.
This class is used for over all control of the CANopen network.
This file holds code to implement the CANopen node related objects.
Node.cpp
CML.h
CML_Network.h CML_EventMap.h
CML_Can.h CML_Geometry.h
CML_Reference.h CML_Trajectory.h
CML_Threads.h CML_Firmware.h
CML_Error.h CML_Array.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
Generated by Doxygen
786 File Documentation
This file holds code to implement the CANopen node related objects.
This file holds the code needed to implement CANopen Process Data Objects (PDOs).
PDO.cpp
CML.h
CML_Network.h CML_EventMap.h
CML_Can.h CML_Geometry.h
CML_Reference.h CML_Trajectory.h
CML_Threads.h CML_Firmware.h
CML_Error.h CML_Array.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
This file holds the code needed to implement CANopen Process Data Objects (PDOs).
PvtConstAccelTrj.cpp
CML.h iostream
CML_Network.h CML_EventMap.h
CML_Can.h CML_Geometry.h
CML_Reference.h CML_Trajectory.h
CML_Threads.h CML_Firmware.h
CML_Error.h CML_Array.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
Generated by Doxygen
6.66 PvtTrj.cpp File Reference 787
PvtTrj.cpp
CML.h iostream
CML_Network.h CML_EventMap.h
CML_Can.h CML_Geometry.h
CML_Reference.h CML_Trajectory.h
CML_Threads.h CML_Firmware.h
CML_Error.h CML_Array.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
This file holds the code needed to implement the CML reference counting objects.
Reference.cpp
CML.h
CML_Network.h CML_EventMap.h
CML_Can.h CML_Geometry.h
CML_Reference.h CML_Trajectory.h
CML_Threads.h CML_Firmware.h
CML_Error.h CML_Array.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
Generated by Doxygen
788 File Documentation
This file holds the code needed to implement the CML reference counting objects.
This file contains the code used to implement the CANopen SDO objects.
SDO.cpp
CML.h
CML_Network.h CML_EventMap.h
CML_Can.h CML_Geometry.h
CML_Reference.h CML_Trajectory.h
CML_Threads.h CML_Firmware.h
CML_Error.h CML_Array.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
This file contains the code used to implement the CANopen SDO objects.
This file only contains definitions for the generic thread error objects.
Generated by Doxygen
6.69 Threads.cpp File Reference 789
Threads.cpp
CML_Threads.h
CML_Error.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
This file only contains definitions for the generic thread error objects.
The code used to implement the OS specific thread methods is located in Operating system specific files such as
Threads_posix.cpp and Threads_w32.cpp.
Generated by Doxygen
790 File Documentation
Generated by Doxygen
Index
Ain16SetNegativeDelta AinFltGetScaling
IOModule, 373 IOModule, 385
Ain16SetPositiveDelta AinFltGetUnsignedDelta
IOModule, 373 IOModule, 386
Ain16SetUnsignedDelta AinFltGetUpperLimit
IOModule, 374 IOModule, 386
Ain16SetUpperLimit AinFltRead
IOModule, 374 IOModule, 387
Ain32GetCt AinFltSetLowerLimit
IOModule, 375 IOModule, 387
Ain32GetLowerLimit AinFltSetNegativeDelta
IOModule, 375 IOModule, 388
Ain32GetNegativeDelta AinFltSetOffset
IOModule, 376 IOModule, 388
Ain32GetOffset AinFltSetPositiveDelta
IOModule, 376 IOModule, 388
Ain32GetPositiveDelta AinFltSetScaling
IOModule, 376 IOModule, 389
Ain32GetScaling AinFltSetUnsignedDelta
IOModule, 377 IOModule, 389
Ain32GetUnsignedDelta AinFltSetUpperLimit
IOModule, 377 IOModule, 390
Ain32GetUpperLimit AinGetIntEna
IOModule, 378 IOModule, 390
Ain32Read AinGetIntSource
IOModule, 378 IOModule, 391
Ain32SetLowerLimit AinGetTrigType
IOModule, 379 IOModule, 391
Ain32SetNegativeDelta AinSetIntEna
IOModule, 379 IOModule, 392
Ain32SetOffset AinSetTrigType
IOModule, 379 IOModule, 392
Ain32SetPositiveDelta AlgoPhaseInit, 26
IOModule, 380 AlgoPhaseInit, 27
Ain32SetScaling phaseInitConfig, 27
IOModule, 380 Amp, 30
Ain32SetUnsignedDelta AccLoad2User, 46
IOModule, 381 AccMtr2User, 47
Ain32SetUpperLimit AccUser2Load, 47
IOModule, 381 AccUser2Mtr, 48
Ain8GetCt Amp, 45, 46
IOModule, 382 CheckStateForMove, 48
Ain8Read ClearEventLatch, 48
IOModule, 382 ClearFaults, 49
AinFltGetCt ClearHaltedMove, 49
IOModule, 382 ClearNodeGuardEvent, 49
AinFltGetLowerLimit Disable, 50
IOModule, 384 Dnld16, 50, 51
AinFltGetNegativeDelta Dnld32, 51, 52
IOModule, 384 Dnld8, 52, 53
AinFltGetOffset DnldString, 53
IOModule, 385 DoMove, 54, 55
AinFltGetPositiveDelta Download, 56
IOModule, 385 Enable, 56
Generated by Doxygen
INDEX 793
FormatPosInit, 57 GetIoConfig, 81
FormatPtSeg, 57 GetIoPullup, 82
FormatPvtSeg, 58 GetIoPullup32, 83
GetAlgoPhaseInit, 58 GetLinkRef, 83
GetAmpConfig, 59 GetLinkage, 83
GetAmpInfo, 59 GetMicrostepRate, 84
GetAmpMode, 60 GetMotorCurrent, 84
GetAmpName, 60 GetMtrInfo, 85
GetAmpTemp, 60 GetNetworkOptions, 85
GetAnalogCommandFilter, 61 GetNetworkRef, 85
GetAnalogEncoder, 61 GetOutputConfig, 86–88
GetAnalogRefConfig, 62 GetOutputs, 89
GetCammingConfig, 62 GetPhaseAngle, 89
GetCanNetworkConfig, 62 GetPhaseMode, 89
GetControlWord, 63 GetPosCaptureCfg, 90
GetCountsPerUnit, 63, 64 GetPosCaptureStat, 90
GetCrntLoopConfig, 64 GetPosLoopConfig, 94
GetCurrentActual, 65 GetPositionActual, 91
GetCurrentCommand, 65 GetPositionCommand, 91
GetCurrentLimited, 66 GetPositionError, 92
GetCurrentProgrammed, 66 GetPositionErrorWindow, 92
GetDAConverterConfig, 66 GetPositionLoad, 92
GetEncoderErrorConfig, 67 GetPositionMotor, 93
GetErrorStatus, 67 GetPositionWarnWindow, 93
GetEventLatch, 68 GetProfileAcc, 94
GetEventMask, 68 GetProfileConfig, 95
GetEventStatus, 69 GetProfileDec, 95
GetEventSticky, 69 GetProfileJerk, 95
GetFaultMask, 70 GetProfileType, 96
GetFaults, 70 GetProfileVel, 96
GetFuncGenConfig, 70 GetPvtBuffFree, 97
GetGainScheduling, 72 GetPvtBuffStat, 97
GetHallState, 72 GetPvtSegID, 97
GetHaltMode, 72 GetPvtSegPos, 98
GetHighVoltage, 73 GetPwmInConfig, 98
GetHomeAccel, 73 GetPwmMode, 99
GetHomeAdjustment, 74 GetQuickStop, 99
GetHomeCapture, 74 GetQuickStopDec, 99
GetHomeConfig, 75 GetRefVoltage, 100
GetHomeCurrent, 75 GetRegenConfig, 100
GetHomeDelay, 75 GetServoLoopConfig, 101
GetHomeMethod, 76 GetSettlingTime, 101
GetHomeOffset, 76 GetSettlingWindow, 102
GetHomeVelFast, 77 GetSoftLimits, 102
GetHomeVelSlow, 77 GetSpecialFirmwareConfig, 102
GetIOOPtions, 82 GetState, 103
GetIloopCommandFilter, 77 GetStatusWord, 103
GetIloopCommandFilter2, 78 GetTargetPos, 104
GetIndexCapture, 78 GetTargetVel, 104
GetInputConfig, 79 GetTorqueActual, 105
GetInputDebounce, 80 GetTorqueDemand, 105
GetInputShapingFilter, 81 GetTorqueRated, 105
GetInputs, 80 GetTorqueSlope, 106
GetInputs32, 81 GetTorqueTarget, 106
Generated by Doxygen
794 INDEX
Generated by Doxygen
INDEX 795
Generated by Doxygen
796 INDEX
Generated by Doxygen
INDEX 797
Generated by Doxygen
798 INDEX
Generated by Doxygen
INDEX 799
Generated by Doxygen
800 INDEX
DetachNode Din8GetMaskAny
CanOpen, 235 IOModule, 415
Din16GetCt Din8GetMaskHigh2Low
IOModule, 404 IOModule, 416
Din16GetFilt Din8GetMaskLow2High
IOModule, 404 IOModule, 416
Din16GetMaskAny Din8GetPol
IOModule, 405 IOModule, 417
Din16GetMaskHigh2Low Din8Read
IOModule, 405 IOModule, 417
Din16GetMaskLow2High Din8SetFilt
IOModule, 406 IOModule, 418
Din16GetPol Din8SetMaskAny
IOModule, 406 IOModule, 418
Din16Read Din8SetMaskHigh2Low
IOModule, 407 IOModule, 419
Din16SetFilt Din8SetMaskLow2High
IOModule, 407 IOModule, 419
Din16SetMaskAny Din8SetPol
IOModule, 407 IOModule, 420
Din16SetMaskHigh2Low DinGetCt
IOModule, 408 IOModule, 420
Din16SetMaskLow2High DinGetFilt
IOModule, 408 IOModule, 420
Din16SetPol DinGetIntEna
IOModule, 409 IOModule, 421
Din32GetCt DinGetMaskAny
IOModule, 409 IOModule, 421
Din32GetFilt DinGetMaskHigh2Low
IOModule, 410 IOModule, 422
Din32GetMaskAny DinGetMaskLow2High
IOModule, 410 IOModule, 422
Din32GetMaskHigh2Low DinGetPol
IOModule, 410 IOModule, 423
Din32GetMaskLow2High DinRead
IOModule, 411 IOModule, 423
Din32GetPol DinSetFilt
IOModule, 411 IOModule, 424
Din32Read DinSetIntEna
IOModule, 412 IOModule, 424
Din32SetFilt DinSetMaskAny
IOModule, 412 IOModule, 424
Din32SetMaskAny DinSetMaskHigh2Low
IOModule, 413 IOModule, 425
Din32SetMaskHigh2Low DinSetMaskLow2High
IOModule, 413 IOModule, 425
Din32SetMaskLow2High DinSetPol
IOModule, 414 IOModule, 426
Din32SetPol dir
IOModule, 414 ProfileConfigVel, 593
Din8GetCt Disable
IOModule, 415 Amp, 50
Din8GetFilt DisableBlkDnld
IOModule, 415 SDO, 625
Generated by Doxygen
INDEX 801
DisableBlkUpld Dout32SetErrMode
SDO, 626 IOModule, 434
DisableReceiver Dout32SetErrValue
CanOpen, 236 IOModule, 434
Dnld16 Dout32SetFilt
Amp, 50, 51 IOModule, 435
SDO, 626 Dout32SetPol
Dnld32 IOModule, 435
Amp, 51, 52 Dout32Write
SDO, 627 IOModule, 436
Dnld8 Dout8GetCt
Amp, 52, 53 IOModule, 436
SDO, 628 Dout8GetErrMode
DnldFlt IOModule, 437
SDO, 628 Dout8GetErrValue
DnldString IOModule, 437
Amp, 53 Dout8GetFilt
SDO, 629 IOModule, 438
DoMove Dout8GetPol
Amp, 54, 55 IOModule, 438
Dout16GetCt Dout8Read
IOModule, 426 IOModule, 438
Dout16GetErrMode Dout8SetErrMode
IOModule, 427 IOModule, 439
Dout16GetErrValue Dout8SetErrValue
IOModule, 427 IOModule, 439
Dout16GetFilt Dout8SetFilt
IOModule, 428 IOModule, 440
Dout16GetPol Dout8SetPol
IOModule, 428 IOModule, 440
Dout16Read Dout8Write
IOModule, 428 IOModule, 441
Dout16SetErrMode DoutGetCt
IOModule, 429 IOModule, 441
Dout16SetErrValue DoutGetErrMode
IOModule, 429 IOModule, 442
Dout16SetFilt DoutGetErrValue
IOModule, 430 IOModule, 442
Dout16SetPol DoutGetFilt
IOModule, 430 IOModule, 443
Dout16Write DoutGetPol
IOModule, 431 IOModule, 443
Dout32GetCt DoutSetErrMode
IOModule, 431 IOModule, 443
Dout32GetErrMode DoutSetErrValue
IOModule, 432 IOModule, 444
Dout32GetErrValue DoutSetFilt
IOModule, 432 IOModule, 444
Dout32GetFilt DoutSetPol
IOModule, 433 IOModule, 445
Dout32GetPol DoutWrite
IOModule, 433 IOModule, 445
Dout32Read Download
IOModule, 433 Amp, 56
Generated by Doxygen
802 INDEX
Generated by Doxygen
INDEX 803
Generated by Doxygen
804 INDEX
Generated by Doxygen
INDEX 805
GetInVal Amp, 84
IOModule::AlgInPDO, 24 GetMotorCurrent
IOModule::DigInPDO, 288 Amp, 84
GetIndex GetMoveLimits
Pmap, 563 Linkage, 475
GetIndexCapture GetMtrInfo
Amp, 78 Amp, 85
GetInputConfig getNdx
Amp, 79 EcatDgram, 296
GetInputDebounce GetNetworkOptions
Amp, 80 Amp, 85
GetInputShapingFilter GetNetworkRef
Amp, 81 Amp, 85
GetInputs Node, 528
Amp, 80 GetNetworkType
GetInputs32 CanOpen, 237
Amp, 81 EtherCAT, 312
GetIoConfig Node, 528
Amp, 81 getNext
GetIoPullup EcatDgram, 296
Amp, 82 GetNodeAddress
GetIoPullup32 EtherCAT, 312
Amp, 83 getNodeCount
GetLatchedError EtherCAT, 313
Linkage, 475 GetNodeID
getLength Node, 529
Firmware, 345 GetNodeInfo
GetLinkRef Network, 516
Amp, 83 GetOutputConfig
GetLinkage Amp, 86–88
Amp, 83 GetOutputs
GetLogFile Amp, 89
CopleyMotionLibrary, 274 GetPhaseAngle
GetMapCodes Amp, 89
PDO, 556 GetPhaseMode
getMask Amp, 89
Event, 325 GetPosCaptureCfg
EventMap, 339 Amp, 90
getMax GetPosCaptureStat
Point, 583 Amp, 90
PointN, 585 GetPosLoopConfig
GetMaxLogSize Amp, 94
CopleyMotionLibrary, 274 GetPosition
GetMaxRetry PvtSegCache, 597
SDO, 631 GetPositionActual
GetMfgDeviceName Amp, 91
Node, 527 GetPositionCommand
GetMfgHardwareVer Amp, 91
Node, 527 Linkage, 476
GetMfgSoftwareVer GetPositionError
Node, 527 Amp, 92
GetMfgStatus GetPositionErrorWindow
Node, 528 Amp, 92
GetMicrostepRate GetPositionLoad
Generated by Doxygen
806 INDEX
Generated by Doxygen
INDEX 807
GetTrajectoryJrkAbort hallVelShift
Amp, 111 MtrInfo, 510
GetTrajectoryVel HaltMove
Amp, 111 Amp, 118
GetType Linkage, 476
PDO, 557 haltOnPosWarn
GetUstepConfig LinkSettings, 487
Amp, 112 haltOnVelWin
getValue LinkSettings, 488
Event, 325 HandleEmergency
GetVelLoopConfig Node, 530
Amp, 112 HandleRxMsg
GetVelocityActual TPDO, 658
Amp, 113 HandleStateChange
GetVelocityCommand Amp, 118
Amp, 113 Node, 530
GetVelocityLimited heartbeat
Amp, 114 CanNetworkConfig, 230
GetVelocityLoad heartbeatPeriod
Amp, 114 AmpSettings, 203
GetVelocityProgrammed IOModuleSettings, 449
Amp, 115 heartbeatTimeout
GetVelocityWarnTime AmpSettings, 204
Amp, 115 IOModuleSettings, 450
GetVelocityWarnWindow HomeConfig, 352
Amp, 115 accel, 353
GetVersionString current, 353
CopleyMotionLibrary, 274 delay, 353
GetVloopCommandFilter extended, 353
Amp, 116 HomeConfig, 353
GetVloopOutputFilter offset, 354
Amp, 116 velFast, 354
GetVloopOutputFilter2 velSlow, 354
Amp, 117
GetVloopOutputFilter3 INPUT_PIN_CONFIG
Amp, 117 CML_AmpDef.h, 716
GoHome IO_AIN_TRIG_TYPE
Amp, 117, 118 CML_IO.h, 748
GrabRef IO_OBJID
RefObj, 608 CML_IO.h, 748
GuardProtocol IOError, 356
CML_Network.h, 755 IOFileError, 358
guardTime IOMODULE_EVENTS
AmpSettings, 203 CML_IO.h, 750
IOModuleSettings, 449 IOModule, 359
guardTimeout Ain16GetCt, 370
CanOpenNodeInfo, 248 Ain16GetLowerLimit, 370
guardToggle Ain16GetNegativeDelta, 370
CanOpenNodeInfo, 248 Ain16GetPositiveDelta, 371
guardType Ain16GetUnsignedDelta, 371
CanOpenNodeInfo, 248 Ain16GetUpperLimit, 372
Ain16Read, 372
HALT_MODE Ain16SetLowerLimit, 373
CML_AmpDef.h, 716 Ain16SetNegativeDelta, 373
Generated by Doxygen
808 INDEX
Generated by Doxygen
INDEX 809
Generated by Doxygen
810 INDEX
Generated by Doxygen
INDEX 811
Generated by Doxygen
812 INDEX
Generated by Doxygen
INDEX 813
NoneAvailable POS_CAPTURE_STAT
TrjError, 666 CML_AmpDef.h, 720
NotInitialized PROFILE_TYPE
CanOpenError, 246 CML_AmpDef.h, 721
NotSupported Path, 542
LinkError, 486 AddArc, 544
numInPins AddLine, 545
CanNetworkConfig, 230 GetDim, 546
NextSegment, 546
OUTPUT_PIN_CONFIG Path, 543
CML_AmpDef.h, 718 Pause, 547
offset PlayPath, 547
CanNetworkConfig, 231 Reset, 548
HomeConfig, 354 SetAcc, 548
Open SetDec, 548
CanInterface, 224
SetJrk, 549
CanOpen, 237, 238
SetStartPos, 549
CopleyCAN, 254
SetVel, 550
IxxatCANV3, 460
StartNew, 550
IxxatCAN, 455
PathError, 551
KvaserCAN, 466
Pause
SiemensCAN, 647
Path, 547
operator∗
PdoDisable
RefObjLocker, 613
Node, 532
operator->
PdoEnable
RefObjLocker, 613
Node, 532
operator=
PdoSet
Event, 326
Node, 533
operator[]
peakPower
Array, 213
RegenConfig, 615
Linkage, 480
peakTime
options
CrntLoopConfig, 283
AmpConfig, 186
RegenConfig, 615
outMask
phaseInitConfig
AmpIoCfg, 200
AlgoPhaseInit, 27
outMask1
phaseMode
AmpIoCfg, 201
AmpConfig, 186
outputCt
pinMapping
AmpIoCfg, 201
CanNetworkConfig, 231
PDO.cpp, 786 PlayPath
PDO_Error, 559 Path, 547
BitOverflow, 560 Pmap, 560
PDO, 553 Get, 563
AddVar, 555 GetBits, 563
ClearMap, 556 GetIndex, 563
GetID, 556 GetSub, 564
GetMapCodes, 556 Init, 564
GetRtrOk, 557 Pmap, 561
GetType, 557 Set, 564
map, 558 Pmap16, 565
SetID, 557 Get, 567
SetType, 558 Init, 567
POS_CAPTURE_CFG Pmap16, 566
CML_AmpDef.h, 719 Read, 567
Generated by Doxygen
814 INDEX
Generated by Doxygen
INDEX 815
Generated by Doxygen
816 INDEX
Generated by Doxygen
INDEX 817
Generated by Doxygen
818 INDEX
Generated by Doxygen
INDEX 819
Generated by Doxygen
820 INDEX
TraceStart Upld8
Amp, 172 Amp, 175
TraceStop SDO, 634, 635
Amp, 172 UpldFlt
trackErr SDO, 635
TrackingWindows, 661 UpldString
trackWarn Amp, 176
TrackingWindows, 661 SDO, 636
TrackingWindows, 659 Upload
settlingTime, 660 Amp, 176
settlingWin, 660 SDO, 636, 637
trackErr, 661 useAsTimingReference
trackWarn, 661 CanOpenSettings, 250
TrackingWindows, 660 useStandardAinPDO
Trajectory, 661 IOModuleSettings, 450
Finish, 663 useStandardAoutPDO
MaximumBufferPointsToUse, 663 IOModuleSettings, 451
NextSegment, 663 useStandardDinPDO
StartNew, 664 IOModuleSettings, 451
UseVelocityInfo, 664 useStandardDoutPDO
Transmit IOModuleSettings, 451
IOModule::AlgOutPDO, 29 useSwitch
IOModule::DigOutPDO, 291 CanNetworkConfig, 231
RPDO_LinkCtrl, 620 UseVelocityInfo
TrjError, 665 LinkTrajectory, 492
NoneAvailable, 666 Trajectory, 664
TrjScurve, 666 UstepConfig, 670
Calculate, 668, 669 maxVelAdj, 671
GetStartPos, 669 UstepConfig, 671
SetStartPos, 670 ustepConfigAndStatus, 672
StartNew, 670 ustepPGainOutLoop, 672
TrjScurve, 668 ustepConfigAndStatus
UstepConfig, 672
uint16 ustepPGainOutLoop
CML_Utils.h, 776 UstepConfig, 672
uint32 uunit
CML_Utils.h, 777 CML_Utils.h, 777
UnInit uvCfg
Node, 538 PwmInConfig, 603
Unlock
Mutex, 512 vOff
Update RegenConfig, 615
IOModule::AlgOutPDO, 30 vOn
IOModule::DigOutPDO, 292 RegenConfig, 615
UpdateBit vel
IOModule::DigOutPDO, 292 ProfileConfigScurve, 590
UpdateEvents ProfileConfigTrap, 591
Amp, 172 ProfileConfigVel, 593
Upld16 velCmdff
Amp, 173 VelLoopConfig, 675
SDO, 632, 633 velFast
Upld32 HomeConfig, 354
Amp, 174 VelLoad2User
SDO, 633, 634 Amp, 177
Generated by Doxygen
INDEX 821
Wait
Event, 327
WaitCycleUpdate
EtherCAT, 316
WaitEvent
Amp, 179
Linkage, 482, 483
WaitHomeDone
Amp, 180
WaitIOEvent
IOModule, 447, 448
WaitInputEvent
Amp, 180
WaitInputHigh
Amp, 181
WaitInputLow
Amp, 181
WaitMoveDone
Amp, 182
Linkage, 483
Warn
CopleyMotionLibrary, 277
WinUdpEcatHardware, 675
WinUdpEcatHardware, 676
Write
Pmap16, 568
Pmap24, 572
Pmap32, 575
Pmap8, 579
WriteCCDToCANDrive
AmpFile.cpp, 681
WriteCCDToEcatDrive
AmpFile.cpp, 681
Xmit
CanInterface, 226
CanOpen, 241
LSS, 507
Generated by Doxygen