Esempio n. 1
0
 public void Jog(Motor motor, double velocity)
 {
 }
Esempio n. 2
0
 public void BreakToPoint(Motor motor, double point)
 {
     Break(motor);
     point *= motor.Direction;
     _ch.ToPoint(MotionFlags.ACSC_AMF_MAXIMUM, motor.Id, point);
 }
Esempio n. 3
0
 public double GetJerk(Motor motor)
 {
     return(0);
 }
Esempio n. 4
0
 public void Disable(Motor motor, int timeout = 2000)
 {
     _ch.Disable(motor.Id);
     //Wait till enabled
     _ch.WaitMotorEnabled(motor.Id, 0, timeout);
 }
Esempio n. 5
0
 private void WriteVariable(Motor motor, string acsVariable, object value)
 {
     _ch.WriteVariable(value, acsVariable, ProgramBuffer.ACSC_NONE,
                       (int)motor.Id, (int)motor.Id, -1, -1);
 }
Esempio n. 6
0
 public double GetDeceleration(Motor motor)
 {
     return(0);
 }
Esempio n. 7
0
 public void SetJerk(Motor motor, double jerk)
 {
 }
Esempio n. 8
0
 public MotorStates GetRobotState(Motor motor)
 {
     return(_ch.GetMotorState(motor.Id));
 }
Esempio n. 9
0
 public void SetAcceleration(Motor motor, double acceleration)
 {
 }
Esempio n. 10
0
 public void SetDeceleration(Motor motor, double deceleration)
 {
 }
Esempio n. 11
0
 public void SetVelocity(Motor motor, double velocity)
 {
     _ch.SetVelocity(motor.Id, velocity);
 }
Esempio n. 12
0
 public void SetPosition(Motor motor, double position)
 {
 }
Esempio n. 13
0
 private string GetEcatActPosName(Motor motor)
 {
     return(EcatActPosName + motor.EcatPosActValAddr);
 }
Esempio n. 14
0
 public void Break(Motor motor)
 {
     _ch.Break(motor.Id);
 }
Esempio n. 15
0
 public double GetPosition(Motor motor)
 {
     return(_ch.GetFPosition(motor.Id) * motor.Direction);
 }
Esempio n. 16
0
 public void Halt(Motor motor)
 {
     _ch.Halt(motor.Id);
 }
Esempio n. 17
0
 public double GetVelocity(Motor motor)
 {
     return(_ch.GetVelocity(motor.Id));
 }
Esempio n. 18
0
 public bool IsEnabled(Motor motor)
 {
     return(Convert.ToBoolean(GetRobotState(motor) & MotorStates.ACSC_MST_ENABLE));
 }
Esempio n. 19
0
        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;
        }