public override bool AddBufMove(object objGroup, BufMotionType type, int mode, int nAxisNum, double velHigh, double velLow, double[] Point1, double[] Point2) { if (type == BufMotionType.buf_Arc2dAbsCCW || type == BufMotionType.buf_Arc2dAbsCW) { var ret = LTSMC.smc_conti_arc_move_center_unit(_ConnecNo, 0, 2, axis, new double[] { Point2[0], Point2[1] }, Point1, 0, 0, 1, 1); } return(true); }
public override bool AddBufMove(object objGroup, BufMotionType type, int mode, int nAxisNum, double velHigh, double velLow, double[] Point1, double[] Point2) { ushort Cmd = 0; switch (type) { case BufMotionType.buf_Line3dAbs: Cmd = (ushort)PathCmd.Abs3DLine; break; break; case BufMotionType.buf_Line2dAbs: Cmd = (ushort)PathCmd.Abs2DLine; break; case BufMotionType.buf_Arc2dAbsCCW: Cmd = (ushort)PathCmd.Abs2DArcCCW; break; case BufMotionType.buf_Arc2dAbsCW: Cmd = (ushort)PathCmd.Abs2DArcCW; break; case BufMotionType.buf_end: Cmd = (ushort)PathCmd.EndPath; break; default: MessageBox.Show("path运动类型不对", "Err", MessageBoxButtons.OK, MessageBoxIcon.Error); return(false); } uint nAxisCount = (uint)nAxisNum; IntPtr GpHand = (IntPtr)objGroup; uint reslut = 0; reslut = Motion.mAcm_GpAddPath(GpHand, Cmd, 0, velHigh, velLow, Point1, Point2 // new double[] { 0,0} , ref nAxisCount); return(reslut == (uint)ErrorCode.SUCCESS); }
/// <summary> /// 与其他的控制卡不兼容,因为这个M314没有buf'运动 /// </summary> /// <param name="objGroup"></param> /// <param name="type"></param> /// <param name="mode"></param> /// <param name="nAxisNum">nAxisNum 3=1&2</param> /// <param name="velHigh"></param> /// <param name="velLow"></param> /// <param name="Point1">Point1[0]= centerX,Point1[1]=centerY</param> /// <param name="Point2">Point2[0]=angle</param> /// <returns></returns> public override bool AddBufMove(object objGroup, BufMotionType type, int mode, int nAxisNum, double velHigh, double velLow, double[] Point1, double[] Point2) { if (mode == 1) { short rtn = 0; ushort[] array = new ushort[3] { (ushort)nAxisNum, (ushort)(nAxisNum + 1), (ushort)(nAxisNum - 1) }; double speed = velHigh; double Acc = m_MovePrm[2].AccH; double Dcc = m_MovePrm[2].DccH; switch ((int)velHigh) { case 0: Acc = m_MovePrm[2].AccH; Dcc = m_MovePrm[2].DccH; speed = m_MovePrm[2].VelH; break; case (int)SpeedType.Mid: Acc = m_MovePrm[2].AccM; Dcc = m_MovePrm[2].DccM; speed = m_MovePrm[2].VelM; break; case (int)SpeedType.Low: Acc = m_MovePrm[2].AccL; Dcc = m_MovePrm[2].DccL; speed = m_MovePrm[2].VelL; break; } double Tacc = (speed - 0) / Acc; double Tdec = (speed - 0) / Dcc; // rtn |= CPCI_M314.CS_m314_start_ta_arc_xy((ushort)m_nCardIndex, ref array[0], (int)Point1[0], (int)(Point1[1]/10.0), Point2[0], 0, (int)speed, Tacc, Tdec); rtn |= CPCI_M314.CS_m314_start_tr_heli_xy((ushort)m_nCardIndex, ref array[0], (int)Point1[0], (int)(Point1[1] / 10.0), (int)10, 9, 0, 0, (int)speed, Tacc, Tdec); return(rtn == 0); } return(false); }
public override bool AddBufMove(object objGroup, BufMotionType type, int mode, int nAxisNum, double velHigh, double velLow, double[] Point1, double[] Point2) { return(true); }