CML Reference Manual
CML Reference Manual
2 Hierarchical Index 9
2.1 Class Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3 Class Index 13
3.1 Class List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
iv CONTENTS
4 File Index 19
5 Class Documentation 23
5.1.2.1 GetInVal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.1.2.2 Init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.1.2.3 Received . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.2.2.1 AlgoPhaseInit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.2.3.1 phaseInitConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.3.2.1 Init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.3.2.2 Transmit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.3.2.3 Update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.4.2.1 Amp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
5.4.2.2 Amp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
5.4.2.3 Amp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
5.4.3.1 AccLoad2User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
5.4.3.2 AccMtr2User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
5.4.3.3 AccUser2Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
5.4.3.4 AccUser2Mtr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
5.4.3.5 CheckStateForMove . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
5.4.3.6 ClearEventLatch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
5.4.3.7 ClearFaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
5.4.3.8 ClearNodeGuardEvent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
CONTENTS v
5.4.3.9 Disable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
5.4.3.10 Dnld16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
5.4.3.11 Dnld16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
5.4.3.12 Dnld32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
5.4.3.13 Dnld32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
5.4.3.14 Dnld8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
5.4.3.15 Dnld8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
5.4.3.16 DnldString . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
5.4.3.17 DoMove . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
5.4.3.18 DoMove . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
5.4.3.19 DoMove . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
5.4.3.20 DoMove . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
5.4.3.21 Download . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
5.4.3.22 Enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
5.4.3.23 FormatPosInit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
5.4.3.24 FormatPtSeg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
5.4.3.25 FormatPvtSeg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
5.4.3.26 GetAlgoPhaseInit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
5.4.3.27 GetAmpConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
5.4.3.28 GetAmpInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
5.4.3.29 GetAmpMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
5.4.3.30 GetAmpName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
5.4.3.31 GetAmpTemp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
5.4.3.32 GetAnalogCommandFilter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
5.4.3.33 GetAnalogEncoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
5.4.3.34 GetAnalogRefConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
5.4.3.35 GetCammingConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
5.4.3.36 GetCanNetworkConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
5.4.3.37 GetControlWord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
5.4.3.38 GetCountsPerUnit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
5.4.3.39 GetCountsPerUnit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
5.4.3.40 GetCrntLoopConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
5.4.3.41 GetCurrentActual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
5.4.3.42 GetCurrentCommand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
5.4.3.43 GetCurrentLimited . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
5.4.3.44 GetCurrentProgrammed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
5.4.3.45 GetDAConverterConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
vi CONTENTS
5.4.3.46 GetErrorStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
5.4.3.47 GetEventLatch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
5.4.3.48 GetEventMask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
5.4.3.49 GetEventStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
5.4.3.50 GetEventSticky . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
5.4.3.51 GetFaultMask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
5.4.3.52 GetFaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
5.4.3.53 GetFuncGenConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
5.4.3.54 GetGainScheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
5.4.3.55 GetHallState . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
5.4.3.56 GetHaltMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
5.4.3.57 GetHighVoltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
5.4.3.58 GetHomeAccel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
5.4.3.59 GetHomeAdjustment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
5.4.3.60 GetHomeCapture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
5.4.3.61 GetHomeConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
5.4.3.62 GetHomeCurrent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
5.4.3.63 GetHomeDelay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
5.4.3.64 GetHomeMethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
5.4.3.65 GetHomeOffset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
5.4.3.66 GetHomeVelFast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
5.4.3.67 GetHomeVelSlow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
5.4.3.68 GetIloopCommandFilter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
5.4.3.69 GetIloopCommandFilter2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
5.4.3.70 GetIndexCapture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.4.3.71 GetInputConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.4.3.72 GetInputConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.4.3.73 GetInputDebounce . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
5.4.3.74 GetInputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
5.4.3.75 GetInputs32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
5.4.3.76 GetInputShapingFilter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
5.4.3.77 GetIoConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
5.4.3.78 GetIOOPtions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
5.4.3.79 GetIoPullup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
5.4.3.80 GetIoPullup32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
5.4.3.81 GetLinkage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
5.4.3.82 GetLinkRef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
CONTENTS vii
5.4.3.83 GetMicrostepRate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
5.4.3.84 GetMotorCurrent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
5.4.3.85 GetMtrInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
5.4.3.86 GetNetworkOptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
5.4.3.87 GetNetworkRef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
5.4.3.88 GetOutputConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
5.4.3.89 GetOutputConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
5.4.3.90 GetOutputConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
5.4.3.91 GetOutputConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
5.4.3.92 GetOutputConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
5.4.3.93 GetOutputConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
5.4.3.94 GetOutputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
5.4.3.95 GetPhaseAngle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
5.4.3.96 GetPhaseMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
5.4.3.97 GetPosCaptureCfg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
5.4.3.98 GetPosCaptureStat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
5.4.3.99 GetPositionActual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
5.4.3.100 GetPositionCommand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
5.4.3.101 GetPositionError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
5.4.3.102 GetPositionErrorWindow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
5.4.3.103 GetPositionLoad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
5.4.3.104 GetPositionMotor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
5.4.3.105 GetPositionWarnWindow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
5.4.3.106 GetPosLoopConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
5.4.3.107 GetProfileAcc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
5.4.3.108 GetProfileConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
5.4.3.109 GetProfileDec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
5.4.3.110 GetProfileJerk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
5.4.3.111 GetProfileType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
5.4.3.112 GetProfileVel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
5.4.3.113 GetPvtBuffFree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
5.4.3.114 GetPvtBuffStat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
5.4.3.115 GetPvtSegID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
5.4.3.116 GetPvtSegPos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
5.4.3.117 GetPwmInConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
5.4.3.118 GetPwmMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
5.4.3.119 GetQuickStop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
viii CONTENTS
5.4.3.120 GetQuickStopDec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
5.4.3.121 GetRefVoltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
5.4.3.122 GetRegenConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
5.4.3.123 GetSettlingTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
5.4.3.124 GetSettlingWindow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
5.4.3.125 GetSoftLimits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
5.4.3.126 GetState . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
5.4.3.127 GetStatusWord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
5.4.3.128 GetTargetPos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
5.4.3.129 GetTargetVel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
5.4.3.130 GetTorqueActual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
5.4.3.131 GetTorqueDemand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
5.4.3.132 GetTorqueRated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
5.4.3.133 GetTorqueSlope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
5.4.3.134 GetTorqueTarget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
5.4.3.135 GetTraceChannel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
5.4.3.136 GetTraceData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
5.4.3.137 GetTraceMaxChannel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
5.4.3.138 GetTracePeriod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
5.4.3.139 GetTraceRefPeriod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
5.4.3.140 GetTraceStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
5.4.3.141 GetTraceTrigger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
5.4.3.142 GetTrackingWindows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
5.4.3.143 GetTrajectoryAcc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
5.4.3.144 GetTrajectoryVel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
5.4.3.145 GetUstepConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
5.4.3.146 GetVelLoopConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
5.4.3.147 GetVelocityActual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
5.4.3.148 GetVelocityCommand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
5.4.3.149 GetVelocityLimited . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
5.4.3.150 GetVelocityLoad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
5.4.3.151 GetVelocityProgrammed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
5.4.3.152 GetVelocityWarnTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
5.4.3.153 GetVelocityWarnWindow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
5.4.3.154 GetVloopCommandFilter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
5.4.3.155 GetVloopOutputFilter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
5.4.3.156 GetVloopOutputFilter2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
CONTENTS ix
5.4.3.157 GetVloopOutputFilter3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
5.4.3.158 GoHome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
5.4.3.159 GoHome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
5.4.3.160 HaltMove . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
5.4.3.161 HandleStateChange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
5.4.3.162 Init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
5.4.3.163 Init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
5.4.3.164 InitSubAxis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
5.4.3.165 IsHardwareEnabled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
5.4.3.166 IsReferenced . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
5.4.3.167 IsSoftwareEnabled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
5.4.3.168 JrkLoad2User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
5.4.3.169 JrkUser2Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
5.4.3.170 LoadFromFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
5.4.3.171 MoveAbs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
5.4.3.172 MoveRel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
5.4.3.173 PosLoad2User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
5.4.3.174 PosMtr2User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
5.4.3.175 PosUser2Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
5.4.3.176 PosUser2Mtr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
5.4.3.177 PvtBufferFlush . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
5.4.3.178 PvtBufferPop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
5.4.3.179 PvtClearErrors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
5.4.3.180 PvtStatusUpdate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
5.4.3.181 PvtWriteBuff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
5.4.3.182 PvtWriteBuff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
5.4.3.183 QuickStop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
5.4.3.184 ReInit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
5.4.3.185 Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
5.4.3.186 SaveAmpConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
5.4.3.187 SaveAmpConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
5.4.3.188 SendTrajectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
5.4.3.189 SetAlgoPhaseInit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
5.4.3.190 SetAmpConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
5.4.3.191 SetAmpMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
5.4.3.192 SetAmpName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
5.4.3.193 SetAnalogCommandFilter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
x CONTENTS
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
CONTENTS xi
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
xii CONTENTS
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
CONTENTS xiii
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
xiv CONTENTS
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
CONTENTS xv
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
xvi CONTENTS
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
CONTENTS xvii
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
xviii CONTENTS
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
CONTENTS xix
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
xx CONTENTS
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
CONTENTS xxi
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
xxii CONTENTS
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
CONTENTS xxiii
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
xxiv CONTENTS
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
CONTENTS xxv
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
xxvi CONTENTS
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
CONTENTS xxvii
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
xxviii CONTENTS
5.67.3.118DinGetMaskAny . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
5.67.3.119DinGetMaskHigh2Low . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
5.67.3.120DinGetMaskLow2High . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
5.67.3.121DinGetPol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
5.67.3.122DinRead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
5.67.3.123DinSetFilt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
5.67.3.124DinSetIntEna . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
5.67.3.125DinSetMaskAny . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
5.67.3.126DinSetMaskHigh2Low . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
5.67.3.127DinSetMaskLow2High . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
5.67.3.128DinSetPol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
5.67.3.129Dout16GetCt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
5.67.3.130Dout16GetErrMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
5.67.3.131Dout16GetErrValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
5.67.3.132Dout16GetFilt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
5.67.3.133Dout16GetPol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
5.67.3.134Dout16Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
5.67.3.135Dout16SetErrMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
5.67.3.136Dout16SetErrValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
5.67.3.137Dout16SetFilt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
5.67.3.138Dout16SetPol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
5.67.3.139Dout16Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
5.67.3.140Dout32GetCt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
5.67.3.141Dout32GetErrMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
5.67.3.142Dout32GetErrValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
5.67.3.143Dout32GetFilt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
5.67.3.144Dout32GetPol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
5.67.3.145Dout32Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
5.67.3.146Dout32SetErrMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
5.67.3.147Dout32SetErrValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
5.67.3.148Dout32SetFilt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
5.67.3.149Dout32SetPol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
5.67.3.150Dout32Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
5.67.3.151Dout8GetCt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
5.67.3.152Dout8GetErrMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
5.67.3.153Dout8GetErrValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
5.67.3.154Dout8GetFilt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
CONTENTS xxix
5.67.3.155Dout8GetPol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
5.67.3.156Dout8Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
5.67.3.157Dout8SetErrMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
5.67.3.158Dout8SetErrValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
5.67.3.159Dout8SetFilt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
5.67.3.160Dout8SetPol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
5.67.3.161Dout8Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
5.67.3.162DoutGetCt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
5.67.3.163DoutGetErrMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
5.67.3.164DoutGetErrValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
5.67.3.165DoutGetFilt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
5.67.3.166DoutGetPol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
5.67.3.167DoutSetErrMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
5.67.3.168DoutSetErrValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
5.67.3.169DoutSetFilt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
5.67.3.170DoutSetPol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
5.67.3.171DoutWrite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
5.67.3.172Init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
5.67.3.173Init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
5.67.3.174PostIOEvent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
5.67.3.175WaitIOEvent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
5.67.3.176WaitIOEvent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
5.68 IOModuleSettings Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
5.68.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
5.68.2 Member Data Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
5.68.2.1 guardTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
5.68.2.2 heartbeatPeriod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
5.68.2.3 heartbeatTimeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
5.68.2.4 lifeFactor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
5.68.2.5 useStandardAinPDO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
5.68.2.6 useStandardAoutPDO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
5.68.2.7 useStandardDinPDO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
5.68.2.8 useStandardDoutPDO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
5.69 IxxatCAN Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
5.69.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
5.69.2 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
5.69.2.1 IxxatCAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
xxx CONTENTS
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
CONTENTS xxxi
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
xxxii CONTENTS
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
CONTENTS xxxiii
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
xxxiv CONTENTS
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
CONTENTS xxxv
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
xxxvi CONTENTS
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
CONTENTS xxxvii
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
xxxviii CONTENTS
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
CONTENTS xxxix
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
xl CONTENTS
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
CONTENTS xli
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
xlii CONTENTS
5.116.3.30Upload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495
5.117SDO_Error Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496
5.117.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
5.118Semaphore Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
5.118.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
5.118.2 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
5.118.2.1 Semaphore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
5.118.2.2 ∼Semaphore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
5.118.3 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
5.118.3.1 Get . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
5.118.3.2 Put . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
5.119ServoLoopConfig Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500
5.119.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500
5.119.2 Member Data Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500
5.119.2.1 servoLoopConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500
5.120SoftPosLimit Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500
5.120.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501
5.120.2 Member Data Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501
5.120.2.1 accel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501
5.120.2.2 macroEncoderCapture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501
5.120.2.3 motorPosWrap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501
5.120.2.4 neg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501
5.120.2.5 pos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502
5.121Thread Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502
5.121.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503
5.121.2 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503
5.121.2.1 Thread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503
5.121.3 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503
5.121.3.1 getTimeMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503
5.121.3.2 run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503
5.121.3.3 setPriority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503
5.121.3.4 sleep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504
5.121.3.5 start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504
5.121.3.6 stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504
5.122ThreadError Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505
5.122.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506
5.123TPDO Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
CONTENTS xliii
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
xliv CONTENTS
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
CONTENTS xlv
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
xlvi CONTENTS
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
CONTENTS xlvii
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
xlviii CONTENTS
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
CONTENTS xlix
Index 628
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library 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.
2 Copley Motion Library
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.
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.
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-
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
1.2 CANopen basics 3
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.
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
4 Copley Motion Library
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.
• 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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
1.3 EtherCAT basics 5
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.
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6 Copley Motion Library
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.
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
1.4 Architectural overview 7
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
8 Copley Motion Library
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
Chapter 2
Hierarchical Index
EventError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
FirmwareError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
IOFileError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
LinkError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
NetworkError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406
NodeError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
AmpError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
AmpFault . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
CopleyNodeError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
IOError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
PathError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
PDO_Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
ScurveError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482
SDO_Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496
ThreadError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505
TrjError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513
EtherCatSettings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
EventAll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
EventAny . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
EventAnyClear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
EventNone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
EventMap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
Firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
FuncGenConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
GainScheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
HomeConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
InputShaper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
IOModuleSettings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
LinkSettings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
MtrInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
Mutex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
MutexLocker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
NetworkNodeInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
CanOpenNodeInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
NetworkOptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
NodeIdentity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
Pmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
Pmap16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442
Pmap24 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444
Pmap32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447
Pmap8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
PmapRaw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453
PointN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
Point< N > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
Point< CML_MAX_AMPS_PER_LINK > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
Point< PATH_MAX_DIMENSIONS > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
PosLoopConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
ProfileConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460
ProfileConfigScurve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461
ProfileConfigTrap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
ProfileConfigVel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
2.1 Class Hierarchy 11
PvtSegCache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465
PwmInConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466
RefObj . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469
CanInterface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
CopleyCAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
IxxatCAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
IxxatCANV3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
KvaserCAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
EcatFrame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
EtherCatHardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
LinuxEcatHardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
PcapEcatHardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
WinUdpEcatHardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521
Linkage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
LinkTrajectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
LinkTrjScurve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
Path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
CanOpen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
EtherCAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
CopleyNode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
Amp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
IOModule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
CopleyIO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
PDO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
RPDO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477
IOModule::AlgOutPDO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
IOModule::DigOutPDO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
RPDO_LinkCtrl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480
TPDO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506
IOModule::AlgInPDO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
IOModule::DigInPDO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
Receiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468
LSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
Trajectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 510
TrjScurve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514
RefObjLocker< RefClass > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474
RegenConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
SDO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484
Semaphore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
ServoLoopConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500
SoftPosLimit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500
Thread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502
CanOpen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Linkage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
TrackingWindows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508
UstepConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518
VelLoopConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
12 Hierarchical Index
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library 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 . . . . . . . . . . . . . . . . . . . . . 25
IOModule::AlgOutPDO
Receive PDO for mapping analog outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Amp
Copley Controls amplifier object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
AmpConfig
Amplifier configuration structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
AmpError
This class represents error conditions that can occur in the Copley Amplifier object . . . . . . . . . 146
AmpFault
This class represents latching amplifier fault conditions . . . . . . . . . . . . . . . . . . . . . . . . 150
AmpFileError
This class represents error conditions that can occur when loading amplifer data from a data file . . 153
AmpInfo
Amplifier characteristics data structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
AmpIoCfg
Programmable I/O pin configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
AmpSettings
Copley amplifier settings object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
AnalogRefConfig
Analog input configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
APWR
Write by position in network (Auto Increment Physical Write) Like the APRD datagram, but a write
version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
ARMW
Read by position in network and write to the same address of all following nodes . . . . . . . . . . . 165
Array< C >
This class template implements a simple dynamic array of a given type . . . . . . . . . . . . . . . . 166
14 Class Index
BRD
Broadcast read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
BWR
Broadcast write. This type of datagram writes data to the same location on every node in the network 169
CammingConfig
Configuration structure used to set up the camming . . . . . . . . . . . . . . . . . . . . . . . . . . 170
CanError
Class used to represent an error condition returned from a CAN interface function . . . . . . . . . . 171
CanFrame
Low level CAN data frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
CanInterface
Abstract class used for low level interaction with CAN hardware . . . . . . . . . . . . . . . . . . . . 174
CanNetworkConfig
CANopen Node ID and bit rate configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
CanOpen
Top level interface into the CANopen network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
CanOpenError
This class holds the error codes that describe CANopen error conditions . . . . . . . . . . . . . . . 190
CanOpenNodeInfo
The CanOpenNodeInfo structure holds some data required by the CANopen network interface which
is present in every node it manages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
CanOpenSettings
Configuration object used to customize global settings for the CANopen network . . . . . . . . . . . 195
CopleyCAN
This class extends the generic CanInterface class into a working interface for the Copley can device
driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
CopleyIO
This class represents a Copley CANopen I/O module . . . . . . . . . . . . . . . . . . . . . . . . . 200
CopleyIOAnlg
This structure is used to return information about the analog inputs of a Copley I/O module . . . . . 208
CopleyIOCfg
IO Module configuration structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
CopleyIODigi
This structure is used to return information about the digital I/O of a Copley I/O module . . . . . . . 210
CopleyIOInfo
IO Module characteristics data structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
CopleyIOPWM
This structure is used to return information about the PWM outputs of a Copley I/O module . . . . . 212
CopleyMotionLibrary
Copley Motion Libraries utility object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
CopleyNode
Copley CANopen Node class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
CopleyNodeError
This class represents errors that can be returned by the CopleyNode class . . . . . . . . . . . . . . 219
CrntLoopConfig
This structure holds the current loop configuration parameters . . . . . . . . . . . . . . . . . . . . 221
DAConfig
Configuration structure used to hold the settings for a drive’s D/A converter . . . . . . . . . . . . . . 223
IOModule::DigInPDO
Transmit PDO for mapping digital inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
IOModule::DigOutPDO
Receive PDO for mapping digital output pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
EcatDgram
Generic EtherCAT datagram class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
3.1 Class List 15
EcatFrame
EtherCAT frame class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
Error
This class is the root class for all error codes returned by functions defined within the Motion Library 237
EtherCAT
Top level interface into the EtherCAT network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
EtherCatError
This class holds the error codes that describe EtherCAT error conditions . . . . . . . . . . . . . . . 249
EtherCatHardware
Low level Ethernet hardware interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
EtherCatSettings
Configuration object used to customize global settings for the EtherCAT network . . . . . . . . . . . 253
Event
Events are a generic mechanism used to wait on some condition . . . . . . . . . . . . . . . . . . . 254
EventAll
This is an event that matches if all of a group of bits are set in the EventMap mask . . . . . . . . . . 258
EventAny
This is an event that matches if any of a group of bits are set in the EventMap mask . . . . . . . . . 260
EventAnyClear
This is an event that matches if any of a group of bits are clear in the EventMap mask . . . . . . . . 261
EventError
This class represents error conditions related to the Event object . . . . . . . . . . . . . . . . . . . 264
EventMap
An event map is a mechanism that allows one or more threads to wait on some pre-defined event, or
group of events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
EventNone
This is an event that matches if none of a group of bits are set in the EventMap mask . . . . . . . . 269
Filter
Generic filter structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
Firmware
Copley Controls amplifier firmware object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
FirmwareError
This class represents error conditions that can occur while accessing a Copley Controls amplifier
firmware object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
FPRD
Read by assigned node ID (Configured Address Physical Read) The master assigns each node a
unique 16-bit address at startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
FPWR
Write by assigned node ID (Configured Address Physical Write) . . . . . . . . . . . . . . . . . . . 276
FuncGenConfig
Configuration parameters for amplifier’s internal function generator . . . . . . . . . . . . . . . . . . 277
GainScheduling
Configuration structure used to set up the Gain Scheduling . . . . . . . . . . . . . . . . . . . . . . 278
HomeConfig
Homing parameter structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
InputShaper
Generic input shaper structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
IOError
I/O module errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
IOFileError
This class represents error conditions that can occur when loading IO module data from a data file . 283
IOModule
Standard CANopen I/O module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
16 Class Index
IOModuleSettings
Standard CANopen I/O module settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
IxxatCAN
Ixxat specific CAN interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
IxxatCANV3
Ixxat specific CAN interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
KvaserCAN
Kvaser specific CAN interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
Linkage
Linkage object, used for controlling a group of coordinated amplifiers . . . . . . . . . . . . . . . . . 370
LinkError
This class represents error conditions that can occur in the Linkage class . . . . . . . . . . . . . . 381
LinkSettings
Linkage object settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
LinkTrajectory
Linkage trajectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
LinkTrjScurve
Multi-axis s-curve profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
LinuxEcatHardware
This class provides an interface to the Ethernet ports on a linux system . . . . . . . . . . . . . . . 391
LSS
CANopen Layer Setting Services object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
MtrInfo
Motor information structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
Mutex
This class represents an object that can be used by multiple threads to gain safe access to a shared
resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
MutexLocker
This is a utility class that locks a mutex in it’s constructor, and unlocks it in it’s destructor . . . . . . . 402
Network
Abstract network class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
NetworkError
This class holds the error codes that describe various Netowrk error conditions . . . . . . . . . . . 406
NetworkNodeInfo
Private data owned by the network object attached to every node . . . . . . . . . . . . . . . . . . . 407
NetworkOptions
Configuration structure used to configure the amplifiers network support . . . . . . . . . . . . . . . 407
Node
Node class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
NodeError
This class represents node errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
NodeIdentity
CANopen identity object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
Path
Multi-axis complex trajectory path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
PathError
This class represents errors returned by the path Path object . . . . . . . . . . . . . . . . . . . . . 429
PcapEcatHardware
This class provides an interface to the Ethernet ports on a Windows system using the winpcap library 431
PDO
PDO (Process Data Object) base class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
PDO_Error
This class represents error conditions related to PDOs . . . . . . . . . . . . . . . . . . . . . . . . 438
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
3.1 Class List 17
Pmap
This class allows variables to be mapped into a PDO . . . . . . . . . . . . . . . . . . . . . . . . . 439
Pmap16
This is a PDO variable mapping class that extends the virtual Pmap class to handle 16-bit integers . 442
Pmap24
This is a PDO variable mapping class that extends the virtual Pmap class to handle 24-bit integers . 444
Pmap32
This is a PDO variable mapping class that extends the virtual Pmap class to handle 32-bit integers . 447
Pmap8
This is a PDO variable mapping class that extends the virtual Pmap class to handle 8-bit integers . . 451
PmapRaw
This is the most generic PDO variable mapping class . . . . . . . . . . . . . . . . . . . . . . . . . 453
Point< N >
Template used for N dimensional objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
PointN
An N axis point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
PosLoopConfig
This structure holds the position loop configuration parameters specific to the Copley amplifier . . . 459
ProfileConfig
Amplifier profile parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460
ProfileConfigScurve
S-curve profile parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461
ProfileConfigTrap
Trapezoidal profile parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
ProfileConfigVel
Velocity profile parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464
PvtSegCache
PVT trajectory segment cache object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465
PwmInConfig
PWM or Pulse/Direction input configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466
Receiver
CANopen receiver object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468
RefObj
This class is used to track object references in the CML library . . . . . . . . . . . . . . . . . . . . 469
RefObjLocker< RefClass >
This is a utility class that locks a reference in it’s constructor, and unlocks it in it’s destructor . . . . . 474
RegenConfig
Configuration structure used to set up the amplifier regeneration resister . . . . . . . . . . . . . . . 475
RPDO
Receive PDO (received by node, transmitted by this software) . . . . . . . . . . . . . . . . . . . . 477
RPDO_LinkCtrl
Receive PDO used to update the control word of all amplifiers in the linkage . . . . . . . . . . . . . 480
ScurveError
This class represents error conditions that can occur in the TrjScurve class . . . . . . . . . . . . . . 482
SDO
CANopen Service Data Object (SDO) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484
SDO_Error
This class represents SDO errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496
Semaphore
Generic semaphore class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
ServoLoopConfig
This structure holds configuration info about specific parts of the velocity and position loops . . . . . 500
SoftPosLimit
Software limit switch configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
18 Class Index
Thread
Virtual class which provides multi-tasking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502
ThreadError
Errors related to the multi-threaded libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505
TPDO
Transmit PDO (transmitted by node, received by this software) . . . . . . . . . . . . . . . . . . . . 506
TrackingWindows
Position and velocity error windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508
Trajectory
Trajectory information class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 510
TrjError
This class represents error conditions reported by the trajectory classes . . . . . . . . . . . . . . . 513
TrjScurve
Asymmetric S-curve profile generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514
UstepConfig
Configuration structure used to set up the microstepper . . . . . . . . . . . . . . . . . . . . . . . . 518
VelLoopConfig
This structure holds the velocity loop configuration parameters specific to the Copley amplifier . . . . 519
WinUdpEcatHardware
This class provides an interface to the Ethernet ports on a windows system . . . . . . . . . . . . . 521
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
Chapter 4
File Index
CML.cpp
CML object definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536
CML.h
Top level include file for the CML libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537
CML_Amp.h
This file defines the Copley Amplifier object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538
CML_AmpDef.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540
CML_AmpStruct.h
This file contains a number of structures used to pass configuration parameters to an Amp object . . 563
CML_Array.h
This file implements a simple dynamic array template used in CML . . . . . . . . . . . . . . . . . . 566
CML_Can.h
This file contains the base classes used to define the low level interface to the CAN network hardware 567
CML_CanOpen.h
This header file defines the classes used for the top level of the CANopen network . . . . . . . . . . 569
CML_Copley.h
This header file defines a generic Copley node type . . . . . . . . . . . . . . . . . . . . . . . . . . 571
CML_CopleyIO.h
Standard CANopen I/O module support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572
CML_Error.h
This file defines the top level error class used throughout the library . . . . . . . . . . . . . . . . . 576
CML_EtherCAT.h
This header file defines the classes used to represent the top level of the EtherCAT network interface 577
CML_EventMap.h
This file defines the Event Map class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579
CML_File.h
This file holds various handy functions for parsing files . . . . . . . . . . . . . . . . . . . . . . . . 581
CML_Filter.h
This file defines the Filter object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 582
CML_Firmware.h
This file defines classes related to the Copley amplifier Firmware object . . . . . . . . . . . . . . . 583
CML_Geometry.h
This file contains class definitions used to define multi-axis trajectory paths . . . . . . . . . . . . . . 585
CML_InputShaper.h
This file defines the InputShaper object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586
CML_IO.h
Standard CANopen I/O module support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587
CML_Linkage.h
This file defines the Linkage object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593
CML_Network.h
This header file defines the classes used for the generic top level network interface . . . . . . . . . 595
CML_Node.h
This header file defines the classes that define a generic node on the network . . . . . . . . . . . . 598
CML_PDO.h
This header file defines the classes used to communicate to CANopen nodes using Process Data
Objects (PDOs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599
CML_Reference.h
This header file defines a set of classes used to handle reference counting within the CML library . . 601
CML_SDO.h
This header file defines the classes used to communicate to CANopen nodes using Service Data
Objects (SDOs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603
CML_Settings.h
This file provides some configuration options used to customize the Copley Motion Libraries . . . . . 605
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
4.1 File List 21
CML_Threads.h
The classes defined in this file provide an operating system independent way of accessing multi-
tasking system features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609
CML_Trajectory.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611
CML_TrjScurve.h
This file defines the TrjScurve class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612
CML_Utils.h
This file holds various handy utility types and functions . . . . . . . . . . . . . . . . . . . . . . . . 613
CopleyIO.cpp
This file contains the CopleyIO object methods used to upload / download structures containing
groups of module parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616
CopleyNode.cpp
This file holds code to implement the CopleyNode object . . . . . . . . . . . . . . . . . . . . . . . 616
ecatdc.cpp
This file holds some utility code used by the EtherCAT network when initializing it’s distributed clock 617
Error.cpp
This file handles initializing the static data objects used by the Error class . . . . . . . . . . . . . . 617
EtherCAT.cpp
This file holds code for the top level EtherCAT class . . . . . . . . . . . . . . . . . . . . . . . . . . 618
EventMap.cpp
This file contains the implementation of the EventMap class . . . . . . . . . . . . . . . . . . . . . . 618
File.cpp
This file contains code used to parse CME-2 type files . . . . . . . . . . . . . . . . . . . . . . . . 619
Filter.cpp
Implementation of the Filter class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619
Firmware.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621
Geometry.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622
InputShaper.cpp
Implementation of the InputShaper class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622
IOmodule.cpp
I/O module object support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622
Linkage.cpp
Implementation of the Linkage class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 623
Network.cpp
This file holds code for the top level CANopen class . . . . . . . . . . . . . . . . . . . . . . . . . . 624
Node.cpp
This file holds code to implement the CANopen node related objects . . . . . . . . . . . . . . . . . 624
PDO.cpp
This file holds the code needed to implement CANopen Process Data Objects (PDOs) . . . . . . . 625
Reference.cpp
This file holds the code needed to implement the CML reference counting objects . . . . . . . . . . 625
SDO.cpp
This file contains the code used to implement the CANopen SDO objects . . . . . . . . . . . . . . 626
Threads.cpp
This file only contains definitions for the generic thread error objects . . . . . . . . . . . . . . . . . 626
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
22 File Index
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library 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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.2 AlgoPhaseInit Struct Reference 25
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 const Error ∗ Init ( class IOModule ∗ io, uint32 cobID, uint8 ct, uint8 id[ ], IOMODULE_EVENTS event )
Returns
• CML_IO.h
• IOmodule.cpp
• AlgoPhaseInit (void)
Default constructor.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
26 Class Documentation
Public Attributes
• uint16 phaseInitCurrent
Maximum Current to use with algorithmic phase initialization. (0.01 amp units)
• uint16 phaseInitTime
• uint16 phaseInitConfig
Default constructor.
Initializes all structure elements to zero.
• CML_AmpStruct.h
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.3 IOModule::AlgOutPDO Class Reference 27
RefObj
PDO
RPDO
IOModule::AlgOutPDO
RefObj Pmap
map
PDO
RPDO
IOModule::AlgOutPDO
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
28 Class Documentation
• 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.
5.3.2.1 const Error ∗ Init ( class IOModule ∗ io, uint32 cobID, uint8 ct, uint8 id[ ] )
Returns
Returns
Update the locally stored value of one of the 16-bit analog outputs associated with this PDO.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 29
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
RefObj
Node
CopleyNode
Amp
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
30 Class Documentation
RefObj SDO
sdo
Node
CopleyNode EventMap
eventMap
Amp
Amplifier initialization
• Amp ()
Default constructor.
• Amp (Network &net, int16 nodeID)
Construct and initialize an amplifier object using defaults for all amp settings.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 31
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
32 Class Documentation
Get the current PWM output mode configuration from the amplifier.
• const Error ∗ SetPhaseMode (AMP_PHASE_MODE mode)
Set the phasing mode configuration for the amplifier.
• const Error ∗ GetPhaseMode (AMP_PHASE_MODE &mode)
Get the current phasing mode configuration from the amplifier.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 33
Get the actual current values read directly from the amplifier’s current sensors.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
34 Class Documentation
Position capture
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 35
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 ∗ 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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
36 Class Documentation
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 37
Homing mode.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
38 Class Documentation
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 39
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
40 Class Documentation
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 41
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
42 Class Documentation
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 43
Protected Attributes
• EventMap eventMap
This is an event map that is used to track amplifier events and state changes.
Friends
• class Linkage
Default constructor.
Init() must be called before the Amp object may be used.
Construct and initialize an amplifier object using defaults for all amp settings.
Parameters
net Reference to the network object for this amp.
nodeID a valid node ID for the amp. For CANopen, the node ID should range from 1 to 127. For Ether-
CAT, node ID’s >= 0 identify the node by it’s EtherCAT alias. Negative ID’s identify the node by
network position (-1 is the first node, -2 is the second, etc).
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
44 Class Documentation
5.4.2.3 Amp ( Network & net, int16 nodeID, AmpSettings & settings )
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 45
Parameters
net Reference to the Network for this amp.
nodeID a valid node ID for the amp. For CANopen, the node ID should range from 1 to 127. For Ether-
CAT, node ID’s >= 0 identify the node by it’s EtherCAT alias. Negative ID’s identify the node by
network position (-1 is the first node, -2 is the second, etc).
settings Amplifier settings to be used.
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
46 Class Documentation
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 47
Parameters
acc The acceleration in user units
Returns
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
48 Class Documentation
Returns
Returns
Returns
5.4.3.10 const Error ∗ Dnld16 ( int16 index, int16 sub, uint16 data )
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 49
Returns
5.4.3.11 const Error ∗ Dnld16 ( int16 index, int16 sub, int16 data )
Returns
5.4.3.12 const Error ∗ Dnld32 ( int16 index, int16 sub, uint32 data )
Returns
5.4.3.13 const Error ∗ Dnld32 ( int16 index, int16 sub, int32 data )
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
50 Class Documentation
5.4.3.14 const Error ∗ Dnld8 ( int16 index, int16 sub, uint8 data )
Returns
5.4.3.15 const Error ∗ Dnld8 ( int16 index, int16 sub, int8 data )
Returns
5.4.3.16 const Error ∗ DnldString ( int16 index, int16 sub, char ∗ data )
Returns
5.4.3.17 const Error ∗ DoMove ( ProfileConfigTrap & cfg, bool relative = false )
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 51
Parameters
cfg A structure holding all the move configuration parameters.
relative This will be a relative move if true, absolute if false (default)
Returns
5.4.3.18 const Error ∗ DoMove ( ProfileConfigScurve & cfg, bool relative = false )
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
52 Class Documentation
Parameters
pos Position to move to (absolute) or distance to move (relative).
relative True if this is a relative move, false for absolute.
Returns
5.4.3.21 const Error ∗ Download ( int16 index, int16 sub, int32 size, byte ∗ data )
Returns
Returns
Returns
An error object
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 53
5.4.3.24 const Error ∗ FormatPtSeg ( int32 pos, uint8 time, uint8 ∗ buff ) [protected]
Returns
An error object
5.4.3.25 const Error ∗ FormatPvtSeg ( int32 pos, int32 vel, uint8 time, uint8 ∗ buff ) [protected]
Returns
An error object
Upload the current configuration parameters for the algorithmic phase init.
Parameters
cfg A structure where the configuration parameters will be returned.
Returns
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
54 Class Documentation
Parameters
cfg The structure which will hold the uploaded configuration.
Returns
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 55
Parameters
value The value will be returned in this variable
Returns
Returns
5.4.3.33 const Error ∗ GetAnalogEncoder ( int16 & sin, int16 & cos )
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.
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
56 Class Documentation
Parameters
cfg A structure where the configuration parameters will be returned.
Returns
Get the current CANopen network configuration programmed into the amplifier.
Parameters
cfg A structure where the configuration parameters will be returned.
Returns
Returns the present value of the CANopen device profile control word.
Parameters
value Returns the control word value
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 57
5.4.3.39 const Error ∗ GetCountsPerUnit ( uunit & load, uunit & mtr ) [virtual]
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
load The load encoder scaling factor will be returned here
mtr The motor encoder scaling factor will be returned here
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
58 Class Documentation
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 59
Parameters
value A variable that will store the returned value.
Returns
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
60 Class Documentation
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 61
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 communi-
cations. If false (default), then the amplifier may be queried for more detailed error information.
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
62 Class Documentation
Parameters
stat The register status is returned here.
Returns
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 63
Parameters
cfg A structure where the configuration will be returned.
Returns
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
64 Class Documentation
Parameters
value The value will be returned in this variable
Returns
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 65
Parameters
cfg A structure where the configuration parameters will be returned.
Returns
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
66 Class Documentation
Parameters
value variable that will store the returned value
Returns
Returns
Returns
Returns
Get the coefficients used in the second current loop input filter.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 67
Parameters
f A structure where the filter coefficients will be returned
Returns
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
5.4.3.72 const Error ∗ GetInputConfig ( int8 pin, INPUT_PIN_CONFIG & cfg, uint16 & axis )
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
68 Class Documentation
Returns
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.74 const Error ∗ GetInputs ( uint16 & value, bool viaSDO = false )
Returns
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 69
Parameters
value variable that will store the returned value
Returns
Returns
Read the amplifier’s programmable I/O pin configuration and return it in the passed config structure.
Parameters
cfg A structure that holds the configuration settings.
Returns
Returns
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
70 Class Documentation
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 71
Parameters
value variable that will store the returned value
Returns
Returns
Returns
The linkage pointer, or NULL if the Amp is not attached to any linkage object.
Returns
The linkage reference, or 0 if the Amp is not attached to any linkage object.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
72 Class Documentation
Returns
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.
Returns
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 73
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
74 Class Documentation
Parameters
pin The output pin to check.
cfg The pin configuration value will be returned here.
Returns
5.4.3.89 const Error ∗ GetOutputConfig ( int8 pin, OUTPUT_PIN_CONFIG & cfg, uint16 & axis )
Returns
5.4.3.90 const Error ∗ GetOutputConfig ( int8 pin, OUTPUT_PIN_CONFIG & cfg, uint32 & mask )
Returns
5.4.3.91 const Error ∗ GetOutputConfig ( int8 pin, OUTPUT_PIN_CONFIG & cfg, uint32 & mask, uint16 & axis )
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 75
5.4.3.92 const Error ∗ GetOutputConfig ( int8 pin, OUTPUT_PIN_CONFIG & cfg, uint32 & param1, uint32 & param2 )
Returns
5.4.3.93 const Error ∗ GetOutputConfig ( int8 pin, OUTPUT_PIN_CONFIG & cfg, uint32 & param1, uint32 & param2,
uint16 & axis )
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
76 Class Documentation
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.
The angle is returned in degrees.
Parameters
value variable that will store the returned value
Returns
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 77
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
78 Class Documentation
Parameters
value variable that will store the returned value
Returns
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 79
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
80 Class Documentation
Parameters
cfg A structure that will be filled with the config info.
Returns
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 81
Parameters
value The location in which the jerk value will be returned.
Returns
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
82 Class Documentation
Parameters
stat A reference to a variable where the status will be returned
Returns
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
id A reference to the variable where the ID will be written
Returns
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
Returns
Get the current PWM output mode configuration from the amplifier.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 83
Parameters
mode The mode information will be returned here.
Returns
Returns
Returns
Returns
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
84 Class Documentation
Parameters
cfg A structure where the configuration parameters will be returned.
Returns
Returns
Returns
Upload the current software limit switch settings from the amplifier.
Parameters
cfg The limit switch settings will be returned in this structure.
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 85
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
86 Class Documentation
Returns
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
Returns
Returns
Get the rate of change of torque for use in profile torque mode (AMPMODE_CAN_TORQUE).
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 87
Parameters
value The rate of change specified in thousandths of the total rated torque per second.
Returns
Returns
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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
88 Class Documentation
Returns
Returns
Returns
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
per The reference period is returned here in units of nanoseconds.
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 89
5.4.3.140 const Error ∗ GetTraceStatus ( AMP_TRACE_STATUS & stat, int16 & samp, int16 & sampMax )
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
90 Class Documentation
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.
Returns
5.4.3.141 const Error ∗ GetTraceTrigger ( AMP_TRACE_TRIGGER & type, uint8 & chan, int32 & level, int16 & delay )
Returns
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
cfg A structure that will be filled with the config info.
Returns
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.
This parameter is specified in "user units". See Amp::SetCountsPerUnit for details.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 91
Parameters
value variable that will store the returned value
Returns
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.
This parameter is specified in "user units". See Amp::SetCountsPerUnit for details.
Parameters
value variable that will store the returned value
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
92 Class Documentation
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 93
Parameters
value variable that will store the returned value
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
94 Class Documentation
Parameters
value variable that will store the returned value
Returns
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 95
Parameters
f A structure where the filter coefficients will be returned
Returns
Returns
Get the coefficients used in the second velocity loop output filter.
Parameters
f A structure where the filter coefficients will be returned
Returns
Get the coefficients used in the third velocity loop output filter.
Parameters
f A structure where the filter coefficients will be returned
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
96 Class Documentation
Returns
Returns
5.4.3.162 const Error ∗ Init ( Network & net, int16 nodeID ) [virtual]
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 97
Returns
5.4.3.163 const Error ∗ Init ( Network & net, int16 nodeID, AmpSettings & settings )
Returns
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
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
98 Class Documentation
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.
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 99
Parameters
jrk The jerk in user units
Returns
5.4.3.170 const Error ∗ LoadFromFile ( const char ∗ name, int & line )
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
100 Class Documentation
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 101
Returns
Returns
An error object.
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.
Parameters
n The number of segments to pop off the buffer. Defaults to 1.
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.179 const Error ∗ PvtClearErrors ( uint8 mask, bool viaSDO = true ) [protected]
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
102 Class Documentation
Returns
An error object.
5.4.3.181 const Error ∗ PvtWriteBuff ( uint8 ∗ buff, bool viaSDO = false ) [protected]
Returns
5.4.3.182 const Error ∗ PvtWriteBuff ( uint8 buff[ ][8], int ct, bool viaSDO = false ) [protected]
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 103
Note that the quick stop function is only available when running in one of the standard CAN amplifier modes. If doing
low level velocity or current control, then moves must be stopped externally.
Returns
Re-initialize an amplifier.
This function simply calls Amp::Init using the same parameters that were initially passed.
Returns
Returns
Upload the passed amplifier configuration to the amplifier’s workign memory, and then copy that working memory to
flash.
Parameters
cfg The structure which holds the new configuration.
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
104 Class Documentation
5.4.3.188 const Error ∗ SendTrajectory ( Trajectory & trj, bool start = true )
Upload a PVT move trajectory to the amplifier and optionally start the move.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 105
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.
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
106 Class Documentation
Parameters
mode The mode of operation to be set
Returns
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 107
Parameters
cfg A structure containing the configuration parameters to set.
Returns
Returns
Returns
• Jerk: 100 counts / second∧ 3 (i.e. 100 would be 10000 counts/sec∧ 3).
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
108 Class Documentation
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
cts The number of encoder counts / user distance unit.
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.
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 109
Returns
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
110 Class Documentation
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 111
Parameters
cfg A structure containing the configuration parameters to set.
Returns
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
112 Class Documentation
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 113
Parameters
value the value to set
Returns
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
114 Class Documentation
Set the coefficients used in the second current loop input filter.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 115
Parameters
f A structure holding the filter coefficients
Returns
5.4.3.217 const Error ∗ SetInputConfig ( int8 pin, INPUT_PIN_CONFIG cfg, uint16 axis = 0 )
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).
Returns
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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
116 Class Documentation
Returns
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
cfg A structure that holds the configuration settings.
Returns
Returns
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 117
Parameters
value The new value to write to the pull up/down control register.
Returns
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
118 Class Documentation
Parameters
cfg Reference to the NetworkOptions structure containing the configuration data to be written to the
amp.
Returns
5.4.3.227 const Error ∗ SetOutputConfig ( int8 pin, OUTPUT_PIN_CONFIG cfg, uint32 param1 = 0, uint32 param2 = 0,
uint16 axis = 0 )
• 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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 119
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
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
120 Class Documentation
Parameters
value The actual position of the motor.
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 121
Parameters
value The actual position of the motor.
Returns
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
122 Class Documentation
Parameters
cfg A structure holding the configuration parameters.
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 123
Parameters
type The profile type to use
Returns
Returns
5.4.3.243 const Error ∗ SetPvtInitialPos ( int32 pos, bool viaSDO = true ) [protected]
Returns
An error object
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
124 Class Documentation
Returns
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 125
Parameters
cfg A structure containing the configuration parameters to set.
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
126 Class Documentation
Parameters
cfg The limit switch settings to use
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 127
value The motor’s rated torque in 0.001 Nm units. For linear motors the units are 0.001 N.
Returns
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
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
128 Class Documentation
Returns
5.4.3.259 const Error ∗ SetTraceTrigger ( AMP_TRACE_TRIGGER type, uint8 chan = 0, int32 level = 0, int16 delay = 0 )
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 129
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
130 Class Documentation
Parameters
cfg A structure containing the configuration parameters to set.
Returns
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 131
Returns
Returns
Returns
Set the coefficients used in the second velocity loop output filter.
Parameters
f A structure holding the filter coefficients
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
132 Class Documentation
Set the coefficients used in the third velocity loop output filter.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 133
Parameters
f A structure holding the filter coefficients
Returns
Returns
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
134 Class Documentation
5.4.3.277 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.
This function is intended for internal use and shouldn’t generally be called by user code.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 135
Parameters
stat The CANopen status word
events The Event status word
inputs The current state of the first 16 input pins
Returns
5.4.3.278 const Error ∗ Upld16 ( int16 index, int16 sub, uint16 & data )
Returns
5.4.3.279 const Error ∗ Upld16 ( int16 index, int16 sub, int16 & data )
Returns
5.4.3.280 const Error ∗ Upld32 ( int16 index, int16 sub, uint32 & data )
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
136 Class Documentation
Returns
5.4.3.281 const Error ∗ Upld32 ( int16 index, int16 sub, int32 & data )
Returns
5.4.3.282 const Error ∗ Upld8 ( int16 index, int16 sub, uint8 & data )
Returns
5.4.3.283 const Error ∗ Upld8 ( int16 index, int16 sub, int8 & data )
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 137
Returns
5.4.3.284 const Error ∗ UpldString ( int16 index, int16 sub, int32 & len, char ∗ data )
Returns
5.4.3.285 const Error ∗ Upload ( int16 index, int16 sub, int32 & size, byte ∗ data )
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
138 Class Documentation
Parameters
vel The velocity in 0.1 encoder counts / second
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.4 Amp Class Reference 139
Parameters
vel The velocity in user units
Returns
Returns
5.4.3.291 const Error ∗ WaitEvent ( Event & e, Timeout timeout, AMP_EVENT & match )
Returns
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
timeout The maximum time to wait (milliseconds)
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
140 Class Documentation
5.4.3.293 const Error ∗ WaitInputEvent ( Event & e, Timeout timeout, uint32 & match )
Returns
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
inputs Specifies which input pin(s) to wait on.
timeout The timeout for the wait (milliseconds). If < 0, then wait forever. If not specified, the timeout
defaults to -1
Returns
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.
Parameters
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.5 AmpConfig Struct Reference 141
Returns
Wait for the currently running move to finish, or for an error to occur.
Parameters
timeout The maximum time to wait (milliseconds)
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
142 Class Documentation
servoConfig
ServoLoopConfig
inputShaping
InputShaper
limit
SoftPosLimit
fgen
FuncGenConfig
can
CanNetworkConfig
daConfig
DAConfig
iloopCmdFltr
iloopCmdFltr2
aInCmdFltr
vloopOutFltr2
vloopOutFltr3
Filter vloopCmdFltr
vloopOutFltr
PwmInConfig
pwmIn
VelLoopConfig
vLoop
CammingConfig
camming
CrntLoopConfig
cLoop
window
TrackingWindows AmpConfig
gainSched
GainScheduling regen
RegenConfig motor
MtrInfo netOptions
NetworkOptions
home
HomeConfig
io
AmpIoCfg
ustep
UstepConfig
algoPhaseInit
AlgoPhaseInit
ref
AnalogRefConfig
profile
ProfileConfig
pLoop
PosLoopConfig
• AmpConfig ()
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.5 AmpConfig Struct Reference 143
Public Attributes
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
144 Class Documentation
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.5 AmpConfig Struct Reference 145
String used by CME to save state information This string is reserved and should not be modified.
Some amplifier models provide a secondary encoder connected which can be configured as either an input or output.
This parameter is used to configure this hardware.
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.
Amplifier options.
This parameter is reserved for future use.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
146 Class Documentation
The documentation for this struct was generated from the following file:
• CML_AmpStruct.h
This class represents error conditions that can occur in the Copley Amplifier object.
Inheritance diagram for AmpError:
Error
NodeError
AmpError
AmpFault
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.6 AmpError Class Reference 147
Internal
Error OK
Unknown
NetworkUnavailable
NodeError
GuardTimeout
NegLim
pvtSegVel
NegSoftLim
PhaseErr
UnderVolt
AmpError HomingError
NoUserUnits
TrackErr
PrimaryGone
TrackWarn
...
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
148 Class Documentation
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.6 AmpError Class Reference 149
This class represents error conditions that can occur in the Copley Amplifier object.
Decode the passed event status word and return an appropriate error object.
Parameters
stat The amplifier event status register
Returns
The documentation for this class was generated from the following files:
• CML_Amp.h
• Amp.cpp
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
150 Class Documentation
Error
NodeError
AmpError
AmpFault
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.7 AmpFault Class Reference 151
Internal
Error OK
Unknown
NetworkUnavailable
NodeError
GuardTimeout
NegLim
pvtSegVel
NegSoftLim
PhaseErr
UnderVolt
AmpError HomingError
NoUserUnits
TrackErr
PrimaryGone
TrackWarn
...
I2TLimit
PhaseErr
UnderVolt
TrackErr
EncoderPower
AmpFault OverVolt
MotorTemp
AmpTemp
ADC
ShortCircuit
...
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
152 Class Documentation
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.8 AmpFileError Class Reference 153
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.
Inheritance diagram for AmpFileError:
Error
AmpFileError
Internal
Error OK
Unknown
range
tooOld
format
AmpFileError noFileAccess
fileOpen
axisCt
axis
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
154 Class Documentation
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.9 AmpInfo Struct Reference 155
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
156 Class Documentation
• CML_AmpStruct.h
• 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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.10 AmpIoCfg Struct Reference 157
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
158 Class Documentation
• CML_AmpStruct.h
• AmpStruct.cpp
• AmpSettings ()
Create a settings object with all default values.
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.11 AmpSettings Class Reference 159
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
160 Class Documentation
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.
This setting is not used on EtherCAT networks.
Default: zero (not used)
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.
This setting is not used on EtherCAT networks.
Default 200 (ms)
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.11 AmpSettings Class Reference 161
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
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.
Note: There should be exactly one synch producer on every network.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
162 Class Documentation
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
• 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.
Calibration offset.
This offset is set at the factory and should normally not be modified. Units are millivolts
Deadband in millivolts.
The analog input will be treated as zero when it’s absolute value is less then this.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.13 APRD Struct Reference 163
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.
Inheritance diagram for APRD:
EcatDgram
APRD
EcatDgram
APRD
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
164 Class Documentation
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.
Inheritance diagram for APWR:
EcatDgram
APWR
EcatDgram
APWR
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.15 ARMW Struct Reference 165
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.
Inheritance diagram for ARMW:
EcatDgram
ARMW
EcatDgram
ARMW
Read by position in network and write to the same address of all following nodes.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
166 Class Documentation
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.16 Array< C > Class Template Reference 167
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
168 Class Documentation
Parameters
ndx The index of the value to remove
The documentation for this class was generated from the following file:
• CML_Array.h
Broadcast read.
Inheritance diagram for BRD:
EcatDgram
BRD
EcatDgram
BRD
Broadcast read.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.18 BWR Struct Reference 169
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.
Inheritance diagram for BWR:
EcatDgram
BWR
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:
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
170 Class Documentation
• 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.
Default constructor.
Initializes all structure elements to zero.
• CML_AmpStruct.h
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.20 CanError Class Reference 171
Class used to represent an error condition returned from a CAN interface function.
Inheritance diagram for CanError:
Error
CanError
CanOpenError
Internal
Error OK
Unknown
InvalidID
Alloc
NoDriver
Timeout
Driver
CanError AlreadyOpen
BadParam
BadPortName
NotOpen
Permission
...
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
172 Class Documentation
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.21 CanFrame Struct Reference 173
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.
5.21.2.2 int32 id
• CML_Can.h
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
174 Class Documentation
Abstract class used for low level interaction with CAN hardware.
Inheritance diagram for CanInterface:
RefObj
CanInterface
RefObj
CanInterface
• 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)
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.22 CanInterface Class Reference 175
Protected Attributes
• char ∗ portName
This string is initialized by the default constructor.
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
176 Class Documentation
Parameters
port A string that may be used to identify which port to open.
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.22 CanInterface Class Reference 177
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 const Error ∗ RecvFrame ( CanFrame & frame, Timeout timeout ) [protected], [virtual]
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
178 Class Documentation
Returns
Reimplemented in CopleyCAN.
Returns
5.22.3.10 const Error ∗ XmitFrame ( CanFrame & frame, Timeout timeout ) [protected], [virtual]
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.23 CanNetworkConfig Struct Reference 179
• CML_Can.h
• Can.cpp
• CanNetworkConfig ()
Default constructor. Set default values.
• void FromAmpFormat (uint16 a)
Load the structure from a 16-bit word.
• uint16 ToAmpFormat (void)
Encode the contents of the structure into a 16-bit word in the format used by the amplifier.
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
180 Class Documentation
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.
Encode the contents of the structure into a 16-bit word in the format used by the amplifier.
See the amplifier documentation for details on this format.
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.24 CanOpen Class Reference 181
Number of general purpose input pins to read on startup for node ID selection.
This parameter may be set from 0 to 7.
Offset added to the value read from the input pins & address switch.
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
The CanOpen class is the top level interface into the CANopen network.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
182 Class Documentation
RefObj
Network Thread
CanOpen
RefObj
Network Thread
CanOpen
• CanOpen (void)
Default constructor.
• virtual ∼CanOpen (void)
CanOpen Destructor.
• const Error ∗ Open (CanInterface &can)
Open the CANopen network.
• const Error ∗ Open (CanInterface &can, CanOpenSettings &settings)
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.24 CanOpen Class Reference 183
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
184 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.
Default constructor.
Simply initializes some local variables.
CanOpen Destructor.
This closes the CANopen network.
Returns
Implements Network.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.24 CanOpen Class Reference 185
Parameters
n Pointer to the node to stop.
Returns
Implements Network.
Returns
Implements Network.
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
186 Class Documentation
Parameters
msgID The CAN message ID to assocaite with this receiver.
rcvr Pointer to the receiver to add
Returns
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();
Returns
Implements Network.
Returns
The synch producer node ID, or 0 if no synch producer has been registered.
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.24 CanOpen Class Reference 187
5.24.3.11 const Error ∗ Open ( CanInterface & ci, CanOpenSettings & settings )
Returns
Send a network management message to put the specified node in pre-operational state.
Parameters
n Pointer to the node.
Returns
Implements Network.
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
188 Class Documentation
Parameters
n A pointer to the node to reset
Returns
Implements Network.
5.24.3.15 const Error ∗ SetNodeGuard ( Node ∗ n, GuardProtocol type, Timeout to = 50, uint8 life = 3 ) [virtual]
Returns
Implements Network.
Returns
Implements Network.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.24 CanOpen Class Reference 189
Parameters
n Pointer to the node to stop.
Returns
Implements Network.
5.24.3.19 const Error ∗ Xmit ( CanFrame & frame, Timeout timeout = 2000 )
Returns
5.24.3.20 const Error ∗ XmitPDO ( class PDO ∗ pdo, Timeout timeout = 2000 ) [virtual]
Returns
Implements Network.
5.24.3.21 const Error ∗ XmitSDO ( Node ∗ n, uint8 ∗ buff, uint16 len, uint16 ∗ ret, Timeout timeout = 2000 )
[virtual]
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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
190 Class Documentation
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.
Inheritance diagram for CanOpenError:
Error
CanError
CanOpenError
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.25 CanOpenError Class Reference 191
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
192 Class Documentation
This class holds the error codes that describe CANopen error conditions.
The node returned an illegal field count for the object being requested in it’s object dictionary.
An attempt was made to initialize an object that has already been initialized, and doesn’t allow multiple initialization.
Monitor already running - An attempt is made to start the heartbeat or node guarding and it’s already running.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.26 CanOpenNodeInfo Struct Reference 193
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
The CanOpenNodeInfo structure holds some data required by the CANopen network interface which is present in every
node it manages.
Inheritance diagram for CanOpenNodeInfo:
NetworkNodeInfo
CanOpenNodeInfo
RefObj SDO
sdo
sdoSemPtr
me
semPtr
prev
CanOpenNodeInfo
next
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
194 Class Documentation
Public Attributes
• uint32 eventTime
Time (milliseconds) when next guarding event is due.
• 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.
This value keeps track of the toggle bit used with node guarding.
It’s set to -1 if the toggle bit isn’t used.
This variable identifies the type of guard protocol being used by this node.
The options are none, heartbeat monitor, and node guarding.
The documentation for this struct was generated from the following files:
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.27 CanOpenSettings Class Reference 195
• 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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
196 Class Documentation
• CML_CanOpen.h
• CanOpen.cpp
This class extends the generic CanInterface class into a working interface for the Copley can device driver.
Inheritance diagram for CopleyCAN:
RefObj
CanInterface
CopleyCAN
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.28 CopleyCAN Class Reference 197
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
198 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.
• 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.
Returns
Returns
5.28.2.3 const Error ∗ RecvFrame ( CanFrame & frame, Timeout timeout ) [protected], [virtual]
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.28 CopleyCAN Class Reference 199
Returns
Returns
5.28.2.6 const Error ∗ XmitFrame ( CanFrame & frame, Timeout timeout ) [protected], [virtual]
Returns
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
200 Class Documentation
RefObj
Node
IOModule
CopleyIO
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.29 CopleyIO Class Reference 201
sdo map
Node PDO
RPDO TPDO
IOModule
CopleyIO
• CopleyIO (void)
Default constructor for a Copley I/O module.
• CopleyIO (Network &net, int16 nodeID)
Construct a CopleyIO object and initialize it using default settings.
• CopleyIO (Network &net, int16 nodeID, IOModuleSettings &settings)
Construct a CopleyIO object and initialize it using custom settings.
• virtual ∼CopleyIO ()
Virtual destructor for the IOModule object.
• virtual const Error ∗ Init (Network &net, int16 nodeID)
Initialize a Copley IO module using default settings.
• virtual const Error ∗ Init (Network &net, int16 nodeID, IOModuleSettings &settings)
Initialize an I/O module using custom settings.
• const Error ∗ GetIOInfo (CopleyIOInfo &info)
Read the I/O Module information parameters from the drive.
• const Error ∗ GetIODigi (CopleyIODigi &digi)
Read the I/O Module digital parameters from the drive.
• const Error ∗ GetIOAnlg (CopleyIOAnlg &anlg)
Read the I/O Module analog parameters from the drive.
• const Error ∗ GetIOPWM (CopleyIOPWM &pwm, CopleyIOInfo &info)
Read the I/O Module PWM parameters from the drive.
• const Error ∗ GetIOCfg (CopleyIOCfg &cfg)
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
202 Class Documentation
Read the complete I/O configuration from the module and return it in the passed structure.
• const Error ∗ SetIOInfo (CopleyIOInfo &info)
Write the I/O Module information parameters to the drive.
• const Error ∗ SetIODigi (CopleyIODigi &digi)
Write the I/O Module digital parameters to the drive.
• const Error ∗ SetIOAnlg (CopleyIOAnlg &anlg)
Write the I/O Module analog parameters to the drive.
• const Error ∗ SetIOPWM (CopleyIOPWM &pwm, CopleyIOInfo &info)
Write the I/O Module PWM parameters to the drive.
• const Error ∗ SetIOConfig (CopleyIOCfg &cfg)
Write the complete I/O configuration from the module and return it in the passed structure.
• const Error ∗ SaveIOConfig (void)
Save all I/O parameters to internal flash memory.
• const Error ∗ SaveIOConfig (CopleyIOCfg &cfg)
Upload the passed io module configuration to the module’s working memory, and then copy that working memory to flash.
• const Error ∗ LoadFromFile (const char ∗name, int &line)
Load the specified io module data file.
• const Error ∗ SerialCmd (uint8 opcode, uint8 &ct, uint8 max, uint16 ∗data)
Send a serial port message to a Copley device over the CANopen network.
5.29.2.2 CopleyIO ( Network & net, int16 nodeID, IOModuleSettings & settings )
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.29 CopleyIO Class Reference 203
Returns
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
cfg The structure which will hold the uploaded configuration.
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
204 Class Documentation
Parameters
info A structure that will be filled with the I/O module info
Returns
5.29.3.5 const Error ∗ GetIOPWM ( CopleyIOPWM & pwm, CopleyIOInfo & info )
Returns
5.29.3.6 const Error ∗ Init ( Network & net, int16 nodeID ) [virtual]
Returns
5.29.3.7 const Error ∗ Init ( Network & net, int16 nodeID, IOModuleSettings & settings ) [virtual]
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.29 CopleyIO Class Reference 205
5.29.3.8 const Error ∗ LoadFromFile ( const char ∗ name, int & line )
Returns
Returns
Upload the passed io module configuration to the module’s working memory, and then copy that working memory to
flash.
Parameters
cfg The structure which holds the new configuration.
Returns
5.29.3.11 const Error ∗ SerialCmd ( uint8 opcode, uint8 & ct, uint8 max, uint16 ∗ data )
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
206 Class Documentation
Parameters
opcode The command code to be sent to the amplifier.
ct The number of 16-bit words of data to be sent to the amplifier. On return, this parameter will hold
the number of 16-bit words of response data passed back from the amplifier.
max The maximum number of words of response data that the data array can hold.
data An array of data to be passed to the node with the command. On return, any response data (up
to max words) will be passed here. If this parameter is not specified, then no data will be passed
or returned regardless of the values passed in max and ct.
Returns
Returns
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
cfg The structure which will hold the uploaded configuration.
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.29 CopleyIO Class Reference 207
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
208 Class Documentation
Parameters
info A structure that will be filled with the I/O module info
Returns
5.29.3.16 const Error ∗ SetIOPWM ( CopleyIOPWM & pwm, CopleyIOInfo & info )
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.
Public Attributes
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.31 CopleyIOCfg Struct Reference 209
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
Public Attributes
• CopleyIOInfo info
Global IO Module parameters.
• CopleyIODigi digi
Digital IO parameters.
• CopleyIOAnlg anlg
Analog input parameters.
• CopleyIOPWM pwm
PWM output parameters.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
210 Class Documentation
• CML_CopleyIO.h
This structure is used to return information about the digital I/O of a Copley I/O module.
Public Attributes
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.33 CopleyIOInfo Struct Reference 211
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.
• 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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
212 Class Documentation
• 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.
• CML_CopleyIO.h
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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.35 CopleyMotionLibrary Class Reference 213
• 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)
Flush the log file (if one is open).
• void SetLogFile (const char ∗fname)
Set the debug message log file name.
• void Debug (const char ∗fmt,...)
Write a debug message to the log file.
• void Warn (const char ∗fmt,...)
Write a warning message to the log file.
• void Error (const char ∗fmt,...)
Write an error message to the log file.
• void LogCAN (bool recv, struct CanFrame &frame)
Write the CAN frame to the log file.
• CML_LOG_LEVEL GetDebugLevel (void)
Return the debug level.
• bool GetFlushLog (void)
Get the state of the log flushing setting.
• int32 GetMaxLogSize (void)
Return the max log size.
• const char ∗ GetLogFile (void)
Return the name of the log file.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
214 Class Documentation
5.35.2.1 ∼CopleyMotionLibrary ( )
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.35 CopleyMotionLibrary Class Reference 215
Returns
true if enabled.
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
216 Class Documentation
Parameters
level The log level.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.36 CopleyNode Class Reference 217
Parameters
fmt A printf style format string
The documentation for this class was generated from the following files:
• CML.h
• CML.cpp
RefObj
Node
CopleyNode
Amp
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
218 Class Documentation
RefObj SDO
sdo
Node
CopleyNode
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.37 CopleyNodeError Class Reference 219
Parameters
fw The firmware object holding the data to be programmed.
Returns
5.36.2.2 const Error ∗ SerialCmd ( uint8 opcode, uint8 & ct, uint8 max = 0, uint16 ∗ data = 0 )
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
opcode The command code to be sent to the amplifier.
ct The number of 16-bit words of data to be sent to the amplifier. On return, this parameter will hold
the number of 16-bit words of response data passed back from the amplifier.
max The maximum number of words of response data that the data array can hold.
data An array of data to be passed to the node with the command. On return, any response data (up
to max words) will be passed here. If this parameter is not specified, then no data will be passed
or returned regardless of the values passed in max and ct.
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
220 Class Documentation
Error
NodeError
CopleyNodeError
Internal
Error OK
Unknown
NetworkUnavailable
NodeError
GuardTimeout
SerialMsgLen
CopleyNodeError
SerialError
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.38 CrntLoopConfig Struct Reference 221
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
• CrntLoopConfig (void)
Default constructor.
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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
222 Class Documentation
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).
Default constructor.
Simply initializes all members to zero.
Continuous current limit (0.01 amp units) This is the maximum current that can continuously be applied to the load.
Also used as Run current in stepper mode.
Time at peak current limit (milliseconds) If peak current is requested, it will fall back to the continuous limit within this
amount of time.
Also used as Boost current time in stepper mode.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.39 DAConfig Struct Reference 223
Run to hold time(milliseconds) The period of time, beginning when a move is complete, to when output current switched
to hold current.
Used in stepper mode only.
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
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::Get-
DAConverterConfig
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
224 Class Documentation
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
RefObj
PDO
TPDO
IOModule::DigInPDO
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.40 IOModule::DigInPDO Class Reference 225
RefObj Pmap
map
PDO
TPDO
IOModule::DigInPDO
• const Error ∗ Init (class IOModule ∗io, uint32 cobID, uint8 ct, uint8 id[ ], IOMODULE_EVENTS event)
Initialize a digital input PDO object.
• bool GetInVal (uint8 id, uint8 &value)
Read the specified input bank from the PDO’s cached data.
• bool GetBitVal (uint16 id, bool &value)
Update the locally stored value of one bit in this PDO.
• void Received (void)
New transmit PDO received.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
226 Class Documentation
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.40 IOModule::DigInPDO Class Reference 227
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.
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 const Error ∗ Init ( class IOModule ∗ io, uint32 cobID, uint8 ct, uint8 id[ ], IOMODULE_EVENTS event )
Returns
• CML_IO.h
• IOmodule.cpp
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
228 Class Documentation
RefObj
PDO
RPDO
IOModule::DigOutPDO
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.41 IOModule::DigOutPDO Class Reference 229
RefObj Pmap
map
PDO
RPDO
IOModule::DigOutPDO
• 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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
230 Class Documentation
5.41.2.1 const Error ∗ Init ( class IOModule ∗ io, uint32 cobID, uint8 ct, uint8 id[ ] )
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.41 IOModule::DigOutPDO Class Reference 231
Parameters
io Pointer to the I/O module to which this PDO is assigned.
cobID The CAN ID for this PDO message.
ct The number of output blocks to be mapped (1 to 8)
id An array of ct output block ID numbers. These will be mapped (in order) to the PDO.
Returns
Returns
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.
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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
232 Class Documentation
EcatDgram
RPDO_List TPDO_List
• 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.
• bool checkNdx (void)
Compare the index stored in the frame that this datagram is part of to the expected value.
• void setData (void ∗ptr)
Update the data value stored in this datagram.
• void setData (int32 val)
Update the data value stored in this datagram.
• void setNdx (uint8 ndx)
Update the index value associated with this datagram.
• uint8 getNdx (void)
Return the current datagram index value.
• int16 getDgramLen (void)
Return the datagram length in bytes.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.42 EcatDgram Class Reference 233
5.42.2.1 EcatDgram ( uint8 cmd, int16 adp, int16 ado, int16 len, void ∗ ptr = 0 )
5.42.2.2 EcatDgram ( uint8 cmd, int16 adp, int16 ado, int16 len, int32 val )
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
234 Class Documentation
Returns
Returns
Returns
5.42.3.5 void Init ( uint8 cmd, int16 adp, int16 ado, int16 len, int32 val )
5.42.3.6 void Init ( uint8 cmd, int16 adp, int16 ado, int16 len, void ∗ ptr = 0 )
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.42 EcatDgram Class Reference 235
5.42.3.7 const Error ∗ Load ( void ∗ ptr, int16 & off ) [virtual]
Pack this datagram into a memory buffer that’s large enough to hold an entire EtherCAT frame.
Parameters
ptr Points to the frame buffer
off Gives the offset in the frame where this datagram should be loaded. On return, this is increased
by the size of the datagram
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
236 Class Documentation
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
RefObj
EcatFrame
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.44 Error Class Reference 237
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 class is the root class for all error codes returned by functions defined within the Motion Library.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
238 Class Documentation
AmpFileError
CanError CanOpenError
EtherCatError
EventError
FirmwareError
IOFileError
LinkError
NodeError CopleyNodeError
PathError IOError
PDO_Error
ScurveError
SDO_Error
ThreadError
TrjError
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.44 Error Class Reference 239
Internal
Error OK
Unknown
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:
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
240 Class Documentation
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.
Returns
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.45 EtherCAT Class Reference 241
Parameters
id The ID code of the error to be found
Returns
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.
Inheritance diagram for EtherCAT:
RefObj
Network
EtherCAT
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
242 Class Documentation
RefObj
Network
EtherCAT
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.45 EtherCAT Class Reference 243
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.45.2.1 const Error ∗ AddToFrame ( class EcatFrame ∗ frame, class EcatDgram ∗ dg ) [protected]
Returns
5.45.2.2 const Error ∗ FoE_DnldData ( Node ∗ n, int32 len, uint8 ∗ data, Timeout to = 2000, bool end = true )
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
244 Class Documentation
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.45.2.3 const Error ∗ FoE_DnldStart ( Node ∗ n, const char ∗ filename, uint32 password, Timeout to = 2000 )
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.
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
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.45.2.5 const Error ∗ FoE_UpldData ( Node ∗ n, int32 max, int32 ∗ len, uint8 ∗ data, Timeout to = 2000 )
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.45 EtherCAT Class Reference 245
Parameters
n Pointer to the node to upload from
max Maximum length of data to upload in bytes
len On return, holds the actual number of bytes uploaded.
data Buffer where data will be written
to A timeout value.
Returns
5.45.2.6 const Error ∗ FoE_UpldStart ( Node ∗ n, const char ∗ filename, uint32 password, Timeout to = 2000 )
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
n Points to the node from which the data will be uploaded.
filename Name of the file to be read. 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
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
Returns
Implements Network.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
246 Class Documentation
Returns
Returns
Returns
5.45.2.12 const Error ∗ MailboxTransfer ( Node ∗ n, uint16 len, uint16 ∗ ret, Timeout timeout = 2000 ) [protected]
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.
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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.45 EtherCAT Class Reference 247
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
248 Class Documentation
Parameters
n The node to query
Returns
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
5.45.2.15 const Error ∗ SetNodeGuard ( Node ∗ n, GuardProtocol type, Timeout timeout = 200, uint8 life = 0 )
[virtual]
Returns
Implements Network.
Set the period of the SYNC0 signal used on nodes with a distributed clock.
This also starts generation of the SYNC0 signal.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.46 EtherCatError Class Reference 249
Parameters
n The node to modify
ns The period in nanoseconds.
Returns
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.
Inheritance diagram for EtherCatError:
Error
EtherCatError
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
250 Class Documentation
Internal
Error OK
Unknown
ReadHardware
MboxHeader
OpenHardware
MboxSyntax
EcatMsgCorrupt
EtherCatError HardwareNotInit
PdoNotEnabled
NodeStateChange
EcatNotInit
Sync0Config
...
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.46 EtherCatError Class Reference 251
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
252 Class Documentation
RefObj
EtherCatHardware
RefObj
EtherCatHardware
• CML_EtherCAT.h
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.48 EtherCatSettings Class Reference 253
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
254 Class Documentation
• CML_EtherCAT.h
Event
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.49 Event Class Reference 255
Return the most recent mask value that caused the event to succeed.
• const Error ∗ Wait (EventMap &m, Timeout timeout)
Wait on an event.
• virtual bool isTrue (uint32 mask)
Test the event to see if it’s condition is true.
Protected Attributes
• uint32 value
This is the value that the event is waiting for.
Friends
• class EventMap
Event distructor.
This makes sure the event isn’t mapped when it’s destroyed
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
256 Class Documentation
Parameters
e Another event that this will copy.
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
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.49 Event Class Reference 257
Parameters
e Another event that will be used to initialize this one.
Returns
Returns
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
m The event map that this event should watch.
timeout The maximum amount of time to wait (milliseconds). If < 0, then the task will wait forever.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
258 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.
Inheritance diagram for EventAll:
Event
EventAll
Event
EventAll
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.50 EventAll Class Reference 259
This is an event that matches if all of a group of bits are set in the EventMap mask.
Returns
• CML_EventMap.h
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
260 Class Documentation
This is an event that matches if any of a group of bits are set in the EventMap mask.
Inheritance diagram for EventAny:
Event
EventAny
Event
EventAny
This is an event that matches if any of a group of bits are set in the EventMap mask.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.52 EventAnyClear Class Reference 261
Returns
• CML_EventMap.h
This is an event that matches if any of a group of bits are clear in the EventMap mask.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
262 Class Documentation
Event
EventAnyClear
Event
EventAnyClear
This is an event that matches if any of a group of bits are clear in the EventMap mask.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.52 EventAnyClear Class Reference 263
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
264 Class Documentation
Parameters
v The bit mask that the event will wait on. Default is zero
Returns
• CML_EventMap.h
Error
EventError
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.54 EventMap Class Reference 265
Internal
Error OK
Unknown
NotMapped
EventError
AlreadyOwned
• 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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
266 Class Documentation
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.
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
e Points to the event to add
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.54 EventMap Class Reference 267
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.
Get the current value of the mask for this event map.
Returns
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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
268 Class Documentation
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.55 EventNone Class Reference 269
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.
Inheritance diagram for EventNone:
Event
EventNone
Event
EventNone
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
270 Class Documentation
This is an event that matches if none of a group of bits are set in the EventMap mask.
Returns
• CML_EventMap.h
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.56 Filter Class Reference 271
• Filter (void)
Default constructor for filter object.
• const Error ∗ LoadFromCCX (int32 coef[ ], int ct)
Load the filter coefficients from an array of integer values read from a .ccx file.
• void getIntCoef (int16 &a1, int16 &a2, int16 &b0, int16 &b1, int16 &b2, int16 &k)
Return the filter coefficients in integer format as used by DSP based amplifiers.
• void getFloatCoef (float &a1, float &a2, float &b0, float &b1, float &b2)
Return the filter coefficients in floating point format as used by FPGA based amplifiers.
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.
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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
272 Class Documentation
• 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.
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.58 FirmwareError Class Reference 273
Returns
Returns
Returns
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
274 Class Documentation
Error
FirmwareError
Internal
Error OK
Unknown
alloc
format
read
FirmwareError
notSupported
open
crc
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.59 FPRD Struct Reference 275
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.
Inheritance diagram for FPRD:
EcatDgram
FPRD
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
276 Class Documentation
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.61 FuncGenConfig Struct Reference 277
EcatDgram
FPWR
• 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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
278 Class Documentation
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.
Default constructor.
Initializes all structure elements to zero.
The documentation for this struct was generated from the following file:
• CML_AmpStruct.h
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.63 HomeConfig Struct Reference 279
• 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.
Default constructor, just set the method to none and the other parameters to zero.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
280 Class Documentation
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.
• CML_AmpStruct.h
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.65 IOError Class Reference 281
• InputShaper (void)
Default constructor for InputShaper object.
• const Error ∗ LoadFromCCX (int32 inputShaping[ ], int ct)
Load the filter coefficients from an array of integer values read from a .ccx file.
• void setInputShapeFilter (float inputShaperData[ ])
Return the amplitude for each impulse in the input shaping filter.
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.
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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
282 Class Documentation
Error
NodeError
IOError
Internal
Error OK
Unknown
NetworkUnavailable
NodeError
GuardTimeout
BadID
IOError
BadIOCount
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.66 IOFileError Class Reference 283
• CML_IO.h
This class represents error conditions that can occur when loading IO module data from a data file.
Inheritance diagram for IOFileError:
Error
IOFileError
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
284 Class Documentation
Internal
Error OK
Unknown
IOFileError bankInvalid
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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 285
RefObj
Node
IOModule
CopleyIO
sdo map
Node PDO
RPDO TPDO
IOModule
Classes
• class AlgInPDO
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
286 Class Documentation
• 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.
• virtual const Error ∗ WaitIOEvent (IOMODULE_EVENTS event, Timeout timeout=-1)
Wait on an event associated with this I/O module.
• virtual const Error ∗ WaitIOEvent (Event &e, Timeout timeout, IOMODULE_EVENTS &match)
Wait for an event associated with this I/O module.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 287
• virtual const Error ∗ DinRead (uint16 id, bool &value, bool viaSDO=false)
Read a single digital input.
• virtual const Error ∗ DinGetPol (uint16 id, bool &value)
Get the current polarity settings for a digital input.
• virtual const Error ∗ DinSetPol (uint16 id, bool value)
Set the current polarity setting for a digital input.
• virtual const Error ∗ DinGetFilt (uint16 id, bool &value)
Get the current filter constant setting for a digital input.
• virtual const Error ∗ DinSetFilt (uint16 id, bool value)
Set the current filter constant setting for a digital input.
• virtual const Error ∗ DinGetMaskAny (uint16 id, bool &value)
Get the ’any transition’ interrupt mask settings for a digital input.
• virtual const Error ∗ DinSetMaskAny (uint16 id, bool value)
Set the ’any transition’ interrupt mask settings for a digital input.
• virtual const Error ∗ DinGetMaskLow2High (uint16 id, bool &value)
Get the ’low to high’ interrupt mask settings for a digital input.
• virtual const Error ∗ DinSetMaskLow2High (uint16 id, bool value)
Set the ’low to high’ interrupt mask settings for a digital input.
• virtual const Error ∗ DinGetMaskHigh2Low (uint16 id, bool &value)
Get the ’high to low’ interrupt mask settings for a digital input.
• virtual const Error ∗ DinSetMaskHigh2Low (uint16 id, bool value)
Set the ’high to low’ interrupt mask settings for a digital input.
• virtual const Error ∗ Din8GetCt (uint8 &ct)
Return the number of 8-bit groups of inputs available on this device.
• virtual const Error ∗ Din8Read (uint8 id, uint8 &value, bool viaSDO=false)
Read a group of 8 digital inputs.
• virtual const Error ∗ Din8GetPol (uint8 id, uint8 &value)
Get the current polarity settings for a group of 8 digital inputs.
• virtual const Error ∗ Din8SetPol (uint8 id, uint8 value)
Set the current polarity setting for a group of 8 digital inputs.
• virtual const Error ∗ Din8GetFilt (uint8 id, uint8 &value)
Get the current filter constant settings for a group of 8 digital inputs.
• virtual const Error ∗ Din8SetFilt (uint8 id, uint8 value)
Set the current filter constant setting for a group of 8 digital inputs.
• virtual const Error ∗ Din8GetMaskAny (uint8 id, uint8 &value)
Get the ’any transition’ interrupt mask settings for a group of 8 digital inputs.
• virtual const Error ∗ Din8SetMaskAny (uint8 id, uint8 value)
Set the ’any transition’ interrupt mask settings for a group of 8 digital inputs.
• virtual const Error ∗ Din8GetMaskLow2High (uint8 id, uint8 &value)
Get the ’low to high’ interrupt mask settings for a group of 8 digital inputs.
• virtual const Error ∗ Din8SetMaskLow2High (uint8 id, uint8 value)
Set the ’low to high’ interrupt mask settings for a group of 8 digital inputs.
• virtual const Error ∗ Din8GetMaskHigh2Low (uint8 id, uint8 &value)
Get the ’high to low’ interrupt mask settings for a group of 8 digital inputs.
• virtual const Error ∗ Din8SetMaskHigh2Low (uint8 id, uint8 value)
Set the ’high to low’ interrupt mask settings for a group of 8 digital inputs.
• virtual const Error ∗ Din16GetCt (uint8 &ct)
Return the number of 16-bit groups of inputs available on this device.
• virtual const Error ∗ Din16Read (uint8 id, uint16 &value, bool viaSDO=false)
Read a group of 16 digital inputs.
• virtual const Error ∗ Din16GetPol (uint8 id, uint16 &value)
Get the current polarity settings for a group of 16 digital inputs.
• virtual const Error ∗ Din16SetPol (uint8 id, uint16 value)
Set the current polarity setting for a group of 16 digital inputs.
• virtual const Error ∗ Din16GetFilt (uint8 id, uint16 &value)
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
288 Class Documentation
Get the current filter constant settings for a group of 16 digital inputs.
• virtual const Error ∗ Din16SetFilt (uint8 id, uint16 value)
Set the current filter constant setting for a group of 16 digital inputs.
• virtual const Error ∗ Din16GetMaskAny (uint8 id, uint16 &value)
Get the ’any transition’ interrupt mask settings for a group of 16 digital inputs.
• virtual const Error ∗ Din16SetMaskAny (uint8 id, uint16 value)
Set the ’any transition’ interrupt mask settings for a group of 16 digital inputs.
• virtual const Error ∗ Din16GetMaskLow2High (uint8 id, uint16 &value)
Get the ’low to high’ interrupt mask settings for a group of 16 digital inputs.
• virtual const Error ∗ Din16SetMaskLow2High (uint8 id, uint16 value)
Set the ’low to high’ interrupt mask settings for a group of 16 digital inputs.
• virtual const Error ∗ Din16GetMaskHigh2Low (uint8 id, uint16 &value)
Get the ’high to low’ interrupt mask settings for a group of 16 digital inputs.
• virtual const Error ∗ Din16SetMaskHigh2Low (uint8 id, uint16 value)
Set the ’high to low’ interrupt mask settings for a group of 16 digital inputs.
• virtual const Error ∗ Din32GetCt (uint8 &ct)
Return the number of 32-bit groups of inputs available on this device.
• virtual const Error ∗ Din32Read (uint8 id, uint32 &value, bool viaSDO=false)
Read a group of 32 digital inputs.
• virtual const Error ∗ Din32GetPol (uint8 id, uint32 &value)
Get the current polarity settings for a group of 32 digital inputs.
• virtual const Error ∗ Din32SetPol (uint8 id, uint32 value)
Set the current polarity setting for a group of 32 digital inputs.
• virtual const Error ∗ Din32GetFilt (uint8 id, uint32 &value)
Get the current filter constant settings for a group of 32 digital inputs.
• virtual const Error ∗ Din32SetFilt (uint8 id, uint32 value)
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 289
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
290 Class Documentation
Set the current filter constant setting for a group of 16 digital outputs.
• virtual const Error ∗ Dout16GetErrMode (uint8 id, uint16 &value)
Get the current error mode settings for a group of 16 digital outputs.
• virtual const Error ∗ Dout16SetErrMode (uint8 id, uint16 value)
Set the current error mode settings for a group of 16 digital outputs.
• virtual const Error ∗ Dout16GetErrValue (uint8 id, uint16 &value)
Get the current error value settings for a group of 16 digital outputs.
• virtual const Error ∗ Dout16SetErrValue (uint8 id, uint16 value)
Set the current error value settings for a group of 16 digital outputs.
• virtual const Error ∗ Dout32GetCt (uint8 &ct)
Return the number of 32-bit groups of outputs available on this device.
• virtual const Error ∗ Dout32Write (uint8 id, uint32 value, bool viaSDO=false)
Write a group of 32 digital outputs.
• const Error ∗ Dout32Read (uint8 id, uint32 &value)
Read back the last value written to this bank of 32 digital outputs.
• virtual const Error ∗ Dout32GetPol (uint8 id, uint32 &value)
Get the current polarity settings for a group of 32 digital outputs.
• virtual const Error ∗ Dout32SetPol (uint8 id, uint32 value)
Set the current polarity setting for a group of 32 digital outputs.
• virtual const Error ∗ Dout32GetFilt (uint8 id, uint32 &value)
Get the current filter constant settings for a group of 32 digital outputs.
• virtual const Error ∗ Dout32SetFilt (uint8 id, uint32 value)
Set the current filter constant setting for a group of 32 digital outputs.
• virtual const Error ∗ Dout32GetErrMode (uint8 id, uint32 &value)
Get the current error mode settings for a group of 32 digital outputs.
• virtual const Error ∗ Dout32SetErrMode (uint8 id, uint32 value)
Set the current error mode settings for a group of 32 digital outputs.
• virtual const Error ∗ Dout32GetErrValue (uint8 id, uint32 &value)
Get the current error value settings for a group of 32 digital outputs.
• virtual const Error ∗ Dout32SetErrValue (uint8 id, uint32 value)
Set the current error value settings for a group of 32 digital outputs.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 291
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
292 Class Documentation
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 293
Protected Attributes
• DigOutPDO doutPDO
Default PDO used to transmit digital output info.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
294 Class Documentation
5.67.2.3 IOModule ( Network & net, int16 nodeID, IOModuleSettings & settings )
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 295
Returns
5.67.3.2 virtual const Error∗ Ain16GetLowerLimit ( uint8 id, int16 & value ) [inline], [virtual]
Returns
5.67.3.3 virtual const Error∗ Ain16GetNegativeDelta ( uint8 id, int16 & value ) [inline], [virtual]
Returns
5.67.3.4 virtual const Error∗ Ain16GetPositiveDelta ( uint8 id, int16 & value ) [inline], [virtual]
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
296 Class Documentation
Parameters
id The analog input channel ID
value The value is returned here.
Returns
5.67.3.5 virtual const Error∗ Ain16GetUnsignedDelta ( uint8 id, int16 & value ) [inline], [virtual]
Returns
5.67.3.6 virtual const Error∗ Ain16GetUpperLimit ( uint8 id, int16 & value ) [inline], [virtual]
Returns
5.67.3.7 const Error ∗ Ain16Read ( uint8 id, int16 & value, bool viaSDO = false ) [virtual]
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 297
5.67.3.8 virtual const Error∗ Ain16SetLowerLimit ( uint8 id, int16 value ) [inline], [virtual]
Returns
5.67.3.9 virtual const Error∗ Ain16SetNegativeDelta ( uint8 id, int16 value ) [inline], [virtual]
Returns
5.67.3.10 virtual const Error∗ Ain16SetPositiveDelta ( uint8 id, int16 value ) [inline], [virtual]
Returns
5.67.3.11 virtual const Error∗ Ain16SetUnsignedDelta ( uint8 id, int16 value ) [inline], [virtual]
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
298 Class Documentation
Parameters
id The analog input channel ID
value The value to be set.
Returns
5.67.3.12 virtual const Error∗ Ain16SetUpperLimit ( uint8 id, int16 value ) [inline], [virtual]
Returns
Returns
5.67.3.14 virtual const Error∗ Ain32GetLowerLimit ( uint8 id, int32 & value ) [inline], [virtual]
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 299
5.67.3.15 virtual const Error∗ Ain32GetNegativeDelta ( uint8 id, int32 & value ) [inline], [virtual]
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
300 Class Documentation
Parameters
id The analog input channel ID
value The value is returned here.
Returns
5.67.3.16 virtual const Error∗ Ain32GetOffset ( uint8 id, int32 & value ) [inline], [virtual]
Returns
5.67.3.17 virtual const Error∗ Ain32GetPositiveDelta ( uint8 id, int32 & value ) [inline], [virtual]
Returns
5.67.3.18 virtual const Error∗ Ain32GetScaling ( uint8 id, int32 & value ) [inline], [virtual]
Returns
5.67.3.19 virtual const Error∗ Ain32GetUnsignedDelta ( uint8 id, int32 & value ) [inline], [virtual]
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 301
Parameters
id The analog input channel ID
value The value is returned here.
Returns
5.67.3.20 virtual const Error∗ Ain32GetUpperLimit ( uint8 id, int32 & value ) [inline], [virtual]
Returns
5.67.3.21 virtual const Error∗ Ain32Read ( uint8 id, int32 & value ) [inline], [virtual]
Returns
5.67.3.22 virtual const Error∗ Ain32SetLowerLimit ( uint8 id, int32 value ) [inline], [virtual]
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
302 Class Documentation
5.67.3.23 virtual const Error∗ Ain32SetNegativeDelta ( uint8 id, int32 value ) [inline], [virtual]
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 303
Parameters
id The analog input channel ID
value The value to be set.
Returns
5.67.3.24 virtual const Error∗ Ain32SetOffset ( uint8 id, int32 value ) [inline], [virtual]
Returns
5.67.3.25 virtual const Error∗ Ain32SetPositiveDelta ( uint8 id, int32 value ) [inline], [virtual]
Returns
5.67.3.26 virtual const Error∗ Ain32SetScaling ( uint8 id, int32 value ) [inline], [virtual]
Returns
5.67.3.27 virtual const Error∗ Ain32SetUnsignedDelta ( uint8 id, int32 value ) [inline], [virtual]
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
304 Class Documentation
Parameters
id The analog input channel ID
value The value to be set.
Returns
5.67.3.28 virtual const Error∗ Ain32SetUpperLimit ( uint8 id, int32 value ) [inline], [virtual]
Returns
Returns
5.67.3.30 virtual const Error∗ Ain8Read ( uint8 id, int8 & value ) [inline], [virtual]
Returns
Return the number of floating point analog inputs available on this device.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 305
Parameters
ct The count is returned here. Zero is returned on error.
Returns
5.67.3.32 virtual const Error∗ AinFltGetLowerLimit ( uint8 id, float & value ) [inline], [virtual]
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.67.3.33 virtual const Error∗ AinFltGetNegativeDelta ( uint8 id, float & value ) [inline], [virtual]
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.
Returns
5.67.3.34 virtual const Error∗ AinFltGetOffset ( uint8 id, float & value ) [inline], [virtual]
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
306 Class Documentation
5.67.3.35 virtual const Error∗ AinFltGetPositiveDelta ( uint8 id, float & value ) [inline], [virtual]
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 307
Parameters
id The analog input channel ID
value The value is returned here.
Returns
5.67.3.36 virtual const Error∗ AinFltGetScaling ( uint8 id, float & value ) [inline], [virtual]
Returns
5.67.3.37 virtual const Error∗ AinFltGetUnsignedDelta ( uint8 id, float & value ) [inline], [virtual]
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.67.3.38 virtual const Error∗ AinFltGetUpperLimit ( uint8 id, float & value ) [inline], [virtual]
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.
Parameters
id The analog input channel ID
value The value is returned here.
Returns
5.67.3.39 virtual const Error∗ AinFltRead ( uint8 id, float & value ) [inline], [virtual]
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
308 Class Documentation
Parameters
id The analog input channel ID
value The analog input value
Returns
5.67.3.40 virtual const Error∗ AinFltSetLowerLimit ( uint8 id, float value ) [inline], [virtual]
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.
Returns
5.67.3.41 virtual const Error∗ AinFltSetNegativeDelta ( uint8 id, float value ) [inline], [virtual]
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.67.3.42 virtual const Error∗ AinFltSetOffset ( uint8 id, float value ) [inline], [virtual]
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 309
5.67.3.43 virtual const Error∗ AinFltSetPositiveDelta ( uint8 id, float value ) [inline], [virtual]
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
310 Class Documentation
Parameters
id The analog input channel ID
value The value to be set.
Returns
5.67.3.44 virtual const Error∗ AinFltSetScaling ( uint8 id, float value ) [inline], [virtual]
Returns
5.67.3.45 virtual const Error∗ AinFltSetUnsignedDelta ( uint8 id, float value ) [inline], [virtual]
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.
Parameters
id The analog input channel ID
value The value to be set.
Returns
5.67.3.46 virtual const Error∗ AinFltSetUpperLimit ( uint8 id, float value ) [inline], [virtual]
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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 311
5.67.3.47 virtual const Error∗ AinGetIntEna ( bool & value ) [inline], [virtual]
Get the current setting of the global interrupt enable for analog inputs.
A return value of true indicates that interrupts are enabled, false disabled.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
312 Class Documentation
Parameters
value The current interrupt enable setting is returned here.
Returns
5.67.3.48 virtual const Error∗ AinGetIntSource ( uint8 id, uint32 & value ) [inline], [virtual]
Returns
5.67.3.49 virtual const Error∗ AinGetTrigType ( uint8 id, IO_AIN_TRIG_TYPE & value ) [inline], [virtual]
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
Set the current setting of the global interrupt enable for analog inputs.
Setting this parameter to true enables interrupts, false disables.
Parameters
value The interrupt enable setting.
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 313
5.67.3.51 virtual const Error∗ AinSetTrigType ( uint8 id, IO_AIN_TRIG_TYPE value ) [inline], [virtual]
Set the analog input trigger type associated with the input channel.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
314 Class Documentation
Parameters
id The analog input channel ID
value The value to set
Returns
Returns
5.67.3.53 virtual const Error∗ Aout16GetErrValue ( uint8 id, int16 & value ) [inline], [virtual]
Returns
5.67.3.54 virtual const Error∗ Aout16SetErrValue ( uint8 id, int16 value ) [inline], [virtual]
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 315
5.67.3.55 const Error ∗ Aout16Write ( uint8 id, int16 value, bool viaSDO = false ) [virtual]
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
316 Class Documentation
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
Returns
5.67.3.57 virtual const Error∗ Aout32GetErrValue ( uint8 id, int32 & value ) [inline], [virtual]
Returns
5.67.3.58 virtual const Error∗ Aout32GetOffset ( uint8 id, int32 & value ) [inline], [virtual]
Returns
5.67.3.59 virtual const Error∗ Aout32GetScaling ( uint8 id, int32 & value ) [inline], [virtual]
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 317
Parameters
id The analog output channel ID
value The value is returned here.
Returns
5.67.3.60 virtual const Error∗ Aout32SetErrValue ( uint8 id, int32 value ) [inline], [virtual]
Returns
5.67.3.61 virtual const Error∗ Aout32SetOffset ( uint8 id, int32 value ) [inline], [virtual]
Returns
5.67.3.62 virtual const Error∗ Aout32SetScaling ( uint8 id, int32 value ) [inline], [virtual]
Returns
5.67.3.63 virtual const Error∗ Aout32Write ( uint8 id, int32 value ) [inline], [virtual]
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
318 Class Documentation
Parameters
id The analog input channel ID
value The value to write.
Returns
Returns
5.67.3.65 virtual const Error∗ Aout8Write ( uint8 id, int8 value ) [inline], [virtual]
Returns
Return the number of floating point analog outputs available on this device.
Parameters
ct The count is returned here. Zero is returned on error.
Returns
5.67.3.67 virtual const Error∗ AoutFltGetErrValue ( uint8 id, float & value ) [inline], [virtual]
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 319
Parameters
id The analog output channel ID
value The value is returned here.
Returns
5.67.3.68 virtual const Error∗ AoutFltGetOffset ( uint8 id, float & value ) [inline], [virtual]
Returns
5.67.3.69 virtual const Error∗ AoutFltGetScaling ( uint8 id, float & value ) [inline], [virtual]
Returns
5.67.3.70 virtual const Error∗ AoutFltSetErrValue ( uint8 id, float value ) [inline], [virtual]
Returns
5.67.3.71 virtual const Error∗ AoutFltSetOffset ( uint8 id, float value ) [inline], [virtual]
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
320 Class Documentation
Parameters
id The analog output channel ID
value The value to be set.
Returns
5.67.3.72 virtual const Error∗ AoutFltSetScaling ( uint8 id, float value ) [inline], [virtual]
Returns
5.67.3.73 virtual const Error∗ AoutFltWrite ( uint8 id, float value ) [inline], [virtual]
Returns
5.67.3.74 virtual const Error∗ AoutGetErrMode ( uint8 id, bool & value ) [inline], [virtual]
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 321
5.67.3.75 virtual const Error∗ AoutSetErrMode ( uint8 id, bool value ) [inline], [virtual]
Returns
5.67.3.76 const Error∗ BitCount ( uint16 base, uint16 & ct ) [inline], [protected]
Returns
5.67.3.77 const Error∗ BitDnld ( uint16 base, uint16 id, bool value ) [inline], [protected]
Returns
5.67.3.78 const Error∗ BitUpld ( uint16 base, uint16 id, bool & value ) [inline], [protected]
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
322 Class Documentation
Parameters
base The object dictionary base index for this parameter
id The I/O pin ID. Must range from 0 to 1024
value The boolean value is returned here
Returns
Returns
5.67.3.80 virtual const Error∗ Din16GetFilt ( uint8 id, uint16 & value ) [inline], [virtual]
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.
Parameters
id Identifies which group of inputs to read.
value The current filter setting of the input lines is returned here.
Returns
5.67.3.81 virtual const Error∗ Din16GetMaskAny ( uint8 id, uint16 & value ) [inline], [virtual]
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
id Identifies which group of inputs to read.
value The current interrupt mask setting of the input lines.
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 323
5.67.3.82 virtual const Error∗ Din16GetMaskHigh2Low ( uint8 id, uint16 & value ) [inline], [virtual]
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
id Identifies which group of inputs to read.
value The current interrupt mask setting of the input lines.
Returns
5.67.3.83 virtual const Error∗ Din16GetMaskLow2High ( uint8 id, uint16 & value ) [inline], [virtual]
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
id Identifies which group of inputs to read.
value The current interrupt mask setting of the input lines.
Returns
5.67.3.84 virtual const Error∗ Din16GetPol ( uint8 id, uint16 & value ) [inline], [virtual]
Returns
5.67.3.85 const Error ∗ Din16Read ( uint8 id, uint16 & value, bool viaSDO = false ) [virtual]
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
324 Class Documentation
Parameters
id Identifies which group of 16 inputs to read.
value The value of the 16 input lines is returned here.
viaSDO If true, read the inputs using SDO transfers. If false (default) use the most recently received PDO
data if this input group is mapped to a transmit PDO and the PDO is active.
Returns
5.67.3.86 virtual const Error∗ Din16SetFilt ( uint8 id, uint16 value ) [inline], [virtual]
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
id Identifies which group of inputs to effect.
value The new filter setting of the input lines.
Returns
5.67.3.87 virtual const Error∗ Din16SetMaskAny ( uint8 id, uint16 value ) [inline], [virtual]
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
id Identifies which group of inputs to effect.
value The new interrupt mask value.
Returns
5.67.3.88 virtual const Error∗ Din16SetMaskHigh2Low ( uint8 id, uint16 value ) [inline], [virtual]
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
id Identifies which group of inputs to effect.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 325
Returns
5.67.3.89 virtual const Error∗ Din16SetMaskLow2High ( uint8 id, uint16 value ) [inline], [virtual]
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
id Identifies which group of inputs to effect.
value The new interrupt mask value.
Returns
5.67.3.90 virtual const Error∗ Din16SetPol ( uint8 id, uint16 value ) [inline], [virtual]
Returns
Returns
5.67.3.92 virtual const Error∗ Din32GetFilt ( uint8 id, uint32 & value ) [inline], [virtual]
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
326 Class Documentation
Parameters
id Identifies which group of inputs to read.
value The current filter setting of the input lines is returned here.
Returns
5.67.3.93 virtual const Error∗ Din32GetMaskAny ( uint8 id, uint32 & value ) [inline], [virtual]
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
id Identifies which group of inputs to read.
value The current interrupt mask setting of the input lines.
Returns
5.67.3.94 virtual const Error∗ Din32GetMaskHigh2Low ( uint8 id, uint32 & value ) [inline], [virtual]
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
id Identifies which group of inputs to read.
value The current interrupt mask setting of the input lines.
Returns
5.67.3.95 virtual const Error∗ Din32GetMaskLow2High ( uint8 id, uint32 & value ) [inline], [virtual]
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
id Identifies which group of inputs to read.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 327
Returns
5.67.3.96 virtual const Error∗ Din32GetPol ( uint8 id, uint32 & value ) [inline], [virtual]
Returns
5.67.3.97 const Error ∗ Din32Read ( uint8 id, uint32 & value, bool viaSDO = false ) [virtual]
Returns
5.67.3.98 virtual const Error∗ Din32SetFilt ( uint8 id, uint32 value ) [inline], [virtual]
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
id Identifies which group of inputs to effect.
value The new filter setting of the input lines.
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
328 Class Documentation
5.67.3.99 virtual const Error∗ Din32SetMaskAny ( uint8 id, uint32 value ) [inline], [virtual]
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 329
Parameters
id Identifies which group of inputs to effect.
value The new interrupt mask value.
Returns
5.67.3.100 virtual const Error∗ Din32SetMaskHigh2Low ( uint8 id, uint32 value ) [inline], [virtual]
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.
Parameters
id Identifies which group of inputs to effect.
value The new interrupt mask value.
Returns
5.67.3.101 virtual const Error∗ Din32SetMaskLow2High ( uint8 id, uint32 value ) [inline], [virtual]
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
id Identifies which group of inputs to effect.
value The new interrupt mask value.
Returns
5.67.3.102 virtual const Error∗ Din32SetPol ( uint8 id, uint32 value ) [inline], [virtual]
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
330 Class Documentation
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 331
Parameters
ct The count is returned here. Zero is returned on error.
Returns
5.67.3.104 virtual const Error∗ Din8GetFilt ( uint8 id, uint8 & value ) [inline], [virtual]
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
id Identifies which group of 8 inputs to read.
value The current filter setting of the 8 input lines is returned here.
Returns
5.67.3.105 virtual const Error∗ Din8GetMaskAny ( uint8 id, uint8 & value ) [inline], [virtual]
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
id Identifies which group of 8 inputs to read.
value The current interrupt mask setting of the 8 input lines.
Returns
5.67.3.106 virtual const Error∗ Din8GetMaskHigh2Low ( uint8 id, uint8 & value ) [inline], [virtual]
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
id Identifies which group of 8 inputs to read.
value The current interrupt mask setting of the 8 input lines.
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
332 Class Documentation
5.67.3.107 virtual const Error∗ Din8GetMaskLow2High ( uint8 id, uint8 & value ) [inline], [virtual]
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
id Identifies which group of 8 inputs to read.
value The current interrupt mask setting of the 8 input lines.
Returns
5.67.3.108 virtual const Error∗ Din8GetPol ( uint8 id, uint8 & value ) [inline], [virtual]
Returns
5.67.3.109 const Error ∗ Din8Read ( uint8 id, uint8 & value, bool viaSDO = false ) [virtual]
Returns
5.67.3.110 virtual const Error∗ Din8SetFilt ( uint8 id, uint8 value ) [inline], [virtual]
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 333
Parameters
id Identifies which group of 8 inputs to effect.
value The new filter setting of the 8 input lines.
Returns
5.67.3.111 virtual const Error∗ Din8SetMaskAny ( uint8 id, uint8 value ) [inline], [virtual]
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.
Parameters
id Identifies which group of 8 inputs to effect.
value The new interrupt mask value.
Returns
5.67.3.112 virtual const Error∗ Din8SetMaskHigh2Low ( uint8 id, uint8 value ) [inline], [virtual]
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
id Identifies which group of 8 inputs to effect.
value The new interrupt mask value.
Returns
5.67.3.113 virtual const Error∗ Din8SetMaskLow2High ( uint8 id, uint8 value ) [inline], [virtual]
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
id Identifies which group of 8 inputs to effect.
value The new interrupt mask value.
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
334 Class Documentation
5.67.3.114 virtual const Error∗ Din8SetPol ( uint8 id, uint8 value ) [inline], [virtual]
Returns
Returns
5.67.3.116 virtual const Error∗ DinGetFilt ( uint16 id, bool & value ) [inline], [virtual]
Returns
5.67.3.117 virtual const Error∗ DinGetIntEna ( bool & value ) [inline], [virtual]
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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 335
Returns
5.67.3.118 virtual const Error∗ DinGetMaskAny ( uint16 id, bool & value ) [inline], [virtual]
Get the ’any transition’ interrupt mask settings for a digital input.
If true, any transition on the input will generate an interrupt.
Parameters
id Identifies the digital input.
value The current interrupt mask setting
Returns
5.67.3.119 virtual const Error∗ DinGetMaskHigh2Low ( uint16 id, bool & value ) [inline], [virtual]
Get the ’high to low’ interrupt mask settings for a digital input.
If true, a high to low transition on the input will generate an interrupt.
Parameters
id Identifies the digital input.
value The current interrupt mask setting
Returns
5.67.3.120 virtual const Error∗ DinGetMaskLow2High ( uint16 id, bool & value ) [inline], [virtual]
Get the ’low to high’ interrupt mask settings for a digital input.
If true, a low to high transition on the input will generate an interrupt.
Parameters
id Identifies the digital input.
value The current interrupt mask setting
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
336 Class Documentation
5.67.3.121 virtual const Error∗ DinGetPol ( uint16 id, bool & value ) [inline], [virtual]
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 337
Parameters
id Identifies the digital input.
value The current polarity setting.
Returns
5.67.3.122 const Error ∗ DinRead ( uint16 id, bool & value, bool viaSDO = false ) [virtual]
Returns
5.67.3.123 virtual const Error∗ DinSetFilt ( uint16 id, bool value ) [inline], [virtual]
Returns
Set the current setting of the global interrupt enable for digital inputs.
Setting this parameter to true enables interrupts, false disables.
Parameters
value The interrupt enable setting.
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
338 Class Documentation
5.67.3.125 virtual const Error∗ DinSetMaskAny ( uint16 id, bool value ) [inline], [virtual]
Set the ’any transition’ interrupt mask settings for a digital input.
If true, any transition on the input will generate an interrupt.
Parameters
id Identifies the digital input.
value The new interrupt mask setting.
Returns
5.67.3.126 virtual const Error∗ DinSetMaskHigh2Low ( uint16 id, bool value ) [inline], [virtual]
Set the ’high to low’ interrupt mask settings for a digital input.
If true, a high to low transition on the input will generate an interrupt.
Parameters
id Identifies the digital input.
value The new interrupt mask setting.
Returns
5.67.3.127 virtual const Error∗ DinSetMaskLow2High ( uint16 id, bool value ) [inline], [virtual]
Set the ’low to high’ interrupt mask settings for a digital input.
If true, a low to high transition on the input will generate an interrupt.
Parameters
id Identifies the digital input.
value The new interrupt mask setting.
Returns
5.67.3.128 virtual const Error∗ DinSetPol ( uint16 id, bool value ) [inline], [virtual]
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 339
Parameters
id Identifies the digital input.
value The new polarity setting.
Returns
Returns
5.67.3.130 virtual const Error∗ Dout16GetErrMode ( uint8 id, uint16 & value ) [inline], [virtual]
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
id Identifies which group of outputs to read.
value The current error mode setting of the output lines is returned here.
Returns
5.67.3.131 virtual const Error∗ Dout16GetErrValue ( uint8 id, uint16 & value ) [inline], [virtual]
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
id Identifies which group of outputs to read.
value The current error value setting of the output lines is returned here.
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
340 Class Documentation
5.67.3.132 virtual const Error∗ Dout16GetFilt ( uint8 id, uint16 & value ) [inline], [virtual]
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
id Identifies which group of outputs to read.
value The current filter setting of the output lines is returned here.
Returns
5.67.3.133 virtual const Error∗ Dout16GetPol ( uint8 id, uint16 & value ) [inline], [virtual]
Returns
5.67.3.134 const Error∗ Dout16Read ( uint8 id, uint16 & value ) [inline]
Read back the last value written to this bank of 16 digital outputs.
Parameters
id Identifies which group of outputs to read.
value The current state of the output lines is returned here.
Returns
5.67.3.135 virtual const Error∗ Dout16SetErrMode ( uint8 id, uint16 value ) [inline], [virtual]
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 341
Parameters
id Identifies which group of outputs to effect.
value The new error mode setting of the output lines.
Returns
5.67.3.136 virtual const Error∗ Dout16SetErrValue ( uint8 id, uint16 value ) [inline], [virtual]
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
id Identifies which group of outputs to effect.
value The new error value setting of the output lines.
Returns
5.67.3.137 virtual const Error∗ Dout16SetFilt ( uint8 id, uint16 value ) [inline], [virtual]
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
id Identifies which group of outputs to effect.
value The new filter setting of the output lines.
Returns
5.67.3.138 virtual const Error∗ Dout16SetPol ( uint8 id, uint16 value ) [inline], [virtual]
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
342 Class Documentation
5.67.3.139 const Error ∗ Dout16Write ( uint8 id, uint16 value, bool viaSDO = false ) [virtual]
Returns
Returns
5.67.3.141 virtual const Error∗ Dout32GetErrMode ( uint8 id, uint32 & value ) [inline], [virtual]
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
id Identifies which group of outputs to read.
value The current error mode setting of the output lines is returned here.
Returns
5.67.3.142 virtual const Error∗ Dout32GetErrValue ( uint8 id, uint32 & value ) [inline], [virtual]
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 343
Parameters
id Identifies which group of outputs to read.
value The current error value setting of the output lines is returned here.
Returns
5.67.3.143 virtual const Error∗ Dout32GetFilt ( uint8 id, uint32 & value ) [inline], [virtual]
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
id Identifies which group of outputs to read.
value The current filter setting of the output lines is returned here.
Returns
5.67.3.144 virtual const Error∗ Dout32GetPol ( uint8 id, uint32 & value ) [inline], [virtual]
Returns
5.67.3.145 const Error∗ Dout32Read ( uint8 id, uint32 & value ) [inline]
Read back the last value written to this bank of 32 digital outputs.
Parameters
id Identifies which group of outputs to read.
value The current state of the output lines is returned here.
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
344 Class Documentation
5.67.3.146 virtual const Error∗ Dout32SetErrMode ( uint8 id, uint32 value ) [inline], [virtual]
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
id Identifies which group of outputs to effect.
value The new error mode setting of the output lines.
Returns
5.67.3.147 virtual const Error∗ Dout32SetErrValue ( uint8 id, uint32 value ) [inline], [virtual]
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
id Identifies which group of outputs to effect.
value The new error value setting of the output lines.
Returns
5.67.3.148 virtual const Error∗ Dout32SetFilt ( uint8 id, uint32 value ) [inline], [virtual]
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
id Identifies which group of outputs to effect.
value The new filter setting of the output lines.
Returns
5.67.3.149 virtual const Error∗ Dout32SetPol ( uint8 id, uint32 value ) [inline], [virtual]
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 345
Parameters
id Identifies which group of outputs to effect.
value The new polarity setting of the output lines.
Returns
5.67.3.150 const Error ∗ Dout32Write ( uint8 id, uint32 value, bool viaSDO = false ) [virtual]
Returns
Returns
5.67.3.152 virtual const Error∗ Dout8GetErrMode ( uint8 id, uint8 & value ) [inline], [virtual]
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
346 Class Documentation
Parameters
id Identifies which group of outputs to read.
value The current error mode setting of the output lines is returned here.
Returns
5.67.3.153 virtual const Error∗ Dout8GetErrValue ( uint8 id, uint8 & value ) [inline], [virtual]
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
id Identifies which group of outputs to read.
value The current error value setting of the output lines is returned here.
Returns
5.67.3.154 virtual const Error∗ Dout8GetFilt ( uint8 id, uint8 & value ) [inline], [virtual]
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
id Identifies which group of outputs to read.
value The current filter setting of the output lines is returned here.
Returns
5.67.3.155 virtual const Error∗ Dout8GetPol ( uint8 id, uint8 & value ) [inline], [virtual]
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 347
5.67.3.156 const Error∗ Dout8Read ( uint8 id, uint8 & value ) [inline]
Read back the last value written to this bank of 8 digital outputs.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
348 Class Documentation
Parameters
id Identifies which group of outputs to read.
value The current state of the output lines is returned here.
Returns
5.67.3.157 virtual const Error∗ Dout8SetErrMode ( uint8 id, uint8 value ) [inline], [virtual]
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
id Identifies which group of outputs to effect.
value The new error mode setting of the output lines.
Returns
5.67.3.158 virtual const Error∗ Dout8SetErrValue ( uint8 id, uint8 value ) [inline], [virtual]
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
id Identifies which group of outputs to effect.
value The new error value setting of the output lines.
Returns
5.67.3.159 virtual const Error∗ Dout8SetFilt ( uint8 id, uint8 value ) [inline], [virtual]
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
id Identifies which group of outputs to effect.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 349
Returns
5.67.3.160 virtual const Error∗ Dout8SetPol ( uint8 id, uint8 value ) [inline], [virtual]
Returns
5.67.3.161 const Error ∗ Dout8Write ( uint8 id, uint8 value, bool viaSDO = false )
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
350 Class Documentation
5.67.3.163 virtual const Error∗ DoutGetErrMode ( uint16 id, bool & value ) [inline], [virtual]
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
id Identifies the output to read.
value The current error mode setting of the output line is returned here.
Returns
5.67.3.164 virtual const Error∗ DoutGetErrValue ( uint16 id, bool & value ) [inline], [virtual]
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
id Identifies the output to read.
value The current error value setting of the output line is returned here.
Returns
5.67.3.165 virtual const Error∗ DoutGetFilt ( uint16 id, bool & value ) [inline], [virtual]
Get the current filter constant setting for an individual digital output.
A value of true enables the filter, false disables.
Parameters
id Identifies the output to read.
value The current filter setting of the output line is returned here.
Returns
5.67.3.166 virtual const Error∗ DoutGetPol ( uint16 id, bool & value ) [inline], [virtual]
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 351
Parameters
id Identifies the output to read.
value The current polarity setting of the output line is returned here.
Returns
5.67.3.167 virtual const Error∗ DoutSetErrMode ( uint16 id, bool value ) [inline], [virtual]
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
id Identifies which digital output to effect.
value The new error mode setting of the output line.
Returns
5.67.3.168 virtual const Error∗ DoutSetErrValue ( uint16 id, bool value ) [inline], [virtual]
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
id Identifies which digital output to effect.
value The new error value setting of the output line.
Returns
5.67.3.169 virtual const Error∗ DoutSetFilt ( uint16 id, bool value ) [inline], [virtual]
Set the current filter constant setting for an individual digital output.
A value of true enables the filter, false disables.
Parameters
id Identifies which digital output to effect.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
352 Class Documentation
Returns
5.67.3.170 virtual const Error∗ DoutSetPol ( uint16 id, bool value ) [inline], [virtual]
Returns
5.67.3.171 const Error ∗ DoutWrite ( uint16 id, bool value, bool viaSDO = false ) [virtual]
Returns
5.67.3.172 const Error ∗ Init ( Network & net, int16 nodeID ) [virtual]
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.67 IOModule Class Reference 353
Returns
5.67.3.173 const Error ∗ Init ( Network & net, int16 nodeID, IOModuleSettings & settings ) [virtual]
Returns
Reimplemented in CopleyIO.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
354 Class Documentation
timeout The timeout for the wait (milliseconds). Negative values indicate that no timeout should be used
(wait forever). The default value is -1.
Returns
5.67.3.176 const Error ∗ WaitIOEvent ( Event & e, Timeout timeout, IOMODULE_EVENTS & match ) [virtual]
Returns
The documentation for this class was generated from the following files:
• CML_IO.h
• IOmodule.cpp
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.68 IOModuleSettings Struct Reference 355
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.
Default: zero (not used)
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.
Default 100 (ms)
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
356 Class Documentation
• CML_IO.h
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.69 IxxatCAN Class Reference 357
RefObj
CanInterface
IxxatCAN
RefObj
rxSem mutex rx
IxxatCAN
• IxxatCAN (void)
Construct a new Ixxat CAN interface object.
• IxxatCAN (const char ∗port)
Construct a new Ixxat CAN interface object for the specified port.
• virtual ∼IxxatCAN (void)
Destructor for Ixxat card.
• const Error ∗ Open (void)
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
358 Class Documentation
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.
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.69 IxxatCAN Class Reference 359
Parameters
port The port name string identifying the CAN device.
Returns
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
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
360 Class Documentation
5.69.3.4 const Error ∗ RecvFrame ( CanFrame & frame, Timeout timeout ) [protected], [virtual]
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.69 IxxatCAN Class Reference 361
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
Returns
5.69.3.7 const Error ∗ XmitFrame ( CanFrame & frame, Timeout timeout ) [protected], [virtual]
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
362 Class Documentation
• can_ixxat.h
• can_ixxat.cpp
RefObj
CanInterface
IxxatCANV3
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.70 IxxatCANV3 Class Reference 363
RefObj
CanInterface Mutex
mutex
IxxatCANV3
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
364 Class Documentation
Returns
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
Returns
5.70.2.4 const Error ∗ RecvFrame ( CanFrame & frame, Timeout timeout ) [protected], [virtual]
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.70 IxxatCANV3 Class Reference 365
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
Returns
5.70.2.6 const Error ∗ XmitFrame ( CanFrame & frame, Timeout timeout ) [protected], [virtual]
Returns
• can_ixxat_v3.h
• can_ixxat_v3.cpp
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
366 Class Documentation
RefObj
CanInterface
KvaserCAN
RefObj
CanInterface Mutex
mutex
KvaserCAN
• KvaserCAN (void)
Construct a default CAN object.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.71 KvaserCAN Class Reference 367
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
368 Class Documentation
Destructor.
This closes the CAN port and frees the .dll
Returns
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
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.71 KvaserCAN Class Reference 369
5.71.3.4 const Error ∗ RecvFrame ( CanFrame & frame, Timeout timeout ) [protected], [virtual]
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
370 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
Returns
5.71.3.6 const Error ∗ XmitFrame ( CanFrame & frame, Timeout timeout ) [protected], [virtual]
Returns
• can_kvaser.h
• can_kvaser.cpp
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.72 Linkage Class Reference 371
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)
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
372 Class Documentation
• const Error ∗ MoveTo (PointN &p, uunit vel, uunit acc, uunit dec, uunit jrk, bool start=true)
Move to a point in space.
• 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 ∗ 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)
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.
• virtual const Error ∗ ConvertAmpToAxis (uunit pos[ ], uunit vel[ ])
Convert position & velocity information from the amplifier frame to the axis frame.
• virtual const Error ∗ ConvertAxisToAmp (uunit pos[ ], uunit vel[ ])
Convert position & velocity information from the axis frame to the amplifier frame.
• uint32 GetNetworkRef (void)
Return a CML reference number for the Network this linkage is associated with.
• NetworkType GetNetworkType (void)
Return the network type for the network this linkage is associated with.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.72 Linkage Class Reference 373
Public Attributes
• EventMap eventMap
This is an event map that is used to track linkage events and state changes.
Friends
• class Amp
Default constructor.
Linkage::Init must be called before this linkage object may be used.
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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
374 Class Documentation
5.72.3.3 virtual const Error∗ ConvertAmpToAxis ( uunit pos[ ], uunit vel[ ] ) [inline], [virtual]
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.
Parameters
pos An array of amplifer positions on entry, and axes positions on exit.
vel An array of amplifier velocities on entry, and axis velocities on exit.
Returns
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
pos An array of amplifer positions on entry, and axes positions on exit.
Returns
5.72.3.5 virtual const Error∗ ConvertAxisToAmp ( uunit pos[ ], uunit vel[ ] ) [inline], [virtual]
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.
Parameters
pos An array of axis positions on entry, and amplifier positions on exit.
vel An array of axis velocities on entry, and amplifier velocities on exit.
Returns
Convert the linkage position from the axis frame to the amplifier frame.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.72 Linkage Class Reference 375
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
376 Class Documentation
Parameters
pos An array of axis positions on entry, and amp positions on exit.
Returns
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.
Parameters
i The index of the amplifier to access.
Returns
Returns
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
i The index of the amplifier to access.
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.72 Linkage Class Reference 377
Returns
Returns
5.72.3.12 const Error ∗ GetMoveLimits ( uunit & vel, uunit & acc, uunit & dec, uunit & jrk )
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
378 Class Documentation
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.72 Linkage Class Reference 379
5.72.3.17 const Error ∗ MoveTo ( PointN & p, uunit vel, uunit acc, uunit dec, uunit jrk, bool start = true )
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
380 Class Documentation
Parameters
i The amplifier index location
Returns
5.72.3.20 const Error ∗ SendTrajectory ( LinkTrajectory & trj, bool start = true )
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.72.3.21 const Error ∗ SetMoveLimits ( uunit vel, uunit acc, uunit dec, uunit jrk )
Returns
Start the moves that have already been programmed into all axes of this linkage.
Returns
5.72.3.23 const Error ∗ WaitEvent ( Event & e, Timeout timeout, LINK_EVENT & match )
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.73 LinkError Class Reference 381
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
Returns
Wait for the currently running move to finish, or for an error to occur.
Parameters
timeout The maximum time to wait (milliseconds). Default is -1 (forever).
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
382 Class Documentation
Error
LinkError
Internal
Error OK
Unknown
BadAmpCount
AmpTrjNotRunning
AmpAlreadyLinked
AmpRemoved
AmpTrjOverflow
LinkError StartMoveTO
AlreadyInit
NoActiveTrj
NetworkMismatch
BadMoveLimit
...
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.73 LinkError Class Reference 383
This class represents error conditions that can occur in the Linkage class.
The amplifier objects used to init the linkage are not all attached to the same CanOpen network.
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
384 Class Documentation
• 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.
5.74.2.1 LinkSettings ( )
Default constructor.
All settings are set to their default values at construction time.
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
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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.75 LinkTrajectory Class Reference 385
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
Linkage trajectory.
Inheritance diagram for LinkTrajectory:
RefObj
LinkTrajectory
LinkTrjScurve Path
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
386 Class Documentation
RefObj
LinkTrajectory
• LinkTrajectory (void)
LinkTrajectory default constructor.
• virtual ∼LinkTrajectory ()
Virtual destructor.
• virtual const Error ∗ StartNew (void)
Start a new trajectory.
• virtual void Finish (void)
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.75 LinkTrajectory Class Reference 387
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.
Returns
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.75.2.4 virtual const Error∗ NextSegment ( uunit pos[ ], uunit vel[ ], uint8 & time ) [pure virtual]
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
388 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
Returns
An error pointer if the trajectory object is not available, or NULL if it is ready to be sent.
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.76 LinkTrjScurve Class Reference 389
RefObj
LinkTrajectory
LinkTrjScurve
RefObj
LinkTrajectory
LinkTrjScurve
• LinkTrjScurve ()
Default constructor for multi-axis s-curve trajectory.
• const Error ∗ Calculate (PointN &start, PointN &end, uunit vel, uunit acc, uunit dec, uunit jrk)
Calculate a multi-axis s-curve trajectory.
• int GetDim (void)
Get the dimension of the trajectory.
• const Error ∗ StartNew (void)
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
390 Class Documentation
5.76.2.1 const Error ∗ Calculate ( PointN & s, PointN & e, uunit vel, uunit acc, uunit dec, uunit jrk )
Returns
Returns
Implements LinkTrajectory.
5.76.2.3 const Error ∗ NextSegment ( uunit pos[ ], uunit vel[ ], uint8 & time ) [virtual]
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.77 LinuxEcatHardware Class Reference 391
Parameters
pos An array which will be filled with position information.
vel An array which will be filled with velocity information.
time A reference to a variable where the time (milliseconds) will be returned.
Returns
Implements LinkTrajectory.
Returns
• CML_TrjScurve.h
• TrjScurve.cpp
RefObj
EtherCatHardware
LinuxEcatHardware
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
392 Class Documentation
RefObj
EtherCatHardware
LinuxEcatHardware
• ecat_linux.h
• ecat_linux.cpp
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.78 LSS Class Reference 393
RefObj
Receiver
LSS
RefObj
Receiver
LSS
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
394 Class Documentation
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.78 LSS Class Reference 395
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
max The maximum number of amplifier serial numbers to be returned.
serial An array where the amplifier serial numbers will be returned. This array must be at least max
elements long.
Returns
The number of amplifiers actually found. This is not limited to the max parameter value
Find the serial number of the first amplifier in the passed range.
Parameters
low The lower limit of the range
high The upper limit of the range
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
396 Class Documentation
This method is called by the main CAN network listener when a new LSS response frame is received.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.78 LSS Class Reference 397
Parameters
frame A reference to the CAN fame that was received
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
398 Class Documentation
Parameters
cs The command specifier for this frame.
data The data passed with the frame.
Returns
The documentation for this class was generated from the following files:
• CML_CanOpen.h
• LSS.cpp
• MtrInfo (void)
Motor info structure default constructor.
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)
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.79 MtrInfo Struct Reference 399
• 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
Encoder type. See documentation for details.
• int32 ctsPerRev
Encoder counts / revolution (rotory motors only)
• int16 encUnits
Encoder units (linear motor only)
• int16 encRes
Encoder resolution (encoder units / count) - linear motors only.
• int32 eleDist
Motor electrical distance (encoder units / electrical phase) - linear only.
• int16 mtrUnits
Motor units (used by CME program)
• int32 stepsPerRev
Microsteps / motor rotation (used for Stepnet amplifiers)
• int16 encShift
Analog Encoder shift value (used only with Analog encoders)
• int32 ndxDist
Index mark distance (reserved for future use)
• int16 loadEncType
Load encoder type (0 for none).
• int32 loadEncRes
Load encoder resolution.
• bool loadEncReverse
Reverse load encoder if true.
• int32 gearRatio
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
400 Class Documentation
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.80 Mutex Class Reference 401
• CML_AmpStruct.h
• AmpStruct.cpp
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
402 Class Documentation
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.
Returns
An error object.
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.82 Network Class Reference 403
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.
The documentation for this class was generated from the following file:
• CML_Threads.h
RefObj
Network
CanOpen EtherCAT
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
404 Class Documentation
RefObj
Network
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.82 Network Class Reference 405
Parameters
n Pointer to the node object
Returns
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.
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
Reimplemented in EtherCAT.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
406 Class Documentation
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.
Inheritance diagram for NetworkError:
Error
NetworkError
Internal
Error OK
Unknown
NetworkError NodeIdUsed
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.84 NetworkNodeInfo Class Reference 407
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
• CML_Network.h
• NetworkOptions (void)
Default constructor.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
408 Class Documentation
Public Attributes
• uint16 canBusConfig
Network Options. The details fo this parameter depend on the type.
Default constructor.
Initialize all structure elements to zero.
The documentation for this struct was generated from the following file:
• CML_AmpStruct.h
Node class.
Inheritance diagram for Node:
RefObj
Node
CopleyNode IOModule
Amp CopleyIO
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.86 Node Class Reference 409
RefObj SDO
sdo
Node
• Node ()
Default CANopen node object constructor.
• Node (Network &net, int16 nodeID)
Initialize the Node object.
• virtual ∼Node ()
CANopen node destructor.
• virtual const Error ∗ StopGuarding (void)
Disable node guarding & heartbeat monitoring.
• virtual const Error ∗ StartHeartbeat (uint16 period, uint16 timeout)
Enable heartbeat messages from this node, and start a thread to monitor them.
• virtual const Error ∗ StartNodeGuard (uint16 guardTime, byte lifeFactor)
Enable node guarding on this node.
• virtual const Error ∗ Init (Network &co, int16 nodeID)
Initialize the CANopen Node object.
• virtual const Error ∗ UnInit (void)
Un-initialize the Node object.
• virtual NetworkType GetNetworkType (void)
Return a value that identifies the type of network the node is currently attached to.
• virtual uint32 GetNetworkRef (void)
Return a reference ID to the network that this node is attached to.
• virtual const Error ∗ PdoSet (uint16 n, PDO &pdo, bool enable=true)
Associate the passed PDO object with this node.
• virtual const Error ∗ PdoEnable (uint16 n, PDO &pdo)
Enable the passed PDO object.
• virtual const Error ∗ PdoDisable (uint16 n, PDO &pdo)
Disable the passed PDO object.
• virtual const Error ∗ RpdoDisable (uint16 n)
Disable the specified receive PDO.
• virtual const Error ∗ TpdoDisable (uint16 n)
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
410 Class Documentation
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.86 Node Class Reference 411
Public Attributes
• SDO sdo
This SDO may be used to get/set values in the node’s object dictionary.
Friends
• class Network
• class CanOpen
• class EtherCAT
Node class.
Objects of this class represent individual nodes on the CANopen or EtherCAT network.
5.86.2.1 Node ( )
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
412 Class Documentation
Parameters
net The network object that this node is associated with.
nodeID The node’s ID.
Clear the error history (object 0x1003) array for this node.
Returns
An error object.
5.86.3.2 virtual const Error∗ GetDeviceType ( uint32 & devType ) [inline], [virtual]
Returns
An error object
5.86.3.3 const Error ∗ GetErrorHistory ( uint16 & ct, uint32 ∗ array ) [virtual]
Returns
5.86.3.4 virtual const Error∗ GetErrorRegister ( byte & err ) [inline], [virtual]
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.86 Node Class Reference 413
Returns
An error object
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
id The identity object to be filled in by this call
Returns
5.86.3.6 virtual const Error∗ GetMfgDeviceName ( int32 & len, char ∗ str ) [inline], [virtual]
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.86.3.7 virtual const Error∗ GetMfgHardwareVer ( int32 & len, char ∗ str ) [inline], [virtual]
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
5.86.3.8 virtual const Error∗ GetMfgSoftwareVer ( int32 & len, char ∗ str ) [inline], [virtual]
Read the manufacturer’s software version string from the object dictionary.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
414 Class Documentation
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.86.3.9 virtual const Error∗ GetMfgStatus ( uint32 & stat ) [inline], [virtual]
Returns
An error object
Returns
Reimplemented in Amp.
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.
Returns
The node ID
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.86 Node Class Reference 415
Returns
Reimplemented in Amp.
Returns
An error object.
5.86.3.15 virtual const Error∗ GetSynchPeriod ( uint32 & per ) [inline], [virtual]
Returns
An error object.
5.86.3.16 virtual void HandleEmergency ( CanFrame & frame ) [inline], [protected], [virtual]
5.86.3.17 virtual void HandleStateChange ( NodeState from, NodeState to ) [inline], [protected], [virtual]
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
416 Class Documentation
Parameters
from Previous node state before the change
to New node state
Reimplemented in Amp.
5.86.3.18 const Error ∗ Init ( Network & network, int16 nodeID ) [virtual]
Returns
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
Returns
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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.86 Node Class Reference 417
Parameters
n The slot number of the PDO
pdo The PDO mapped to that slot
Returns
An error object
Returns
An error object
5.86.3.23 const Error ∗ PdoSet ( uint16 slot, PDO & pdo, bool enable = true ) [virtual]
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
418 Class Documentation
Returns
An error object
Returns
An error object
Returns
An error object
Returns
An error object.
Enable heartbeat messages from this node, and start a thread to monitor them.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.86 Node Class Reference 419
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
Returns
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
420 Class Documentation
Returns
An error object.
Returns
An error object.
Returns
An error object
Returns
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.87 NodeError Class Reference 421
Error
NodeError
AmpFault
Internal
Error OK
Unknown
NetworkUnavailable
NodeError
GuardTimeout
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
422 Class Documentation
• 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.
• CML_Node.h
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.89 Path Class Reference 423
RefObj
LinkTrajectory
Path
RefObj
LinkTrajectory Mutex
mtx
Path
• Path (uint d)
Path object constructor.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
424 Class Documentation
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.89 Path Class Reference 425
Parameters
d The number of dimensions for the path. Must be either one or two for now.
5.89.3.1 virtual const Error∗ AddArc ( double radius, double angle ) [virtual]
Returns
5.89.3.2 virtual const Error∗ AddArc ( PointN & center, double angle ) [virtual]
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
center The center point of the arc.
angle The number of radians to rotate through. Positive values will result in clockwise rotation.
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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
426 Class Documentation
Returns
Returns
Implements LinkTrajectory.
5.89.3.6 virtual const Error∗ NextSegment ( uunit pos[ ], uunit vel[ ], uint8 & time ) [virtual]
Returns
Implements LinkTrajectory.
Set the current velocity to 0 and pause for the specified amount of time.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.89 Path Class Reference 427
Parameters
sec The time to pause (must be >= 0). Time is specified in seconds.
Returns
Returns
true if the end of the path has been reached, false if not.
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
428 Class Documentation
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.90 PathError Class Reference 429
Parameters
v The maximum velocity (position units / second)
Returns
Returns
An error pointer if the trajectory object is not available, or NULL if it is ready to be sent.
• CML_Path.h
Error
PathError
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
430 Class Documentation
Internal
Error OK
Unknown
Alloc
BadLength
BadPoint
VelNotInit
PathError
BadVel
Empty
AccNotInit
BadAcc
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.91 PcapEcatHardware Class Reference 431
• CML_Path.h
This class provides an interface to the Ethernet ports on a Windows system using the winpcap library.
Inheritance diagram for PcapEcatHardware:
RefObj
EtherCatHardware
PcapEcatHardware
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
432 Class Documentation
RefObj
EtherCatHardware
PcapEcatHardware
This class provides an interface to the Ethernet ports on a Windows system using the winpcap library.
Support for winpcap is now depreciated in CML. Please use the WinUdpEcatHardware class instead.
Create an EtherCAT hardware interface which uses the pcap library to capture packets.
This module also supports the winpcap library on Windows. Please see http://www.winpcap.org for more
information.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.92 PDO Class Reference 433
Parameters
name The parameter identifies the Ethernet adapter to open. This parameter can either be the name
of an EtherNet port as returned by the pcap call pcap_findalldevs, or it can take the form ethN
for some integer N (i.e. eth0, eth1, etc). In this case the Nth Ethernet port identified by the pcap
library will be used.
If NULL Is passed (default), then the first Ethernet adapter will be used.
Returns
A locally allocated buffer holding the description, or NULL if there is no description available. It’s possible that a
valid device number may not have a description available, so a NULL returned here does not necessarily indicate
the lack of a device.
Return the name of the Nth EtherCAT adapter available in the system.
Parameters
index Identifies which adapter name to return.
Returns
A locally allocated buffer holding the name, or NULL if there are no remaining adapters available. The returned
buffer is owned by the class and will be updated on subsequent calls to this function.
The documentation for this class was generated from the following files:
• ecat_pcap.h
• ecat_pcap.cpp
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
434 Class Documentation
AlgOutPDO
DigOutPDO
RPDO_Ctrl
RPDO RPDO_HighResTime
RPDO_LinkCtrl
AlgInPDO
DigInPDO
TPDO
TPDO_HighResTime
TPDO_PvtStat
TPDO_Status
RefObj Pmap
map
PDO
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.92 PDO Class Reference 435
• 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.
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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
436 Class Documentation
Add the passed variable to the end of the variable map associated with this PDO.
Parameters
var The variable to be added.
Returns
An error object.
Returns
An error code
Returns
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
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.92 PDO Class Reference 437
Returns
Returns
Returns
Returns
An error object.
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
438 Class Documentation
Error
PDO_Error
Internal
Error OK
Unknown
MapFull
PDO_Error BitOverflow
BitSizeError
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.94 Pmap Class Reference 439
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
• 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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
440 Class Documentation
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.
Construct a generic PDO mapping variable and initialize it’s size and object ID.
Parameters
index The index of the variable in the object dictionary
sub The variable’s sub-index in the object dictionary
bits The size of the variable in bits
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.94 Pmap Class Reference 441
Parameters
cptr Pointer where the PDO data should be stored
Returns
Returns
Returns
5.94.3.5 virtual const Error∗ Init ( uint16 index, byte sub, byte bits ) [inline], [virtual]
Returns
An error object
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
442 Class Documentation
Parameters
cptr Pointer to the received PDO data.
• CML_PDO.h
This is a PDO variable mapping class that extends the virtual Pmap class to handle 16-bit integers.
Inheritance diagram for Pmap16:
Pmap
Pmap16
Pmap
Pmap16
• Pmap16 ()
Default constructor for a 16-bit mapping object.
• Pmap16 (uint16 index, byte sub=0)
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.95 Pmap16 Class Reference 443
This is a PDO variable mapping class that extends the virtual Pmap class to handle 16-bit integers.
Copy the current value of this variable into the passed character array.
This function is called when a receive PDO is about to be transmitted to a node.
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
444 Class Documentation
Parameters
index Object index associated with this variable
sub Object sub-index (defaults to 0)
Returns
An error object
Returns
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.
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 24-bit integers.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.96 Pmap24 Class Reference 445
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)
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
446 Class Documentation
This is a PDO variable mapping class that extends the virtual Pmap class to handle 24-bit integers.
Copy the current value of this variable into the passed character array.
This function is called when a receive PDO is about to be transmitted to a node.
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.
Returns
An error object
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.97 Pmap32 Class Reference 447
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.
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.
Inheritance diagram for Pmap32:
Pmap
Pmap32
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
448 Class Documentation
Pmap
Pmap32
• Pmap32 ()
Default constructor for a 32-bit mapping object.
• Pmap32 (uint16 index, byte sub=0)
Create a new 32-bit mapping object.
• const Error ∗ Init (uint16 index, byte sub=0)
Initialize a 32-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)
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 32-bit integers.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.97 Pmap32 Class Reference 449
Parameters
index Object index associated with this variable
sub Object sub-index (defaults to 0)
Copy the current value of this variable into the passed character array.
This function is called when a receive PDO is about to be transmitted to a node.
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.
Returns
An error object
Returns
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
450 Class Documentation
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.98 Pmap8 Class Reference 451
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 8-bit integers.
Inheritance diagram for Pmap8:
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
452 Class Documentation
This is a PDO variable mapping class that extends the virtual Pmap class to handle 8-bit integers.
Copy the current value of this variable into the passed character array.
This function is called when a receive PDO is about to be transmitted to a node.
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.99 PmapRaw Class Reference 453
Parameters
index Object index associated with this variable
sub Object sub-index (defaults to 0)
Returns
An error object
Returns
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 1 bytes. The value of this variable will
be updated with the data passed in this array.
The documentation for this class was generated from the following file:
• CML_PDO.h
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
454 Class Documentation
Pmap
PmapRaw
Pmap
PmapRaw
• PmapRaw ()
Default constructor.
• PmapRaw (uint16 index, byte sub, byte bits)
Create a new mapping object.
• virtual void Get (byte ∗cptr)
Copy the current value of this variable into the passed character array.
• virtual void Set (byte ∗cptr)
Update the value of this variable based on the data passed in a character array.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.100 Point< N > Class Template Reference 455
Copy the current value of this variable into the passed character array.
This function is called when a receive PDO is about to be transmitted to a node.
Parameters
cptr A character pointer that references a char array large enough to hold this objects data.
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
456 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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.101 PointN Class Reference 457
This template may be used to generate point objects for some fixed number of dimensions.
Returns
Implements PointN.
Returns
Implements PointN.
Implements PointN.
The documentation for this class was generated from the following file:
• CML_Geometry.h
An N axis point.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
458 Class Documentation
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.
An N axis point.
This point specifies a position in N dimensions.
This is a pure virtual base class of the more specific Point classes.
Returns
Implemented in Point< N >, Point< CML_MAX_AMPS_PER_LINK >, and Point< PATH_MAX_DIMENSIONS >.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.102 PosLoopConfig Struct Reference 459
Returns
Implemented in Point< N >, Point< CML_MAX_AMPS_PER_LINK >, and Point< PATH_MAX_DIMENSIONS >.
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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
460 Class Documentation
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.
Default constructor.
Simply initializes all servo parameters to zero.
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
• ProfileConfig (void)
Default constructor. Simply set all parameters to zero.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.104 ProfileConfigScurve Struct Reference 461
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.
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
462 Class Documentation
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.
For absolute moves this is an absolute position, for relative moves it’s a distance to move.
This parameter is specified in "user units". See Amp::SetCountsPerUnit for details.
• CML_Amp.h
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.105 ProfileConfigTrap Struct Reference 463
• ProfileConfigTrap (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 dec
Deceleration limit for move.
For absolute moves this is an absolute position, for relative moves it’s a distance to move.
This parameter is specified in "user units". See Amp::SetCountsPerUnit for details.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
464 Class Documentation
• 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.
Direction of motion.
If >= 0, then move in the positive direction If < 0, then move in the negative direction.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.107 PvtSegCache Class Reference 465
• CML_Amp.h
• 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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
466 Class Documentation
Get the position corresponding to the specified segment from the cache.
If the requested position is available, it will be copied to the passed pointer.
Parameters
p A pointer to where the position information will be copied.
id The ID number of the segment being requested
Returns
Returns
The documentation for this class was generated from the following files:
• CML_Amp.h
• AmpPVT.cpp
• PwmInConfig (void)
Default constructor. Simply sets all members to zero.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.108 PwmInConfig Struct Reference 467
Public Attributes
• int16 cfg
PWM input pin configuration.
• int32 uvCfg
PWM input UV configuration.
• int32 scale
Scaling factor.
• int16 freq
PWM input frequency.
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.
• CML_AmpStruct.h
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
468 Class Documentation
RefObj
Receiver
RefObj
Receiver
• Receiver ()
Default constructor for a network receiver object.
• virtual ∼Receiver ()
Destructor for network receiver objects.
• virtual int NewFrame (CanFrame &frame)
Process a new received CAN bus frame.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.110 RefObj Class Reference 469
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.
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
470 Class Documentation
CopleyCAN
IxxatCAN
CanInterface IxxatCANV3
KvaserCAN
LinuxEcatHardware
EcatFrame PcapEcatHardware
EtherCatHardware WinUdpEcatHardware
Linkage LinkTrjScurve
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.110 RefObj Class Reference 471
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
472 Class Documentation
Returns
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 RefObj-
::Unlock when finished accessing the object.
Parameters
val The reference ID associated with the object
Returns
A pointer to the referenced object if it still exists, or NULL if it’s been destroyed.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.110 RefObj Class Reference 473
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
474 Class Documentation
Parameters
val The reference previously returned by a call to RefObj::GrabRef
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
autoDeleteEna Boolean that if is true enabled the auto delete
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.112 RegenConfig Struct Reference 475
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.
Returns
Returns
The documentation for this class was generated from the following file:
• CML_Reference.h
• RegenConfig (void)
Default constructor.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
476 Class Documentation
Public Attributes
Default constructor.
Initializes all structure elements to zero.
Model number / name string for regen resister connected to the amplifier.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.113 RPDO Class Reference 477
• CML_AmpStruct.h
RefObj
PDO
RPDO
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
478 Class Documentation
RefObj Pmap
map
PDO
RPDO
• 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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.113 RPDO Class Reference 479
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
480 Class Documentation
Parameters
cobID The CAN message ID associated with this PDO
Returns
Load the data from this PDO into the passed buffer.
Parameters
buff Buffer where data will be loaded
max The maximum number of bytes to load.
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.114 RPDO_LinkCtrl Class Reference 481
RefObj
PDO
RPDO
RPDO_LinkCtrl
RefObj Pmap
map
PDO
RPDO
RPDO_LinkCtrl
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
482 Class Documentation
Receive PDO used to update the control word of all amplifiers in the linkage.
This object is intended for internal use only.
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
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.115 ScurveError Class Reference 483
Error
ScurveError
Internal
Error OK
Unknown
InUse
NoCalc
ScurveError
BadParam
NotInUse
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
484 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)
Upload data using this SDO.
• const Error ∗ Dnld32 (int16 index, int16 sub, uint32 data)
Download a 32-bit value using this SDO.
• const Error ∗ Upld32 (int16 index, int16 sub, uint32 &data)
Upload a 32-bit value using this SDO.
• const Error ∗ Dnld16 (int16 index, int16 sub, uint16 data)
Download a 16-bit value using this SDO.
• const Error ∗ Upld16 (int16 index, int16 sub, uint16 &data)
Upload a 16-bit value using this SDO.
• const Error ∗ Dnld8 (int16 index, int16 sub, uint8 data)
Download a 8-bit value using this SDO.
• const Error ∗ Upld8 (int16 index, int16 sub, uint8 &data)
Upload a 8-bit value using this SDO.
• const Error ∗ DnldString (int16 index, int16 sub, char ∗data)
Download a visible string type using the SDO.
• const Error ∗ UpldString (int16 index, int16 sub, int32 &len, char ∗data)
Upload a visible string type from the SDO.
• const Error ∗ Download (int16 index, int16 sub, int32 size, char ∗data)
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.116 SDO Class Reference 485
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
486 Class Documentation
5.116.3.1 const Error ∗ BlockDnld ( int16 index, int16 sub, int32 size, byte ∗ data )
Returns
5.116.3.2 const Error ∗ BlockUpld ( int16 index, int16 sub, int32 & size, byte ∗ data )
Returns
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.116 SDO Class Reference 487
5.116.3.5 const Error ∗ Dnld16 ( int16 index, int16 sub, uint16 data )
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
488 Class Documentation
Parameters
index The index of the object in the object dictionary
sub The sub-index of the object in the object dictionary
data The data to be downloaded
Returns
5.116.3.6 const Error∗ Dnld16 ( int16 index, int16 sub, int16 data ) [inline]
Returns
5.116.3.7 const Error ∗ Dnld32 ( int16 index, int16 sub, uint32 data )
Returns
5.116.3.8 const Error∗ Dnld32 ( int16 index, int16 sub, int32 data ) [inline]
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.116 SDO Class Reference 489
5.116.3.9 const Error ∗ Dnld8 ( int16 index, int16 sub, uint8 data )
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
490 Class Documentation
Parameters
index The index of the object in the object dictionary
sub The sub-index of the object in the object dictionary
data The data to be downloaded
Returns
5.116.3.10 const Error∗ Dnld8 ( int16 index, int16 sub, int8 data ) [inline]
Returns
5.116.3.11 const Error∗ DnldFlt ( int16 index, int16 sub, float data ) [inline]
Returns
5.116.3.12 const Error ∗ DnldString ( int16 index, int16 sub, char ∗ data )
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.116 SDO Class Reference 491
Returns
5.116.3.13 const Error ∗ Download ( int16 index, int16 sub, int32 size, byte ∗ data )
Returns
5.116.3.14 const Error∗ Download ( int16 index, int16 sub, int32 size, char ∗ data ) [inline]
Returns
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
492 Class Documentation
Returns
Return the maximum number times that the SDO transfer will be attempted before returning an error.
Returns
Returns
Returns
5.116.3.21 const Error ∗ Upld16 ( int16 index, int16 sub, uint16 & data )
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.116 SDO Class Reference 493
Returns
5.116.3.22 const Error∗ Upld16 ( int16 index, int16 sub, int16 & data ) [inline]
Returns
5.116.3.23 const Error ∗ Upld32 ( int16 index, int16 sub, uint32 & data )
Returns
5.116.3.24 const Error∗ Upld32 ( int16 index, int16 sub, int32 & data ) [inline]
Returns
5.116.3.25 const Error ∗ Upld8 ( int16 index, int16 sub, uint8 & data )
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
494 Class Documentation
Parameters
index The index of the object in the object dictionary
sub The sub-index of the object in the object dictionary
data The uploaded data will be returned here.
Returns
5.116.3.26 const Error∗ Upld8 ( int16 index, int16 sub, int8 & data ) [inline]
Returns
5.116.3.27 const Error∗ UpldFlt ( int16 index, int16 sub, float & data ) [inline]
Returns
5.116.3.28 const Error ∗ UpldString ( int16 index, int16 sub, int32 & len, char ∗ data )
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.116 SDO Class Reference 495
Returns
5.116.3.29 const Error ∗ Upload ( int16 index, int16 sub, int32 & size, byte ∗ data )
Returns
5.116.3.30 const Error∗ Upload ( int16 index, int16 sub, int32 & size, char ∗ data ) [inline]
Returns
The documentation for this class was generated from the following files:
• CML_SDO.h
• SDO.cpp
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
496 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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.117 SDO_Error Class Reference 497
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
498 Class Documentation
• CML_SDO.h
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.118 Semaphore Class Reference 499
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
500 Class Documentation
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.
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
• SoftPosLimit (void)
Default constructor. Simply sets both limits to zero.
Public Attributes
• uunit neg
Negative limit position.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.120 SoftPosLimit Struct Reference 501
• 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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
502 Class Documentation
• CML_AmpStruct.h
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.121 Thread Class Reference 503
Returns
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
504 Class Documentation
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
Returns
Returns
Returns
The documentation for this class was generated from the following file:
• CML_Threads.h
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.122 ThreadError Class Reference 505
Error
ThreadError
Internal
Error OK
Unknown
Alloc
Timeout
Running
ThreadError
BadParam
General
Start
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
506 Class Documentation
General failure.
• CML_Threads.h
RefObj
PDO
TPDO
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.123 TPDO Class Reference 507
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 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.
Protected Attributes
• uint32 timestamp
Timestamp of received frame if available.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
508 Class Documentation
This function is called by the Network read thread when this PDO has been received.
Reimplemented in IOModule::AlgInPDO, and IOModule::DigInPDO.
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.124 TrackingWindows Struct Reference 509
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
510 Class Documentation
• CML_AmpStruct.h
• AmpStruct.cpp
RefObj
Trajectory
TrjScurve
RefObj
Trajectory
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.125 Trajectory Class Reference 511
• 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.
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.
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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
512 Class Documentation
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.125.2.3 virtual const Error∗ NextSegment ( uunit & pos, uunit & vel, uint8 & time ) [pure virtual]
Returns
An error object. If this is not Error::OK, then the segment data is assumed to be invalid.
Implemented in TrjScurve.
Returns
An error pointer if the trajectory object is not available, or NULL if it is ready to be sent.
Reimplemented in TrjScurve.
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.126 TrjError Class Reference 513
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
Error
TrjError
Internal
Error OK
Unknown
TrjError NoneAvailable
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
514 Class Documentation
• CML_Trajectory.h
RefObj
Trajectory
TrjScurve
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.127 TrjScurve Class Reference 515
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
516 Class Documentation
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.127.3.1 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.
Parameters
start The profile starting position.
end The profile ending position.
vel The maximum allowable velocity for the move.
acc The maximum allowable acceleration for the move.
dec The maximum allowable deceleration for the move.
jrk The maximum jerk (rate of change of acceleration) for the move.
Returns
5.127.3.2 const Error ∗ Calculate ( uunit dist, uunit maxVel, uunit maxAcc, uunit maxDec, uunit maxJrk )
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.127 TrjScurve Class Reference 517
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 then zero.
Returns
Returns
• CML_TrjScurve.h
• TrjScurve.cpp
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
518 Class Documentation
• 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.
Default constructor.
Initializes all structure elements to zero.
Stepper config and status Bit mapped as follows (Bit 0 Use the encoder input for phase compensation if enabled.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.129 VelLoopConfig Struct Reference 519
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
• CML_AmpStruct.h
This structure holds the velocity loop configuration parameters specific to the Copley amplifier.
• VelLoopConfig (void)
Default constructor.
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
520 Class Documentation
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.
Default constructor.
Simply initializes all members to zero.
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.
Setting this value to zero indicates that the deceleration is unlimited.
This parameter is specified in "user units". See Amp::SetCountsPerUnit for details.
Maximum allowed deceleration 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 decreasing.
Note that the acceleration & deceleration limits are not used when the position loop is driving the velocity loop.
This parameter is specified in "user units". See Amp::SetCountsPerUnit for details.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.130 WinUdpEcatHardware Class Reference 521
This value is used to limit the velocity command before the velocity loop uses it to calculate output current. When
running in a position mode (normal for CAN operation) The velocity command is the output from the position loop. This
command is clipped by this value before it is passed to the velocity loop.
This parameter is specified in "user units". See Amp::SetCountsPerUnit for details.
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
522 Class Documentation
RefObj
EtherCatHardware
WinUdpEcatHardware
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
5.130 WinUdpEcatHardware Class Reference 523
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
name Used to identify the Ethernet interface as described above.
The documentation for this class was generated from the following files:
• ecat_winudp.h
• ecat_winudp.cpp
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
524 Class Documentation
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
Chapter 6
File Documentation
This file provides most of the implementation for the Copley Amplifier object.
Include dependency graph for Amp.cpp:
Amp.cpp
CML.h
CML_Linkage.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.
This file contains code used to read a CME-2 .ccx amplifier file.
526 File Documentation
AmpFile.cpp
CML.h
CML_Linkage.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 read a CME-2 .ccx amplifier file.
This file contains code used to update an amplifier’s firmware over the CANopen network.
Include dependency graph for AmpFW.cpp:
AmpFW.cpp
CML_Copley.h
CML_Node.h CML_AmpDef.h
CML_Network.h
CML_Can.h
CML_Reference.h CML_EventMap.h
CML_Firmware.h CML_Threads.h
CML_Error.h
CML_Utils.h
limits.h CML_Settings.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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.4 AmpParam.cpp File Reference 527
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.
Include dependency graph for AmpParam.cpp:
AmpParam.cpp
CML.h
CML_Linkage.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 various amplifier parameters.
This file contains code that implements PDO objects used by the Copley Controls amplifier object.
Include dependency graph for AmpPDO.cpp:
AmpPDO.cpp
CML.h
CML_Linkage.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 that implements PDO objects used by the Copley Controls amplifier object.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
528 File Documentation
This file contains the code used by the Amp object to stream PVT trajectory profiles over the CANopen network.
Include dependency graph for AmpPVT.cpp:
AmpPVT.cpp
CML.h
CML_Linkage.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.
Include dependency graph for AmpStruct.cpp:
AmpStruct.cpp
CML.h
CML_Linkage.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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.8 AmpUnits.cpp File Reference 529
This file contains the AMP object methods used to handle unit conversions.
Include dependency graph for AmpUnits.cpp:
AmpUnits.cpp
CML.h
CML_Linkage.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.
Include dependency graph for AmpVersion.cpp:
AmpVersion.cpp
CML.h
CML_Linkage.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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
530 File Documentation
This file handles the initialization of the static variables (error codes) used by the CanError and CanInterface classes.
Include dependency graph for Can.cpp:
Can.cpp
CML.h
CML_Linkage.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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.11 can_copley.h File Reference 531
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
532 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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.13 can_ixxat_v3.h File Reference 533
This gives the size of the CAN message receive queue used for Ixxat cards.
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
534 File Documentation
Macros
• #define IXXAT_RX_QUEUE_SZ 50
This gives the size of the CAN message receive queue used for Ixxat cards.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.14 can_kvaser.h File Reference 535
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
536 File Documentation
This file holds code for the top level CANopen class.
Include dependency graph for CanOpen.cpp:
CanOpen.cpp
CML.h
CML_Linkage.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 code for the top level CANopen class. This class is used for over all control of the CANopen network.
CML.cpp
CML.h
CML_Linkage.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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.17 CML.h File Reference 537
CML object definition. This file contains the code used to implement the global CML object.
CML.h
CML_Linkage.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
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
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
538 File Documentation
Top level include file for the CML libraries. 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.
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
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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.18 CML_Amp.h File Reference 539
This graph shows which files directly or indirectly include this file:
CML_Amp.h
CML_Linkage.h
CML.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
Classes
• class AmpError
This class represents error conditions that can occur in the Copley Amplifier object.
• class AmpFault
• class AmpSettings
• class PvtSegCache
• struct ProfileConfigTrap
• struct ProfileConfigScurve
• struct ProfileConfigVel
• class Amp
This file defines the Copley Amplifier object. This object may be used to interface to an amplifier over the CANopen
network.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
540 File Documentation
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 AmpFW.cpp
CML_Linkage.h CML_File.h
CML.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
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 {
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.19 CML_AmpDef.h File Reference 541
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,
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 }
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
542 File Documentation
• 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,
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 }
• enum EVENT_STATUS {
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.19 CML_AmpDef.h File Reference 543
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,
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_NOT_INIT = 0x80000000 }
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
544 File Documentation
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 }
• 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 {
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.19 CML_AmpDef.h File Reference 545
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,
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,
PROFILE_CSP = 4 }
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
546 File Documentation
• 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,
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 }
• enum AMP_TRACE_STATUS
• enum AMP_TRACE_TRIGGER {
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.19 CML_AmpDef.h File Reference 547
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_NODELAY = 0x4000,
TRACETRIG_SAMPLE = 0x8000 }
• enum POS_CAPTURE_CFG {
CAPTURE_INDEX_RISING = 0x0001,
CAPTURE_INDEX_FALLING = 0x0002,
CAPTURE_INDEX_LATCH = 0x0004,
CAPTURE_HOME_LATCH = 0x0040,
CAPTURE_HIGH_SPEED_INPUT = 0x0100,
CAPTURE_HIGH_SPEED_INPUT_LATCH = 0x0400 }
• enum POS_CAPTURE_STAT {
CAPTURE_INDEX_FULL = 0x0001,
CAPTURE_INDEX_OVER = 0x0008,
CAPTURE_HOME_FULL = 0x0010,
CAPTURE_HOME_OVER = 0x0080 }
• enum AMP_FEATURE { ,
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
548 File Documentation
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.
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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.19 CML_AmpDef.h File Reference 549
Enumerator
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
550 File Documentation
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.
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.19 CML_AmpDef.h File Reference 551
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?
FEATURE_AXIS_CT Does the amp support the paramter containing the number of axis?
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 ampli-
fier. 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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
552 File Documentation
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 (DS-
P-402) homing mode.
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.
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.19 CML_AmpDef.h File Reference 553
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.
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 param-
eter (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 between the hall sensor angles
and creates a smoother commutation angle.
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 hexag-
onal 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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
554 File Documentation
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.
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_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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.19 CML_AmpDef.h File Reference 555
Enumerator
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
556 File Documentation
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.
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.19 CML_AmpDef.h File Reference 557
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.
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
558 File Documentation
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.
Enumerator
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.19 CML_AmpDef.h File Reference 559
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
Enumerator
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
560 File Documentation
Enumerator
OUTCFG_EVENT_STATUS_L The output pin follows the amplifier’s event status register and is active Low.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.19 CML_AmpDef.h File Reference 561
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.
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 pro-
grammed 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.
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
562 File Documentation
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.
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.
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 ).
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.20 CML_AmpStruct.h File Reference 563
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.
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
QSTOP_QUICKSTOP Slow down using the quick stop deceleration then disable.
This file contains a number of structures used to pass configuration parameters to an Amp object.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
564 File Documentation
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
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
Classes
• class AmpFileError
This class represents error conditions that can occur when loading amplifer data from a data file.
• struct AmpInfo
Amplifier characteristics data structure.
• struct PosLoopConfig
This structure holds the position loop configuration parameters specific to the Copley amplifier.
• struct ServoLoopConfig
This structure holds configuration info about specific parts of the velocity and position loops.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.20 CML_AmpStruct.h File Reference 565
• struct VelLoopConfig
This structure holds the velocity loop configuration parameters specific to the Copley amplifier.
• struct CrntLoopConfig
This structure holds the current loop configuration parameters.
• struct HomeConfig
Homing parameter structure.
• struct ProfileConfig
Amplifier profile parameters.
• struct TrackingWindows
Position and velocity error windows.
• struct MtrInfo
Motor information structure.
• struct AmpIoCfg
Programmable I/O pin configuration.
• struct SoftPosLimit
Software limit switch configuration.
• struct RegenConfig
Configuration structure used to set up the amplifier regeneration resister.
• struct FuncGenConfig
Configuration parameters for amplifier’s internal function generator.
• struct AnalogRefConfig
Analog input configuration.
• struct PwmInConfig
PWM or Pulse/Direction input configuration.
• struct CanNetworkConfig
CANopen Node ID and bit rate configuration.
• struct NetworkOptions
Configuration structure used to configure the amplifiers network support.
• struct DAConfig
Configuration structure used to hold the settings for a drive’s D/A converter.
• struct UstepConfig
Configuration structure used to set up the microstepper.
• struct AlgoPhaseInit
Configuration structure used to set up algorithmic phase init.
• struct CammingConfig
Configuration structure used to set up the camming.
• struct GainScheduling
Configuration structure used to set up the Gain Scheduling.
• struct AmpConfig
Amplifier configuration structure.
Macros
• #define COPLEY_MAX_INPUTS 26
Maximum available on any amplifier.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
566 File Documentation
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 }
This file contains a number of structures used to pass configuration parameters to an Amp object.
Enumerator
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.22 CML_Can.h File Reference 567
CML_Array.h
CML_Settings.h
assert.h
This graph shows which files directly or indirectly include this file:
CML_Array.h
CML.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
Classes
This file contains the base classes used to define the low level interface to the CAN network hardware.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
568 File Documentation
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_Linkage.h
CML.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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.23 CML_CanOpen.h File Reference 569
Classes
• struct CanFrame
• 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 file contains the base classes used to define the low level interface to the CAN network hardware.
Enumerator
This header file defines the classes used for the top level of the CANopen network.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
570 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_Linkage.h
CML.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
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
The CanOpen class is the top level interface into the CANopen network.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.24 CML_Copley.h File Reference 571
• 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 AmpFW.cpp
CML_Linkage.h
CML.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
Classes
• class CopleyNodeError
This class represents errors that can be returned by the CopleyNode class.
• class CopleyNode
Copley CANopen Node class.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
572 File Documentation
This header file defines a generic Copley node type. 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
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
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.25 CML_CopleyIO.h File Reference 573
• struct CopleyIOCfg
• class CopleyIO
• class IOFileError
This class represents error conditions that can occur when loading IO module data from a data file.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
574 File Documentation
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,
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,
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.25 CML_CopleyIO.h File Reference 575
CIOOBJID_PWM_OOFFSET = 0x3053 }
Object dictionary ID values used on Copley I/O modules.
Enumerator
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
576 File Documentation
This file defines the top level error class used throughout the library.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.27 CML_EtherCAT.h File Reference 577
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
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
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
578 File Documentation
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
This graph shows which files directly or indirectly include this file:
CML_EtherCAT.h
CML_Node.h
CML_Linkage.h
CML.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
Classes
• class EtherCatError
This class holds the error codes that describe EtherCAT error conditions.
• class EtherCatSettings
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.28 CML_EventMap.h File Reference 579
Configuration object used to customize global settings for the EtherCAT network.
• class EtherCatHardware
• class EtherCAT
The EtherCAT class is the top level interface into the EtherCAT network.
• class EcatDgram
• 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
• class EcatFrame
This header file defines the classes used to represent the top level of the EtherCAT network interface.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
580 File Documentation
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_Linkage.h
CML.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
Classes
• class EventError
This class represents error conditions related to the Event object.
• class Event
Events are a generic mechanism used to wait on some condition.
• class EventAny
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.29 CML_File.h File Reference 581
This is an event that matches if any of a group of bits are set in the EventMap mask.
• class EventAnyClear
This is an event that matches if any of a group of bits are clear in the EventMap mask.
• class EventAll
This is an event that matches if all of a group of bits are set in the EventMap mask.
• class EventNone
This is an event that matches if none of a group of bits are set in the EventMap mask.
• class EventMap
An event map is a mechanism that allows one or more threads to wait on some pre-defined event, or group of events.
CML_File.h
CML_AmpDef.h
CML_Settings.h
assert.h
This graph shows which files directly or indirectly include this file:
CML_File.h
CML.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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
582 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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.31 CML_Firmware.h File Reference 583
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
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
Classes
• class Filter
This file defines the Filter object. The Filter object represents a two pole filter structure used in various locations within
the amplifier.
This file defines classes related to the Copley amplifier Firmware object.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
584 File Documentation
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 AmpFW.cpp
CML_Linkage.h
CML.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
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.32 CML_Geometry.h File Reference 585
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.
Include dependency graph for CML_Geometry.h:
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
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
Classes
• class PointN
An N axis point.
• class Point< N >
Template used for N dimensional objects.
This file contains class definitions used to define multi-axis trajectory paths.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
586 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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.34 CML_IO.h File Reference 587
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
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
Classes
• class InputShaper
This file defines the InputShaper object. 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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
588 File Documentation
This graph shows which files directly or indirectly include this file:
CML_IO.h
CML_CopleyIO.h
CML.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
Classes
• class IOError
• struct IOModuleSettings
• class IOModule
• class IOModule::DigOutPDO
• class IOModule::AlgOutPDO
• class IOModule::DigInPDO
• class IOModule::AlgInPDO
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.34 CML_IO.h File Reference 589
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,
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
Generated on Thu Mar 12 2015 16:19:51 for Copley=Motion
0x6413,
Library by Doxygen
IOOBJID_AOUT_MFG_VALUE = 0x6414,
IOOBJID_AIN_TRIG = 0x6421,
IOOBJID_AIN_INTSRC = 0x6422,
590 File Documentation
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,
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.
This enumeration is used to define the types of events that may cause an analog input to generate an interrupt event.
Enumerator
Enumerator
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.34 CML_IO.h File Reference 591
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
592 File Documentation
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.35 CML_Linkage.h File Reference 593
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
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
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
594 File Documentation
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 }
Linkage events.
This file defines the Linkage object. A linkage is a group of two or more amplifiers which work together.
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.
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 am-
plifiers 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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.36 CML_Network.h File Reference 595
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.
This header file defines the classes used for the generic top level network interface.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
596 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_Linkage.h
CML.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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.36 CML_Network.h File Reference 597
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.
Enumerator
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
598 File Documentation
Enumerator
Enumerator
This header file defines the classes that define a generic node on the network.
Include dependency graph for CML_Node.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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.38 CML_PDO.h File Reference 599
This graph shows which files directly or indirectly include this file:
CML_Node.h
CML_Linkage.h
CML.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
Classes
• class NodeError
• struct NodeIdentity
• class Node
Node class.
This header file defines the classes that define a generic node on the network.
This header file defines the classes used to communicate to CANopen nodes using Process Data Objects (PDOs).
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
600 File Documentation
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_Linkage.h
CML.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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.39 CML_Reference.h File Reference 601
Classes
• class PDO_Error
• class Pmap
• class PmapRaw
• 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
• class TPDO
• class RPDO
Macros
• #define PDO_MAP_LEN 32
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 a set of classes used to handle reference counting within the CML library.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
602 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_Linkage.h
CML.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
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.40 CML_SDO.h File Reference 603
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
604 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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.41 CML_Settings.h File Reference 605
This graph shows which files directly or indirectly include this file:
CML_SDO.h
CML_Linkage.h
CML.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
Classes
• class SDO_Error
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).
SDO downloads of this size (byte) or greater are more efficiently handled using a block download.
SDO uploads of this size (byte) or greater are more efficiently handled using a block upload.
This file provides some configuration options used to customize the Copley Motion Libraries.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
606 File Documentation
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
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 Amp.cpp Geometry.cpp
Macros
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.41 CML_Settings.h File Reference 607
• #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.
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
608 File Documentation
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.
Size of the hash table used to associate CAN messages with their receivers.
Larger tables give faster access, but use more memory.
The following values have been selected as good options for a typical CANopen system: 2053, 1483, 1097, 683, 409.
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.
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.42 CML_Threads.h File Reference 609
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.
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
The classes defined in this file provide an operating system independent way of accessing multi-tasking system features.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
610 File Documentation
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_Threads.h
CML_Can.h
CML_Node.h
CML_CopleyIO.h CML_Amp.h
CML_Filter.h CML_Linkage.h
CML.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
Classes
• class ThreadError
Errors related to the multi-threaded libraries.
• class Thread
Virtual class which provides multi-tasking.
• class Mutex
This class represents an object that can be used by multiple threads to gain safe access to a shared resource.
• class MutexLocker
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.43 CML_Trajectory.h File Reference 611
This is a utility class that locks a mutex in it’s constructor, and unlocks it in it’s destructor.
• class Semaphore
Generic semaphore class.
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.
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
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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
612 File Documentation
Classes
• class TrjError
• class Trajectory
• class LinkTrajectory
Linkage trajectory.
CML_TrjScurve.h
CML_Trajectory.h
CML_Error.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.45 CML_Utils.h File Reference 613
This graph shows which files directly or indirectly include this file:
CML_TrjScurve.h
CML_Linkage.h
CML.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
Classes
• class ScurveError
This class represents error conditions that can occur in the TrjScurve class.
• class TrjScurve
• class LinkTrjScurve
This file defines the TrjScurve class. 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
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
614 File Documentation
This graph shows which files directly or indirectly include this file:
CML_Utils.h
CML_Node.h
CML_Linkage.h
CML.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
Macros
Typedefs
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.45 CML_Utils.h File Reference 615
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.45.3.1 int16
6.45.3.2 int32
6.45.3.3 int64
6.45.3.4 uint16
6.45.3.5 uint32
6.45.3.6 uunit
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
616 File Documentation
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.
Include dependency graph for CopleyIO.cpp:
CopleyIO.cpp
CML.h
CML_Linkage.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 CopleyIO object methods used to upload / download structures containing groups of module
parameters.
CopleyNode.cpp
CML.h
CML_Linkage.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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.48 ecatdc.cpp File Reference 617
This file holds some utility code used by the EtherCAT network when initializing it’s distributed clock.
Include dependency graph for ecatdc.cpp:
ecatdc.cpp
CML_Linkage.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.
This file handles initializing the static data objects used by the Error class.
Include dependency graph for Error.cpp:
Error.cpp
CML.h
CML_Linkage.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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
618 File Documentation
This file handles initializing the static data objects used by the Error class.
This file holds code for the top level EtherCAT class.
Include dependency graph for EtherCAT.cpp:
EtherCAT.cpp
string.h CML.h
CML_Linkage.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 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. This class manages the EtherCAT network.
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.
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.52 File.cpp File Reference 619
EventMap.cpp
CML.h
CML_Linkage.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
File.cpp
CML.h
CML_Linkage.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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
620 File Documentation
Filter.cpp
CML.h
CML_Linkage.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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.54 Firmware.cpp File Reference 621
Firmware.cpp
stdio.h CML_Firmware.h
CML_Error.h
CML_Utils.h
CML_Settings.h limits.h
assert.h
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
622 File Documentation
Geometry.cpp
CML.h math.h
CML_Linkage.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_Linkage.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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.58 Linkage.cpp File Reference 623
IOmodule.cpp
CML.h
CML_Linkage.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
I/O module object support. This file holds the code used to implement a standard DS401 I/O module.
Linkage.cpp
CML.h
CML_Linkage.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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
624 File Documentation
This file holds code for the top level CANopen class.
Include dependency graph for Network.cpp:
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.
Include dependency graph for Node.cpp:
Node.cpp
CML.h
CML_Linkage.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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.61 PDO.cpp File Reference 625
This file holds code to implement the CANopen node related objects.
This file holds the code needed to implement CANopen Process Data Objects (PDOs).
Include dependency graph for PDO.cpp:
PDO.cpp
CML.h
CML_Linkage.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).
This file holds the code needed to implement the CML reference counting objects.
Include dependency graph for Reference.cpp:
Reference.cpp
CML.h
CML_Linkage.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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
626 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.
Include dependency graph for SDO.cpp:
SDO.cpp
CML.h
CML_Linkage.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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
6.64 Threads.cpp File Reference 627
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 on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
Index
AMPMODE_DISABLED AddArc
CML_AmpDef.h, 552 Path, 425
AMPMODE_FGEN_CRNT AddLine
CML_AmpDef.h, 552 Path, 425
AMPMODE_FGEN_POS AddSegment
CML_AmpDef.h, 552 PvtSegCache, 465
AMPMODE_FGEN_USTEP AddToFrame
CML_AmpDef.h, 552 EtherCAT, 243
AMPMODE_FGEN_VEL AddVar
CML_AmpDef.h, 552 PDO, 436
AMPMODE_PROG_CRNT Ain16GetCt
CML_AmpDef.h, 552 IOModule, 295
AMPMODE_PROG_VEL Ain16GetLowerLimit
CML_AmpDef.h, 552 IOModule, 295
AMP_EVENT Ain16GetNegativeDelta
CML_AmpDef.h, 548 IOModule, 295
AMP_FAULT Ain16GetPositiveDelta
CML_AmpDef.h, 549 IOModule, 295
AMP_FEATURE Ain16GetUnsignedDelta
CML_AmpDef.h, 550 IOModule, 296
AMP_MODE Ain16GetUpperLimit
CML_AmpDef.h, 551 IOModule, 296
AMP_PHASE_MODE Ain16Read
CML_AmpDef.h, 553 IOModule, 296
AMP_PWM_MODE Ain16SetLowerLimit
CML_AmpDef.h, 553 IOModule, 296
AMP_TRACE_STATUS Ain16SetNegativeDelta
CML_AmpDef.h, 553 IOModule, 297
AMP_TRACE_VAR Ain16SetPositiveDelta
CML_AmpDef.h, 554 IOModule, 297
APRD, 163 Ain16SetUnsignedDelta
APWR, 164 IOModule, 297
ARMW, 165 Ain16SetUpperLimit
abort IOModule, 298
ProfileConfig, 461 Ain32GetCt
acc IOModule, 298
ProfileConfigScurve, 462 Ain32GetLowerLimit
ProfileConfigTrap, 463 IOModule, 298
ProfileConfigVel, 464 Ain32GetNegativeDelta
AccLoad2User IOModule, 298
Amp, 45 Ain32GetOffset
AccMtr2User IOModule, 300
Amp, 45 Ain32GetPositiveDelta
AccUser2Load IOModule, 300
Amp, 45 Ain32GetScaling
AccUser2Mtr IOModule, 300
Amp, 47 Ain32GetUnsignedDelta
accel IOModule, 300
HomeConfig, 279 Ain32GetUpperLimit
SoftPosLimit, 501 IOModule, 301
Add Ain32Read
EventMap, 266 IOModule, 301
add Ain32SetLowerLimit
Array, 167 IOModule, 301
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
630 INDEX
Ain32SetNegativeDelta AinSetIntEna
IOModule, 301 IOModule, 312
Ain32SetOffset AinSetTrigType
IOModule, 303 IOModule, 312
Ain32SetPositiveDelta AlgoPhaseInit, 25
IOModule, 303 AlgoPhaseInit, 26
Ain32SetScaling AlgoPhaseInit, 26
IOModule, 303 phaseInitConfig, 26
Ain32SetUnsignedDelta Amp, 29
IOModule, 303 AccLoad2User, 45
Ain32SetUpperLimit AccMtr2User, 45
IOModule, 304 AccUser2Load, 45
Ain8GetCt AccUser2Mtr, 47
IOModule, 304 Amp, 43
Ain8Read CheckStateForMove, 47
IOModule, 304 ClearEventLatch, 47
AinFltGetCt ClearFaults, 47
IOModule, 304 ClearNodeGuardEvent, 48
AinFltGetLowerLimit Disable, 48
IOModule, 305 Dnld16, 48, 49
AinFltGetNegativeDelta Dnld32, 49
IOModule, 305 Dnld8, 49, 50
AinFltGetOffset DnldString, 50
IOModule, 305 DoMove, 50, 51
AinFltGetPositiveDelta Download, 52
IOModule, 305 Enable, 52
AinFltGetScaling FormatPosInit, 52
IOModule, 307 FormatPtSeg, 52
AinFltGetUnsignedDelta FormatPvtSeg, 53
IOModule, 307 GetAlgoPhaseInit, 53
AinFltGetUpperLimit GetAmpConfig, 53
IOModule, 307 GetAmpInfo, 54
AinFltRead GetAmpMode, 54
IOModule, 307 GetAmpName, 54
AinFltSetLowerLimit GetAmpTemp, 54
IOModule, 308 GetAnalogCommandFilter, 55
AinFltSetNegativeDelta GetAnalogEncoder, 55
IOModule, 308 GetAnalogRefConfig, 55
AinFltSetOffset GetCammingConfig, 55
IOModule, 308 GetCanNetworkConfig, 56
AinFltSetPositiveDelta GetControlWord, 56
IOModule, 308 GetCountsPerUnit, 56
AinFltSetScaling GetCrntLoopConfig, 57
IOModule, 310 GetCurrentActual, 57
AinFltSetUnsignedDelta GetCurrentCommand, 57
IOModule, 310 GetCurrentLimited, 59
AinFltSetUpperLimit GetCurrentProgrammed, 59
IOModule, 310 GetDAConverterConfig, 59
AinGetIntEna GetErrorStatus, 59
IOModule, 310 GetEventLatch, 61
AinGetIntSource GetEventMask, 61
IOModule, 312 GetEventStatus, 61
AinGetTrigType GetEventSticky, 62
IOModule, 312 GetFaultMask, 62
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
INDEX 631
GetFaults, 62 GetProfileVel, 81
GetFuncGenConfig, 62 GetPvtBuffFree, 81
GetGainScheduling, 63 GetPvtBuffStat, 81
GetHallState, 63 GetPvtSegID, 82
GetHaltMode, 63 GetPvtSegPos, 82
GetHighVoltage, 63 GetPwmInConfig, 82
GetHomeAccel, 64 GetPwmMode, 82
GetHomeAdjustment, 64 GetQuickStop, 83
GetHomeCapture, 64 GetQuickStopDec, 83
GetHomeConfig, 64 GetRefVoltage, 83
GetHomeCurrent, 65 GetRegenConfig, 83
GetHomeDelay, 65 GetSettlingTime, 84
GetHomeMethod, 65 GetSettlingWindow, 84
GetHomeOffset, 65 GetSoftLimits, 84
GetHomeVelFast, 66 GetState, 84
GetHomeVelSlow, 66 GetStatusWord, 85
GetIOOPtions, 69 GetTargetPos, 85
GetIloopCommandFilter, 66 GetTargetVel, 85
GetIloopCommandFilter2, 66 GetTorqueActual, 86
GetIndexCapture, 67 GetTorqueDemand, 86
GetInputConfig, 67 GetTorqueRated, 86
GetInputDebounce, 68 GetTorqueSlope, 86
GetInputShapingFilter, 69 GetTorqueTarget, 87
GetInputs, 68 GetTraceChannel, 87
GetInputs32, 68 GetTraceData, 87
GetIoConfig, 69 GetTraceMaxChannel, 88
GetIoPullup, 69 GetTracePeriod, 88
GetIoPullup32, 71 GetTraceRefPeriod, 88
GetLinkRef, 71 GetTraceStatus, 88
GetLinkage, 71 GetTraceTrigger, 90
GetMicrostepRate, 71 GetTrackingWindows, 90
GetMotorCurrent, 72 GetTrajectoryAcc, 90
GetMtrInfo, 72 GetTrajectoryVel, 91
GetNetworkOptions, 72 GetUstepConfig, 91
GetNetworkRef, 72 GetVelLoopConfig, 91
GetOutputConfig, 72, 74, 75 GetVelocityActual, 91
GetOutputs, 75 GetVelocityCommand, 93
GetPhaseAngle, 75 GetVelocityLimited, 93
GetPhaseMode, 76 GetVelocityLoad, 93
GetPosCaptureCfg, 76 GetVelocityProgrammed, 94
GetPosCaptureStat, 76 GetVelocityWarnTime, 94
GetPosLoopConfig, 79 GetVelocityWarnWindow, 94
GetPositionActual, 76 GetVloopCommandFilter, 94
GetPositionCommand, 78 GetVloopOutputFilter, 95
GetPositionError, 78 GetVloopOutputFilter2, 95
GetPositionErrorWindow, 78 GetVloopOutputFilter3, 95
GetPositionLoad, 78 GoHome, 95
GetPositionMotor, 79 HaltMove, 96
GetPositionWarnWindow, 79 HandleStateChange, 96
GetProfileAcc, 80 Init, 96, 97
GetProfileConfig, 80 InitSubAxis, 97
GetProfileDec, 80 IsHardwareEnabled, 97
GetProfileJerk, 80 IsReferenced, 97
GetProfileType, 81 IsSoftwareEnabled, 98
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
632 INDEX
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
INDEX 633
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
634 INDEX
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
INDEX 635
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
636 INDEX
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
INDEX 637
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
638 INDEX
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
INDEX 639
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
640 INDEX
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
INDEX 641
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
642 INDEX
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
INDEX 643
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
644 INDEX
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
INDEX 645
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
646 INDEX
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
INDEX 647
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
648 INDEX
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
INDEX 649
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
650 INDEX
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
INDEX 651
Amp, 75 GetRefVoltage
GetPhaseMode Amp, 83
Amp, 76 GetRegenConfig
GetPosCaptureCfg Amp, 83
Amp, 76 GetRtrOk
GetPosCaptureStat PDO, 436
Amp, 76 GetSegment
GetPosLoopConfig PvtSegCache, 466
Amp, 79 GetSettlingTime
GetPosition Amp, 84
PvtSegCache, 466 GetSettlingWindow
GetPositionActual Amp, 84
Amp, 76 GetSoftLimits
GetPositionCommand Amp, 84
Amp, 78 getStart
Linkage, 377 Firmware, 273
GetPositionError GetStartPos
Amp, 78 TrjScurve, 517
GetPositionErrorWindow GetState
Amp, 78 Amp, 84
GetPositionLoad Node, 414
Amp, 78 GetStatusWord
GetPositionMotor Amp, 85
Amp, 79 GetSub
GetPositionWarnWindow Pmap, 441
Amp, 79 GetSynchId
GetProfileAcc Node, 415
Amp, 80 GetSynchPeriod
GetProfileConfig Node, 415
Amp, 80 GetSynchProducer
GetProfileDec CanOpen, 186
Amp, 80 GetTargetPos
GetProfileJerk Amp, 85
Amp, 80 GetTargetVel
GetProfileType Amp, 85
Amp, 81 getTimeMS
GetProfileVel Thread, 503
Amp, 81 GetTimeout
GetPvtBuffFree SDO, 492
Amp, 81 getTimeout
GetPvtBuffStat LSS, 395
Amp, 81 GetTorqueActual
GetPvtSegID Amp, 86
Amp, 82 GetTorqueDemand
GetPvtSegPos Amp, 86
Amp, 82 GetTorqueRated
GetPwmInConfig Amp, 86
Amp, 82 GetTorqueSlope
GetPwmMode Amp, 86
Amp, 82 GetTorqueTarget
GetQuickStop Amp, 87
Amp, 83 GetTraceChannel
GetQuickStopDec Amp, 87
Amp, 83 GetTraceData
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
652 INDEX
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
INDEX 653
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
654 INDEX
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
INDEX 655
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
656 INDEX
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
INDEX 657
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
658 INDEX
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
INDEX 659
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
660 INDEX
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
INDEX 661
nodeGuardLife operator->
CanNetworkConfig, 181 RefObjLocker, 475
NodeIdentity, 422 operator=
NodeState Event, 256
CML_Network.h, 598 options
NoneAvailable AmpConfig, 145
TrjError, 514 outMask
NotInitialized AmpIoCfg, 157
CanOpenError, 192 outMask1
NotSupported AmpIoCfg, 157
LinkError, 383 outputCt
numInPins AmpIoCfg, 157
CanNetworkConfig, 181
PHASE_MODE_AHALL90
OUTCFG_ACTIVE_HIGH CML_AmpDef.h, 553
CML_AmpDef.h, 561 PHASE_MODE_BRUSHED
OUTCFG_EVENT_LATCH_H CML_AmpDef.h, 553
CML_AmpDef.h, 561 PHASE_MODE_ENCODER
OUTCFG_EVENT_LATCH_L CML_AmpDef.h, 553
CML_AmpDef.h, 561 PHASE_MODE_ENCPHASE
OUTCFG_EVENT_STATUS_H CML_AmpDef.h, 553
CML_AmpDef.h, 560 PHASE_MODE_NOADJUST
OUTCFG_EVENT_STATUS_L CML_AmpDef.h, 553
CML_AmpDef.h, 560 PHASE_MODE_NOHALL
OUTCFG_MANUAL_H CML_AmpDef.h, 553
CML_AmpDef.h, 561 PHASE_MODE_TRAP
OUTCFG_MANUAL_L CML_AmpDef.h, 553
CML_AmpDef.h, 561 PHASE_MODE_TRAPINTERP
OUTCFG_POSITION_TRIG CML_AmpDef.h, 553
CML_AmpDef.h, 561 PROFILE_CSP
OUTCFG_POSITION_TRIG_HIGH2LOW CML_AmpDef.h, 563
CML_AmpDef.h, 561 PROFILE_SCURVE
OUTCFG_POSITION_TRIG_LIST CML_AmpDef.h, 563
CML_AmpDef.h, 561 PROFILE_TRAP
OUTCFG_POSITION_TRIG_LOW2HIGH CML_AmpDef.h, 562
CML_AmpDef.h, 561 PROFILE_VEL
OUTCFG_POSITION_WINDOW CML_AmpDef.h, 562
CML_AmpDef.h, 561 PWM_MODE_AUTOCLAMP
OUTCFG_SYNC_OUTPUT CML_AmpDef.h, 553
CML_AmpDef.h, 561 PWM_MODE_FORCECLAMP
OUTCFG_TRJ_STATUS CML_AmpDef.h, 553
CML_AmpDef.h, 561 PWM_MODE_HEXLIMIT
offset CML_AmpDef.h, 553
CanNetworkConfig, 181 PWM_MODE_STANDARD
HomeConfig, 280 CML_AmpDef.h, 553
Open PDO, 433
CanInterface, 176 AddVar, 436
CanOpen, 186 ClearMap, 436
CopleyCAN, 198 GetID, 436
IxxatCAN, 359 GetMapCodes, 436
IxxatCANV3, 364 GetRtrOk, 436
KvaserCAN, 368 GetType, 437
operator∗ map, 437
RefObjLocker, 475 SetID, 437
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
662 INDEX
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
INDEX 663
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
664 INDEX
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
INDEX 665
SelectAmp setChain
LSS, 397 Event, 257
Semaphore, 498 SetControlWord
∼Semaphore, 499 Amp, 107
Get, 499 SetCountsPerUnit
Put, 499 Amp, 107, 108
Semaphore, 499 SetCrntLoopConfig
SendTrajectory Amp, 108
Amp, 103 SetCurrentProgrammed
Linkage, 380 Amp, 108
SerialCmd SetDAConverterConfig
CopleyIO, 205 Amp, 109
CopleyNode, 219 setData
ServoLoopConfig, 500 EcatDgram, 235
servoLoopConfig, 500 SetDebugLevel
servoLoopConfig CopleyMotionLibrary, 215
ServoLoopConfig, 500 SetDec
Set Path, 427
Pmap, 441 setDim
Pmap16, 444 Point, 457
Pmap24, 446 PointN, 459
Pmap32, 449 SetFaultMask
Pmap8, 453 Amp, 109
PmapRaw, 455 SetFlushLog
SetAcc CopleyMotionLibrary, 216
Path, 427 SetFuncGenConfig
SetAlgoPhaseInit Amp, 109
Amp, 105 SetGainScheduling
SetAmpConfig Amp, 109
Amp, 105 SetHaltMode
SetAmpMode Amp, 111
Amp, 105 SetHomeAccel
SetAmpName Amp, 111
Amp, 106 SetHomeConfig
SetAmpNodeID Amp, 111
LSS, 397 SetHomeCurrent
SetAnalogCommandFilter Amp, 111
Amp, 106 SetHomeDelay
SetAnalogRefConfig Amp, 112
Amp, 106 SetHomeMethod
setAutoDelete Amp, 112
RefObj, 474 SetHomeOffset
SetBaud Amp, 112
CanInterface, 177 SetHomeVelFast
CopleyCAN, 198 Amp, 113
IxxatCAN, 361 SetHomeVelSlow
IxxatCANV3, 365 Amp, 113
KvaserCAN, 370 SetID
setBits PDO, 437
EventMap, 267 SetIOAnlg
SetCammingConfig CopleyIO, 206
Amp, 106 SetIOConfig
SetCanNetworkConfig CopleyIO, 206
Amp, 107 SetIODigi
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
666 INDEX
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
INDEX 667
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
668 INDEX
SupportsTimestamps TRACEVAR_CMD_VEL
CanInterface, 177 CML_AmpDef.h, 555
CopleyCAN, 199 TRACEVAR_CRNT_A
syncID CML_AmpDef.h, 555
CanOpenSettings, 195 TRACEVAR_CRNT_ACT_D
synchID CML_AmpDef.h, 555
AmpSettings, 161 TRACEVAR_CRNT_ACT_Q
synchPeriod CML_AmpDef.h, 555
AmpSettings, 161 TRACEVAR_CRNT_B
synchProducer CML_AmpDef.h, 555
AmpSettings, 161 TRACEVAR_CRNT_CMD
SynchStart CML_AmpDef.h, 555
Node, 419 TRACEVAR_CRNT_CMD_D
SynchStop CML_AmpDef.h, 555
Node, 420 TRACEVAR_CRNT_CMD_Q
synchUseFirstAmp CML_AmpDef.h, 555
AmpSettings, 161 TRACEVAR_CRNT_ERR_D
CML_AmpDef.h, 555
TRACETRIG_ABOVE TRACEVAR_CRNT_ERR_Q
CML_AmpDef.h, 554 CML_AmpDef.h, 555
TRACETRIG_BELOW TRACEVAR_CRNT_LIM
CML_AmpDef.h, 554 CML_AmpDef.h, 555
TRACETRIG_BITCLR TRACEVAR_DEST_POS
CML_AmpDef.h, 554 CML_AmpDef.h, 555
TRACETRIG_BITSET TRACEVAR_ENC_COS
CML_AmpDef.h, 554 CML_AmpDef.h, 555
TRACETRIG_CHANGE TRACEVAR_ENC_SIN
CML_AmpDef.h, 554 CML_AmpDef.h, 555
TRACETRIG_CHANNEL TRACEVAR_EVENTLATCH
CML_AmpDef.h, 554 CML_AmpDef.h, 555
TRACETRIG_EVENTCLR TRACEVAR_EVENTS
CML_AmpDef.h, 554 CML_AmpDef.h, 555
TRACETRIG_EVENTSET TRACEVAR_HALLS
CML_AmpDef.h, 554 CML_AmpDef.h, 555
TRACETRIG_FALL TRACEVAR_HIGH_VOLT
CML_AmpDef.h, 554 CML_AmpDef.h, 555
TRACETRIG_FGEN_CYCLE TRACEVAR_INPUTS
CML_AmpDef.h, 554 CML_AmpDef.h, 555
TRACETRIG_NODELAY TRACEVAR_LOAD_POS
CML_AmpDef.h, 554 CML_AmpDef.h, 555
TRACETRIG_NONE TRACEVAR_MTR_POS
CML_AmpDef.h, 554 CML_AmpDef.h, 555
TRACETRIG_RISE TRACEVAR_PHASE
CML_AmpDef.h, 554 CML_AmpDef.h, 555
TRACETRIG_SAMPLE TRACEVAR_POS_ERR
CML_AmpDef.h, 554 CML_AmpDef.h, 555
TRACETRIG_TYPE TRACEVAR_RAW_INPUTS
CML_AmpDef.h, 554 CML_AmpDef.h, 555
TRACEVAR_ANALOG_REF TRACEVAR_TEMP
CML_AmpDef.h, 555 CML_AmpDef.h, 555
TRACEVAR_CMD_ACC TRACEVAR_VEL_LOAD
CML_AmpDef.h, 555 CML_AmpDef.h, 555
TRACEVAR_CMD_POS TRACEVAR_VEL_MTR
CML_AmpDef.h, 555 CML_AmpDef.h, 555
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
INDEX 669
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen
670 INDEX
Generated on Thu Mar 12 2015 16:19:51 for Copley Motion Library by Doxygen