public void InitMacDataToHardWare() { if (Common.HwProvider.CreateSucessful) { AxisParams p = Common.X_Axis.Param; if (p != null) { p.JogVelSlow = this.XLowSpeed; p.JogAccSlow = this.XLowAcc; p.JogVel = this.XSpeed; p.JogAcc = this.XAcc; } p = Common.Y_Axis.Param; if (p != null) { p.JogVelSlow = this.YLowSpeed; p.JogAccSlow = this.YLowAcc; p.JogVel = this.YSpeed; p.JogAcc = this.YAcc; } p = Common.Z_Axis.Param; if (p != null) { p.JogVelSlow = this.ZLowSpeed; p.JogAccSlow = this.ZLowAcc; p.JogVel = this.ZSpeed; p.JogAcc = this.ZAcc; } p = Common.T_Axis.Param; if (p != null) { p.JogVelSlow = this.TLowSpeed; p.JogAccSlow = this.TLowAcc; p.JogVel = this.TSpeed; p.JogAcc = this.TAcc; } if (Common.Capture != null) { if (Common.DoubleCap) { Common.Capture.Scale = LowPixValue; //低倍的倍率 Common.CaptureL.Scale = HighPixValue; //高倍倍率 } else { Common.Capture.Scale = HighPixValue;//高倍倍率 } } Globals.ViewCenter.X = HighCenterX; Globals.ViewCenter.Y = HighCenterY; } }
public void InitMacDataToHardWare() { if (Common.HwProvider.CreateSucessful) { AxisParams p = Common.X_Axis.Param; if (p != null) { p.HomeAcc = this.XHomeAcc; p.HomeOffset = this.XOffset; p.StartPos = this.XStartPos; p.HomeVel = this.XHomeSpeed; p.PerCTS = this.XResolution / this.XLead; p.WorkAcc = this.XAcc; p.WorkVel = this.XSpeed; p.SoftPlimit = this.XPLimit; p.SoftNlimit = this.XNLimit; p.PosAccuracy = this.XAccuracy; p.MaxError = this.XMaxError; } p = Common.Y_Axis.Param; if (p != null) { p.HomeAcc = this.YHomeAcc; p.HomeOffset = this.YOffset; p.StartPos = this.YStartPos; p.HomeVel = this.YHomeSpeed; p.PerCTS = this.YResolution / this.YLead; p.WorkAcc = this.YAcc; p.WorkVel = this.YSpeed; p.SoftPlimit = this.YPLimit; p.SoftNlimit = this.YNLimit; p.PosAccuracy = this.YAccuracy; p.MaxError = this.YMaxError; } p = Common.Z_Axis.Param; if (p != null) { p.HomeAcc = this.ZHomeAcc; p.HomeOffset = this.ZOffset; p.StartPos = this.ZStartPos; p.HomeVel = this.ZHomeSpeed; p.PerCTS = this.ZResolution / this.ZLead; p.WorkAcc = this.ZAcc; p.WorkVel = this.ZSpeed; p.PosAccuracy = this.ZAccuracy; p.MaxError = this.ZMaxError; } p = Common.T_Axis.Param; if (p != null) { p.HomeAcc = this.THomeAcc; p.HomeOffset = this.TOffset; p.StartPos = this.TStartPos; p.HomeVel = this.THomeSpeed; p.PerCTS = this.TResolution / this.TLead; p.WorkAcc = this.TAcc; p.WorkVel = this.TSpeed; p.PosAccuracy = this.TAccuracy; p.MaxError = this.TMaxError; p.MaxPos = this.TMaxPos; p.StepPos = this.TStep; } Globals.TabCenter.X = centerPos.X; Globals.TabCenter.Y = centerPos.Y; CutChip.SelfTickness = this.ZSelfPos; Globals.IsInit = false; if (Common.DI != null) { Common.DI.IOList = ioData.DiList; Common.DI.Mask = ioData.DiMask; Common.DI.Used = ioData.DiUsed; } if (Common.DO != null) { Common.DO.IOList = ioData.DoList; Common.DO.Mask = ioData.DoMask; Common.DO.Used = ioData.DoUsed; } if (Common.SPD != null) { Common.SPD.DevIndex = spdIndex; Common.SPD.BaudRate = spdBaud; } } }