コード例 #1
0
ファイル: Power.cs プロジェクト: zjhayes/SpacetimeGame
 public void PowerOn()
 {
     if (onPowerOn != null)
     {
         onPowerOn.Invoke();
     }
 }
コード例 #2
0
        public void RunSingleOut(bool bUseCalibrate, IBeamScan beamScan, ushort focusADD)
        {
            if (_beamScan != null)
            {
                _beamScan.X           = beamScan.X;
                _beamScan.Y           = beamScan.Y;
                _beamScan.BeamCurrent = beamScan.BeamCurrent;
                if (bUseCalibrate)
                {
                    _beamScan.Astig1 = (ushort)StaticTool.CaculateLinerVal(beamScan.X, beamScan.Y, true);
                    _beamScan.Astig2 = (ushort)StaticTool.CaculateLinerVal(beamScan.X, beamScan.Y, false);
                    _beamScan.Focus  = (ushort)(StaticTool.CaculateFocus((uint)StaticTool.GetRadius(beamScan.X, beamScan.Y)) + focusADD);
                }
                else
                {
                    _beamScan.Astig1 = beamScan.Astig1;
                    _beamScan.Astig2 = beamScan.Astig2;
                    _beamScan.Focus  = beamScan.Focus;
                }
                BeamStart(SignalCardModeEnum.SingleOut);
                OnPowerOn?.Invoke(null, null);
                OnOperation?.Invoke("直流下束...");

                _isDirecStop = false;
            }
        }
コード例 #3
0
 public void RunPeaHeatOut(ref ScanParamters paramters, bool isX)
 {
     try
     {
         _iDummySweep.Speed    = (float)Parameter.PreHeat.Speed;
         _beamSetup.DummySweep = _iDummySweep;
         if (beamScanFactory != null)
         {
             _beamScan.X = _beamScan.Y = _beamScan.Focus = _beamScan.Astig1 = _beamScan.Astig2 = 32767;
             beamScanFactory.SetBeamScan(_beamScan);
             _beamSetup.Rate = (int)Parameter.Frequency;
             beamScanFactory.SetBeamSetup(_beamSetup);
             beamScanFactory.SetBeamState(_beamState);
         }
         if (isX)
         {
             beamScanFactory.CreatePreHeatLinesX(
                 (ushort)Parameter.PreHeat.Size
                 , (int)Parameter.PreHeat.LineOrder
                 , (float)Parameter.PreHeat.LineOffset
                 , (float)Parameter.PreHeat.Speed
                 , Parameter.Frequency
                 , paramters.scanCount
                 , paramters.scanVolt
                 , paramters.focusOffset
                 , true
                 );
         }
         else
         {
             beamScanFactory.CreatePreHeatLinesY(
                 (ushort)Parameter.PreHeat.Size
                 , (int)Parameter.PreHeat.LineOrder
                 , (float)Parameter.PreHeat.LineOffset
                 , (float)Parameter.PreHeat.Speed
                 , Parameter.Frequency
                 , paramters.scanCount
                 , paramters.scanVolt
                 , paramters.focusOffset
                 , true
                 );
         }
         if (_beamScan != null)
         {
             if (!_isBeamOn)
             {
                 BeamStart(SignalCardModeEnum.BufferedOut);
                 _isBeamOn = true;
             }
             OnPowerOn?.Invoke(null, null);
             OnOperation?.Invoke(isX ? "X向预热..." : "Y向预热...");
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
コード例 #4
0
 public void RunCADOut(uint count, DxfcadReader dxfcad)
 {
     try
     {
         _iDummySweep.Speed    = (float)Parameter.cadFilescanPara.Speed;
         _beamSetup.DummySweep = _iDummySweep;
         if (beamScanFactory != null)
         {
             _beamScan.X = _beamScan.Y = _beamScan.Focus = _beamScan.Astig1 = _beamScan.Astig2 = 32767;
             beamScanFactory.SetBeamScan(_beamScan);
             _beamSetup.Rate = (int)Parameter.Frequency;
             beamScanFactory.SetBeamSetup(_beamSetup);
             beamScanFactory.SetBeamState(_beamState);
         }
         double        speed         = Parameter.cadFilescanPara.Speed;
         double        focusOffs     = Parameter.cadFilescanPara.FocusOffset;
         double        beamVal       = Parameter.cadFilescanPara.BeamValue;
         DxfcadPackage dxfcadPackage = new DxfcadPackage(dxfcad);
         for (int i = 0; i < count; i++)
         {
             beamScanFactory.AddPackage(dxfcadPackage);
         }
         if (_beamScan != null)
         {
             if (!_isBeamOn)
             {
                 BeamStart(SignalCardModeEnum.BufferedOut);
                 _isBeamOn = true;
             }
             OnPowerOn?.Invoke(null, null);
             OnOperation?.Invoke("cad  扫描");
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
コード例 #5
0
 public void DummySweep(float speed)
 {
     this._iDummySweep.Speed = speed;
     _beamSetup.DummySweep   = _iDummySweep;
     if (beamScanFactory != null)
     {
         _beamScan.X = _beamScan.Y = _beamScan.Focus = _beamScan.Astig1 = _beamScan.Astig2 = 32767;
         beamScanFactory.SetBeamScan(_beamScan);
         _beamSetup.Rate = (int)Parameter.Frequency;
         beamScanFactory.SetBeamSetup(_beamSetup);
         beamScanFactory.SetBeamState(_beamState);
     }
     if (_beamScan != null)
     {
         ///*************暂时去掉
         if (!_isBeamOn)
         {
             BeamStart(SignalCardModeEnum.BufferedOut);
             _isBeamOn = true;
         }
         OnPowerOn?.Invoke(null, null);
         OnOperation?.Invoke("空扫...");
     }
 }