public void MoveAnglePos(int[] m_nAxis, float Speed, float TargetStroke, float LeverLength) { // 현재 위치(0,0)에서 (100,100) 위치까지 (0,100)을 중심으로 원호 보간을 수행한다. int[] lAxesNo = { m_nAxis[0], m_nAxis[1] }; double[] dCenPos = new double[2]; //double[] dEndPos = new double[2]; int lCoordinate = 0; uint uAbsRelMode = 1; //uint uProfileMode = 3; uint lSize = 2; CAXM.AxmContiWriteClear(lCoordinate); //CAXM.AxmContiBeginNode(lCoordinate); CAXM.AxmContiSetAxisMap(lCoordinate, lSize, lAxesNo); CAXM.AxmContiSetAbsRelMode(lCoordinate, uAbsRelMode); // 상대 위치 구동으로 설정 //CAXM.AxmContiEndNode(lCoordinate); //double dCenterXPosition = LeverLength; // 0 // dCenterYPosition = LeverLength; // 100 //double dEndXPosition = 50; //double dEndYPosition = 50; //dCenPos[0] = dCenterXPosition + AxtReadPosition(mStatus.X_SELECT); //dCenPos[1] = dCenterYPosition + AxtReadPosition(mStatus.Y_SELECT); dCenPos[0] = 0; dCenPos[1] = LeverLength; //dEndPos[0] = dEndXPosition; //dEndPos[1] = dEndYPosition; double dMaxVelocity = Speed * 2; double dMaxAccel = Speed; double dMaxDecel = Speed * 2; uint uCWDir = 1; //[0] Ccw방향, [1] Cw방향 float dAngle = (float)(TargetStroke / (Math.PI * LeverLength)) * 180F; dAngle = 180; //CAXM.AxmCircleCenterMove(lCoordinate, lAxesNo, dCenPos, dEndPos, dMaxVelocity, dMaxAccel, dMaxDecel,uCWDir); uint Status = CAXM.AxmCircleAngleMove(lCoordinate, lAxesNo, dCenPos, dAngle, dMaxVelocity, dMaxAccel, dMaxDecel, uCWDir); return; }
public void CircleAngleMove(int _iCoord, int [] _iaAxisNo, double [] _daCenterPos, double _dAngle, double _dVel, double _dAcc, double _dDec, uint _uiCWDir) { CAXM.AxmCircleAngleMove(_iCoord, _iaAxisNo, _daCenterPos, _dAngle, _dVel, _dAcc, _dDec, _uiCWDir); }