Browse Source

add loader load routine,add Wago simulator DI/DO set ability

chenzk 4 months ago
parent
commit
babcab54eb

+ 146 - 233
CyberX8_RT/Devices/Loader/LoaderLoadRoutine.cs

@@ -19,6 +19,8 @@ using System.Threading.Tasks;
 using MECF.Framework.Common.CommonData.Loader;
 using CyberX8_RT.Modules.Transporter;
 using MECF.Framework.Common.WaferHolder;
+using CyberX8_RT.Modules.Loader;
+using Aitex.Core.Common;
 
 namespace CyberX8_RT.Devices.Loader
 {
@@ -28,38 +30,25 @@ namespace CyberX8_RT.Devices.Loader
         {
             CheckPreCondition,
             WSClampOn,
-            WSSideClampOn,
-            WSSideClampOnCheck,
-            BernoulliBladderOn,
-            BernoulliBladderOnCheck,
-            TranslateBladderOff,
-            TranslateBladderOffCheck,
-            CRSGotoUnlock,
-            CRSGotoUnlockWait,
             BernoulliN2On,
             BernoulliN2OnCheck,
             BernoulliBladderOff,
             BernoulliBladderOffCheck,
             TiltGotoFloat,
             TiltGotoFloatWait,
-            ReBernoulliBladderOn,
-            ReBernoulliBladderOnCheck,
+            Wait1,
+            BernoulliBladderOn,
+            BernoulliBladderOnCheck,
+            CRSVacuumValue,
+            CRSVacuumValueCheck,
             TiltGotoVertical,
             TiltGotoVerticalWait,
-            CRSVacuumValue, 
-            CRSVacuumValueCheck,
-            ShuttleGotoClose,
-            ShuttleGotoCloseWait,
-            ReCRSVacuumValue,
-            ReCRSVacuumValueCheck,
-            DoorLockOn,
-            DoorLockOnCheck,
+            CRSGotoUnlock,
+            CRSGotoUnlockWait,
+            ShuttleGotoCRS,
+            ShuttleGotoCRSWait,
             WSBladderOn,
             WSBladderOnCheck,
-            TransBladderOn,
-            TransBladderOnCheck,
-            TransHighOff,
-            TransHighOffCheck,
             CRSGotoSetUp,
             CRSGotoSetUpWait,
             CRSGotoLock,
@@ -68,39 +57,35 @@ namespace CyberX8_RT.Devices.Loader
             BernoulliN2OffCheck,
             WSBladderOff,
             WSBladderOffCheck,
-            CRSReleaseDelay,
+            Wait2,
             CRSVacuumOff,
             CRSVacuumOffCheck,
-            TranslateBladderReleaseDelay,
-            ReTranslateBladderOff,
-            ReTranslateBladderOffCheck,
-            TranslateHighPresOff,
-            TranslateHighPresOffCheck,
+            Wait3,
+            ShuttleGotoMID,
+            ShuttleGotoMIDWait,
             HomingCRSAxis,
             HomingCRSAxisWait,
             CRSHomedGotoSetUp,
             CRSHomedGotoSetUpCheck,
             End
+ 
         }
         #region 内部变量
         private string _side = "";
         private int _crsVacuumReleaseDelayInMilliseconds = 250;
         private int _translateOutDelayInMilliseconds = 250;
+        private int _waferSize = 200;
         private JetAxisBase _crsAxis;
         private JetAxisBase _tiltAxis;
         private JetAxisBase _shuttleAxis;
         private JetAxisBase _rotationAxis;
         private LoaderCommonDevice _loaderCommonDevice;
         private LoaderSideDevice _sideDevice;
-        private LoaderCommonWaferHolderSideClampRoutine _waferHolderSideClampRoutine;
         private LoaderSideBernoulliBladderRoutine _bernoulliBladderRoutine;
-        private LoaderSideTransBladderRoutine _transBladderRoutine;
         private LoaderSideBernoulliN2PressureRoutine _bernoulliN2PressureRoutine;
         private LoaderSideVacuumAndLevelCheckRoutineRoutine _vacuumAndLevelCheckRoutineRoutine;
         private LoaderSideVacuumLevelCheckRoutine _vacuumLevelCheckRoutine;
-        private LoaderSideDoorLockRoutine _doorLockRoutine;
         private LoaderSideWhBladderRoutine _whBladderRoutine;
-        private LoaderSideTransHighRoutine _transHighPressureRoutine;
 
         #endregion
         /// <summary>
@@ -125,143 +110,87 @@ namespace CyberX8_RT.Devices.Loader
         /// <returns></returns>
         public RState Monitor()
         {
-            Runner.Run(LoadStep.CheckPreCondition,CheckPreCondition,_delay_1ms)
-                //1.0 WS Clamp On
-                .Run(LoadStep.WSClampOn, WaferHolderClampOn,_delay_1ms)
-                //1.1 WSSideClampOn
-                .Run(LoadStep.WSSideClampOn, () => { return _waferHolderSideClampRoutine.Start(true) == RState.Running; },_delay_1ms)
-                .WaitWithStopCondition(LoadStep.WSSideClampOnCheck, () => { return CommonFunction.CheckRoutineEndState(_waferHolderSideClampRoutine); }, 
-                    () => CheckRoutineStopStatus(_waferHolderSideClampRoutine,"WaferHolder Side Clamp on failed"))
-                //1.2 BernoulliBladderOn
-                .Run(LoadStep.BernoulliBladderOn, () => { return _bernoulliBladderRoutine.Start(true) == RState.Running; },_delay_1ms)
-                .WaitWithStopCondition(LoadStep.BernoulliBladderOnCheck, () => { return CommonFunction.CheckRoutineEndState(_bernoulliBladderRoutine); }, 
-                    () => CheckRoutineStopStatus(_bernoulliBladderRoutine, "BernoulliBladder On failed"))
-                //1.3 TranslateBladderOff
-                .Run(LoadStep.TranslateBladderOff, () => { return _transBladderRoutine.Start(false) == RState.Running; },_delay_1ms)
-                .WaitWithStopCondition(LoadStep.TranslateBladderOffCheck, () => { return CommonFunction.CheckRoutineEndState(_transBladderRoutine); }, 
-                    () => CheckRoutineStopStatus(_transBladderRoutine,"TransBladder Off failed"))
-                //1.4 CRS Goto Unlock
-                .Run(LoadStep.CRSGotoUnlock, () => { return AxisPosition(_crsAxis,"Unlock"); }, NullFun, _delay_1ms)
-                .WaitWithStopCondition(LoadStep.CRSGotoUnlockWait, () => { return _crsAxis.Status == RState.End; }, 
-                    ()=>CheckAxisMotionStopStatus(_crsAxis))
-                //1.5 BernoulliN2 On
-                .Run(LoadStep.BernoulliN2On, () => { return _bernoulliN2PressureRoutine.Start(true)==RState.Running; },_delay_1ms)
-                .WaitWithStopCondition(LoadStep.BernoulliN2OnCheck, () => { return CommonFunction.CheckRoutineEndState(_bernoulliN2PressureRoutine); }, 
+            Runner.Run(LoadStep.CheckPreCondition, CheckPreCondition, _delay_1ms)
+                //1 WSClamp On
+                .Run(LoadStep.WSClampOn, WaferHolderClampOn, _delay_1ms)
+                //2 BernoulliN2 On
+                .Run(LoadStep.BernoulliN2On, () => { return _bernoulliN2PressureRoutine.Start(true) == RState.Running; }, _delay_1ms)
+                .WaitWithStopCondition(LoadStep.BernoulliN2OnCheck, () => { return CommonFunction.CheckRoutineEndState(_bernoulliN2PressureRoutine); },
                     () => CheckRoutineStopStatus(_bernoulliN2PressureRoutine, "BernoulliN2 On failed"))
-                //1.6 Bernoulli Bladder Off
+                //3 Bernoulli Bladder Off
                 .Run(LoadStep.BernoulliBladderOff, () => { return _bernoulliBladderRoutine.Start(false) == RState.Running; }, _delay_1ms)
-                .WaitWithStopCondition(LoadStep.BernoulliBladderOffCheck, () => { return CommonFunction.CheckRoutineEndState(_bernoulliBladderRoutine); }, 
+                .WaitWithStopCondition(LoadStep.BernoulliBladderOffCheck, () => { return CommonFunction.CheckRoutineEndState(_bernoulliBladderRoutine); },
                     () => CheckRoutineStopStatus(_bernoulliBladderRoutine, "BernoulliBladder Off failed"))
-                //1.7 Tilt Goto Float
-                .Run(LoadStep.TiltGotoFloat, () => { return AxisPosition(_tiltAxis,"FLOAT"); }, NullFun, _delay_1ms)
-                .WaitWithStopCondition(LoadStep.TiltGotoFloatWait, () => { return _tiltAxis.Status == RState.End; }, 
-                    () => CheckAxisMotionStopStatus(_tiltAxis))
-                //1.8 Re Bernoulli Bladder On
-                .Run(LoadStep.ReBernoulliBladderOn, () => { return _bernoulliBladderRoutine.Start(true) == RState.Running; }, _delay_1ms)
-                .WaitWithStopCondition(LoadStep.ReBernoulliBladderOnCheck, () => { return CommonFunction.CheckRoutineEndState(_bernoulliBladderRoutine); }, 
-                    () =>  CheckRoutineStopStatus(_bernoulliBladderRoutine, "ReBernoulliBladder On failed"))
-                //1.9 Tilt Goto Vertical
-                .Run(LoadStep.TiltGotoVertical, () => { return AxisPosition(_tiltAxis,"VERT"); }, NullFun, _delay_1ms)
-                .WaitWithStopCondition(LoadStep.TiltGotoVerticalWait, () => { return _tiltAxis.Status == RState.End; }, 
+                //4 Tilt Goto Float
+                .Run(LoadStep.TiltGotoFloat, () => { return AxisPosition(_tiltAxis, "FLOAT"); }, NullFun, _delay_1ms)
+                .WaitWithStopCondition(LoadStep.TiltGotoFloatWait, () => { return _tiltAxis.Status == RState.End; },
                     () => CheckAxisMotionStopStatus(_tiltAxis))
-                //2.0 CRS Vacuum Check
+                //5 等待0.5秒
+                .Delay(LoadStep.Wait1, 500)
+                //6 BernoulliBladder On
+                .Run(LoadStep.BernoulliBladderOn, () => { return _bernoulliBladderRoutine.Start(true) == RState.Running; }, _delay_1ms)
+                .WaitWithStopCondition(LoadStep.BernoulliBladderOnCheck, () => { return CommonFunction.CheckRoutineEndState(_bernoulliBladderRoutine); },
+                    () => CheckRoutineStopStatus(_bernoulliBladderRoutine, "BernoulliBladder On failed"))
+                //7 CRS Vacuum Check
                 .Run(LoadStep.CRSVacuumValue, () => { return _vacuumLevelCheckRoutine.Start(true) == RState.Running; }, _delay_1ms)
-                .WaitWithStopCondition(LoadStep.CRSVacuumValueCheck, () => { return CommonFunction.CheckRoutineEndState(_vacuumLevelCheckRoutine); }, 
+                .WaitWithStopCondition(LoadStep.CRSVacuumValueCheck, () => { return CommonFunction.CheckRoutineEndState(_vacuumLevelCheckRoutine); },
                     () => CheckRoutineStopStatus(_vacuumLevelCheckRoutine, "CRS Vacuum Check failed"))
-                //2.1 Shuttle Goto CLOSED
-                .Run(LoadStep.ShuttleGotoClose, () => { return AxisPosition(_shuttleAxis,"CLOSED"); }, NullFun, _delay_1ms)
-                .WaitWithStopCondition(LoadStep.ShuttleGotoCloseWait, () => { return _shuttleAxis.Status == RState.End; }, 
+                //8 Tilt Goto Vertical
+                .Run(LoadStep.TiltGotoVertical, () => { return AxisPosition(_tiltAxis, "VERT"); }, NullFun, _delay_1ms)
+                .WaitWithStopCondition(LoadStep.TiltGotoVerticalWait, () => { return _tiltAxis.Status == RState.End; },
+                    () => CheckAxisMotionStopStatus(_tiltAxis))
+                //9 CRS Goto Unlock
+                .Run(LoadStep.CRSGotoUnlock, () => { return AxisPosition(_crsAxis, $"Unlock{_waferSize}"); }, NullFun, _delay_1ms)
+                .WaitWithStopCondition(LoadStep.CRSGotoUnlockWait, () => { return _crsAxis.Status == RState.End; },
+                    () => CheckAxisMotionStopStatus(_crsAxis))
+                //10 Shuttle Goto CRS
+                .Run(LoadStep.ShuttleGotoCRS, () => { return AxisPosition(_shuttleAxis, "LS"); }, NullFun, _delay_1ms)
+                .WaitWithStopCondition(LoadStep.ShuttleGotoCRSWait, () => { return _shuttleAxis.Status == RState.End; },
                     () => CheckAxisMotionStopStatus(_shuttleAxis))
-                //2.2 Re CRS Vacuum Check
-                .Run(LoadStep.ReCRSVacuumValue, () => { return _vacuumLevelCheckRoutine.Start(true) == RState.Running; }, _delay_1ms)
-                .WaitWithStopCondition(LoadStep.ReCRSVacuumValueCheck, () => { return CommonFunction.CheckRoutineEndState(_vacuumLevelCheckRoutine); }, 
-                    () => CheckRoutineStopStatus(_vacuumLevelCheckRoutine, "Re CRS Vacuum Check failed"))
-                //2.3 Dor Lock On
-                .Run(LoadStep.DoorLockOn, () => { return _doorLockRoutine.Start(true) == RState.Running; }, _delay_1ms)
-                .WaitWithStopCondition(LoadStep.DoorLockOnCheck, () => { return CommonFunction.CheckRoutineEndState(_doorLockRoutine); }, 
-                    () => CheckRoutineStopStatus(_doorLockRoutine,"Door lock failed"))
-                //2.4 WS Bladder On
+                //11 WS Bladder On
                 .Run(LoadStep.WSBladderOn, () => { return _whBladderRoutine.Start(true) == RState.Running; }, _delay_1ms)
-                .WaitWithStopCondition(LoadStep.WSBladderOnCheck, () => { return CommonFunction.CheckRoutineEndState(_whBladderRoutine); }, 
-                    () => CheckRoutineStopStatus(_whBladderRoutine,"WSBladder On failed"))
-                //2.5 Trans Bladder On
-                .Run(LoadStep.TransBladderOn, () => { return _transBladderRoutine.Start(true) == RState.Running; }, _delay_1ms)
-                .WaitWithStopCondition(LoadStep.TransBladderOnCheck, () => { return CommonFunction.CheckRoutineEndState(_transBladderRoutine); }, 
-                    () => CheckRoutineStopStatus(_transBladderRoutine,"TransBladder On failed"))
-                //2.5 Trans High Off
-                .Run(LoadStep.TransHighOff, () => { return _transHighPressureRoutine.Start(false) == RState.Running; }, _delay_1ms)
-                .WaitWithStopCondition(LoadStep.TransHighOffCheck, () => { return CommonFunction.CheckRoutineEndState(_transHighPressureRoutine); }, 
-                    () => CheckRoutineStopStatus(_transHighPressureRoutine, "Trans High Off failed"))
-                //2.6 CRS Goto SetUp
-                .Run(LoadStep.CRSGotoSetUp, () => { return AxisPosition(_crsAxis,"Setup"); }, NullFun, _delay_1ms)
-                .WaitWithStopCondition(LoadStep.CRSGotoSetUpWait, () => { return _crsAxis.Status == RState.End; }, 
+                .WaitWithStopCondition(LoadStep.WSBladderOnCheck, () => { return CommonFunction.CheckRoutineEndState(_whBladderRoutine); },
+                    () => CheckRoutineStopStatus(_whBladderRoutine, "WSBladder On failed"))
+                //12 CRS Goto SetUp
+                .Run(LoadStep.CRSGotoSetUp, () => { return AxisPosition(_crsAxis, $"Setup{_waferSize}"); }, NullFun, _delay_1ms)
+                .WaitWithStopCondition(LoadStep.CRSGotoSetUpWait, () => { return _crsAxis.Status == RState.End; },
                     () => CheckAxisMotionStopStatus(_crsAxis))
-                //2.7 CRS Goto Lock
-                .Run(LoadStep.CRSGotoLock, () => { return AxisPosition(_crsAxis,"Lock"); }, NullFun, _delay_1ms)
-                .WaitWithStopCondition(LoadStep.CRSGotoLockWait, () => { return _crsAxis.Status == RState.End; }, 
+                //13 CRS Goto Lock
+                .Run(LoadStep.CRSGotoLock, () => { return AxisPosition(_crsAxis, $"Lock{_waferSize}"); }, NullFun, _delay_1ms)
+                .WaitWithStopCondition(LoadStep.CRSGotoLockWait, () => { return _crsAxis.Status == RState.End; },
                     () => CheckAxisMotionStopStatus(_crsAxis))
-                //2.8 Bernoulli N2 Off
+                //14 Bernoulli N2 Off
                 .Run(LoadStep.BernoulliN2Off, () => { return _bernoulliN2PressureRoutine.Start(false) == RState.Running; }, _delay_1ms)
-                .WaitWithStopCondition(LoadStep.BernoulliN2OffCheck, () => { return CommonFunction.CheckRoutineEndState(_bernoulliN2PressureRoutine); }, 
+                .WaitWithStopCondition(LoadStep.BernoulliN2OffCheck, () => { return CommonFunction.CheckRoutineEndState(_bernoulliN2PressureRoutine); },
                     () => CheckRoutineStopStatus(_bernoulliN2PressureRoutine, "Bernoulli N2 Off failed"))
-                //2.9 WS Bladder Off
+                //15 WS Bladder Off
                 .Run(LoadStep.WSBladderOff, () => { return _whBladderRoutine.Start(false) == RState.Running; }, _delay_1ms)
-                .WaitWithStopCondition(LoadStep.WSBladderOffCheck, () => { return CommonFunction.CheckRoutineEndState(_whBladderRoutine); }, 
+                .WaitWithStopCondition(LoadStep.WSBladderOffCheck, () => { return CommonFunction.CheckRoutineEndState(_whBladderRoutine); },
                     () => CheckRoutineStopStatus(_whBladderRoutine, "WS Bladder Off failed"))
-                //3.0 CRS Release Delay
-                .Delay(LoadStep.CRSReleaseDelay,_crsVacuumReleaseDelayInMilliseconds)
-                //3.1 CRS Vacuum Off
+                //16 等待0.5秒
+                .Delay(LoadStep.Wait2, 500)
+                //17 CRS Vacuum Off
                 .Run(LoadStep.CRSVacuumOff, () => { return _vacuumAndLevelCheckRoutineRoutine.Start(false) == RState.Running; }, _delay_1ms)
-                .WaitWithStopCondition(LoadStep.CRSVacuumOffCheck, () => { return CommonFunction.CheckRoutineEndState(_vacuumAndLevelCheckRoutineRoutine); }, 
+                .WaitWithStopCondition(LoadStep.CRSVacuumOffCheck, () => { return CommonFunction.CheckRoutineEndState(_vacuumAndLevelCheckRoutineRoutine); },
                     () => CheckRoutineStopStatus(_vacuumAndLevelCheckRoutineRoutine, "LS Vacuum Off failed"))
-                //3.2 Translate Bladder Release Delay
-                .Delay(LoadStep.TranslateBladderReleaseDelay,_translateOutDelayInMilliseconds)
-                //3.3 Trans Bladder Off
-                .Run(LoadStep.ReTranslateBladderOff, () => { return _transBladderRoutine.Start(false) == RState.Running; }, _delay_1ms)
-                .WaitWithStopCondition(LoadStep.ReTranslateBladderOffCheck, () => { return CommonFunction.CheckRoutineEndState(_transBladderRoutine); }, 
-                    () => CheckRoutineStopStatus(_transBladderRoutine, "Trans Bladder Off failed"))
-                //3.3 Trans High Off
-                .Run(LoadStep.TranslateHighPresOff, () => { return _transHighPressureRoutine.Start(false) == RState.Running; }, _delay_1ms)
-                .WaitWithStopCondition(LoadStep.TranslateHighPresOffCheck, () => { return CommonFunction.CheckRoutineEndState(_transHighPressureRoutine); },
-                    () => CheckRoutineStopStatus(_transHighPressureRoutine, "Trans High Off failed"))
-                //3.4 Home CRS Axis
-                .Run(LoadStep.HomingCRSAxis, CRSHome,_delay_1ms)
-                .WaitWithStopCondition(LoadStep.HomingCRSAxisWait, () => { return _crsAxis.Status == RState.End; }, 
+                //18 等待0.5秒
+                .Delay(LoadStep.Wait3, 500)
+                //19 Shuttle Goto Mid
+                .Run(LoadStep.ShuttleGotoMID, () => { return AxisPosition(_shuttleAxis, "MID"); }, NullFun, _delay_1ms)
+                .WaitWithStopCondition(LoadStep.ShuttleGotoMIDWait, () => { return _shuttleAxis.Status == RState.End; },
+                    () => CheckAxisMotionStopStatus(_shuttleAxis))
+                //20 Home CRS Axis
+                .Run(LoadStep.HomingCRSAxis, CRSHome, _delay_1ms)
+                .WaitWithStopCondition(LoadStep.HomingCRSAxisWait, () => { return _crsAxis.Status == RState.End; },
                     () => CheckCRSHomeStopStatus())
-                .Run(LoadStep.CRSHomedGotoSetUp, () => { return AxisPosition(_crsAxis,"Setup"); }, _delay_1ms)
-                .WaitWithStopCondition(LoadStep.CRSHomedGotoSetUpCheck, () => { return _crsAxis.Status == RState.End; }, 
-                    ()=>CheckAxisMotionStopStatus(_crsAxis))
-                .End(LoadStep.End,UpdateWaferHolderLipCRSUsed);
+                .Run(LoadStep.CRSHomedGotoSetUp, () => { return AxisPosition(_crsAxis, $"Setup{_waferSize}"); }, _delay_1ms)
+                .WaitWithStopCondition(LoadStep.CRSHomedGotoSetUpCheck, () => { return _crsAxis.Status == RState.End; },
+                    () => CheckAxisMotionStopStatus(_crsAxis))
+                .End(LoadStep.End, UpdateWaferHolderLipCRSUsed);
 
             return Runner.Status; 
         }
         /// <summary>
-        /// Wafer Holder Clamp On
-        /// </summary>
-        /// <returns></returns>
-        private bool WaferHolderClampOn()
-        {
-            bool result = _loaderCommonDevice.WaferHolderClampOnAction();
-            if (!result)
-            {
-                NotifyError(eEvent.ERR_LOADER, "Wafer Shuttle Clamp on faied", 0);
-            }
-            return result;
-        }
-        /// <summary>
-        /// 检验WSSideClampOn异常状态
-        /// </summary>
-        /// <returns></returns>
-        private bool CheckWSSideClampOnStopStatus()
-        {
-            bool result = CommonFunction.CheckRoutineStopState(_waferHolderSideClampRoutine);
-            if (result)
-            {
-                NotifyError(eEvent.ERR_LOADER, "WS Clamp On failed", 0);
-            }
-            return result;
-        }
-        /// <summary>
         /// 检验TranslateBladderOff异常状态
         /// </summary>
         /// <returns></returns>
@@ -336,20 +265,19 @@ namespace CyberX8_RT.Devices.Loader
         /// <returns></returns>
         public RState Start(params object[] objs)
         {
+            if (SC.ContainsItem($"Loader1.{_side}WaferSize"))
+            {
+                _waferSize = SC.GetValue<int>($"Loader1.{_side}WaferSize");
+            }
             _crsAxis = GetCrsAxis();
             _tiltAxis = GetTiltAxis();
             _shuttleAxis= GetShuttleAxis();
             _loaderCommonDevice = DEVICE.GetDevice<LoaderCommonDevice>($"Loader1.Common");
             _rotationAxis = DEVICE.GetDevice<JetAxisBase>($"{ModuleName.Loader1}.Rotation");
             _sideDevice = DEVICE.GetDevice<LoaderSideDevice>($"{Module}.{_side}");
-
-            _waferHolderSideClampRoutine = new LoaderCommonWaferHolderSideClampRoutine(ModuleName.Loader1.ToString());
             _vacuumLevelCheckRoutine = new LoaderSideVacuumLevelCheckRoutine($"{Module}.{_side}");
-            _doorLockRoutine = new LoaderSideDoorLockRoutine($"{Module}.{_side}");
             _whBladderRoutine = new LoaderSideWhBladderRoutine($"{Module}.{_side}");
-            _transHighPressureRoutine = new LoaderSideTransHighRoutine($"{Module}.{_side}");
             _bernoulliBladderRoutine = new LoaderSideBernoulliBladderRoutine($"{Module}.{_side}");
-            _transBladderRoutine = new LoaderSideTransBladderRoutine($"{Module}.{_side}");
             _bernoulliN2PressureRoutine = new LoaderSideBernoulliN2PressureRoutine($"{Module}.{_side}");
             _vacuumAndLevelCheckRoutineRoutine = new LoaderSideVacuumAndLevelCheckRoutineRoutine($"{Module}.{_side}");
 
@@ -420,12 +348,10 @@ namespace CyberX8_RT.Devices.Loader
             {
                 return false;
             }
-
             if(!StatusCheck())
             {
                 return false;
             }
-
             if(!CRSVacuumCheck())
             {
                 return false;
@@ -449,13 +375,12 @@ namespace CyberX8_RT.Devices.Loader
                     return false;
                 }
             }
-            if (ModuleHelper.IsInstalled(ModuleName.PUF2))
+            if (ModuleHelper.IsInstalled(ModuleName.Loader1))
             {
-                PUFEntity puf2Entity = Singleton<RouteManager>.Instance.GetModule<PUFEntity>(ModuleName.PUF2.ToString());
-
-                if (!puf2Entity.IsHomed)
+                LoaderEntity loaderEntity = Singleton<RouteManager>.Instance.GetModule<LoaderEntity>(ModuleName.Loader1.ToString());
+                if (!loaderEntity.IsHomed)
                 {
-                    NotifyError(eEvent.ERR_LOADER, "PUF2 is not homed",-1);
+                    NotifyError(eEvent.ERR_LOADER, "Loader is not homed", -1);
                     return false;
                 }
             }
@@ -468,11 +393,12 @@ namespace CyberX8_RT.Devices.Loader
                     return false;
                 }
             }
+
             return true;
         }
 
         /// <summary>
-        /// 检验Axis我们的
+        /// 检验Axis位置
         /// </summary>
         /// <param name="side"></param>
         /// <returns></returns>
@@ -498,36 +424,45 @@ namespace CyberX8_RT.Devices.Loader
                 NotifyError(eEvent.ERR_LOADER,  $"{_crsAxis.Name} is not homed",-1);
                 return false;
             }
-            double rotationPosition = _rotationAxis.MotionData.MotorPosition;
-            if (!_rotationAxis.CheckPositionIsInStation(rotationPosition, "LOADA") &&
-                !_rotationAxis.CheckPositionIsInStation(rotationPosition, "SERVICEB"))
+            double rotationPosition = _rotationAxis.MotionData.MotorPosition; //校验rotation是否再load位置
+            if (!_rotationAxis.CheckPositionIsInStation(rotationPosition, $"LOAD{_side.Substring(_side.Length- 1)}{_waferSize}"))
             {
-                NotifyError(eEvent.ERR_LOADER,  $"rotation {rotationPosition} not in LOADA and SERVICEB", -1);
+                NotifyError(eEvent.ERR_LOADER,  $"rotation {rotationPosition} not in LOAD{_side.Substring(_side.Length - 1)}{_waferSize}", -1);
                 return false;
             }
-            double shuttlePosition=_shuttleAxis.MotionData.MotorPosition;
-            if (!_shuttleAxis.CheckPositionIsInStation(shuttlePosition, "OPEN") &&
-                !_shuttleAxis.CheckPositionIsInStation(shuttlePosition, "OPENB"))
+            double shuttlePosition=_shuttleAxis.MotionData.MotorPosition;//校验shuttle位置是否再out位置
+            if (!_shuttleAxis.CheckPositionIsInStation(shuttlePosition, $"OUT{_waferSize}"))
             {
-                NotifyError(eEvent.ERR_LOADER,  $"shuttle {shuttlePosition} not in OPEN and OPENB",-1);
+                NotifyError(eEvent.ERR_LOADER,  $"shuttle {shuttlePosition} not in $OUT{_waferSize}",-1);
                 return false;
             }
-
-            double tiltPosition = _tiltAxis.MotionData.MotorPosition;
+            double tiltPosition = _tiltAxis.MotionData.MotorPosition;//校验tilt是否在hori位置
             if (!_tiltAxis.CheckPositionIsInStation(tiltPosition, "HORI"))
             {
                 NotifyError(eEvent.ERR_LOADER,  $"tilt {tiltPosition} not in HORI", -1);
                 return false;
             }
-            double crsPosition=_crsAxis.MotionData.MotorPosition;
-            if (_crsAxis.CheckPositionIsEmpty(crsPosition))
+            double crsPosition=_crsAxis.MotionData.MotorPosition;//校验crs是否在setup位置
+            if (_crsAxis.CheckPositionIsInStation(tiltPosition, $"Setup{_waferSize}"))
             {
-                NotifyError(eEvent.ERR_LOADER,  $"crs {crsPosition} not at station",-1);
+                NotifyError(eEvent.ERR_LOADER,  $"crs {crsPosition} not at Setup{_waferSize}",-1);
                 return false;
             }
             return true;
         }
-
+        /// <summary>
+        /// Wafer Holder Clamp On
+        /// </summary>
+        /// <returns></returns>
+        private bool WaferHolderClampOn()
+        {
+            bool result = _loaderCommonDevice.WaferHolderClampOnAction();
+            if (!result)
+            {
+                NotifyError(eEvent.ERR_LOADER, "Wafer Shuttle Clamp on faied", 0);
+            }
+            return result;
+        }
         /// <summary>
         /// Status Check
         /// </summary>
@@ -535,19 +470,10 @@ namespace CyberX8_RT.Devices.Loader
         /// <returns></returns>
         private bool StatusCheck()
         {
-            //Facility:CDA,N2,Vaccum均Enable且在正常范围
-
-            //Side WaferPresent
-            LoaderSideData sideData = _sideDevice.SideData;
-            bool isSimulator = SC.GetValue<bool>("System.IsSimulatorMode");
-            if (!sideData.WaferPresent&&!isSimulator)
-            {
-                NotifyError(eEvent.ERR_LOADER,  "side wafer not present", -1);
-                return false;
-            }
-            if (sideData.DoorUpperLocked || sideData.DoorLowerLocked)
+            //判断是否放置wafershuttle
+            if (!_loaderCommonDevice.CommonData.WaferHolderPresent)
             {
-                NotifyError(eEvent.ERR_LOADER,  "Door Lock is not off", -1);
+                NotifyError(eEvent.ERR_LOADER, "There is no wafer shuttle, can not do load", -1);
                 return false;
             }
             return true;
@@ -560,14 +486,32 @@ namespace CyberX8_RT.Devices.Loader
         /// <returns></returns>
         private bool CRSVacuumCheck()
         {
-            //CRS Vacuum检验
             LoaderSideData sideData = _sideDevice.SideData;
+            LoaderCommonData commonData = _loaderCommonDevice.CommonData;
+            //Bernoulli Bladder
+            if (!sideData.BernoulliBladder)
+            {
+                NotifyError(eEvent.ERR_LOADER, "BernoulliBladder is off", -1);
+                return false;
+            }
+            if (sideData.BernoulliExtended)
+            {
+                NotifyError(eEvent.ERR_LOADER, "Bernoulli is Extended", -1);
+                return false;
+            }
+            //Bernoulli N2
+            if (sideData.BernoulliN2)
+            {
+                NotifyError(eEvent.ERR_LOADER, "Bernoulli N2 is On", -1);
+                return false;
+            }
+            //CRS Vacuum检验
             if (!sideData.CRSVacuum)
             {
                 NotifyError(eEvent.ERR_LOADER,  "LS Vacuum is off",-1);
                 return false;
             }
-            if (SC.ContainsItem($"{Module}.LSVacuumHighLimit"))
+            if (SC.ContainsItem($"{Module}.LSVacuumHighLimit"))  //真空值要大于最小设定值
             {
                 double crsVacuumHighLimit = SC.GetValue<double>($"{Module}.LSVacuumHighLimit");
                 if (sideData.CRSVacuumValue >= crsVacuumHighLimit || sideData.CRSVacuumValue >= 0)
@@ -576,20 +520,23 @@ namespace CyberX8_RT.Devices.Loader
                     return false;
                 }
             }
-            //WS Bladder,WS Bladder Pressure压力应该大于设定值WSBladderPressure
-            if (!sideData.WHBladder)
+            //WS Clamp
+            if (!commonData.WaferHolderClamp)
             {
-                NotifyError(eEvent.ERR_LOADER,  "WS Bladder is off",-1);
+                NotifyError(eEvent.ERR_LOADER, "Wafer Shuttle Clamp is off", -1);
                 return false;
             }
-            if (SC.ContainsItem($"{Module}.WSBladderPressure"))
+            //WS Bladder
+            if (sideData.WHBladder)
             {
-                double wsBladderPressure = SC.GetValue<double>($"{Module}.WSBladderPressure");
-                if (sideData.WHBladderPressure <= wsBladderPressure)
-                {
-                    NotifyError(eEvent.ERR_LOADER,  $"WS Bladder Pressure value should be more than {wsBladderPressure}", -1);
-                    return false;
-                }
+                NotifyError(eEvent.ERR_LOADER, "WS Bladder is on", -1);
+                return false;
+            }
+            //Drip Tray Fluid
+            if (commonData.DripTrayFluid)
+            {
+                NotifyError(eEvent.ERR_LOADER, "Drip Tray Fluid is on", -1);
+                return false;
             }
 
             //Translate Bladder/High Pres,且Sensor处于Retracted
@@ -608,46 +555,12 @@ namespace CyberX8_RT.Devices.Loader
                 NotifyError(eEvent.ERR_LOADER,  "Translate Retracted is off",-1);
                 return false;
             }
-            //Bernoulli Bladder
-            if (!sideData.BernoulliBladder)
-            {
-                NotifyError(eEvent.ERR_LOADER,  "BernoulliBladder is off", -1);
-                return false;
-            }
-            if (sideData.BernoulliExtended)
-            {
-                NotifyError(eEvent.ERR_LOADER,  "Bernoulli is Extended",-1);
-                return false;
-            }
-            //Bernoulli N2
-            if (sideData.BernoulliN2)
-            {
-                double minBernoulliN2Pressure = SC.GetValue<double>($"{Module}.MinBernoulliN2Pressure");
-                if (sideData.BernoulliPressure <= minBernoulliN2Pressure)
-                {
-                    NotifyError(eEvent.ERR_LOADER,  "Bernoulli N2 is On,but N2 Pressure is less min setting parameter", -1);
-                    return false;
-                }
-            }
             //Wafer Shuttle Present
-            LoaderCommonData commonData = _loaderCommonDevice.CommonData;
             if (!commonData.WaferHolderPresent)
             {
                 NotifyError(eEvent.ERR_LOADER,  "Wafer Shuttle is absent",-1);
                 return false;
             }
-            //WS Clamp
-            if (!commonData.WaferHolderClamp)
-            {
-                NotifyError(eEvent.ERR_LOADER,  "Wafer Shuttle Clamp is off", -1);
-                return false;
-            }
-            //Drip Tray Fluid
-            if (commonData.DripTrayFluid)
-            {
-                NotifyError(eEvent.ERR_LOADER,  "Drip Tray Fluid is on",-1);
-                return false;
-            }
             return true;
         }
         /// <summary>

+ 4 - 2
CyberX8_RT/Devices/Loader/LoaderTiltAxisInterLock.cs

@@ -11,6 +11,7 @@ using System.Threading.Tasks;
 using MECF.Framework.Common.Equipment;
 using Aitex.Core.Util;
 using CyberX8_RT.Modules;
+using Aitex.Core.RT.SCCore;
 
 namespace CyberX8_RT.Devices.Loader
 {
@@ -106,7 +107,7 @@ namespace CyberX8_RT.Devices.Loader
                         return false;
                     }
                     shuttleAxisPosition = shuttleAxis.MotionData.MotorPosition;
-                    if (!shuttleAxis.CheckPositionIsInStation(shuttleAxisPosition, $"OUT{shuttleAxis.WaferSize.ToString()}"))
+                    if (!shuttleAxis.CheckPositionIsInStation(shuttleAxisPosition, $"OUT{SC.GetValue<int>("Loader1.SideAWaferSize")}"))
                     {
                         LOG.WriteLog(eEvent.ERR_LOADER, Module, $"{Module}.ShuttleA is not in out station,  Cannot execute GotoSavedPosition");
                         return false;
@@ -122,6 +123,7 @@ namespace CyberX8_RT.Devices.Loader
             else
             {
                 shuttleAxis = DEVICE.GetDevice<JetAxisBase>($"{Module}.ShuttleB");
+                shuttleAxis.WaferSize = SC.GetValue<int>("Loader1.SideBWaferSize");
                 if (shuttleAxis != null)
                 {
                     if (shuttleAxis.IsRun) //shuttle正在运动返回false
@@ -130,7 +132,7 @@ namespace CyberX8_RT.Devices.Loader
                         return false;
                     }
                     shuttleAxisPosition = shuttleAxis.MotionData.MotorPosition;
-                    if (!shuttleAxis.CheckPositionIsInStation(shuttleAxisPosition, $"OUT{shuttleAxis.WaferSize.ToString()}"))
+                    if (!shuttleAxis.CheckPositionIsInStation(shuttleAxisPosition, $"OUT{SC.GetValue<int>("Loader1.SideBWaferSize")}"))
                     {
                         LOG.WriteLog(eEvent.ERR_LOADER, Module, $"{Module}.ShuttleB is not in out station,  Cannot execute GotoSavedPosition");
                         return false;

+ 1 - 1
CyberX8_Simulator/Config/UILayout.xml

@@ -8,8 +8,8 @@
   </Navigation>
 
 	<Navigation Id="Wago" Name="Wago" >
-		<SubView Id="Wago1" Name="Wago1" ViewClass="CyberX8_Simulator.Views.WagoView" Assembly="CyberX8_Simulator" Port ="550"/>
 		<SubView Id="Wago0" Name="Wago0" ViewClass="CyberX8_Simulator.Views.WagoView" Assembly="CyberX8_Simulator" Port ="501"/>
+		<SubView Id="Wago1" Name="Wago1" ViewClass="CyberX8_Simulator.Views.WagoView" Assembly="CyberX8_Simulator" Port ="550"/>
 	</Navigation>
 	
 	<Navigation Id="Power" Name="Power" >		

+ 32 - 2
CyberX8_Simulator/Devices/WagoSocketSimulator.cs

@@ -18,6 +18,11 @@ namespace CyberX8_Simulator.Devices
         private IByteTransform byteTransform = new BigEndianByteTransformBase();
 
         private byte[] DOBytes = new byte[100];
+        //键是名字,值是对应DoByte所在的位置
+        private Dictionary<string,int> DONameIndexDic = new Dictionary<string, int>
+        {{"DO0",0 },{"c_LoaderA_LS_Vacuum",1} };
+        private Dictionary<string, int> DINameIndexDic = new Dictionary<string, int>
+        {{"DI0",0 },{"DI1",1} };
 
         private short[] AOShorts = new short[50];
 
@@ -45,8 +50,33 @@ namespace CyberX8_Simulator.Devices
         {
             AIShorts[3] = 0x1388;
             DIBytes[2] = 0x01;
-        }
-
+        }
+
+        #region 公共方法
+        public void UpdataDOBytes(string name,int value)
+        {
+            if (DONameIndexDic.ContainsKey(name))
+            {
+                DOBytes[DONameIndexDic[name]] = value == 0 ? (byte)0 : (byte)1; 
+            }
+        }
+        public void UpdataDIBytes(string name, int value)
+        {
+            if (DINameIndexDic.ContainsKey(name))
+            {
+                DIBytes[DONameIndexDic[name]] = value == 0 ? (byte)0 : (byte)1;
+            }
+        }
+        public void UpdataAOShorts(string name, int value)
+        {
+          
+        }
+        public void UpdataAIShorts(string name, int value)
+        {
+           
+        }
+        #endregion
+
         #region 功能方法
         /// <summary>
         /// 将长度为8的二进制byte数组转成对应十六进制byte值(大端模式)

+ 1 - 1
CyberX8_Simulator/Views/Simu_SunWayEfemView.xaml

@@ -30,7 +30,7 @@
             </StackPanel>
 
             <StackPanel Grid.Row="1" Orientation="Horizontal" Width="1300" Canvas.Top="50">
-                <Button Content="Place1" Margin="10,6,0,0" Width="100" Height="35"   Command="{Binding Place1Command}"  ></Button>
+                <Button Content="Place1" Margin="10,6,0,0" Width="100" Height="35"   Command="{Binding Place1Command}" ></Button>
                 <Button Content="Remove1" Margin="20,6,0,0" Width="100" Height="35"   Command="{Binding Remove1Command}"  ></Button>
                 <Button Content="Place2" Margin="20,6,0,0" Width="100" Height="35"   Command="{Binding Place2Command}"  ></Button>
                 <Button Content="Remove2" Margin="20,6,0,0" Width="100" Height="35"   Command="{Binding Remove2Command}"  ></Button>

+ 28 - 4
CyberX8_Simulator/Views/WagoView.xaml

@@ -10,19 +10,43 @@
     <Grid>
         <Grid.RowDefinitions>
             <RowDefinition Height="100"></RowDefinition>
-            <RowDefinition Height="50"></RowDefinition>
+            <RowDefinition Height="100"></RowDefinition>
             <RowDefinition />
             <RowDefinition Height="10"></RowDefinition>
         </Grid.RowDefinitions>
 
         <commons:SocketTitleView Grid.Row="0"></commons:SocketTitleView>
-
-        <Grid  Grid.Row="1">
+        <Canvas Grid.Row="1"  Width="1200">
             <StackPanel Orientation="Horizontal" Width="1200">
                 <Button Content="Clear Log" Width="100" Height="35"   Command="{Binding ClearLogCommand}"></Button>
             </StackPanel>
-        </Grid>
+            <StackPanel Orientation="Horizontal" Width="500" Height="50" Canvas.Left="120">
+                <Label Content="DO:" VerticalAlignment="Center"></Label>
+                <ComboBox  Width="250" Height="30" VerticalContentAlignment="Center" ItemsSource="{Binding DONameItems}" SelectedItem="{Binding DOSelectedItem}" />
+                <ComboBox  Width="60" Height="30" Margin="5,0,0,0" VerticalContentAlignment="Center" ItemsSource="{Binding DigitalInputSelected}" SelectedItem="{Binding DOInputValue}" HorizontalContentAlignment="Center"></ComboBox>
+                <Button Content="DOInput" Height="30" Width="100" Margin="5,10,0,0" Command="{Binding SetDOCommand}"/>
+            </StackPanel>
+            
+            <StackPanel Orientation="Horizontal" Width="500" Height="50" Canvas.Left="620">
+                <Label Content="DI:" VerticalAlignment="Center"></Label>
+                <ComboBox  Width="250" Height="30" VerticalContentAlignment="Center" ItemsSource="{Binding DINameItems}" SelectedItem="{Binding DISelectedItem}" />
+                <ComboBox  Width="60" Height="30" Margin="5,0,0,0" VerticalContentAlignment="Center" ItemsSource="{Binding DigitalInputSelected}" SelectedItem="{Binding DIInputValue}" HorizontalContentAlignment="Center"></ComboBox>
+                <Button Content="DIInput" Height="30" Width="100" Margin="5,10,0,0" Command="{Binding SetDICommand}"/>
+            </StackPanel>
+            <StackPanel Orientation="Horizontal" Width="500" Height="50" Canvas.Top="50" Canvas.Left="120">
+                <Label Content="AO:" VerticalAlignment="Center"></Label>
+                <ComboBox  Width="250" Height="30" VerticalContentAlignment="Center" ItemsSource="{Binding AONameItems}" SelectedItem="{Binding AOSelectedItem}" />
+                <TextBox Text="{Binding AOInputValue,Mode=OneWayToSource}" Width="60" Height="30" Margin="5,0,0,0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"></TextBox>
+                <Button Content="AoInput" Height="30" Width="100" Margin="5,10,0,0" Command="{Binding SetAOCommand}"/>
+            </StackPanel>
+            <StackPanel Orientation="Horizontal" Width="500" Height="50" Canvas.Top="50" Canvas.Left="620">
+                <Label Content="AI:" VerticalAlignment="Center"></Label>
+                <ComboBox  Width="250" Height="30" VerticalContentAlignment="Center" ItemsSource="{Binding AINameItems}" SelectedItem="{Binding AISelectedItem}" />
+                <TextBox Text="{Binding AIInputValue,Mode=OneWayToSource}" Width="60" Height="30" Margin="5,0,0,0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"></TextBox>
+                <Button Content="AIInput" Height="30" Width="100" Margin="5,10,0,0" Command="{Binding SetAICommand}"/>
+            </StackPanel>
 
+        </Canvas>
         <DataGrid Grid.Row="2" FontSize="16" AutoGenerateColumns="False" CanUserAddRows="False" CanUserResizeRows="False" CanUserSortColumns="False"
               ItemsSource="{Binding TransactionLogItems}"
                   Width="1200" VerticalAlignment="Top" MaxHeight="780">

+ 168 - 0
CyberX8_Simulator/Views/WagoView.xaml.cs

@@ -1,8 +1,11 @@
 using Aitex.Core.UI.MVVM;
+using Aitex.Core.Utilities;
 using CyberX8_Simulator.Devices;
 using MECF.Framework.Simulator.Core.Commons;
+using MECF.Framework.Simulator.Core.Driver;
 using System;
 using System.Collections.Generic;
+using System.Collections.ObjectModel;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
@@ -37,19 +40,184 @@ namespace CyberX8_Simulator.Views
 
     class WagoViewModel : SocketDeviceViewModel
     {
+
+        #region 属性
         public string Title
         {
             get { return "Wago Simulator"; }
         }
 
+        private string _DOSelectedItem;
+        [IgnorePropertyChange]
+        public string DOSelectedItem
+        {
+            get
+            {
+                return _DOSelectedItem;
+            }
+            set
+            {
+                _DOSelectedItem = value;
+            }
+        }
+        private int _DOInputValue;
+        [IgnorePropertyChange]
+        public int DOInputValue
+        {
+            get
+            {
+                return _DOInputValue;
+            }
+            set
+            {
+                _DOInputValue = value;
+            }
+        }
+
+        private string _DISelectedItem;
+        [IgnorePropertyChange]
+        public string DISelectedItem
+        {
+            get
+            {
+                return _DISelectedItem;
+            }
+            set
+            {
+                _DISelectedItem = value;
+            }
+        }
+        private int _DIInputValue;
+        [IgnorePropertyChange]
+        public int DIInputValue
+        {
+            get
+            {
+                return _DIInputValue;
+            }
+            set
+            {
+                _DIInputValue = value;
+            }
+        }
+
+        private string _AOSelectedItem;
+        [IgnorePropertyChange]
+        public string AOSelectedItem
+        {
+            get
+            {
+                return _AOSelectedItem;
+            }
+            set
+            {
+                _AOSelectedItem = value;
+            }
+        }
+        private short _AOInputValue;
+        [IgnorePropertyChange]
+        public short AOInputValue
+        {
+            get
+            {
+                return _AOInputValue;
+            }
+            set
+            {
+                _AOInputValue = value;
+            }
+        }
+
+        private string _AISelectedItem;
+        [IgnorePropertyChange]
+        public string AISelectedItem
+        {
+            get
+            {
+                return _AISelectedItem;
+            }
+            set
+            {
+                _AISelectedItem = value;
+            }
+        }
+        private short _AIInputValue;
+        [IgnorePropertyChange]
+        public short AIInputValue
+        {
+            get
+            {
+                return _AIInputValue;
+            }
+            set
+            {
+                _AIInputValue = value;
+            }
+        }
+        #endregion
+
+        public ObservableCollection<string> DONameItems { get; set; }
+        public ObservableCollection<string> DINameItems { get; set; }
+        public ObservableCollection<string> AONameItems { get; set; }
+        public ObservableCollection<string> AINameItems { get; set; }
+        public ObservableCollection<int> DigitalInputSelected { get; set; }
 
+        
+        
         private WagoSocketSimulator _sim;
+
+        public ICommand SetDICommand { get; set; }
+        public ICommand SetDOCommand { get; set; }
+        public ICommand SetAICommand { get; set; }
+        public ICommand SetAOCommand { get; set; }
+
         public WagoViewModel(string str) : base("WagoViewModel")
         {
+            InitData();
+            
+            SetDICommand = new DelegateCommand<object>(SetDIAction);
+            SetDOCommand = new DelegateCommand<object>(SetDOAction);
+            SetAICommand = new DelegateCommand<object>(SetAIAction);
+            SetAOCommand = new DelegateCommand<object>(SetAOAction);
+            
             int.TryParse(str, out int port);
             _sim = new WagoSocketSimulator(port);
             Init(_sim);
         }
+
+        private void SetDIAction(object obj)
+        {
+            _sim.UpdataDIBytes(DISelectedItem, DIInputValue);
+        }
+        private void SetDOAction(object obj)
+        {
+            _sim.UpdataDOBytes(DOSelectedItem, DOInputValue);
+        }
+        private void SetAIAction(object obj)
+        {
+            _sim.UpdataAIShorts(AISelectedItem, AIInputValue);
+        }
+        private void SetAOAction(object obj)
+        {
+            _sim.UpdataAOShorts(AISelectedItem, AIInputValue);
+        }
+
+        private void InitData()
+        {
+            DigitalInputSelected = new ObservableCollection<int> { 0, 1 };
+
+            DONameItems = new ObservableCollection<string>
+            { "DO1","DO2","DO3","c_LoaderA_LS_Vacuum","DO4","DO5","DO6","DO7","DO8"
+            ,"DO9","DO10","DO11","DO12","DO12","DO13","DO14","DO15","DO16","DO17","DO18",
+                "c_LOADERA_DOOR_UNLOCK","DO20","DO21"};
+            
+            DINameItems = new ObservableCollection<string>
+            { "r_Cassette_1_150","r_Cassette_1_100"};
+
+            AONameItems = new ObservableCollection<string> { "AO0", "AO1" };
+
+            AINameItems = new ObservableCollection<string> { "AI0", "AI1" };
+        }
     }
 
 }