123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- using System;
- using System.Collections;
- using Aitex.Core.Common;
- using Aitex.Core.RT.DataCenter;
- using Aitex.Core.RT.Device;
- using Aitex.Core.RT.Event;
- using Aitex.Core.RT.Log;
- using Aitex.Core.RT.OperationCenter;
- using Aitex.Core.RT.SCCore;
- using Aitex.Core.Util;
- using Aitex.Sorter.Common;
- using MECF.Framework.Common.Equipment;
- using MECF.Framework.Common.FAServices;
- using MECF.Framework.Common.SubstrateTrackings;
- using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.Efems.Rorzes;
- using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.LoadPorts;
- namespace JetEfemLib.LPs
- {
- public class FutureEfemLoadPort : FutureEfemLoadPortBase
- {
- public FutureEfemLoadPort(string module, string name, string efem):base(module, name, efem)
- {
- }
- public override bool Initialize()
- {
- if (_efem == null && !string.IsNullOrEmpty(_efemName))
- {
- _efem = DEVICE.GetDevice<FutureEfem>(_efemName);
- _efem.SetLoadPortCallback(ModuleHelper.Converter(Module), this);
- }
- return base.Initialize();
- }
- public override void NoteStatus(string data1, string data2)
- {
- uint result1 = Convert.ToUInt32(data1, 16);
- uint result2 = Convert.ToUInt32(data2, 16);
- BitArray bitData1 = new BitArray(new int[] { Convert.ToInt32(data1, 16) });
- BitArray bitData2 = new BitArray(new int[] { Convert.ToInt32(data2, 16) });
- //placement bit 0
- //present bit 1
- //access sw bit 2
- //clampState bit 3
- //doorState bit 4
- //dockState bit 5
- //wafer size 8 bit 6
- //wafer size 12 bit 7
- bool placement = (result1 & 0x00000001u) == 0x00000001u;
- bool present = !((result1 & 0x00000002u) == 0x00000002u);
- SetPresent(present);
- SetPlaced(placement);
- _isAccessSwPressed = (result1 & 0x00000004u) == 0x00000004u;
- //_clampState = (result1 & 0x00000008u) == 0x00000008u ? FoupClampState.Close : FoupClampState.Open;
- _doorState = (result1 & 0x00000020u) == 0x00000020u ? FoupDoorState.Close : FoupDoorState.Open;
- _dockState = FoupDockState.Docked;
- bool sizecheck1 = (result1 & 0x00000040u) == 0x00000040u;
- bool sizecheck2 = (result1 & 0x00000080u) == 0x00000080u;
- bool sizecheck3 = (result1 & 0x00000100u) == 0x00000100u;
- if (IsPlacement)
- {
- if (_doorState == FoupDoorState.Close)
- {
- IsWaferProtrude = !((result1 & 0x00000200u) == 0x00000200u);
- if (IsWaferProtrude)
- {
- EV.PostAlarmLog(Module, "Detect Wafer Protrude !");
- }
- }
- //if (isWS8 == isWS12)
- //{
- // EV.PostAlarmLog(LPModuleName.ToString(), "Get WaferSize Data Abnormal , pls check config");
- //}
- if (sizecheck1 && sizecheck2 && sizecheck3)
- {
- WaferSize = (WaferSize)SC.GetValue<int>("System.BigWafer");
- CarrierManager.Instance.UpdateWaferSize(LPModuleName, 0, WaferSize);
- }
- else if (!sizecheck1 && sizecheck2 && sizecheck3)
- {
- WaferSize = (WaferSize)SC.GetValue<int>("System.SmallWafer");
- CarrierManager.Instance.UpdateWaferSize(LPModuleName, 0, WaferSize);
- }
- else if (sizecheck1 && !sizecheck2 && sizecheck3)
- {
- WaferSize = (WaferSize)SC.GetValue<int>("System.MidWafer");
- CarrierManager.Instance.UpdateWaferSize(LPModuleName, 0, WaferSize);
- }
- else if (sizecheck1 && sizecheck2 && !sizecheck3)
- {
- WaferSize = (WaferSize)SC.GetValue<int>("System.BigWafer");
- CarrierManager.Instance.UpdateWaferSize(LPModuleName, 0, WaferSize);
- }
- }
- IndicatorVALID = GetIndicatorState((result1 & 0x01000000u) == 0x01000000u); //bit24
- IndicatorCS0 = GetIndicatorState((result1 & 0x02000000u) == 0x02000000u); //bit25
- IndicatorCS1 = GetIndicatorState((result1 & 0x04000000u) == 0x04000000u); //bit26
- IndicatorTR_REQ = GetIndicatorState((result1 & 0x10000000u) == 0x10000000u); //bit28
- IndicatorBUSY = GetIndicatorState((result1 & 0x20000000u) == 0x20000000u); //bit29
- IndicatorCOMPT = GetIndicatorState((result1 & 0x40000000u) == 0x40000000u); //bit30
- IndicatorCONT = GetIndicatorState((result1 & 0x80000000u) == 0x80000000u); //bit31
- //E84Signal.VALID = (result1 & 0x01000000u) == 0x01000000u //bit 24
- //E84Signal.CS_0 = (result1 & 0x02000000u) == 0x02000000u //bit 25
- //E84Signal.CS_1 = (result1 & 0x04000000u) == 0x04000000u //bit 26
- //E84Signal.TR_REQ = (result1 & 0x10000000u) == 0x10000000u //bit 28
- //E84Signal.BUSY = (result1 & 0x20000000u) == 0x20000000u //bit 29
- //E84Signal.COMPT = (result1 & 0x40000000u) == 0x40000000u //bit 30
- //E84Signal.CONT = (result1 & 0x80000000u) == 0x80000000u //bit 31
- //check presence light bit 0
- //check placement light bit 1
- //check load light bit 2
- //check unload light bit 3
- //check manual mode light bit 4
- //check error light bit 5
- //check clamp/unclamp light bit 6
- //check dock/undock light bit 7
- //check access switch light bit 8
- IndicatiorPresence = GetIndicatorState(bitData2[0]);
- IndicatiorPlacement = GetIndicatorState(bitData2[1]);
- IndicatiorLoad = GetIndicatorState(bitData2[2]);
- IndicatiorUnload = GetIndicatorState(bitData2[3]);
- IndicatiorManualMode = GetIndicatorState(bitData2[4]);
- IndicatorAlarm = GetIndicatorState(bitData2[5]);
- IndicatiorClampUnclamp = GetIndicatorState(bitData2[6]);
- IndicatiorDockUndock = GetIndicatorState(bitData2[7]);
- IndicatiorOpAccess = GetIndicatorState(bitData2[8]);
- IndicatorL_REQ = GetIndicatorState(bitData2[24]); //bit24
- IndicatorU_REQ = GetIndicatorState(bitData2[25]); //bit25
- IndicatorREADY = GetIndicatorState(bitData2[27]); //bit27
- IndicatorHO_AVBL = GetIndicatorState(bitData2[30]); //bit30
- IndicatorES = GetIndicatorState(bitData2[31]); //bit31
- //E84Signal.L_REQ = bitData2[24] //bit 24
- //E84Signal.U_REQ = bitData2[25] //bit 25
- //E84Signal.READY = bitData2[27] //bit 27
- //E84Signal.HO_AVBL = bitData2[30] //bit 30
- //E84Signal.ES = bitData2[31] //bit 31
- CassetteState = IsPlacement ? LoadportCassetteState.Normal : LoadportCassetteState.None;
- if (bitData2[5])
- {
- Error = true;
- }
- else
- {
- if (_loadPortState == LoadPortStates.Faulted)
- Error = true;
- else
- Error = false;
- }
- }
- }
- }
|