public void Jog(Motor motor, double velocity) { }
public void BreakToPoint(Motor motor, double point) { Break(motor); point *= motor.Direction; _ch.ToPoint(MotionFlags.ACSC_AMF_MAXIMUM, motor.Id, point); }
public double GetJerk(Motor motor) { return(0); }
public void Disable(Motor motor, int timeout = 2000) { _ch.Disable(motor.Id); //Wait till enabled _ch.WaitMotorEnabled(motor.Id, 0, timeout); }
private void WriteVariable(Motor motor, string acsVariable, object value) { _ch.WriteVariable(value, acsVariable, ProgramBuffer.ACSC_NONE, (int)motor.Id, (int)motor.Id, -1, -1); }
public double GetDeceleration(Motor motor) { return(0); }
public void SetJerk(Motor motor, double jerk) { }
public MotorStates GetRobotState(Motor motor) { return(_ch.GetMotorState(motor.Id)); }
public void SetAcceleration(Motor motor, double acceleration) { }
public void SetDeceleration(Motor motor, double deceleration) { }
public void SetVelocity(Motor motor, double velocity) { _ch.SetVelocity(motor.Id, velocity); }
public void SetPosition(Motor motor, double position) { }
private string GetEcatActPosName(Motor motor) { return(EcatActPosName + motor.EcatPosActValAddr); }
public void Break(Motor motor) { _ch.Break(motor.Id); }
public double GetPosition(Motor motor) { return(_ch.GetFPosition(motor.Id) * motor.Direction); }
public void Halt(Motor motor) { _ch.Halt(motor.Id); }
public double GetVelocity(Motor motor) { return(_ch.GetVelocity(motor.Id)); }
public bool IsEnabled(Motor motor) { return(Convert.ToBoolean(GetRobotState(motor) & MotorStates.ACSC_MST_ENABLE)); }
public void Setup() { MotorSetupComplete = false; #region Motor parameters setup MotorZ = new Motor(Axis.ACSC_AXIS_0) { EcatPosActValAddr = 145, EncCtsPerR = 131072, BallScrewLead = 32, HomeOffset = 365, CriticalErrAcc = 100, CriticalErrVel = 100, CriticalErrIdle = 5, SoftLimitNagtive = -10, SoftLimitPositive = 730, SpeedFactor = 0.9, JerkFactor = 16 }; //For Sanyo, axisAddrOffset = 18 MotorX1 = new Motor(Axis.ACSC_AXIS_1) { EcatPosActValAddr = MotorZ.EcatPosActValAddr + 18, EncCtsPerR = 131072, BallScrewLead = 16, HomeOffset = 793.5, CriticalErrAcc = 100, CriticalErrVel = 100, CriticalErrIdle = 5, SoftLimitNagtive = -5, SoftLimitPositive = 590, SpeedFactor = 0.9, JerkFactor = 16 }; //For Sanyo, axisAddrOffset = 18 MotorX1.MaxTravel = MotorX1.SoftLimitPositive - 10; MotorX2 = new Motor(Axis.ACSC_AXIS_2) { EcatPosActValAddr = MotorX1.EcatPosActValAddr + 18, EncCtsPerR = 131072, BallScrewLead = 16, HomeOffset = 256, CriticalErrAcc = 100, CriticalErrVel = 100, CriticalErrIdle = 5, SoftLimitNagtive = -5, SoftLimitPositive = 760, SpeedFactor = 1.0, JerkFactor = 20 }; //For Sanyo, axisAddrOffset = 18 MotorX2.MaxTravel = MotorX2.SoftLimitPositive - 10; MotorY = new Motor(Axis.ACSC_AXIS_3) { EcatPosActValAddr = MotorX2.EcatPosActValAddr + 18, EncCtsPerR = 131072, BallScrewLead = 16, HomeOffset = 12.4, CriticalErrAcc = 100, CriticalErrVel = 100, CriticalErrIdle = 5, SoftLimitNagtive = -330, SoftLimitPositive = 4, SpeedFactor = 0.8, JerkFactor = 20, Direction = -1.0 }; //For Sanyo, axisAddrOffset = 18 MotorR = new Motor(Axis.ACSC_AXIS_4) { EcatPosActValAddr = 113, EncCtsPerR = 10000, BallScrewLead = 360.0 * 1.0 / 100.0, HomeOffset = 30 - 2.56, CriticalErrAcc = 100, CriticalErrVel = 100, CriticalErrIdle = 5, SoftLimitNagtive = -40, SoftLimitPositive = 40, SpeedFactor = 0.18, JerkFactor = 3.6 }; #endregion Motors = new Motor[5] { MotorZ, MotorX1, MotorX2, MotorY, MotorR }; DeclareVariableInDBuffer(); DisableAll(); foreach (var mtr in Motors) { SetFPosition(mtr); SetSafety(mtr); } EnableAll(); MotorSetupComplete = true; }