Quellcode durchsuchen

add WaferTransfer for VenusSE && fix bug in VceControl as param is null && fix bug in Pick,Place as target slot is negative.

zhouhr vor 1 Jahr
Ursprung
Commit
1b999083c8

+ 1 - 0
Venus/Venus_Core/RtState.cs

@@ -41,6 +41,7 @@ namespace Venus_Core
         SETMCycle,
         SERunning,
         ReturnWafer,
+        SETransfer,
     }
 
     public enum PMState

+ 214 - 0
Venus/Venus_RT/Devices/SMIF/FortrendPLUS500.cs

@@ -0,0 +1,214 @@
+using Aitex.Core.RT.SCCore;
+using MECF.Framework.Common.Communications;
+using MECF.Framework.Common.Equipment;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.IO.Ports;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Venus_RT.Devices.SMIF
+{
+    
+    /// <summary>
+    /// Fortrend PLUS 500
+    /// Loader/Unloader
+    /// 执行标准 E84
+    /// </summary>
+    public class FortrendPLUS500
+    {
+        private readonly Dictionary<FunctionType, StreamType> SFPair = new Dictionary<FunctionType, StreamType>()
+        {
+            //s1
+            { FunctionType.Abort,StreamType.SMIFState},
+            { FunctionType.Online,StreamType.SMIFState},
+            { FunctionType.OnlineData,StreamType.SMIFState},
+            { FunctionType.Map,StreamType.SMIFState},
+            { FunctionType.MapData,StreamType.SMIFState},
+            { FunctionType.Status,StreamType.SMIFState},
+            { FunctionType.StatusData,StreamType.SMIFState},
+
+            //s2
+            { FunctionType.SetReport,StreamType.SMIFControl},
+            { FunctionType.SetReportACK,StreamType.SMIFControl},
+            { FunctionType.ResetORInit,StreamType.SMIFControl},
+            { FunctionType.ResetORInitACK,StreamType.SMIFControl},
+            { FunctionType.RemoteCommand,StreamType.SMIFControl},
+            { FunctionType.RemoteCommandData,StreamType.SMIFControl},
+            { FunctionType.CheckProto,StreamType.SMIFControl},
+            { FunctionType.CheckProtoData,StreamType.SMIFControl},
+
+            //s3
+            { FunctionType.AccessMode,StreamType.LP},
+            { FunctionType.AccessModeACK,StreamType.LP},
+
+            //s4
+            {FunctionType.ReadTag,StreamType.TAG},
+            {FunctionType.ReadTagData,StreamType.TAG},
+            {FunctionType.WriteTag,StreamType.TAG},
+            {FunctionType.WriteTagData,StreamType.TAG},
+
+            //s5
+            {FunctionType.AlarmData,StreamType.ALARM },
+            {FunctionType.AlarmACK,StreamType.ALARM },
+            {FunctionType.SetAlarm,StreamType.ALARM },
+            {FunctionType.SetAlarmACK,StreamType.ALARM },
+
+            //s6
+            {FunctionType.DataSend,StreamType.DVDATA},
+            {FunctionType.DataSendACK,StreamType.DVDATA},
+
+            //s9
+            {FunctionType.UnrecognizedDeviceID,StreamType.COMMANDERROR},
+            {FunctionType.UnrecognizedStream,StreamType.COMMANDERROR},
+            {FunctionType.UnrecognizedFunction,StreamType.COMMANDERROR},
+            {FunctionType.IllegalData,StreamType.COMMANDERROR},
+            
+        };
+
+        public enum FunctionType
+        {
+            Abort = 0,
+
+            Online = 1,
+            OnlineData = 2,
+            
+            Map = 3,
+            MapData = 4,
+            
+            Status = 5,
+            StatusData = 6,
+            
+            SetReport = 15,
+            SetReportACK = 16,
+
+            ResetORInit = 19,
+            ResetORInitACK = 20,
+
+            RemoteCommand = 21,
+            RemoteCommandData = 22,
+
+            CheckProto = 25,
+            CheckProtoData = 26,
+
+            AccessMode = 27,
+            AccessModeACK = 27,
+
+            ReadTag = 101,
+            ReadTagData = 102,
+
+            WriteTag = 103,
+            WriteTagData = 104,
+
+            AlarmData = 1,
+            AlarmACK = 2,
+
+            SetAlarm = 3,
+            SetAlarmACK = 4,
+
+            DataSend = 3,
+            DataSendACK = 4,
+
+            UnrecognizedDeviceID = 1,
+            UnrecognizedStream = 3,
+            UnrecognizedFunction = 5,
+            IllegalData = 7,
+        }
+
+        public enum StreamType
+        {
+             SMIFState = 1,
+             SMIFControl = 2,
+             LP = 3,
+             TAG = 4,
+             ALARM = 5,
+             DVDATA = 6,
+             COMMANDERROR = 9,
+             RFIDCOMMAND= 18,
+             SMARTTAG8400COMMAND = 100,
+        }
+
+
+        private AsyncSerialPort _serialport;
+        private string _portname;
+        //connect status
+        public bool IsConnected;        
+        //online status
+        public bool IsOnline;
+        //Load
+        public bool IsLoaded;
+        //Lock
+        public bool IsLocked;
+        //Error
+        public bool IsError;
+
+        /// <summary>
+        /// 构造函数
+        /// </summary>
+        /// <param name="DEVICEBelong">从属的设备 如VCE1 LP1</param>
+        public FortrendPLUS500(ModuleName DEVICEBelong)
+        {
+            _portname = SC.GetStringValue($"{DEVICEBelong}.SMIF.PortNumber");
+            _serialport = new AsyncSerialPort(_portname, 9600, 8,Parity.None,StopBits.One);
+            _serialport.Open();
+            _serialport.OnDataChanged += OnSMIFDataChanged;
+        }
+
+        //检查传入SxFy是否定义在字典中
+        private bool CheckStreamFunctionPair(string sfstring)
+        {
+            string[] sfcodes = sfstring.Split('S','F');
+            if (sfcodes.Length == 2
+                && Enum.TryParse(Convert.ToInt32(sfcodes[0]).ToString(), out StreamType snum)
+                && Enum.IsDefined(typeof(StreamType),snum)
+                && Enum.TryParse(Convert.ToInt32(sfcodes[1]).ToString(), out FunctionType fnum)
+                && Enum.IsDefined(typeof(FunctionType), fnum)
+                && SFPair.TryGetValue(fnum,out StreamType _snum)
+                && _snum == snum)
+            {
+                return true;
+            }
+            return false;
+        }
+
+        private void OnSMIFDataChanged(string oneLineMessage)
+        {
+            
+        }
+
+        public void Load()
+        {
+            
+        }
+
+        public void Unload()
+        {
+            
+        }
+
+        public void Lock()
+        {
+            
+        }
+
+        public void Unlock()
+        {
+
+        }
+
+        public void ReadMap()
+        { 
+
+        }
+
+        /// <summary>
+        /// 中断SMIF正在执行的操作
+        /// </summary>
+        public void Abort()
+        {
+
+        }
+    }
+}

+ 1 - 1
Venus/Venus_RT/Devices/VCE/HongHuVce.cs

@@ -54,7 +54,7 @@ namespace Venus_RT.Devices.VCE
             {VceCommand.DoorOpen,   "DO"    },
             {VceCommand.DoorClose,  "DC"    },
             //Read
-            {VceCommand.ReadMap,    "MI" },
+            {VceCommand.ReadMap,    "MI"    },
             //Set
             
         };

+ 54 - 15
Venus/Venus_RT/Modules/RouteManager.cs

@@ -72,6 +72,7 @@ namespace Venus_RT.Modules
             CreateSEJob,
             StartSEJob,
             AbortSEJob,
+            SEMoveWafer
         }
 
         public PMEntity PMA { get; private set; }
@@ -153,10 +154,11 @@ namespace Venus_RT.Modules
         public SequenceLLInOutPath LLInOutPath => _AutoCycle.LLInOutPath;
 
         private TMCycle _TMCycle;
-		private SETMCycle _seTMCycle;
         private AutoCycle _AutoCycle;
         private ManualTransfer _manualTransfer;
         private ReturnAllWafer _returnWafer;
+		private SETMCycle _seTMCycle;
+        private SEManualTransfer _setransfer;
 
         private bool _isWaitUnload;
         private static int _isATMMode = -1;
@@ -294,11 +296,18 @@ namespace Venus_RT.Modules
                     return false;
                 }
 
-                return CheckToPostMessage((int)MSG.MoveWafer,
-                    source, (int)args[1],
-                    destination, (int)args[3],
-                    (bool)args[4], (int)args[5],
-                    (bool)args[6], (int)args[7], (string)args[8]);
+                if (seTM!=null && VCE!=null)
+                    return CheckToPostMessage((int)MSG.SEMoveWafer,
+                        source, (int)args[1],
+                        destination, (int)args[3],
+                        args[4], args[5],
+                        args[6], args[7], (string)args[8]);
+                else
+                    return CheckToPostMessage((int)MSG.MoveWafer,
+                        source, (int)args[1],
+                        destination, (int)args[3],
+                        (bool)args[4], (int)args[5],
+                        (bool)args[6], (int)args[7], (string)args[8]);
             });
 
             OP.Subscribe("System.HomeAll", (string cmd, object[] args) =>
@@ -595,10 +604,12 @@ namespace Venus_RT.Modules
             seTM?.Initialize();
 
             _TMCycle = new TMCycle();
-			_seTMCycle = new SETMCycle(ModuleName.SETM);
             _AutoCycle = new AutoCycle();
             _manualTransfer = new ManualTransfer();
             _returnWafer = new ReturnAllWafer(_manualTransfer);
+			_seTMCycle = new SETMCycle(ModuleName.SETM);
+            _setransfer = new SEManualTransfer();
+
 
             BuildTransitionTable();
             return true;
@@ -676,13 +687,19 @@ namespace Venus_RT.Modules
             // SETM  Cycle
             Transition(RtState.Idle,            MSG.SETMCycle,          FsmStartSETMCycle,            RtState.SETMCycle);
             Transition(RtState.SETMCycle,       FSM_MSG.TIMER,          FsmMonitorSETMCycle,          RtState.Idle);
-            Transition(RtState.SETMCycle,       MSG.StopSECycle,          FsmStopSETMCycle,             RtState.Idle);
+            Transition(RtState.SETMCycle,       MSG.StopSECycle,        FsmStopSETMCycle,             RtState.Idle);
             // SETM CreateCycle
-            Transition(RtState.Idle,            MSG.CreateSEJob,        FSMStartCreateSEJob,          RtState.Idle);
+            Transition(RtState.Idle,            MSG.CreateSEJob,        FsmStartCreateSEJob,          RtState.Idle);
             // SETM StartCycle
-            Transition(RtState.Idle,            MSG.StartSEJob,         FSMStartSEJob,                RtState.SERunning);
-            Transition(RtState.SERunning,       FSM_MSG.TIMER,          FSMSEJobMonitor,              RtState.Idle);
-            Transition(RtState.SERunning,       MSG.StopSECycle,          FsmStopSETMCycle,             RtState.Idle);
+            Transition(RtState.Idle,            MSG.StartSEJob,         FsmStartSEJob,                RtState.SERunning);
+            Transition(RtState.SERunning,       FSM_MSG.TIMER,          FsmSEJobMonitor,              RtState.Idle);
+            Transition(RtState.SERunning,       MSG.StopSECycle,        FsmStopSETMCycle,             RtState.Idle);
+            // SE Transfer
+            Transition(RtState.Idle,            MSG.SEMoveWafer,        FsmStartMoveWafer,            RtState.SETransfer);
+            Transition(RtState.SETransfer,      FSM_MSG.TIMER,          FsmMonitorMoveWafer,          RtState.Idle);
+            Transition(RtState.SETransfer,      MSG.StopSECycle,        FsmSEAbort,                   RtState.Idle);
+            // SE ReturnWafer
+
         }
 
         private bool FsmMonitor(object[] objs)
@@ -1003,22 +1020,44 @@ namespace Venus_RT.Modules
             return true;
         }
 
-        private bool FSMStartCreateSEJob(object[] objs)
+        private bool FsmStartCreateSEJob(object[] objs)
         {
             _seTMCycle.CreateJob((Dictionary<string, object>)objs[0]);
             return true;
         }
 
-        private bool FSMStartSEJob(object[] objs)
+        private bool FsmStartSEJob(object[] objs)
         {
             _seTMCycle.StartJob(objs[0].ToString());
             return true;
         }
 
-        private bool FSMSEJobMonitor(object[] objs)
+        private bool FsmSEJobMonitor(object[] objs)
         {
             RState ret = _seTMCycle.Monitor();
             return ret == RState.End;
         }
+
+        private bool FsmStartMoveWafer(object[] objs)
+        {
+            return _setransfer.Start(objs) == RState.Running;
+        }
+
+        private bool FsmMonitorMoveWafer(object[] objs)
+        {
+            RState ret = _setransfer.Monitor();
+            if (ret == RState.Failed || ret == RState.Timeout)
+            {
+                PostMsg(MSG.ERROR);
+                return false;
+            }
+            return ret == RState.End;
+        }
+
+        private bool FsmSEAbort(object[] objs)
+        {
+            _setransfer.Abort();
+            return true;
+        }
     }
 }

+ 187 - 0
Venus/Venus_RT/Modules/SEManualTransfer.cs

@@ -0,0 +1,187 @@
+using Aitex.Core.Common;
+using Aitex.Core.RT.Device.Unit;
+using Aitex.Core.RT.Log;
+using Aitex.Core.RT.Routine;
+using Aitex.Core.RT.SCCore;
+using Aitex.Core.Util;
+using Aitex.Sorter.Common;
+using MECF.Framework.Common.Equipment;
+using MECF.Framework.Common.Schedulers;
+using MECF.Framework.Common.SubstrateTrackings;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Venus_Core;
+using Venus_RT.Modules.Schedulers;
+
+namespace Venus_RT.Modules
+{
+    public class SEManualTransfer : IRoutine
+    {
+
+        SchedulerSETMRobot _tmrobot = (SchedulerSETMRobot)Singleton<TransferModule>.Instance.GetScheduler(ModuleName.SETM);
+        
+        private List<MoveItem> _moveQueue = new List<MoveItem>();
+        private MovingStatus _moving_status = MovingStatus.Idle;
+        private RState _transferstate = RState.Init;
+
+        private int _tmRobotSingleArmOption = 0;//usable wafer
+        private ModuleName source_station;
+        private int source_slot;
+        private ModuleName destination_station;
+        private int destination_slot;
+        private ModuleName original_station;
+        private int original_slot;
+        private float align_angle;
+        public SEManualTransfer()
+        {
+        }
+
+        public RState Start(params object[] objs)
+        {
+            _moveQueue.Clear();
+            // obj is enable && robot is usable
+            if (objs.Length > 6)
+            {
+                _transferstate = RState.Running;
+
+                //get where we from and where we go
+                source_station = (ModuleName)Enum.Parse(typeof(ModuleName),objs[0].ToString());
+                source_slot = Convert.ToInt32(objs[1]);
+                destination_station = (ModuleName)Enum.Parse(typeof(ModuleName), objs[2].ToString());
+                destination_slot = Convert.ToInt32(objs[3]);
+
+                WaferInfo waferInfo = WaferManager.Instance.GetWafer(source_station,source_slot);
+                original_station = (ModuleName)waferInfo.OriginStation;
+                original_slot = waferInfo.OriginSlot;
+
+                if ((bool)objs[4])
+                {
+                    align_angle = float.Parse(objs[5].ToString());
+                    _moving_status = MovingStatus.WaitAlign;
+                }
+                else
+                    _moving_status = MovingStatus.Waiting;
+
+
+
+                if (ModuleHelper.IsVCE(source_station)  && _tmrobot.IsVCESlitDoorClosed)
+                {
+                    LOG.Write(eEvent.ERR_TM, ModuleName.TMRobot, $"cannot transfer from {source_station} as VCE InnerDoor is close.");
+                    _transferstate = RState.Failed;
+                }
+
+                if (ModuleHelper.IsVCE(destination_station) && _tmrobot.IsVCESlitDoorClosed)
+                {
+                    LOG.Write(eEvent.ERR_TM, ModuleName.TMRobot, $"cannot transfer to {destination_station} as VCE InnerDoor is close.");
+                    _transferstate = RState.Failed;
+                }
+
+                //from tm to tm
+                if (source_station == destination_station && ModuleHelper.IsTMRobot(source_station))
+                {
+                    LOG.Write(eEvent.ERR_TM,ModuleName.TMRobot,"cannot transfer from TMRobot to TMRobot.");
+                    _transferstate = RState.Failed;
+                }
+
+                if(WaferManager.Instance.CheckNoWafer(source_station,source_slot))
+                {
+                    LOG.Write(eEvent.ERR_TM, ModuleName.TMRobot, "cannot transfer cause wafer has no wafer.");
+                    _transferstate = RState.Failed;
+                }
+
+                if (WaferManager.Instance.CheckHasWafer(destination_station, destination_slot))
+                {
+                    LOG.Write(eEvent.ERR_TM, ModuleName.TMRobot, "cannot transfer cause wafer has wafer.");
+                    _transferstate = RState.Failed;
+                }
+
+            }
+            else 
+            {
+                _transferstate = RState.Failed;
+            }
+
+            return _transferstate;
+        }
+
+        public RState Monitor()
+        {
+            //if tm is free
+            if (_tmrobot.IsAvailable)
+            {
+                CheckTransferOver();
+                WaferNextGoto();
+                TMRobotTask();
+            }
+
+            return _transferstate;
+        }
+
+        private void CheckTransferOver()
+        {
+            //when the transfer is over?
+            //the wafer has arrived the targetModule and targetSlot
+            if (WaferManager.Instance.CheckHasWafer(destination_station,destination_slot) 
+                && (ModuleName)WaferManager.Instance.GetWafer(destination_station, destination_slot).OriginStation == original_station
+                && WaferManager.Instance.GetWafer(destination_station, destination_slot).OriginSlot == original_slot)
+            {
+                _moving_status = MovingStatus.Idle;
+                _transferstate = RState.End;
+            }
+        }
+
+        private void WaferNextGoto()
+        {
+                switch(_moving_status)
+                {
+                    case MovingStatus.WaitAlign:
+                        _moveQueue.Add(new MoveItem(source_station, source_slot, ModuleName.VPA, 0, 0));
+                        _moving_status = MovingStatus.StartAlign;
+                        break;
+                    case MovingStatus.StartAlign:
+                        _tmrobot.Align(align_angle);
+                        _moving_status = MovingStatus.Aligning;
+                        break;
+                    case MovingStatus.Aligning:
+                        _moveQueue.Add(new MoveItem(ModuleName.VPA, 0, destination_station, destination_slot, 0));
+                        break;
+                    //goto slot need to go
+                    case MovingStatus.Waiting:
+                        _moveQueue.Add(new MoveItem(source_station, source_slot, destination_station, destination_slot, 0));
+                        break;
+                }
+            
+        }
+
+        private void TMRobotTask()
+        {
+            if (_tmrobot.IsAvailable)
+            {
+                if (_moveQueue.Count > 0 && _tmrobot.PostMoveItems(_moveQueue.ToArray()))
+                {
+                    foreach (var item in _moveQueue)
+                    {
+                        var wafer = WaferManager.Instance.GetWafer(item.SourceModule, item.SourceSlot);
+                        if (wafer.IsEmpty && _tmrobot.IsAvailable)
+                        {
+                            // post alarm
+                            _transferstate = RState.Failed;
+                            LOG.Write(eEvent.ERR_ROUTER, ModuleName.System, $"Cannot run TM moving task as Get {item.SourceModule}{item.SourceSlot} Wafer Info failed");
+                            return;
+                        }
+
+                    }
+                    _moveQueue.Clear();
+                }
+            }
+        }
+
+        public void Abort()
+        {
+
+        }
+    }
+}

+ 2 - 0
Venus/Venus_RT/Modules/Schedulers/SchedulerSETMRobot.cs

@@ -49,6 +49,8 @@ namespace Venus_RT.Modules.Schedulers
             get { return _entity.RobotStatus; }
         }
 
+        public bool IsVCESlitDoorClosed => _entity.IsVCESlitDoorClosed;
+
 
         private SETMEntity _entity;
         public int _entityTaskToken = (int)FSM_MSG.NONE;

+ 7 - 1
Venus/Venus_RT/Modules/TM/VenusEntity/SEMFPickRoutine.cs

@@ -77,11 +77,17 @@ namespace Venus_RT.Modules.TM.VenusEntity
                     LOG.Write(eEvent.ERR_TM, Module, $"Invalid target module : {_targetModule} is Error! Please solve Error first!");
                     return RState.Failed;
                 }
-                if (_targetSlot <= 0)
+                if (_targetSlot < 0)
                 {
                     LOG.Write(eEvent.ERR_TM, Module, $"VCE target slot cannot be {_targetSlot}. Please check it first.");
                     return RState.Failed;
                 }
+
+                if (_tm.VCESlitDoorClosed)
+                {
+                    LOG.Write(eEvent.ERR_TM, Module, $"cannot pick cause vce slitdoor not open.");
+                    return RState.Failed;
+                }
                 //如果VCE门是关闭的 说明还未进行pump 无法取片等
                 //if (_tm.VCESlitDoorClosed)
                 //{

+ 12 - 0
Venus/Venus_RT/Modules/TM/VenusEntity/SEMFPlaceRoutine.cs

@@ -72,6 +72,18 @@ namespace Venus_RT.Modules.TM.VenusEntity
                     LOG.Write(eEvent.ERR_TM, Module, $"Invalid target module : {_targetModule} is Error! Please solve Error first!");
                     return RState.Failed;
                 }
+
+                if (_targetSlot < 0)
+                {
+                    LOG.Write(eEvent.ERR_TM, Module, $"VCE target slot cannot be {_targetSlot}. Please check it first.");
+                    return RState.Failed;
+                }
+
+                if (_tm.VCESlitDoorClosed)
+                {
+                    LOG.Write(eEvent.ERR_TM, Module, $"cannot place cause vce slitdoor not open.");
+                    return RState.Failed;
+                }
                 //如果VCE门是关闭的 说明还未进行pump 无法取片等
                 //if (_tm.VCESlitDoorClosed)
                 //{

+ 1 - 1
Venus/Venus_RT/Modules/TM/VenusEntity/SETMEntity.cs

@@ -115,7 +115,7 @@ namespace Venus_RT.Modules.TM.VenusEntity
         public bool IsPMASlitDoorClosed => _tm.PMASlitDoorClosed;
         public bool IsPMBSlitDoorClosed => _tm.PMBSlitDoorClosed;
         public bool IsPMCSlitDoorClosed => _tm.PMCSlitDoorClosed;
-
+        public bool IsVCESlitDoorClosed => _tm.VCESlitDoorClosed;
 
         public RState RobotStatus
         {

+ 2 - 0
Venus/Venus_RT/Venus_RT.csproj

@@ -164,6 +164,7 @@
     <Compile Include="Devices\RevtechMatch.cs" />
     <Compile Include="Devices\SkyPump.cs" />
     <Compile Include="Devices\SMCChiller.cs" />
+    <Compile Include="Devices\SMIF\FortrendPLUS500.cs" />
     <Compile Include="Devices\TM\HongHuTM.cs" />
     <Compile Include="Devices\TM\ITransferRobot.cs" />
     <Compile Include="Devices\TM\JetTM.cs" />
@@ -250,6 +251,7 @@
     <Compile Include="Modules\Schedulers\SchedulerTMRobot.cs" />
     <Compile Include="Modules\Schedulers\SchedulerVCE.cs" />
     <Compile Include="Modules\Schedulers\TransferModule.cs" />
+    <Compile Include="Modules\SEManualTransfer.cs" />
     <Compile Include="Modules\SETMCycle.cs" />
     <Compile Include="Modules\TMCycle.cs" />
     <Compile Include="Modules\TM\MFControlPressureRoutine.cs" />

+ 5 - 2
Venus/Venus_Themes/UserControls/VceControl.xaml.cs

@@ -96,7 +96,10 @@ namespace Venus_Themes.UserControls
         //画Foup
         private void foup_Loaded(object sender, RoutedEventArgs e)
         {
-            DrawFoup();
+            if (UnitData2 != null)
+            {
+                DrawFoup();
+            }
         }
         //支撑底柱高度
         public static readonly DependencyProperty PositionZProperty = DependencyProperty.Register(
@@ -184,7 +187,7 @@ namespace Venus_Themes.UserControls
             int ZIndex = 98;
             foreach (WaferInfo item in UnitData2)
             {
-                Console.WriteLine(item);
+                //Console.WriteLine(item);
                 //text
                 TextBlock SlotIndex = new TextBlock()
                 {

+ 9 - 3
Venus/Venus_UI/Views/ShellView.xaml.cs

@@ -100,16 +100,20 @@ namespace Venus_UI.Views
             dialog.DataContext = vm;
             dialog.Height = 300;
             dialog.Width = 400;
+            bool alignflag = false;
+            bool coolingflag = false;
             double angel = 0;
             double coolingtime = 0;
             if (dialog.ShowDialog() == true)
             {
-                if ((bool)dialog.AlignFlag == true && !string.IsNullOrEmpty(dialog.Angle))
+                alignflag = (bool)dialog.AlignFlag;
+                coolingflag = (bool)dialog.CoolingFlag;
+                if (alignflag && !string.IsNullOrEmpty(dialog.Angle))
                 {
                     angel = Convert.ToDouble(dialog.Angle);
                 }
 
-                if ((bool)dialog.CoolingFlag == true && !string.IsNullOrEmpty(dialog.CoolingTime))
+                if (coolingflag && !string.IsNullOrEmpty(dialog.CoolingTime))
                 {
                     coolingtime = Convert.ToDouble(dialog.CoolingTime);
                 }
@@ -121,7 +125,9 @@ namespace Venus_UI.Views
                 }
                 else
                     InvokeClient.Instance.Service.DoOperation("System.MoveWafer",
-                        e.TranferFrom.ModuleID, e.TranferFrom.SlotID, e.TranferTo.ModuleID, e.TranferTo.SlotID, false, 1, false, 1, "");
+                        e.TranferFrom.ModuleID, e.TranferFrom.SlotID, e.TranferTo.ModuleID, e.TranferTo.SlotID, alignflag, angel, coolingflag, coolingtime, "");
+                    
+                    
 
             }
             else