diff --git a/dll/iodllD.dll b/dll/iodllD.dll index c00ac5b..a9f1304 100644 Binary files a/dll/iodllD.dll and b/dll/iodllD.dll differ diff --git a/dll/mcctrdllD.dll b/dll/mcctrdllD.dll index e7f813b..4d859f5 100644 Binary files a/dll/mcctrdllD.dll and b/dll/mcctrdllD.dll differ diff --git a/iodll/Include/Motor.h b/iodll/Include/Motor.h index b392907..915334d 100644 --- a/iodll/Include/Motor.h +++ b/iodll/Include/Motor.h @@ -196,6 +196,8 @@ public: double m_dNegSoftLimit; // negative Software Limit int m_iCardNo; + + int m_iSlaveId{}; // for EtherCAT, slave ID int m_iMotorPosArrayIndex; diff --git a/iodll/Include/MotorBase.h b/iodll/Include/MotorBase.h index fb248ed..cc8913e 100644 --- a/iodll/Include/MotorBase.h +++ b/iodll/Include/MotorBase.h @@ -165,6 +165,12 @@ protected: } }; + using stAxTranslation = struct _stAxTranslation + { + double dPulsePerMM{}; // pulse per mm + int iPosDir{ 1 }; // positive direction + }; + public: CMotorBase(); CMotorBase(const std::string& strMutexName, const CMtrProfile& mtrProfile, double* dpPos, CMotionControllerBase* pBaseController); @@ -337,8 +343,8 @@ public: int SMoveRel(double dDistance, int nPos = -1); // Motion Path - void RegisterPathMoveMtrProfile(const std::vector& vecMtrProfile); - virtual int PathMove(const stMotionPath& motionPath); + void RegisterPathMoveMtrProfile(const std::vector& vecMtrProfile); + virtual int PathMove(const stMotionPath& motionPath); virtual bool StopPathMove(const stMotionPath& motionPath); // return: success = MOTION_END; error = MOTION_ERROR; Force Stop = MOTION_FORCE_STOP @@ -612,6 +618,9 @@ public: // keep track of which motor no int m_iMtrNo; + // keep track of slave id for ECAT slave + int m_iSlaveId; + // keep track of no of pos int m_iNoOfPos; @@ -794,4 +803,3 @@ private: int BaseAbsoluteMove(double dPosition, int nPos, int nMode, PROFILE_CURVE curve); }; - diff --git a/iodll/Include/Motor_ADLINK_ECAT.h b/iodll/Include/Motor_ADLINK_ECAT.h index a4d8e5d..bc9696d 100644 --- a/iodll/Include/Motor_ADLINK_ECAT.h +++ b/iodll/Include/Motor_ADLINK_ECAT.h @@ -150,6 +150,8 @@ private: bool PrepareMotionCurve(PROFILE_CURVE curve); + void Set4XMOEncoderSource(); + enum PROFILE_TYPE { ACC, diff --git a/mcctrdll/Include/MotorRS.h b/mcctrdll/Include/MotorRS.h index 6aebc85..7077d08 100644 --- a/mcctrdll/Include/MotorRS.h +++ b/mcctrdll/Include/MotorRS.h @@ -49,6 +49,7 @@ public: double m_Negative_Soft_Limit; double m_Positive_Soft_Limit; long m_CardNo; + long m_SlaveId; // Overrides