add m_SlaveId to CMtrProfile

main
Yik Teng Hie 1 month ago
parent 30c4bd488a
commit 797c436734

Binary file not shown.

Binary file not shown.

@ -197,6 +197,8 @@ public:
int m_iCardNo; int m_iCardNo;
int m_iSlaveId{}; // for EtherCAT, slave ID
int m_iMotorPosArrayIndex; int m_iMotorPosArrayIndex;
std::vector<stMtrPosTeach> m_motorPos; std::vector<stMtrPosTeach> m_motorPos;

@ -165,6 +165,12 @@ protected:
} }
}; };
using stAxTranslation = struct _stAxTranslation
{
double dPulsePerMM{}; // pulse per mm
int iPosDir{ 1 }; // positive direction
};
public: public:
CMotorBase(); CMotorBase();
CMotorBase(const std::string& strMutexName, const CMtrProfile& mtrProfile, double* dpPos, CMotionControllerBase* pBaseController); CMotorBase(const std::string& strMutexName, const CMtrProfile& mtrProfile, double* dpPos, CMotionControllerBase* pBaseController);
@ -612,6 +618,9 @@ public:
// keep track of which motor no // keep track of which motor no
int m_iMtrNo; int m_iMtrNo;
// keep track of slave id for ECAT slave
int m_iSlaveId;
// keep track of no of pos // keep track of no of pos
int m_iNoOfPos; int m_iNoOfPos;
@ -794,4 +803,3 @@ private:
int BaseAbsoluteMove(double dPosition, int nPos, int nMode, PROFILE_CURVE curve); int BaseAbsoluteMove(double dPosition, int nPos, int nMode, PROFILE_CURVE curve);
}; };

@ -150,6 +150,8 @@ private:
bool PrepareMotionCurve(PROFILE_CURVE curve); bool PrepareMotionCurve(PROFILE_CURVE curve);
void Set4XMOEncoderSource();
enum PROFILE_TYPE enum PROFILE_TYPE
{ {
ACC, ACC,

@ -49,6 +49,7 @@ public:
double m_Negative_Soft_Limit; double m_Negative_Soft_Limit;
double m_Positive_Soft_Limit; double m_Positive_Soft_Limit;
long m_CardNo; long m_CardNo;
long m_SlaveId;
// Overrides // Overrides

Loading…
Cancel
Save