public int MoveTo(ushort NodeID, double Position, int Profile) { ResetAlarm(NodeID); if (CardNo.Count == 0) { return((int)DM_ErrorList.NoCardFound); } double acc = 0.2; double Tdec = 0.2; int speed = GetPara(NodeID).RunSpeed; if (Profile == 0) { speed = GetPara(NodeID).HomeSpeed; } int StrVel = speed / 10; int dist; dist = (Int32)(GetPara(NodeID).MotorScale *Position); short rc = CPCI_DMC.CS_DMC_01_start_ta_move(CardNo[0], NodeID, 0, dist, StrVel, speed, acc, Tdec); if (rc != 0) { return((int)DM_ErrorList.MotionError); } Thread.Sleep(motionCmdDly); return((int)DM_ErrorList.NoError); }
public int MoveTo(ushort NodeID, double Position) { ResetAlarm(NodeID); if (CardNo.Count == 0) { return((int)DM_ErrorList.NoCardFound); } double acc = 0.2; double Tdec = 0.2; int speed = GetPara(NodeID).RunSpeed; int StrVel = speed / 10; int dist; dist = (Int32)(GetPara(NodeID).MotorScale *Position); if ((NodeID == (ushort)Axislist.Mod1YAxis) || (NodeID == (ushort)Axislist.Mod2YAxis)) { if (!ReadIOIn((ushort)InputIOlist.RotaryMotionDone)) { return((int)DM_ErrorList.MotionSafetyError); } } short rc = CPCI_DMC.CS_DMC_01_start_ta_move(CardNo[0], NodeID, 0, dist, StrVel, speed, acc, Tdec); if (rc != 0) { return((int)DM_ErrorList.MotionError); } Thread.Sleep(motionCmdDly); return((int)DM_ErrorList.NoError); }
public void VMoveTo(ushort CardNo, ushort NodeID, double Dist, int speed) { double acc = 0.2; double Tdec = 0.2; int StrVel = speed / 10; int dist; dist = (Int32)(ScaleAxis[NodeID] * Dist); CPCI_DMC.CS_DMC_01_start_ta_move(CardNo, NodeID, 0, dist, StrVel, speed, acc, Tdec); }