private AcsAxes ConvertAxis(GantryAxes axis) { switch (axis) { case GantryAxes.Z: return(AcsAxes.GantryZ); default: case GantryAxes.X: return(AcsAxes.GantryX); case GantryAxes.Y: return(AcsAxes.GantryY); } }
internal AcsAxis(Api api, AcsUtils utils, BufferHelper bufferHelper, GantryAxes axisId, Axis acsAxisId, IRobotControlSetting config) { this.api = api; this.bufferHelper = bufferHelper; acsUtils = utils; axisConfig = config; ApplicationAxisId = (int)axisId; AcsAxisId = acsAxisId; Name = ApplicationAxisId.ToString(); ReloadConfigParameters(); HomeStopCondition = string.Format("FAULT({0}).#LL", (int)AcsAxisId); if (!Homed) { acsUtils.ClearBits("FDEF", (int)AcsAxisId, 64); acsUtils.ClearBits("FDEF", (int)AcsAxisId, 32); } acsUtils.SetBits("FDEF", (int)AcsAxisId, 3); if (Homed) { acsUtils.SetBits("FDEF", (int)AcsAxisId, 64); acsUtils.SetBits("FDEF", (int)AcsAxisId, 32); } switch (ApplicationAxisId) { case 0: HomeBuffer = 3; break; case 1: HomeBuffer = 0; break; case 2: HomeBuffer = 1; break; } }
public bool Stop(GantryAxes axis) { return(true); }
public bool Abort(GantryAxes axis) { return(true); }
public bool MoveRelative(GantryAxes axis, double relativePosition, double vel = 0, double acc = 0, double dec = 0) { axesPosition[ConvertAxis(axis)] += relativePosition; return(true); }
public bool Jog(GantryAxes axis, double vel = 0, double acc = 0, double dec = 0) { return(true); }
public bool Init(GantryAxes axis) { return(true); }
public bool MoveAbsolute(GantryAxes axis, double targetPos, double vel = 0, double acc = 0, double dec = 0) { axesPosition[ConvertAxis(axis)] = targetPos; return(true); }
public bool IsIdle(GantryAxes axis) { return(true); }
public double GetGantryPosition(GantryAxes axis) { return(axesPosition[ConvertAxis(axis)]); }
public bool AtNegativeSwLimit(GantryAxes axis) { return(false); }
public void ClearError(GantryAxes axis) { }
public bool AtPositiveHwLimit(GantryAxes axis) { return(false); }
public bool AtHomeSensor(GantryAxes axis) { return(false); }
public double Velocity(GantryAxes axis) { return(0); }
public void SetRPos(GantryAxes axis, double pos) { axesPosition[ConvertAxis(axis)] = pos; }
public bool Homed(GantryAxes axis) { return(true); }
public bool Disable(GantryAxes axis) { return(true); }
public bool Ready(GantryAxes axis) { return(true); }
public bool ReloadConfigParameters(GantryAxes axis) { return(true); }
public bool Enabled(GantryAxes axis) { return(true); }