Ver código fonte

Modify TransporterInterLock, TransporterPickUpFromRoutine; Add Transporter IO variable; Modify Transporter UI;

niuyx 3 meses atrás
pai
commit
0c701b0226

+ 6 - 6
CyberX8_MainPages/Views/TransporterView.xaml

@@ -29,11 +29,11 @@
             <ColumnDefinition Width="50"/>
         </Grid.ColumnDefinitions>
         <UserControls:TransporterDebugControl Grid.Row="1" Grid.Column="1" ModuleName="Transporter2" ModuleTitle="Loader Transporter" 
-                                              Lock1On="{Binding LoaderTransporterData.Locked1}" Lock2On="{Binding LoaderTransporterData.Locked2}" Unlock1On="{Binding LoaderTransporterData.Unlocked1}"
+                                              Lock1On="{Binding LoaderTransporterData.Lock}" Lock2On="{Binding LoaderTransporterData.Lock}" Unlock1On="{Binding LoaderTransporterData.Unlocked1}"
                                               Unlock2On="{Binding LoaderTransporterData.Unlocked2}" Retract1On="{Binding LoaderTransporterData.ImmobilizeRetracted1}" Retract2On="{Binding LoaderTransporterData.ImmobilizeRetracted2}"
                                               Extend1On="{Binding LoaderTransporterData.ImmobilizeExtended1}" Extend2On="{Binding LoaderTransporterData.ImmobilizeExtended2}" 
-                                              ReadyToLock1On="{Binding LoaderTransporterData.ReadyToLock1}" ReadyToLock2On="{Binding LoaderTransporterData.ReadyToLock2}" WHPresent1="{Binding LoaderTransporterData.WhPresent1}"
-                                              WHPresent2="{Binding LoaderTransporterData.WhPresent2}" GantryMotorOn="{Binding LoaderGantryMotorOn}" GantryHomed="{Binding LoaderGantryHomed}"
+                                              ReadyToLock1On="{Binding LoaderTransporterData.ReadyToLock1}" ReadyToLock2On="{Binding LoaderTransporterData.ReadyToLock2}" WHPresent1="{Binding LoaderTransporterData.WSHoldPresent}"
+                                              WHPresent2="{Binding LoaderTransporterData.WSHoldPresent}" GantryMotorOn="{Binding LoaderGantryMotorOn}" GantryHomed="{Binding LoaderGantryHomed}"
                                               GantryMoving="{Binding LoaderGantryMoving}" ElevatorMotorOn="{Binding LoaderElevatorMotorOn}" ElevatorHomed="{Binding LoaderElevatorHomed}"
                                               ElevatorMoving="{Binding LoaderElevatorMoving}" Barcode="{Binding LoaderBarcode}" PositionList="{Binding LoaderPositionList}"
                                               FromSelectedItem="{Binding LoaderFromSelectedItem,Mode=TwoWay}" ToSelectedItem="{Binding LoaderToSelectedItem,Mode=TwoWay}"
@@ -42,11 +42,11 @@
                                               IsElevatorInUpPlace ="{Binding  LoaderElevatorIsInUpPlace}">
         </UserControls:TransporterDebugControl>
         <UserControls:TransporterDebugControl Grid.Row="1" Grid.Column="2" ModuleName="Transporter1" ModuleTitle="Process Transporter"
-                                       Lock1On="{Binding ProcessTransporterData.Locked1}" Lock2On="{Binding ProcessTransporterData.Locked2}" Unlock1On="{Binding ProcessTransporterData.Unlocked1}"
+                                       Lock1On="{Binding ProcessTransporterData.Lock}" Lock2On="{Binding ProcessTransporterData.Lock}" Unlock1On="{Binding ProcessTransporterData.Unlocked1}"
                                        Unlock2On="{Binding ProcessTransporterData.Unlocked2}" Retract1On="{Binding ProcessTransporterData.ImmobilizeRetracted1}" Retract2On="{Binding ProcessTransporterData.ImmobilizeRetracted2}"
                                        Extend1On="{Binding ProcessTransporterData.ImmobilizeExtended1}" Extend2On="{Binding ProcessTransporterData.ImmobilizeExtended2}" 
-                                       ReadyToLock1On="{Binding ProcessTransporterData.ReadyToLock1}" ReadyToLock2On="{Binding ProcessTransporterData.ReadyToLock2}" WHPresent1="{Binding ProcessTransporterData.WhPresent1}"
-                                       WHPresent2="{Binding ProcessTransporterData.WhPresent2}" GantryMotorOn="{Binding ProcessGantryMotorOn}" GantryHomed="{Binding ProcessGantryHomed}"
+                                       ReadyToLock1On="{Binding ProcessTransporterData.ReadyToLock1}" ReadyToLock2On="{Binding ProcessTransporterData.ReadyToLock2}" WHPresent1="{Binding ProcessTransporterData.WSHoldPresent}"
+                                       WHPresent2="{Binding ProcessTransporterData.WSHoldPresent}" GantryMotorOn="{Binding ProcessGantryMotorOn}" GantryHomed="{Binding ProcessGantryHomed}"
                                        GantryMoving="{Binding ProcessGantryMoving}" ElevatorMotorOn="{Binding ProcessElevatorMotorOn}" ElevatorHomed="{Binding ProcessElevatorHomed}"
                                        ElevatorMoving="{Binding ProcessElevatorMoving}" Barcode="{Binding ProcessBarcode}" PositionList="{Binding ProcessPositionList}"
                                        FromSelectedItem="{Binding ProcessFromSelectedItem,Mode=TwoWay}" ToSelectedItem="{Binding ProcessToSelectedItem,Mode=TwoWay}"

+ 60 - 0
CyberX8_RT/Config/Devices/GalilControllerCfg-Simulator.xml

@@ -130,4 +130,64 @@
 			<PositiveTorqueLimit>20</PositiveTorqueLimit>
 		</GalilAxisConfig>
 	</GalilDeviceConfig>
+	<GalilDeviceConfig Module="Transporter1" IpAddress="127.0.0.1" Port="58680" SendTimeout="2000" RecvTimeout="2000" GalilType="Galil21">
+		<GalilAxisConfig Name="Gantry" Index="0" Type="Galil"  CNType="-1">
+			<Speed>1000000</Speed>
+			<Acceleration>2000000</Acceleration>
+			<Deceleration>2000000</Deceleration>
+			<HomingSpeed>16000</HomingSpeed>
+			<HomingOffset>495</HomingOffset>
+			<HomingTimeOut>20000</HomingTimeOut>
+			<HomingAcceleration>2000000</HomingAcceleration>
+			<HomingDeceleration>2000000</HomingDeceleration>
+			<ReverseSoftwareLimit>0</ReverseSoftwareLimit>
+			<ForwardSoftwareLimit>0</ForwardSoftwareLimit>
+			<NegativeTorqueLimit>130</NegativeTorqueLimit>
+			<PositiveTorqueLimit>20</PositiveTorqueLimit>
+		</GalilAxisConfig>
+		<GalilAxisConfig Name="Elevator" Index="1" Type="Galil"  CNType="-1">
+			<Speed>500000</Speed>
+			<Acceleration>500000</Acceleration>
+			<Deceleration>250000</Deceleration>
+			<HomingSpeed>8000</HomingSpeed>
+			<HomingOffset>0</HomingOffset>
+			<HomingTimeOut>20000</HomingTimeOut>
+			<HomingAcceleration>500000</HomingAcceleration>
+			<HomingDeceleration>250000</HomingDeceleration>
+			<ReverseSoftwareLimit>0</ReverseSoftwareLimit>
+			<ForwardSoftwareLimit>0</ForwardSoftwareLimit>
+			<NegativeTorqueLimit>130</NegativeTorqueLimit>
+			<PositiveTorqueLimit>20</PositiveTorqueLimit>
+		</GalilAxisConfig>
+	</GalilDeviceConfig>
+	<GalilDeviceConfig Module="Transporter2" IpAddress="127.0.0.1" Port="58681" SendTimeout="2000" RecvTimeout="2000" GalilType="Galil21">
+		<GalilAxisConfig Name="Gantry" Index="0" Type="Galil"  CNType="-1">
+			<Speed>1000000</Speed>
+			<Acceleration>2000000</Acceleration>
+			<Deceleration>2000000</Deceleration>
+			<HomingSpeed>16000</HomingSpeed>
+			<HomingOffset>495</HomingOffset>
+			<HomingTimeOut>20000</HomingTimeOut>
+			<HomingAcceleration>2000000</HomingAcceleration>
+			<HomingDeceleration>2000000</HomingDeceleration>
+			<ReverseSoftwareLimit>0</ReverseSoftwareLimit>
+			<ForwardSoftwareLimit>0</ForwardSoftwareLimit>
+			<NegativeTorqueLimit>130</NegativeTorqueLimit>
+			<PositiveTorqueLimit>20</PositiveTorqueLimit>
+		</GalilAxisConfig>
+		<GalilAxisConfig Name="Elevator" Index="1" Type="Galil"  CNType="-1">
+			<Speed>500000</Speed>
+			<Acceleration>500000</Acceleration>
+			<Deceleration>250000</Deceleration>
+			<HomingSpeed>8000</HomingSpeed>
+			<HomingOffset>0</HomingOffset>
+			<HomingTimeOut>20000</HomingTimeOut>
+			<HomingAcceleration>500000</HomingAcceleration>
+			<HomingDeceleration>250000</HomingDeceleration>
+			<ReverseSoftwareLimit>0</ReverseSoftwareLimit>
+			<ForwardSoftwareLimit>0</ForwardSoftwareLimit>
+			<NegativeTorqueLimit>130</NegativeTorqueLimit>
+			<PositiveTorqueLimit>20</PositiveTorqueLimit>
+		</GalilAxisConfig>
+	</GalilDeviceConfig>
 </GalilControllerConfig>

+ 8 - 2
CyberX8_RT/Config/Devices/ModuleIOCfg.xml

@@ -147,7 +147,10 @@
 	<IO Name="Transporter2.ReadyToLock1" IOName="r_ENCLOSED_TRANSPORT2_WS_READY_TO_LOCK_1"/> 
 	<IO Name="Transporter2.ReadyToLock2" IOName="r_ENCLOSED_TRANSPORT2_WS_READY_TO_LOCK_2"/> 
 	<IO Name="Transporter2.WhPresent1" IOName="r_ENCLOSED_TRANSPORT2_WS_PRESENT_1"/> 
-	<IO Name="Transporter2.WhPresent2" IOName="r_ENCLOSED_TRANSPORT2_WS_PRESENT_2"/> 
+	<IO Name="Transporter2.WhPresent2" IOName="r_ENCLOSED_TRANSPORT2_WS_PRESENT_2"/>
+		
+	<IO Name="Transporter2.Lock" IOName="c_TRANSPORT2_DROP_BLOCK_LOCK"/>
+	<IO Name="Transporter2.WSHoldPresent" IOName="r_TRANSPORT2_WS_HOLD_PRESENT"/>	
 	</Module>
 	<Module Name="Transporter1">
 	<IO Name="Transporter1.Unlock" IOName="c_ENCLOSED_TRANSPORT_UNLOCK_SOLENOID"/>  
@@ -164,7 +167,10 @@
 	<IO Name="Transporter1.ReadyToLock1" IOName="r_ENCLOSED_TRANSPORT_WS_READY_TO_LOCK_1"/> 
 	<IO Name="Transporter1.ReadyToLock2" IOName="r_ENCLOSED_TRANSPORT_WS_READY_TO_LOCK_2"/> 
 	<IO Name="Transporter1.WhPresent1" IOName="r_ENCLOSED_TRANSPORT_WS_PRESENT_1"/> 
-	<IO Name="Transporter1.WhPresent2" IOName="r_ENCLOSED_TRANSPORT_WS_PRESENT_2"/> 
+	<IO Name="Transporter1.WhPresent2" IOName="r_ENCLOSED_TRANSPORT_WS_PRESENT_2"/>
+
+	<IO Name="Transporter1.Lock" IOName="c_TRANSPORT1_DROP_BLOCK_LOCK"/>
+	<IO Name="Transporter1.WSHoldPresent" IOName="r_TRANSPORT1_WS_HOLD_PRESENT"/>
 	</Module>
 	<Module Name="SRD">
 	<IO Name="SRD.FluidContainment" IOName="r_SRD_FLUID_CONTAINMENT"/> 

+ 4 - 4
CyberX8_RT/Config/Devices/WagoControllerCfg-Simulator.xml

@@ -24,8 +24,8 @@
 				<DI Name="r_LoaderA_Wafer_Present"  Address="16" Invert="false"/>
 				<DI Name="r_LoaderB_Wafer_Present"  Address="17" Invert="false"/>
 				<DI Name="r_Cathode_Present"  Address="18" Invert="false"/>
-				<DI Name="DI19"  Address="19" Invert="false"/>
-				<DI Name="DI20"  Address="20" Invert="false"/>
+				<DI Name="r_TRANSPORT1_WS_HOLD_PRESENT"  Address="19" Invert="false"/>
+				<DI Name="r_TRANSPORT2_WS_HOLD_PRESENT"  Address="20" Invert="false"/>
 				<DI Name="DI21"  Address="21" Invert="false"/>
 				<DI Name="DI22"  Address="22" Invert="false"/>
 				<DI Name="DI23"  Address="23" Invert="false"/>
@@ -48,8 +48,8 @@
 				<DO Name="c_Pole_Blue"  Address="516" Invert="false"/>
 				<DO Name="c_System_Alarm2"  Address="517" Invert="false"/>
 				<DO Name="c_VACUUM_TEST"  Address="518" Invert="false"/>
-				<DO Name="DO7"  Address="519" Invert="false"/>
-				<DO Name="DO8"  Address="520" Invert="false"/>
+				<DO Name="c_TRANSPORT1_DROP_BLOCK_LOCK"  Address="519" Invert="false"/>
+				<DO Name="c_TRANSPORT2_DROP_BLOCK_LOCK"  Address="520" Invert="false"/>
 				<DO Name="DO9"  Address="521" Invert="false"/>
 				<DO Name="DO10"  Address="522" Invert="false"/>
 				<DO Name="DO11"  Address="523" Invert="false"/>

+ 64 - 15
CyberX8_RT/Devices/TransPorter/LoaderTransPorterElevatorAxisInterLock.cs

@@ -1,16 +1,11 @@
-using Aitex.Core.RT.DataCenter;
-using Aitex.Core.RT.Device;
+using Aitex.Core.RT.Device;
 using Aitex.Core.RT.Log;
-using CyberX8_Core;
+using Aitex.Core.Util;
 using CyberX8_RT.Devices.AXIS;
-using CyberX8_RT.Devices.AXIS.Yaskawa;
-using MECF.Framework.Common.Utilities;
-using MECF.Framework.Common.WaferHolder;
+using CyberX8_RT.Modules.Transporter;
+using CyberX8_RT.Modules;
+using MECF.Framework.Common.Equipment;
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 
 namespace CyberX8_RT.Devices.TransPorter
 {
@@ -51,17 +46,71 @@ namespace CyberX8_RT.Devices.TransPorter
             if (!AxisManager.Instance.CheckModuleAxisSwitchOn(Module, Name))
             {
                 return false;
+            }            
+
+            //ProcessTransporter Home
+            if (ModuleHelper.IsInstalled(ModuleName.Transporter1))
+            {
+                TransporterEntity processTransporterEntity = Singleton<RouteManager>.Instance.GetModule<TransporterEntity>(ModuleName.Transporter1.ToString());
+                if (processTransporterEntity == null)
+                {
+                    LOG.WriteLog(eEvent.ERR_TRANSPORTER, Module, $"{ModuleName.Transporter1.ToString()} entity is null");
+                    return false;
+                }
+                if (!processTransporterEntity.IsHomed)
+                {
+                    LOG.WriteLog(eEvent.ERR_TRANSPORTER, Module, $"{ModuleName.Transporter1.ToString()} is not home, Cannot execute GotoSavedPosition");
+                    return false;
+                }
             }
-            JetAxisBase gantryAxis = DEVICE.GetDevice<JetAxisBase>($"{Module}.Gantry");
-            if (gantryAxis != null)
+            //LoaderTransporter Home
+            if (ModuleHelper.IsInstalled(ModuleName.Transporter2))
             {
-                if (gantryAxis.IsRun)
+                TransporterEntity loaderTransporterEntity = Singleton<RouteManager>.Instance.GetModule<TransporterEntity>(ModuleName.Transporter2.ToString());
+                if (loaderTransporterEntity == null)
+                {
+                    LOG.WriteLog(eEvent.ERR_TRANSPORTER, Module, $"{ModuleName.Transporter2.ToString()} entity is null");
+                    return false;
+                }
+                if (!loaderTransporterEntity.IsHomed)
                 {
-                    LOG.WriteLog(eEvent.ERR_AXIS, Module, "Gantry Axis is Run");
+                    LOG.WriteLog(eEvent.ERR_TRANSPORTER, Module, $"{ModuleName.Transporter2.ToString()} is not home, Cannot execute GotoSavedPosition");
                     return false;
                 }
             }
-
+            //LoaderTransporter Gantry is not run
+            JetAxisBase gantryAxis = DEVICE.GetDevice<JetAxisBase>($"{Module}.Gantry");
+            if (gantryAxis == null)
+            {
+                LOG.WriteLog(eEvent.ERR_TRANSPORTER, Module, $"{Module} Gantry Axis is null");
+                return false;
+            }
+            if (gantryAxis.Status == CyberX8_Core.RState.Running)
+            {
+                LOG.WriteLog(eEvent.ERR_TRANSPORTER, Module, $"{Module} Gantry Axis is Run");
+                return false;
+            }
+            //Check Gantry at station
+            double gantryPosition = gantryAxis.MotionData.MotorPosition;
+            if(gantryAxis.CheckPositionIsEmpty(gantryPosition))
+            {
+                LOG.WriteLog(eEvent.ERR_TRANSPORTER, Module, $"{Module} Gantry is not in any station");
+                return false;
+            }
+            //是否在Load位
+            if (gantryAxis.CheckPositionIsInStation(gantryPosition, "Loader"))
+            {
+                JetAxisBase rotationAxis = DEVICE.GetDevice<JetAxisBase>($"Loader1.Rotation");
+                double rotationPosition = rotationAxis.MotionData.MotorPosition;
+                if (!rotationAxis.CheckPositionIsInStation(rotationPosition, "TRNPA") && !rotationAxis.CheckPositionIsInStation(rotationPosition, "TRNPB"))
+                {
+                    if(station != "UP" && station != "CELLTOP")
+                    {
+                        LOG.WriteLog(eEvent.ERR_TRANSPORTER, Module, $"Loader Rotation is not in TRNP, {Module} Gantry only can go to UP or CELLTOP");
+                        return false;
+                    }
+                }
+            }          
             return true;
         }
     }

+ 42 - 22
CyberX8_RT/Devices/TransPorter/LoaderTransPorterGantryAxisInterLock.cs

@@ -1,23 +1,17 @@
-using Aitex.Core.RT.DataCenter;
-using Aitex.Core.RT.Log;
+using Aitex.Core.RT.Log;
 using Aitex.Core.RT.OperationCenter;
 using Aitex.Core.RT.SCCore;
 using MECF.Framework.Common.Beckhoff.Station;
-using MECF.Framework.Common.DataCenter;
 using MECF.Framework.Common.Equipment;
 using MECF.Framework.Common.Layout;
 using CyberX8_Core;
 using CyberX8_RT.Devices.AXIS;
-using CyberX8_RT.Devices.AXIS.Yaskawa;
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 using Aitex.Core.RT.Device;
 using MECF.Framework.Common.ToolLayout;
-using MECF.Framework.Common.Utilities;
-using MECF.Framework.Common.WaferHolder;
+using Aitex.Core.Util;
+using CyberX8_RT.Modules.Transporter;
+using CyberX8_RT.Modules;
 
 namespace CyberX8_RT.Devices.TransPorter
 {
@@ -64,29 +58,55 @@ namespace CyberX8_RT.Devices.TransPorter
                 return false;
             }
 
-            JetAxisBase elevatorAxis = DEVICE.GetDevice<JetAxisBase>($"{Module}.Elevator");
-            if (elevatorAxis != null)
+            //ProcessTransporter Home
+            if (ModuleHelper.IsInstalled(ModuleName.Transporter1))
             {
-                if (elevatorAxis.IsRun)
+                TransporterEntity processTransporterEntity = Singleton<RouteManager>.Instance.GetModule<TransporterEntity>(ModuleName.Transporter1.ToString());
+                if (processTransporterEntity == null)
+                {
+                    LOG.WriteLog(eEvent.ERR_TRANSPORTER, Module, $"{ModuleName.Transporter1.ToString()} entity is null");
+                    return false;
+                }
+                if (!processTransporterEntity.IsHomed)
                 {
-                    LOG.WriteLog(eEvent.ERR_AXIS, Module, "Elevator Axis is Run");
+                    LOG.WriteLog(eEvent.ERR_TRANSPORTER, Module, $"{ModuleName.Transporter1.ToString()} is not home, Cannot execute GotoSavedPosition");
                     return false;
                 }
             }
-
-            if (WaferHolderManager.Instance.HasWaferHolder(Module.ToString()))
+            //LoaderTransporter Home
+            if (ModuleHelper.IsInstalled(ModuleName.Transporter2))
             {
-                double elevatorPosition = elevatorAxis.MotionData.MotorPosition;
-                if (elevatorAxis.CheckPositionIsInStation(elevatorPosition, "Up"))
+                TransporterEntity loaderTransporterEntity = Singleton<RouteManager>.Instance.GetModule<TransporterEntity>(ModuleName.Transporter2.ToString());
+                if (loaderTransporterEntity == null)
                 {
-                    return true;
+                    LOG.WriteLog(eEvent.ERR_TRANSPORTER, Module, $"{ModuleName.Transporter2.ToString()} entity is null");
+                    return false;
                 }
-                else
+                if (!loaderTransporterEntity.IsHomed)
                 {
-                    LOG.WriteLog(eEvent.ERR_AXIS, Module, $"{Module} has Wafer Shuttle,Elevator {elevatorPosition} is not in Up");
-
+                    LOG.WriteLog(eEvent.ERR_TRANSPORTER, Module, $"{ModuleName.Transporter2.ToString()} is not home, Cannot execute GotoSavedPosition");
+                    return false;
                 }
             }
+            //LoaderTransporter Elevator is not run
+            JetAxisBase elevatorAxis = DEVICE.GetDevice<JetAxisBase>($"{Module}.Elevator");
+            if (elevatorAxis == null)
+            {
+                LOG.WriteLog(eEvent.ERR_TRANSPORTER, Module, $"{Module} Elevator Axis is null");
+                return false;
+            }
+            if (elevatorAxis.Status == CyberX8_Core.RState.Running)
+            {
+                LOG.WriteLog(eEvent.ERR_TRANSPORTER, Module, $"{Module} Elevator Axis is Run");
+                return false;
+            }
+            //LoaderTransporter Elevator 在UP位
+            double elevatorPosition = elevatorAxis.MotionData.MotorPosition;
+            if (!elevatorAxis.CheckPositionIsInStation(elevatorPosition, "UP"))
+            { 
+                LOG.WriteLog(eEvent.ERR_AXIS, Module, $"Elevator {elevatorPosition} is not in UP");
+                return false ;
+            }
             return true;
         }
         /// <summary>

+ 50 - 10
CyberX8_RT/Devices/TransPorter/ProcessTransporterElevatorAxisInterLock.cs

@@ -1,12 +1,10 @@
 using Aitex.Core.RT.Device;
 using Aitex.Core.RT.Log;
+using Aitex.Core.Util;
 using CyberX8_RT.Devices.AXIS;
-using CyberX8_RT.Devices.AXIS.Yaskawa;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using CyberX8_RT.Modules.Transporter;
+using CyberX8_RT.Modules;
+using MECF.Framework.Common.Equipment;
 
 namespace CyberX8_RT.Devices.TransPorter
 {
@@ -45,15 +43,57 @@ namespace CyberX8_RT.Devices.TransPorter
             {
                 return false;
             }
-            JetAxisBase gantryAxis = DEVICE.GetDevice<JetAxisBase>($"{Module}.Gantry");
-            if (gantryAxis != null)
+
+            //ProcessTransporter Home
+            if (ModuleHelper.IsInstalled(ModuleName.Transporter1))
+            {
+                TransporterEntity processTransporterEntity = Singleton<RouteManager>.Instance.GetModule<TransporterEntity>(ModuleName.Transporter1.ToString());
+                if (processTransporterEntity == null)
+                {
+                    LOG.WriteLog(eEvent.ERR_TRANSPORTER, Module, $"{ModuleName.Transporter1.ToString()} entity is null");
+                    return false;
+                }
+                if (!processTransporterEntity.IsHomed)
+                {
+                    LOG.WriteLog(eEvent.ERR_TRANSPORTER, Module, $"{ModuleName.Transporter1.ToString()} is not home, Cannot execute GotoSavedPosition");
+                    return false;
+                }
+            }
+            //LoaderTransporter Home
+            if (ModuleHelper.IsInstalled(ModuleName.Transporter2))
             {
-                if (gantryAxis.IsRun)
+                TransporterEntity loaderTransporterEntity = Singleton<RouteManager>.Instance.GetModule<TransporterEntity>(ModuleName.Transporter2.ToString());
+                if (loaderTransporterEntity == null)
+                {
+                    LOG.WriteLog(eEvent.ERR_TRANSPORTER, Module, $"{ModuleName.Transporter2.ToString()} entity is null");
+                    return false;
+                }
+                if (!loaderTransporterEntity.IsHomed)
                 {
-                    LOG.WriteLog(eEvent.ERR_AXIS, Module, "Gantry Axis is Run");
+                    LOG.WriteLog(eEvent.ERR_TRANSPORTER, Module, $"{ModuleName.Transporter2.ToString()} is not home, Cannot execute GotoSavedPosition");
                     return false;
                 }
             }
+            //ProcessTransporter Gantry is not run
+            JetAxisBase gantryAxis = DEVICE.GetDevice<JetAxisBase>($"{Module}.Gantry");
+            if (gantryAxis == null)
+            {
+                LOG.WriteLog(eEvent.ERR_TRANSPORTER, Module, $"{Module} Gantry Axis is null");
+                return false;
+            }
+            if (gantryAxis.Status == CyberX8_Core.RState.Running)
+            {
+                LOG.WriteLog(eEvent.ERR_TRANSPORTER, Module, $"{Module} Gantry Axis is Run");
+                return false;
+            }
+            //Check Gantry at station
+            double gantryPosition = gantryAxis.MotionData.MotorPosition;
+            if (gantryAxis.CheckPositionIsEmpty(gantryPosition))
+            {
+                LOG.WriteLog(eEvent.ERR_TRANSPORTER, Module, $"{Module} Gantry is not in any station");
+                return false;
+            }
+
             return true;
         }
     }

+ 44 - 18
CyberX8_RT/Devices/TransPorter/ProcessTransporterGantryAxisInterLock.cs

@@ -6,16 +6,13 @@ using MECF.Framework.Common.Equipment;
 using MECF.Framework.Common.Layout;
 using CyberX8_Core;
 using CyberX8_RT.Devices.AXIS;
-using CyberX8_RT.Devices.AXIS.Yaskawa;
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 using MECF.Framework.Common.ToolLayout;
 using Aitex.Core.RT.Device;
-using MECF.Framework.Common.Utilities;
-using MECF.Framework.Common.WaferHolder;
+using Aitex.Core.Util;
+using CyberX8_RT.Modules.Transporter;
+using CyberX8_RT.Modules;
+using System.Windows;
 
 namespace CyberX8_RT.Devices.TransPorter
 {
@@ -55,28 +52,57 @@ namespace CyberX8_RT.Devices.TransPorter
             {
                 return false;
             }
-            JetAxisBase elevatorAxis = DEVICE.GetDevice<JetAxisBase>($"{Module}.Elevator");
-            if(elevatorAxis !=null)
+
+            //ProcessTransporter Home
+            if (ModuleHelper.IsInstalled(ModuleName.Transporter1))
             {
-                if(elevatorAxis.IsRun)
+                TransporterEntity processTransporterEntity = Singleton<RouteManager>.Instance.GetModule<TransporterEntity>(ModuleName.Transporter1.ToString());
+                if (processTransporterEntity == null)
+                {
+                    LOG.WriteLog(eEvent.ERR_TRANSPORTER, Module, $"{ModuleName.Transporter1.ToString()} entity is null");
+                    return false;
+                }
+                if (!processTransporterEntity.IsHomed)
                 {
-                    LOG.WriteLog(eEvent.ERR_AXIS, Module, "Elevator Axis is Run");
+                    LOG.WriteLog(eEvent.ERR_TRANSPORTER, Module, $"{ModuleName.Transporter1.ToString()} is not home, Cannot execute GotoSavedPosition");
                     return false;
                 }
             }
-            if (WaferHolderManager.Instance.HasWaferHolder(Module.ToString()))
+            //LoaderTransporter Home
+            if (ModuleHelper.IsInstalled(ModuleName.Transporter2))
             {
-                double elevatorPosition = elevatorAxis.MotionData.MotorPosition;
-                if (elevatorAxis.CheckPositionIsInStation(elevatorPosition, "Up"))
+                TransporterEntity loaderTransporterEntity = Singleton<RouteManager>.Instance.GetModule<TransporterEntity>(ModuleName.Transporter2.ToString());
+                if (loaderTransporterEntity == null)
                 {
-                    return true;
+                    LOG.WriteLog(eEvent.ERR_TRANSPORTER, Module, $"{ModuleName.Transporter2.ToString()} entity is null");
+                    return false;
                 }
-                else
+                if (!loaderTransporterEntity.IsHomed)
                 {
-                    LOG.WriteLog(eEvent.ERR_AXIS, Module, $"{Module} has Wafer Shuttle,Elevator {elevatorPosition} is not in Up");
-
+                    LOG.WriteLog(eEvent.ERR_TRANSPORTER, Module, $"{ModuleName.Transporter2.ToString()} is not home, Cannot execute GotoSavedPosition");
+                    return false;
                 }
             }
+            //ProcessTransporter Elevator is not run
+            JetAxisBase elevatorAxis = DEVICE.GetDevice<JetAxisBase>($"{Module}.Elevator");
+            if (elevatorAxis == null)
+            {
+                LOG.WriteLog(eEvent.ERR_TRANSPORTER, Module, $"{Module} Elevator Axis is null");
+                return false;
+            }
+            if (elevatorAxis.Status == CyberX8_Core.RState.Running)
+            {
+                LOG.WriteLog(eEvent.ERR_TRANSPORTER, Module, $"{Module} Elevator Axis is Run");
+                return false;
+            }
+            //ProcessTransporter Elevator 在UP位
+            double elevatorPosition = elevatorAxis.MotionData.MotorPosition;
+            if (!elevatorAxis.CheckPositionIsInStation(elevatorPosition, "UP"))
+            {            
+                LOG.WriteLog(eEvent.ERR_AXIS, Module, $"Elevator {elevatorPosition} is not in UP");
+                return false;
+            }
+
             return true;
         }
         /// <summary>

+ 29 - 18
CyberX8_RT/Devices/TransPorter/TransporterCommon.cs

@@ -54,6 +54,9 @@ namespace CyberX8_RT.Devices.TransPorter
         private const string WH_PRESENT1 = "WhPresent1";
         private const string WH_PRESENT2 = "WhPresent2";
         private const string TRANSPORTER_DATA = "TransporterData";
+
+        private const string LOCK = "Lock";
+        private const string WSHOLDPRESENT = "WSHoldPresent";
         #endregion
 
         #region 内部变量
@@ -76,14 +79,6 @@ namespace CyberX8_RT.Devices.TransPorter
         private DateTime _unlockDateTime = DateTime.Now;
         #region Routine
         /// <summary>
-        /// lock routine
-        /// </summary>
-        private TransporterLockRoutine _lockRoutine;
-        /// <summary>
-        /// Unlock Routine
-        /// </summary>
-        private TransporterUnlockRoutine _unlockRoutine;
-        /// <summary>
         /// Retract Routine
         /// </summary>
         private TransporterRetractRoutine _retractRoutine;
@@ -155,6 +150,9 @@ namespace CyberX8_RT.Devices.TransPorter
             DATA.Subscribe($"{Module}.ReadyToLock2", () => _transporterData.ReadyToLock2, SubscriptionAttribute.FLAG.IgnoreSaveDB);
             DATA.Subscribe($"{Module}.Unlocked1", () => _transporterData.Unlocked1, SubscriptionAttribute.FLAG.IgnoreSaveDB);
             DATA.Subscribe($"{Module}.Unlocked2", () => _transporterData.Unlocked2, SubscriptionAttribute.FLAG.IgnoreSaveDB);
+
+            DATA.Subscribe($"{Module}.Locked", () => _transporterData.Lock, SubscriptionAttribute.FLAG.IgnoreSaveDB);
+            DATA.Subscribe($"{Module}.WSHoldPresent", () => _transporterData.WSHoldPresent, SubscriptionAttribute.FLAG.IgnoreSaveDB);
         }
         /// <summary>
         /// 订阅变量数值发生变化
@@ -176,6 +174,9 @@ namespace CyberX8_RT.Devices.TransPorter
             IOModuleManager.Instance.SubscribeModuleVariable($"{Module}", READY_TO_LOCK2, UpdateVariableValue);
             IOModuleManager.Instance.SubscribeModuleVariable($"{Module}", WH_PRESENT1, UpdateVariableValue);
             IOModuleManager.Instance.SubscribeModuleVariable($"{Module}", WH_PRESENT2, UpdateVariableValue);
+
+            IOModuleManager.Instance.SubscribeModuleVariable($"{Module}", LOCK, UpdateVariableValue);
+            IOModuleManager.Instance.SubscribeModuleVariable($"{Module}", WSHOLDPRESENT, UpdateVariableValue);
         }
         /// <summary>
         /// 初始化操作
@@ -211,8 +212,6 @@ namespace CyberX8_RT.Devices.TransPorter
         /// </summary>
         private void InitializeRoutine()
         {
-            _lockRoutine = new TransporterLockRoutine(Module);
-            _unlockRoutine= new TransporterUnlockRoutine(Module);
             _retractRoutine= new TransporterRetractRoutine(Module);
             _extendRoutine=new TransporterExtendRoutine(Module);
         }
@@ -223,9 +222,17 @@ namespace CyberX8_RT.Devices.TransPorter
         /// <param name="cmd"></param>
         /// <param name="args"></param>
         /// <returns></returns>
-        private bool LockOperation(string cmd, object[] args)
+        public bool LockOperation(string cmd, object[] args)
         {
-            return StartRoutine(TransporterCommonOperation.Lock,_lockRoutine,null);
+            string ioName = BeckhoffModuleIOManager.Instance.GetIoNameByInnerModuleName($"{Module}.{LOCK}");
+            if (!string.IsNullOrEmpty(ioName))
+            {
+                return IOModuleManager.Instance.WriteIoValue(ioName, true);
+            }
+            else
+            {
+                return false;
+            }
         }
         /// <summary>
         /// Unlock 操作
@@ -233,9 +240,17 @@ namespace CyberX8_RT.Devices.TransPorter
         /// <param name="cmd"></param>
         /// <param name="args"></param>
         /// <returns></returns>
-        private bool UnlockOperation(string cmd, object[] args)
+        public bool UnlockOperation(string cmd, object[] args)
         {
-            return StartRoutine(TransporterCommonOperation.Unlock, _unlockRoutine, null);
+            string ioName = BeckhoffModuleIOManager.Instance.GetIoNameByInnerModuleName($"{Module}.{LOCK}");
+            if (!string.IsNullOrEmpty(ioName))
+            {
+                return IOModuleManager.Instance.WriteIoValue(ioName, false);
+            }
+            else
+            {
+                return false;
+            }
         }
         /// <summary>
         /// Retract 操作
@@ -364,10 +379,6 @@ namespace CyberX8_RT.Devices.TransPorter
         {
             switch (currentOperation)
             {
-                case TransporterCommonOperation.Lock:
-                    return _lockRoutine;
-                case TransporterCommonOperation.Unlock:
-                    return _unlockRoutine;
                 case TransporterCommonOperation.Retract:
                     return _retractRoutine;
                 case TransporterCommonOperation.Extend:

+ 1 - 7
CyberX8_RT/Modules/Transporter/TransporterGantryPositionRoutine.cs

@@ -211,13 +211,7 @@ namespace CyberX8_RT.Modules.Transporter
                 LOG.WriteLog(eEvent.ERR_TRANSPORTER, Module, $"{Module} has wafer Shuttle but elevator axis is not in up");
                 return false;
             }
-            //检验Facilities
-            var faciltiesResult = _facilities.CheckCDA();
-            if (!faciltiesResult.result)
-            {
-                LOG.WriteLog(eEvent.ERR_TRANSPORTER, Module, faciltiesResult.reason);
-                return false;
-            }
+            
             if (!_gantryAxis.IsSwitchOn)
             {
                 LOG.WriteLog(eEvent.ERR_TRANSPORTER, Module, $"{Module} gantry axis is not switch on ");

+ 32 - 97
CyberX8_RT/Modules/Transporter/TransporterMoveToRoutine.cs

@@ -31,8 +31,6 @@ namespace CyberX8_RT.Modules.Transporter
             CheckStatus,
             ElevatorPosition,
             ElevatorPositionWait,
-            ImmobilizeExtend,
-            ImmobilizeExtendWait,
             SafeMoveTo,
             CheckMoveToStatus,
             GantryPosition,
@@ -42,13 +40,14 @@ namespace CyberX8_RT.Modules.Transporter
 
         #region 内部变量
         private string _cellName;
+        private string _otherModule;
         private JetAxisBase _gantryAxis;
         private JetAxisBase _elevatorAxis;
+        private JetAxisBase _otherElevatorAxis;
         private LoaderEntity _loaderEntity;
         private JetAxisBase _loaderRotationAxis;
         private TransporterCommon _transporterCommon;
         private SystemFacilities _facilities;
-        private TransporterExtendRoutine _extendRoutine;
         private TransporterConflictRoutine _conflictRoutine;
         ProcessLayoutCellItem _cellItem;
         private bool _waferHolderPresent = false;
@@ -74,17 +73,14 @@ namespace CyberX8_RT.Modules.Transporter
         public RState Monitor()
         {
             Runner.Run(MoveToStep.CheckStatus, CheckStartPreConfition, NullFun,_delay_1ms)
-                //1.1 Elevator
+                //1. Elevator
                 .Run(MoveToStep.ElevatorPosition, ElevatorPosition, _delay_1ms)
-                .WaitWithStopCondition(MoveToStep.ElevatorPositionWait, CheckVerticalPositionStatus, CheckVerticalPositionRunStop)
-                //1.1 Immobilizer extend
-                .Run(MoveToStep.ImmobilizeExtend, ImmobilizeExtend, _delay_1ms)
-                .WaitWithStopCondition(MoveToStep.ImmobilizeExtendWait, CheckImmobilizeExtendStatus, CheckImmobilizeExtendRunStop)
-                //1.2 Move to 安全
-                .Run(MoveToStep.SafeMoveTo,SafeMoveTo,_delay_1ms)
+                .WaitWithStopCondition(MoveToStep.ElevatorPositionWait, CheckElevatorPositionStatus, CheckElevatorPositionRunStop)
+                //2. other Transporter Safe Move
+                .Run(MoveToStep.SafeMoveTo, SafeMoveTo, _delay_1ms)
                 .WaitWithStopCondition(MoveToStep.CheckMoveToStatus, () => CommonFunction.CheckRoutineEndState(_conflictRoutine),
                     CheckSafeMoveToStopStatus)
-                //1.3 Gantry 移动
+                //3. this Gantry Move To Target Cell
                 .Run(MoveToStep.GantryPosition, GantryPositionToCell, _delay_1ms)
                 .WaitWithStopCondition(MoveToStep.GantryPositionWait, CheckGantryPositionStatus, CheckGantryPositionRunStop)
                 .End(MoveToStep.End,NullFun,100);
@@ -97,75 +93,23 @@ namespace CyberX8_RT.Modules.Transporter
         private bool ElevatorPosition()
         {
             bool result= false;
-            //状态locked住了 则运动至Up
-            if(_waferHolderPresent)
+            //运动至UP
+            double elevatorPosition = _elevatorAxis.MotionData.MotorPosition;
+            if (!_elevatorAxis.CheckPositionIsInStation(elevatorPosition, "UP"))
             {
-                result= _elevatorAxis.PositionStation("Up");
+                result= _elevatorAxis.PositionStation("UP");
                 if(!result)
                 {
                     NotifyError(eEvent.ERR_TRANSPORTER, "elevator goto up failed", 0);
                 }
             }
-            else//不存在Wafer,则运动至Low
-            {
-                result= _elevatorAxis.PositionStation("LOW");
-                if (!result)
-                {
-                    NotifyError(eEvent.ERR_TRANSPORTER, "elevator goto low failed", 0);
-                }
-            }
-            return result;
-        }
-        /// <summary>
-        /// Immobile Extend
-        /// </summary>
-        /// <returns></returns>
-        private bool ImmobilizeExtend()
-        {
-            if(!_waferHolderPresent)
-            {
-                return true;
-            }
-            else
-            {
-                return _extendRoutine.Start(null) == RState.Running;
-            }
-        }
-        /// <summary>
-        /// 检验Immobilize状态
-        /// </summary>
-        /// <returns></returns>
-        private bool CheckImmobilizeExtendStatus()
-        {
-            if(!_waferHolderPresent)
-            {
-                return true;
-            }
             else
             {
-                return CommonFunction.CheckRoutineEndState(_extendRoutine);
-            }
-        }
-        /// <summary>
-        /// 检验Immobilize状态
-        /// </summary>
-        /// <returns></returns>
-        private bool CheckImmobilizeExtendRunStop()
-        {
-            if (!_waferHolderPresent)
-            {
-                return true;
-            }
-            else
-            {
-                bool result= CommonFunction.CheckRoutineStopState(_extendRoutine);
-                if(result)
-                {
-                    NotifyError(eEvent.ERR_TRANSPORTER, "extend failed", 0);
-                }
-                return result;
-            }
+                result = true;
+            }          
+            return result;
         }
+        
         /// <summary>
         /// 安全避障移动
         /// </summary>
@@ -247,18 +191,18 @@ namespace CyberX8_RT.Modules.Transporter
             }
         }
         /// <summary>
-        /// 检验Vertical移动状态
+        /// 检验Elevator移动状态
         /// </summary>
         /// <returns></returns>
-        private bool CheckVerticalPositionStatus()
+        private bool CheckElevatorPositionStatus()
         {
             return _elevatorAxis.Status == RState.End;
         }
         /// <summary>
-        /// 检验Vertical是否还在运动
+        /// 检验Elevator是否还在运动
         /// </summary>
         /// <returns></returns>
-        private bool CheckVerticalPositionRunStop()
+        private bool CheckElevatorPositionRunStop()
         {
             bool result= _elevatorAxis.Status == RState.Failed||_elevatorAxis.Status==RState.Timeout;
             if (result)
@@ -297,14 +241,14 @@ namespace CyberX8_RT.Modules.Transporter
         {
             _cellName = objs[0].ToString();
             _elevatorAxis = DEVICE.GetDevice<JetAxisBase>($"{Module}.Elevator");
+            _otherModule = Module == "Transporter2" ? "Transporter1" : "Transporter2";
+            _otherElevatorAxis = DEVICE.GetDevice<JetAxisBase>($"{_otherModule}.Elevator");
             _gantryAxis = DEVICE.GetDevice<JetAxisBase>($"{Module}.Gantry");
             _loaderEntity = Singleton<RouteManager>.Instance.GetModule<LoaderEntity>(ModuleName.Loader1.ToString());
             _loaderRotationAxis = DEVICE.GetDevice<JetAxisBase>($"{ModuleName.Loader1}.Rotation");
-            _facilities = DEVICE.GetDevice<SystemFacilities>("System.Facilities");
-            _extendRoutine = new TransporterExtendRoutine(Module);
             _conflictRoutine = new TransporterConflictRoutine(Module);
             _transporterCommon = DEVICE.GetDevice<TransporterCommon>($"{Module}.Common");
-            _waferHolderPresent = _transporterCommon.TransporterData.WhPresent1||_transporterCommon.TransporterData.WhPresent2;
+            //_waferHolderPresent = _transporterCommon.TransporterData.WhPresent1||_transporterCommon.TransporterData.WhPresent2;
             return Runner.Start(Module,$"MoveTo {_cellName}");
         }
         /// <summary>
@@ -313,23 +257,26 @@ namespace CyberX8_RT.Modules.Transporter
         /// <returns></returns>
         private bool CheckStartPreConfition()
         {
+            //所有轴上电并Homed
             if(!CheckPreCondition())
             {
                 return false;
             }
+            //this Transporter Elevator在UP位
             double elevatorPosition = _elevatorAxis.MotionData.MotorPosition;
-            if (!_elevatorAxis.CheckPositionIsInStation(elevatorPosition, "Up") && 
-                !_elevatorAxis.CheckPositionIsInStation(elevatorPosition, "Low"))
+            if (!_elevatorAxis.CheckPositionIsInStation(elevatorPosition, "UP"))
             {
-                NotifyError(eEvent.ERR_TRANSPORTER, $"{Module} elevator axis {elevatorPosition} is not in Up or Low station",-1);
+                NotifyError(eEvent.ERR_TRANSPORTER, $"{Module} elevator axis {elevatorPosition} is not in Up station",-1);
                 return false;
             }
-
-            if (!_loaderEntity.IsHomed)
+            //other Transporter Elevator在UP位
+            double otherElevatorPosition = _otherElevatorAxis.MotionData.MotorPosition;
+            if (!_otherElevatorAxis.CheckPositionIsInStation(otherElevatorPosition, "UP"))
             {
-                NotifyError(eEvent.ERR_TRANSPORTER, $"{ModuleName.Loader1} is not homed",-1);
+                NotifyError(eEvent.ERR_TRANSPORTER, $"{_otherModule} elevator axis {otherElevatorPosition} is not in Up station", -1);
                 return false;
             }
+            //若目标Cell为Loader, 则Loader应在TRNPA或TRNPB位
             if (_cellName == "Loader")
             {
                 double loaderRotationPosition = _loaderRotationAxis.MotionData.MotorPosition;
@@ -340,19 +287,7 @@ namespace CyberX8_RT.Modules.Transporter
                     return false;
                 }
             }
-
-            if (WaferHolderManager.Instance.HasWaferHolder(Module)&& !_elevatorAxis.CheckPositionIsInStation(elevatorPosition, "Up"))
-            {
-                NotifyError(eEvent.ERR_TRANSPORTER,$"{Module} has wafer Shuttle but elevator axis is not in up",-1);
-                return false;
-            }
-            //检验Facilities
-            var faciltiesResult = _facilities.CheckCDA();
-            if (!faciltiesResult.result)
-            {
-                NotifyError(eEvent.ERR_TRANSPORTER, faciltiesResult.reason,-1);
-                return false;
-            }
+            
             return true;
         }
 

+ 91 - 233
CyberX8_RT/Modules/Transporter/TransporterPickUpFromRoutine.cs

@@ -33,36 +33,28 @@ namespace CyberX8_RT.Modules.Transporter
         private enum PickUpStep
         {
             CheckPreCondition,
-            TargetCellUnclamp,
-            TargetCellUnclampWait,
-            VerticalLow,
-            VerticalLowWait,
+            DropBlockLockoff,
+            ElevatorGotoUp,
+            ElevatorGotoUpWait,
             SafeMoveTo,
             CheckMoveToStatus,
             GantryPosition,
-            GantryPoisitiolWait,
-            UnlockTransporterClamp,
-            UnlockTransporterClampWait,
-            CellClampRetract,
-            //CellClampRetractWait,
+            GantryPoisitionWait,
             LoopPickupRetry,
-            LoopRetryUnlock,
-            LoopRetryUnlockWait,
-            LoopRetryBackToLow,
-            LoopRetryBackToLowWait,
-            ElevatorPosition,
-            ElevatorPositionWait,
+            LoopRetryLockoff,
+            LoopRetryElevatorBackToUp,
+            LoopRetryElevatorBackToUpWait,
+            ElevatorPositionToCell,
+            ElevatorPositionToCellWait,
             Delay,
-            ReadyToLockCheck,
-            LockTransporterClamp,
-            LockTransporterClampWait, 
+            DropBlockLockOn, 
             LoopPickupRetryEnd,
             CalculateLiftupSpeed,
             PickupDelay,
-            VerticalUp,
-            VerticalUpWait,
-            UpdateWaferHolder,
-            CheckWHPresentAndLock,
+            ElevatorPositionToUp,
+            ElevatorPositionToUpWait,
+            UpdateWaferShuttle,
+            CheckWSPresent,
             //ReadBarcodeConfirm,
             End
         }
@@ -74,11 +66,8 @@ namespace CyberX8_RT.Modules.Transporter
         private LoaderEntity _loaderEntity;
         private JetAxisBase _loaderRotationAxis;
         private SystemFacilities _facilities;
-        private TransporterUnlockRoutine _unlockRoutine;
-        private TransporterLockRoutine _lockRoutine;
         private TransporterConflictRoutine _conflictRoutine;
         private TransporterCommon _transporterCommon;
-        private LoaderPreTransferUnclampRoutine _preTransferUnclampRoutine;
         private LoaderCommonDevice _loaderCommonDevice;
         ProcessLayoutCellItem _cellItem;
         private int _pickupTime;
@@ -109,175 +98,80 @@ namespace CyberX8_RT.Modules.Transporter
         public RState Monitor()
         {
             Runner.Run(PickUpStep.CheckPreCondition, CheckStartPreConfition, _delay_1ms)
-            //确认cell clamp Retracted
-                .Run(PickUpStep.TargetCellUnclamp, TargetCellUnclamp, _delay_1ms)
-                .WaitWithStopCondition(PickUpStep.TargetCellUnclampWait, TargetCellUnclampEndStatus, TargetCellUnclampStopStatus)
-                .Run(PickUpStep.VerticalLow, ElevatorGotoLow, _delay_1ms)
-                .WaitWithStopCondition(PickUpStep.VerticalLowWait, CheckVerticalPositionStatus, CheckVerticalPositionRunStop)
-                //1.2 Move to 安全
+                //1. 确认DropBlockLock是否off
+                .Run(PickUpStep.DropBlockLockoff, DropBlockLockoff, NullFun, _delay_1ms)
+                //2. Elevator go to up
+                .Run(PickUpStep.ElevatorGotoUp, ElevatorGotoUP, _delay_1ms)
+                .WaitWithStopCondition(PickUpStep.ElevatorGotoUpWait, CheckElevatorPositionEndStatus, CheckElevatorPositionEndStatus)
+                //3. other Transporter Safe Move 
                 .Run(PickUpStep.SafeMoveTo, SafeMoveTo, _delay_1ms)
                 .WaitWithStopCondition(PickUpStep.CheckMoveToStatus, () => CommonFunction.CheckRoutineEndState(_conflictRoutine),
                 CheckSafeMoveToStopStatus)
-                //1.2 Gantry 移动
+                //4. Gantry 移动到目标位置
                 .Run(PickUpStep.GantryPosition, GantryPositionToCell, _delay_1ms)
-                .WaitWithStopCondition(PickUpStep.GantryPoisitiolWait, CheckGantryPositionStatus, CheckGantryPositionRunStop)
-                //1.3 Unlock Transporter clamp
-                .Run(PickUpStep.UnlockTransporterClamp, () => { return _unlockRoutine.Start(null) == RState.Running; }, NullFun, _delay_1ms)
-                .WaitWithStopCondition(PickUpStep.UnlockTransporterClampWait, () => CommonFunction.CheckRoutineEndState(_unlockRoutine), 
-                    CheckUnlockRoutineStopStatus)
-                //.WaitWithStopCondition(PickUpStep.CellClampRetractWait,CheckCellRetractRoutineEndState,CheckGantryPositionRunStop)
+                .WaitWithStopCondition(PickUpStep.GantryPoisitionWait, CheckGantryPositionStatus, CheckGantryPositionRunStop)
+                //5. Pick up Retry
                 .LoopRetryStart(PickUpStep.LoopPickupRetry,"Pick up loop retry",_pickMaxRetries,NullFun,_delay_1ms)
-                .LoopRetrySecondRun(PickUpStep.LoopRetryUnlock, () => { return _unlockRoutine.Start(null) == RState.Running; }, NullFun, _delay_1ms)
-                .LoopRetrySecondRunWithStopStatus(PickUpStep.LoopRetryUnlockWait, () => CommonFunction.CheckRoutineEndState(_unlockRoutine),
-                    CheckUnlockRoutineStopStatus)
-                .LoopRetrySecondRun(PickUpStep.LoopRetryBackToLow,ElevatorGotoLow,NullFun,_delay_1ms)
-                .LoopRetrySecondRunWithStopStatus(PickUpStep.LoopRetryBackToLowWait, CheckVerticalPositionStatus, CheckVerticalPositionRunStop)
-                //1.4 Elevator 移动至cell
-                .LoopRetryRun(PickUpStep.ElevatorPosition, () => { return VerticalPositionToCell(); }, NullFun, _delay_1ms)
-                .LoopRetryRunWithStopStatus(PickUpStep.ElevatorPositionWait, CheckVerticalPositionStatus, CheckVerticalPositionRunStop)
+                .LoopRetrySecondRun(PickUpStep.LoopRetryLockoff, DropBlockLockoff, NullFun, _delay_1ms)
+                .LoopRetrySecondRun(PickUpStep.LoopRetryElevatorBackToUp, ElevatorGotoUp, NullFun,_delay_1ms)
+                .LoopRetrySecondRunWithStopStatus(PickUpStep.LoopRetryElevatorBackToUpWait, CheckElevatorPositionEndStatus, CheckElevatorPositionStopStatus)
+                //6. Elevator 移动至对应cell位
+                .LoopRetryRun(PickUpStep.ElevatorPositionToCell, ElevatorPositionToCell, NullFun, _delay_1ms)
+                .LoopRetryRunWithStopStatus(PickUpStep.ElevatorPositionToCellWait, CheckElevatorPositionEndStatus, CheckElevatorPositionStopStatus)
                 .LoopRetryDelay(PickUpStep.Delay,500)
-                //1.5 确认Ready to Lock Sensor
-                .LoopRetryWaitBack(PickUpStep.ReadyToLockCheck,CheckReadyToLock,_delay_1s)
-                //1.6 Unlock Transporter clamp
-                .LoopRetryRun(PickUpStep.LockTransporterClamp, () => { return _lockRoutine.Start(null) == RState.Running; }, NullFun, _delay_1ms)
-                .LoopRetryRunWithStopStatusBack(PickUpStep.LockTransporterClampWait, () => { return CommonFunction.CheckRoutineEndState(_lockRoutine); }, 
-                    CheckLockRoutineStopStatus)
+                //7. Drop Block Lock on,抓取WS
+                .LoopRetryRun(PickUpStep.DropBlockLockOn, DropBlockLockon, NullFun, _delay_1ms)              
                 .LoopRetryEnd(PickUpStep.LoopPickupRetryEnd, _delay_1ms)
-                //1.7 确认Elevator lift speed
+                //8. 确认Elevator lift speed
                 .Run(PickUpStep.CalculateLiftupSpeed,CalculateLiftupSpeed,_delay_1ms)
-                //1.8 Pickup delay
-                .Delay(PickUpStep.PickupDelay,_pickupDelayTime*1000)
-                 //1.9 Elevator goto Up
-                 .Run(PickUpStep.VerticalUp, ElevatorGotoUP, 100)
-                .WaitWithStopCondition(PickUpStep.VerticalUpWait, CheckVerticalPositionStatus, CheckVerticalPositionRunStop)
-                //2.0 Material Tracking Update
-                .Run(PickUpStep.UpdateWaferHolder, WaferHolderTransfer,_delay_1ms)
-                //2.0 确认WSPresent与Lock
-                .Wait(PickUpStep.CheckWHPresentAndLock,CheckWHPresentAndLock,_delay_2s)
-                //2.1 Read Barcode 确认与Material Tracking的转移是否一致
+                //9. Pickup delay
+                .Delay(PickUpStep.PickupDelay,_pickupDelayTime * 1000)
+                //10. Elevator goto Up
+                 .Run(PickUpStep.ElevatorPositionToUp, ElevatorGotoUP, 100)
+                .WaitWithStopCondition(PickUpStep.ElevatorPositionToUpWait, CheckElevatorPositionEndStatus, CheckElevatorPositionStopStatus)
+                //11. Material Tracking Update
+                .Run(PickUpStep.UpdateWaferShuttle, WaferShuttleTransfer,_delay_1ms)
+                //12. 确认Transporter的Wafer shuttle hold present信号为on
+                .Wait(PickUpStep.CheckWSPresent,CheckWSPresent, _delay_2s)
+                //13. Read Barcode 确认与Material Tracking的转移是否一致
                 //.Run(PickUpStep.ReadBarcodeConfirm,ReadBarcode,_delay_1ms)
                 .End(PickUpStep.End,NullFun,100);
             return Runner.Status;
         }
         /// <summary>
-        /// 目标cell unclamp
+        /// 关闭DropBlockLock
         /// </summary>
         /// <returns></returns>
-        private bool TargetCellUnclamp()
+        private bool DropBlockLockoff()
         {
-            if (_cellName == "Loader")
+            if (_transporterCommon.TransporterData.Lock)
             {
-                bool result= _preTransferUnclampRoutine.Start() == RState.Running;
-                if(!result)
-                {
-                    NotifyError(eEvent.ERR_TRANSPORTER, "Loader Unclamp failed",0);
-                }
-                return result;
-            }
-            else
-            {
-                _cellItem = ProcessLayoutManager.Instance.GetProcessLayoutCellItemByModuleName(_cellName);
-                if(_cellItem!=null)
-                {
-                    bool result = false;
-                    if(Enum.TryParse(_cellItem.ModuleName,out ModuleName cellModuleName))
-                    {
-                        if (ModuleHelper.IsRinse(cellModuleName))
-                        {
-                            RinseDevice rinseDevice = DEVICE.GetDevice<RinseDevice>(_cellItem.ModuleName);
-                            if (rinseDevice != null)
-                            {
-                                result= rinseDevice.WaferHolderClampValveOff();
-                                if(!result)
-                                {
-                                    NotifyError(eEvent.ERR_TRANSPORTER, $"{_cellItem.ModuleName} Clamp off failed", 0);
-                                }
-                                return result;
-                            }
-                        }
-                        else if (ModuleHelper.IsMetal(cellModuleName))
-                        {
-                            MetalCellDevice metalCellDevice = DEVICE.GetDevice<MetalCellDevice>(_cellItem.ModuleName);
-                            if (metalCellDevice != null)
-                            {
-                                result= metalCellDevice.WaferHolderClampOff();
-                                if (!result)
-                                {
-                                    NotifyError(eEvent.ERR_TRANSPORTER, $"{_cellItem.ModuleName} Clamp off failed",0);
-                                }
-                                return result;
-                            }
-                        }
-                    }
-                }
-            }
+                return _transporterCommon.UnlockOperation("", null);
+            }       
             return true;
         }
         /// <summary>
-        /// 目标Cell Unclamp状态
+        /// 打开DropBlockLock
         /// </summary>
         /// <returns></returns>
-        private bool TargetCellUnclampEndStatus()
+        private bool DropBlockLockon()
         {
-            if (_cellName == "Loader")
+            if (!_transporterCommon.TransporterData.Lock)
             {
-                return CommonFunction.CheckRoutineEndState(_preTransferUnclampRoutine);
-            }
-            else
-            {
-                _cellItem = ProcessLayoutManager.Instance.GetProcessLayoutCellItemByModuleName(_cellName);
-                if (_cellItem != null)
-                {
-                    if (Enum.TryParse(_cellItem.ModuleName, out ModuleName cellModuleName))
-                    {
-                        if (ModuleHelper.IsRinse(cellModuleName))
-                        {
-                            RinseDevice rinseDevice = DEVICE.GetDevice<RinseDevice>(_cellItem.ModuleName);
-                            if (rinseDevice != null)
-                            {
-                                return !rinseDevice.RinseData.WaferHolderClamp;
-                            }
-                        }
-                        else if (ModuleHelper.IsMetal(cellModuleName))
-                        {
-                            MetalCellDevice metalCellDevice = DEVICE.GetDevice<MetalCellDevice>(_cellItem.ModuleName);
-                            if (metalCellDevice != null)
-                            {
-                                return metalCellDevice.ClampOff;
-                            }
-                        }
-                    }
-                }
+                return _transporterCommon.LockOperation("", null);
             }
             return true;
         }
         /// <summary>
-        /// 目标Cell Unclamp运行中止状态
-        /// </summary>
-        /// <returns></returns>
-        private bool TargetCellUnclampStopStatus()
-        {
-            if (_cellName == "Loader")
-            {
-                bool result= CommonFunction.CheckRoutineStopState(_preTransferUnclampRoutine);
-                if (result)
-                {
-                    NotifyError(eEvent.ERR_TRANSPORTER, "Loader Unclamp failed", 0);
-                }
-                return result;
-            }
-            return false;
-        }
-        /// <summary>
-        /// Elevator运动至LOW
+        /// Elevator运动至UP
         /// </summary>
         /// <returns></returns>
-        private bool ElevatorGotoLow()
+        private bool ElevatorGotoUp()
         {
-            bool result = _elevatorAxis.PositionStation("LOW");
+            bool result = _elevatorAxis.PositionStation("UP");
             if(!result)
             {
-                NotifyError(eEvent.ERR_TRANSPORTER, "Elevator goto LOW failed",0);
+                NotifyError(eEvent.ERR_TRANSPORTER, "Elevator goto UP failed",0);
             }
             return result;
         }
@@ -364,7 +258,7 @@ namespace CyberX8_RT.Modules.Transporter
         /// Elevator Position to cell
         /// </summary>
         /// <returns></returns>
-        private bool VerticalPositionToCell()
+        private bool ElevatorPositionToCell()
         {
             bool result = false;
             if( _cellItem != null )
@@ -393,7 +287,7 @@ namespace CyberX8_RT.Modules.Transporter
         /// 检验Vertical移动状态
         /// </summary>
         /// <returns></returns>
-        private bool CheckVerticalPositionStatus()
+        private bool CheckElevatorPositionEndStatus()
         {
             return _elevatorAxis.Status == RState.End;
         }
@@ -401,7 +295,7 @@ namespace CyberX8_RT.Modules.Transporter
         /// 检验Vertical是否还在运动
         /// </summary>
         /// <returns></returns>
-        private bool CheckVerticalPositionRunStop()
+        private bool CheckElevatorPositionStopStatus()
         {
             bool result = _elevatorAxis.Status == RState.Failed || _elevatorAxis.Status == RState.Timeout ;
             if (result)
@@ -430,51 +324,7 @@ namespace CyberX8_RT.Modules.Transporter
                 NotifyError(eEvent.ERR_TRANSPORTER, "Gantry Motion failed", 0);
             }
             return result;
-        }
-        /// <summary>
-        /// 检验Unlock异常状态
-        /// </summary>
-        /// <returns></returns>
-        private bool CheckUnlockRoutineStopStatus()
-        {
-            bool result = CommonFunction.CheckRoutineStopState(_unlockRoutine);
-            if (result)
-            {
-                NotifyError(eEvent.ERR_TRANSPORTER, "unlock failed", 0);
-            }
-            return result;
-        }
-        /// <summary>
-        /// 检验Ready to lock
-        /// </summary>
-        /// <returns></returns>
-        private bool CheckReadyToLock()
-        {
-            if(! _transporterCommon.TransporterData.ReadyToLock1)
-            {
-                NotifyError(eEvent.WARN_TRANSPORTER,  $"{Module} Ready to lock1 is off",0);
-                return false;
-            }
-            if (!_transporterCommon.TransporterData.ReadyToLock2)
-            {
-                NotifyError(eEvent.WARN_TRANSPORTER, $"{Module} Ready to lock2 is off",0);
-                return false;
-            }
-            return true;
-        }
-        /// <summary>
-        /// 检验Lock Routine异常状态
-        /// </summary>
-        /// <returns></returns>
-        private bool CheckLockRoutineStopStatus()
-        {
-            bool result = CommonFunction.CheckRoutineStopState(_lockRoutine);
-            if(result)
-            {
-                NotifyError(eEvent.WARN_TRANSPORTER, "lock failed", 0);
-            }
-            return result;
-        }
+        }        
         /// <summary>
         /// 计算提升速度
         /// </summary>
@@ -541,7 +391,7 @@ namespace CyberX8_RT.Modules.Transporter
         /// 更新WaferHolder移动信息
         /// </summary>
         /// <returns></returns>
-        private bool WaferHolderTransfer()
+        private bool WaferShuttleTransfer()
         {
             bool isMetal = false;
             DateTime lastMetalRecipeTime = DateTime.Now;
@@ -593,10 +443,10 @@ namespace CyberX8_RT.Modules.Transporter
         /// 检验WHPresent与Lock状态
         /// </summary>
         /// <returns></returns>
-        private bool CheckWHPresentAndLock()
+        private bool CheckWSPresent()
         {
-            bool locked = _transporterCommon.TransporterData.Locked1 && _transporterCommon.TransporterData.Locked2;
-            bool whPresent= _transporterCommon.TransporterData.WhPresent1 && _transporterCommon.TransporterData.WhPresent2;
+            bool locked = _transporterCommon.TransporterData.Lock;
+            bool whPresent= _transporterCommon.TransporterData.WSHoldPresent;
             bool result= locked && (whPresent||_bypassWaferHolderPresent);
             if (!result)
             {
@@ -641,18 +491,14 @@ namespace CyberX8_RT.Modules.Transporter
         public RState Start(params object[] objs)
         {
             _cellName = objs[0].ToString();
-            _elevatorAxis = DEVICE.GetDevice<JetAxisBase>($"{Module}.Elevator");
+            _elevatorAxis = DEVICE.GetDevice<JetAxisBase>($"{Module}.Elevator");;
             _gantryAxis = DEVICE.GetDevice<JetAxisBase>($"{Module}.Gantry");
             _loaderEntity = Singleton<RouteManager>.Instance.GetModule<LoaderEntity>(ModuleName.Loader1.ToString());
             _loaderRotationAxis = DEVICE.GetDevice<JetAxisBase>($"{ModuleName.Loader1}.Rotation");
-            _facilities = DEVICE.GetDevice<SystemFacilities>("System.Facilities");
-            _unlockRoutine = new TransporterUnlockRoutine(Module);
-            _lockRoutine = new TransporterLockRoutine(Module);
             _conflictRoutine = new TransporterConflictRoutine(Module);
             _transporterCommon = DEVICE.GetDevice<TransporterCommon>($"{Module}.Common");
             _loaderCommonDevice = DEVICE.GetDevice<LoaderCommonDevice>($"{ModuleName.Loader1}.Common");
             _bypassWaferHolderPresent = SC.GetValue<bool>("Transporter.BypassWaferHolderPresent");
-            _preTransferUnclampRoutine = new LoaderPreTransferUnclampRoutine(ModuleName.Loader1.ToString());
             _velocity = 0;
             _acceleration = 0;
             _pickMaxRetries = SC.GetValue<int>("Transporter.MaxPickTries");
@@ -674,24 +520,32 @@ namespace CyberX8_RT.Modules.Transporter
         /// <returns></returns>
         private bool CheckStartPreConfition()
         {
+            //所有轴上电并Homed
             bool result = CheckPreCondition();
             if(!result)
             {
                 return false;
             }
-            double elevatorPosition = _elevatorAxis.MotionData.MotorPosition;
-            if (!_elevatorAxis.CheckPositionIsInStation(elevatorPosition, "Up") && 
-                !_elevatorAxis.CheckPositionIsInStation(elevatorPosition, "Low"))
-            {
-                NotifyError(eEvent.ERR_TRANSPORTER, $"{Module} elevator axis {elevatorPosition} is not in Up or Low station",-1);
+            //Transporter Elevator在UP位
+            //double elevatorPosition = _elevatorAxis.MotionData.MotorPosition;
+            //if (!_elevatorAxis.CheckPositionIsInStation(elevatorPosition, "UP"))
+            //{
+            //    NotifyError(eEvent.ERR_TRANSPORTER, $"{Module} elevator axis {elevatorPosition} is not in Up station", -1);
+            //    return false;
+            //}           
+            //Transporter的Wafer shuttle hold present信号为off
+            if (_transporterCommon.TransporterData.WSHoldPresent)
+            {
+                NotifyError(eEvent.ERR_TRANSPORTER, $"{Module} WaferShuttleHoldPresent is on", -1);
                 return false;
             }
-
+            //Loader is Home
             if (!_loaderEntity.IsHomed)
             {
-                NotifyError(eEvent.ERR_TRANSPORTER, $"{ModuleName.Loader1} is not homed",-1);
+                NotifyError(eEvent.ERR_TRANSPORTER, $"{ModuleName.Loader1} is not homed", -1);
                 return false;
             }
+            //若目标Cell为Loader, 则Loader需在TRNA或TRANB位置且WaferShuttlePresent信号on
             if (_cellName == "Loader")
             {
                 double loaderRotationPosition = _loaderRotationAxis.MotionData.MotorPosition;
@@ -701,23 +555,27 @@ namespace CyberX8_RT.Modules.Transporter
                     NotifyError(eEvent.ERR_TRANSPORTER, $"{ModuleName.Loader1} rotation axis {loaderRotationPosition} is not int TRNPA or TRNPB station",-1);
                     return false;
                 }
+                if(!_loaderCommonDevice.CommonData.WaferHolderPresent)
+                {
+                    NotifyError(eEvent.ERR_TRANSPORTER, $"{ModuleName.Loader1} WaferShuttlePresent is off", -1);
+                    return false;
+                }
             }
-
-            if (!WaferHolderManager.Instance.HasWaferHolder(_cellName))
+            //Transporter没有WS信息
+            if (!WaferHolderManager.Instance.HasWaferHolder(Module))
             {
-                NotifyError(eEvent.ERR_TRANSPORTER, $"{_cellName} does not has wafer Shuttle", -1);
+                NotifyError(eEvent.ERR_TRANSPORTER, $"{Module} already has wafer Shuttle", -1);
                 return false;
             }
-            //检验Facilities
-            var faciltiesResult = _facilities.CheckCDA();
-            if (!faciltiesResult.result)
+            //目标Cell应有WS信息
+            if (!WaferHolderManager.Instance.HasWaferHolder(_cellName))
             {
-                NotifyError(eEvent.ERR_TRANSPORTER, faciltiesResult.reason,-1);
+                NotifyError(eEvent.ERR_TRANSPORTER, $"{_cellName} does not has wafer shuttle", -1);
                 return false;
             }
+            
             return true;
         }
-
         /// <summary>
         /// 检验前置条件
         /// </summary>

+ 4 - 2
CyberX8_Simulator/Config/UILayout.xml

@@ -17,8 +17,10 @@
 	</Navigation>
 
 	<Navigation Id="Galil" Name="Galil">
-		<SubView Id="Galil1" Name="Galil1" ViewClass="CyberX8_Simulator.Views.GalilView" Assembly="CyberX8_Simulator" Port="58678"/>
-		<SubView Id="Galil2" Name="Galil2" ViewClass="CyberX8_Simulator.Views.GalilView" Assembly="CyberX8_Simulator" Port="58679"/>
+		<SubView Id="Galil1" Name="PUF1" ViewClass="CyberX8_Simulator.Views.GalilView" Assembly="CyberX8_Simulator" Port="58678"/>
+		<SubView Id="Galil2" Name="Loader1" ViewClass="CyberX8_Simulator.Views.GalilView" Assembly="CyberX8_Simulator" Port="58679"/>
+		<SubView Id="Galil3" Name="LoaderTransporter" ViewClass="CyberX8_Simulator.Views.GalilView" Assembly="CyberX8_Simulator" Port="58680"/>
+		<SubView Id="Galil4" Name="ProcessTransporter" ViewClass="CyberX8_Simulator.Views.GalilView" Assembly="CyberX8_Simulator" Port="58681"/>
 	</Navigation>
 	
 	<Navigation Id="Power" Name="Power" >		

+ 18 - 14
CyberX8_Themes/UserControls/TransporterDebugControl.xaml

@@ -44,24 +44,28 @@
 
                         </Grid>
                     </GroupBox>
-                    <GroupBox Header="Immobilize" Grid.Row="1">
+                    <!--<GroupBox Header="Immobilize" Grid.Row="1">
                         <Grid>
+                            <Grid.ColumnDefinitions>
+                                <ColumnDefinition Width="43*"/>
+                                <ColumnDefinition Width="245*"/>
+                            </Grid.ColumnDefinitions>
                             <Label Content="1" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10,0,0,0"></Label>
-                            <Ellipse Width="16" Height="16"  Fill="{Binding ElementName=self,Path=Retract1On,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" Margin="10,14,0,14"/>
+                            <Ellipse Width="16" Height="16"  Fill="{Binding ElementName=self,Path=Retract1On,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" Margin="10,21,0,21"/>
 
-                            <Label Content="2" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="40,0,0,0"></Label>
-                            <Ellipse Width="16" Height="16"  Fill="{Binding ElementName=self,Path=Retract2On,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" Margin="40,14,0,14"/>
+                            <Label Content="2" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="40,0,0,0" Grid.ColumnSpan="2"></Label>
+                            <Ellipse Width="16" Height="16"  Fill="{Binding ElementName=self,Path=Retract2On,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" Margin="40,21,0,21" Grid.ColumnSpan="2"/>
 
-                            <Button Style="{StaticResource SysBtnStyle}"  Content="Retract" Width="70" Height="30" HorizontalAlignment="Left" Click="Retract_Click" Margin="70,14,0,14"/>
-                            <Button Style="{StaticResource SysBtnStyle}"  Content="Extend" Width="70" Height="30" HorizontalAlignment="Left" Click="Extend_Click" Margin="150,14,0,14"/>
+                            <Button Style="{StaticResource SysBtnStyle}"  Content="Retract" Width="70" Height="30" HorizontalAlignment="Left" Click="Retract_Click" Margin="27,14,0,14" Grid.Column="1"/>
+                            <Button Style="{StaticResource SysBtnStyle}"  Content="Extend" Width="70" Height="30" HorizontalAlignment="Left" Click="Extend_Click" Margin="107,14,0,14" Grid.Column="1"/>
 
-                            <Label Content="1" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="230,0,0,0"></Label>
-                            <Ellipse Width="16" Height="16"  Fill="{Binding ElementName=self,Path=Extend1On,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" Margin="230,14,0,14"/>
-                            <Label Content="2" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="260,0,0,0"></Label>
-                            <Ellipse Width="16" Height="16"  Fill="{Binding ElementName=self,Path=Extend2On,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" Margin="260,14,0,14"/>
+                            <Label Content="1" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="187,0,0,0" Grid.Column="1"></Label>
+                            <Ellipse Width="16" Height="16"  Fill="{Binding ElementName=self,Path=Extend1On,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" Margin="187,21,0,21" Grid.Column="1"/>
+                            <Label Content="2" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="217,0,0,0" Grid.Column="1"></Label>
+                            <Ellipse Width="16" Height="16"  Fill="{Binding ElementName=self,Path=Extend2On,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" Margin="217,21,0,21" Grid.Column="1"/>
 
                         </Grid>
-                    </GroupBox>
+                    </GroupBox>-->
                 </Grid>
                 <Grid Grid.Column="1">
                     <Grid>
@@ -83,10 +87,10 @@
                                 </Grid.RowDefinitions>
                                 <Label Content="1" Grid.Row="0" Grid.RowSpan="2" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="160,4,0,0"></Label>
                                 <Label Content="2" Grid.Row="0" Grid.RowSpan="2" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="200,4,0,0"></Label>
-
-                                <Label Content="Ready To Lock" Grid.Row="1" VerticalAlignment="Center"></Label>
+                            
+                                <!--<Label Content="Ready To Lock" Grid.Row="1" VerticalAlignment="Center"></Label>
                                 <Ellipse Grid.Row="1" Width="16" Height="16"  Fill="{Binding ElementName=self,Path=ReadyToLock1On,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="160,0,0,0"/>
-                                <Ellipse Grid.Row="1" Width="16" Height="16"  Fill="{Binding ElementName=self,Path=ReadyToLock2On,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="200,0,0,0"/>
+                                <Ellipse Grid.Row="1" Width="16" Height="16"  Fill="{Binding ElementName=self,Path=ReadyToLock2On,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="200,0,0,0"/>-->
 
                                 <Label Content="WS Present" Grid.Row="2" VerticalAlignment="Center"></Label>
                                 <Ellipse Grid.Row="2" Width="16" Height="16"  Fill="{Binding ElementName=self,Path=WHPresent1,Converter={StaticResource boolToColor}}" Stroke="Silver" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="160,0,0,0"/>

+ 2 - 2
CyberX8_Themes/UserControls/TransporterElevatorTeachControl.xaml

@@ -96,7 +96,7 @@
             HorizontalAlignment="Left" Margin="12,0,0,0" Grid.Column="1"/>
                     <Ellipse Margin="35,6,0,6"  Width="16" Height="16"  Fill="{Binding NegativeSwSwitched, Converter={StaticResource boolToRedColor}, ElementName=self}"   Stroke="Silver" HorizontalAlignment="Left" Grid.ColumnSpan="2"/>
                 </Grid>
-                <Grid Grid.Row="9">
+                <!--<Grid Grid.Row="9">
                     <Label Height="40" Content="Ready to Lock1" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Center" 
             HorizontalAlignment="Left" Margin="60,0,0,0"/>
                     <Ellipse Margin="35,0"  Width="16" Height="16"  Fill="{Binding ReadyToLock1, Converter={StaticResource boolToColor}, ElementName=self}"   Stroke="Silver" HorizontalAlignment="Left"/>
@@ -115,7 +115,7 @@
                     <Label Height="40" Content="Wafer Present2" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Center" 
             HorizontalAlignment="Left" Margin="60,0,0,0"/>
                     <Ellipse Margin="35,0"  Width="16" Height="16"  Fill="{Binding WaferPresent2, Converter={StaticResource boolToColor}, ElementName=self}"   Stroke="Silver" HorizontalAlignment="Left"/>
-                </Grid>
+                </Grid>-->
             </Grid>
         </Grid>
     </Grid>

+ 4 - 4
CyberX8_Themes/UserControls/TransporterOperationControl.xaml

@@ -26,12 +26,12 @@
         <Grid Grid.Row="0">
             <Label Content="{Binding ElementName=self,Path=ModuleName}" FontSize="18" Width="120" Height="30" VerticalAlignment="Center" HorizontalAlignment="Center"></Label>
         </Grid>
-        <Grid Grid.Row="1">
+        <!--<Grid Grid.Row="1">
             <Ellipse Margin="35,0"  Width="16" Height="16"  Fill="{Binding Clamped, Converter={StaticResource boolToColor}, ElementName=self}"   Stroke="Silver" HorizontalAlignment="Left"/>
             <Button Style="{StaticResource SysBtnStyle}"  Content="Clamp" Height="30" Width="100" HorizontalAlignment="Left" Margin="70,5,0,5" Click="Clamp_Click"/>
             <Ellipse Margin="225,0,0,0"  Width="16" Height="16"  Fill="{Binding Unclamped, Converter={StaticResource boolToColor}, ElementName=self}"   Stroke="Silver" HorizontalAlignment="Left"/>
             <Button Style="{StaticResource SysBtnStyle}"  Content="Unclamp" Height="30" Width="100" HorizontalAlignment="Left" Margin="260,5,0,5" Click="Unclamp_Click"/>
-        </Grid>
+        </Grid>-->
         <Grid Grid.Row="2">
             <Ellipse Margin="35,0"  Width="16" Height="16"  Fill="{Binding Locked, Converter={StaticResource boolToColor}, ElementName=self}"   Stroke="Silver" HorizontalAlignment="Left"/>
             <Button Style="{StaticResource SysBtnStyle}"  Content="Lock" Height="30" Width="100" HorizontalAlignment="Left" Margin="70,5,0,5" Click="Lock_Click"/>
@@ -50,12 +50,12 @@
 
 
         </Grid>
-        <Grid Grid.Row="5">
+        <!--<Grid Grid.Row="5">
             <CheckBox Content="Disable Empty Drip Tray" VerticalContentAlignment="Center" HorizontalAlignment="Center"></CheckBox>
         </Grid>
         <Grid Grid.Row="6">
             <Ellipse Margin="150,12,234,12"  Width="16" Height="16"  Fill="{Binding ManualMode, Converter={StaticResource boolToColor}, ElementName=self}"   Stroke="Silver"/>
             <Label Content="Manual Mode" VerticalContentAlignment="Center" HorizontalAlignment="Left" Margin="166,0,0,0"/>
-        </Grid>
+        </Grid>-->
     </Grid>
 </UserControl>

+ 17 - 2
Framework/Common/CommonData/Transporter/TransporterData.cs

@@ -9,6 +9,9 @@ namespace MECF.Framework.Common.CommonData.Transporter
     public class TransporterData : NotifiableItem
     {
         #region 内部变量
+        /// <summary>
+        /// X12
+        /// </summary>
         private bool _unlock;
 
         private bool _locked1;
@@ -40,8 +43,16 @@ namespace MECF.Framework.Common.CommonData.Transporter
         private bool _whPresent2;
 
         private string _barcode;
-        #endregion
+        /// <summary>
+        /// X8 Data
+        /// </summary>
+        private bool _lock;
 
+        private bool _wsHoldPresent;
+        #endregion
+        /// <summary>
+        /// X12
+        /// </summary>
         public bool Unlock { get { return _unlock; } set { _unlock = value; InvokePropertyChanged(nameof(Unlock)); } }
         public bool Locked1 { get { return _locked1; } set { _locked1 = value; InvokePropertyChanged(nameof(Locked1)); } }
         public bool Locked2 { get { return _locked2; } set { _locked2 = value; InvokePropertyChanged(nameof(Locked2)); } }
@@ -58,6 +69,10 @@ namespace MECF.Framework.Common.CommonData.Transporter
         public bool WhPresent1 { get { return _whPresent1; } set { _whPresent1 = value;InvokePropertyChanged(nameof(WhPresent1)); } }
         public bool WhPresent2 { get { return _whPresent2; } set { _whPresent2 = value;InvokePropertyChanged(nameof(WhPresent2)); } }
         public string Barcode { get { return _barcode; } set { _barcode = value;InvokePropertyChanged(nameof(Barcode)); } }
-
+        /// <summary>
+        /// X8
+        /// </summary>
+        public bool Lock { get { return _lock; } set { _lock = value; InvokePropertyChanged(nameof(Lock)); } }
+        public bool WSHoldPresent { get { return _wsHoldPresent; } set { _wsHoldPresent = value; InvokePropertyChanged(nameof(WSHoldPresent)); } }
     }
 }