123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232 |
-
- #pragma once
- #include <string>
- enum AxisType{
- ServoAxis,
- ForcerAxis,
- StepAxis,
- WrongAxis,
- };
- enum CardType {
- GTS = 0,
- LeiSai = 1,
- APS = 2,
- ACS = 3,
- };
- enum HomeMethod
- {
- IO2HOME = 1,
- HOME2HOME = 2,
- INDEX2HOME = 4,
- DIRECT2HOME = 5,
- LEFTLIMITHOME = 6,
- RIGHTLIMITHOME = 7,
- };
- struct CardData
- {
- int m_nBoardIndex;
- CardType m_nCardType;
- int m_nCardIndex;
- };
- struct AxisData{
- virtual void virtualMark(){};
-
- int m_nID;
- std::string m_sName;
- int m_nCardType ;
- int m_nCardIndex;
- int m_nAxisIndexInCard;
- int m_nAxisNumInCard;
-
- int m_nAxisType = ServoAxis;
- std::string m_sCommAddress;
- int m_nPort;
- int m_nSerialPort;
- unsigned int m_nBaudRate;
- std::string m_sIPLocal;
- std::string m_sIPDriver;
- int m_nRemotePort;
- int m_nHeadType;
- int m_nModuleType;
- int m_nMotorID;
- int m_nTranceducerType;
- int m_nNegativeLimitSwitch;
- int m_nNegLimSwIndex;
- int m_nNegLimSwLevel;
- int m_nPositiveLimitSwitch;
- int m_nPosLimSwIndex;
- int m_nPosLimSwLevel;
- int m_nAbortAtHWLimit;
- int m_nHighVoltageMode;
-
-
- int m_nEncoderFaultIndex;
- int m_nEncoderFaultBit;
- int m_nEncoderFaultLevel;
- double m_fMotorTemperatureGain;
- double m_fMotorTemperatureTimeConstant;
- double m_fMotorTemperatureLimit;
- int m_nDriveCardType;
- int m_nDriveCardStatusBitMask;
- double m_fKxab;
- double m_fKyab;
- double m_fKza;
- double m_fKza2;
- double m_fKtv;
- double m_fKta;
-
-
- double m_fPositionerRate1;
- double m_fPositionerRate2;
- double m_fPositionerGain1;
- double m_fPositionerGain2;
- double m_fPositionerGain3;
-
- double m_fPosScaleFactor;
- double m_fSpringCoefficient1 = 0;
- double m_fSpringCoefficient2 = 0;
- double m_fSpringCoefficient3 = 0;
- int m_nUPHEnhance;
- };
- struct ControlAxisData : AxisData {
-
- double m_fPositionTolerance;
- int m_nHomeSwitch;
- int m_nHomeSwitchIndex;
- int m_nHomeSwitchLevel;
- int m_nIndexPulse;
- int m_nIndexPulseIndex;
- int m_nHomingBuffer;
- int m_nHomingProcId;
- int m_nHomingDir1;
- int m_nHomingDir2;
- double m_fHomingVel1;
- double m_fHomingVel2;
- double m_fHomingAccel;
- double m_fHomingDecel;
- double m_fHomingOutputLimit;
- double m_fHomingErrThresh;
- double m_fHomePosition;
- double m_fInitialPosition;
-
- double m_fNegCmdLimit;
- double m_fPosCmdLimit;
- double m_fMinimumVelocity;
- double m_fStopDeceleration;
- double m_fStopDecelerationSD;
- int m_nFindLimitsProc;
-
-
- double m_fMaximumJerk = 0;
- double m_fMaximumAcceleration = 0;
- double m_fMaximumVelocity = 0;
- double m_fEndVelocity = 0;
- double m_fNegativeLimitMargin;
- double m_fPositiveLimitMargin;
- };
- struct ForcerAxisData : AxisData {
- int m_nOpenPositionMargin;
- int m_nClosePositionMargin;
- double m_fOutputScaleFactor;
- double m_fOutputOffset;
- double m_fOutputLimit;
- double m_fWireClampForceCoefficient;
- };
- struct ServoAxisData : ControlAxisData {
- double m_fSafetyModeGain;
- double m_fErrorThreshold;
- int m_nErrThreshCount;
- double m_fKa;
- double m_fKv;
- double m_fKp;
- double m_fKi;
- double m_fKd;
- double m_fIntegratorLimit;
- double m_fForceOffset;
- double m_fForceScaleFactor;
- double m_fStaticFriction;
- double m_fDynamicFrictionCoefficient;
- double m_fInertia;
- double m_fPidOutputErrorThreshold;
- double m_fKip;
- double m_fKii;
- int m_nECPR;
- int m_nQuadDiv;
- double m_fEpdOnTime;
- double m_fEpdOffTime;
- double m_fEpdCurrent;
- double m_fEpdPeak;
- double m_fDriveAngleCalibCurrent;
- double m_fDriveAngleCalibPos;
- double m_fDriveAngleCalibAngle;
- double m_fDriveAngleAtHome;
- int m_nDriveAngleCalibCycles;
- double m_fJerkFeedForward;
- double m_fIntegratorSwitchVelocity;
- double m_fBaseMass;
- double m_fForceConstant;
- double m_fOutputLimitGain;
- };
- struct StepAxisData :ControlAxisData {
-
-
- double m_fHoldCurrent;
- double m_fRunCurrent;
- double m_fSettlingTime;
- int m_nErrorCorrectionMode;
- };
|