public void SetLotData(ILotData lotData) { WriteMemory<LotDataTransmissionToStreamConverter, LotDataTransmission>(haLotDataTransmission, LotDataTransmission.BeforeWritingCassetteInfo); WriteMemory<LotCassetteInfoToStreamConverter, ILotData>(haLotCassetteData, lotData); WriteMemory<LotDataTransmissionToStreamConverter, LotDataTransmission>(haLotDataTransmission, LotDataTransmission.BeforeWritingWaferInfo); WriteMemory<LotWaferInfoToStreamConverter, ILotData>(haLotWafferData, lotData); int writeCommandCount; if ((lotData.Wafers.Count % 32) == 0) writeCommandCount = lotData.Wafers.Count / 32; else writeCommandCount = lotData.Wafers.Count / 32 + 1; for (int i = 0; i < writeCommandCount; i++) { WriteMemory<WafersToStreamConverter, IList<IWafer>>(haWafers + i * 64, lotData.Wafers.Skip(i * 32).Take(32).ToList()); } WriteMemory<LotDataTransmissionToStreamConverter, LotDataTransmission>(haLotDataTransmission, LotDataTransmission.Cleared); }
public new void SetLotData(ILotData lotData) { _logger.Debug(_moduleName, string.Format("{0}.SetLotData({1})", typeof(MountPlc).Name, (lotData != null) ? lotData.ToString() : "null")); base.SetLotData(lotData); }
private void CompareObjects(MountSimulatorPlcCommunication simulator, bool isCassetteIdError, string newLotId, MountLine line, bool isNewLotStarted, bool isBarcodeReadedOk, bool isCarrierPlateMountingReady, bool isWaferBreakInfoOk, bool isMountingCarrierPlateError, bool isLotEnded, bool isReservationLotCanceled, bool isInformationSystemError, ILotData lotData) { Assert.AreEqual<bool>(isCassetteIdError, simulator.IsCassetteIdError); Assert.AreEqual<string>(newLotId, simulator.NewLotId); Assert.AreEqual<MountLine>(line, simulator.Line); Assert.AreEqual<bool>(isNewLotStarted, simulator.IsLotStarted); Assert.AreEqual<bool>(isBarcodeReadedOk, simulator.IsBarcodeReadedOk); Assert.AreEqual<bool>(isCarrierPlateMountingReady, simulator.IsCarrierPlateMountingReady); Assert.AreEqual<bool>(isWaferBreakInfoOk, simulator.IsWaferBreakInfoOk); Assert.AreEqual<bool>(isMountingCarrierPlateError, simulator.IsMountingCarrierPlateError); Assert.AreEqual<bool>(isLotEnded, simulator.IsLotEnded); Assert.AreEqual<bool>(isReservationLotCanceled, simulator.IsReservationLotCanceled); Assert.AreEqual<bool>(isInformationSystemError, simulator.InformationSystemError); // Check lot data - START Assert.AreEqual<string>(lotData.LotId, simulator.LotId); for (int idx = 0; idx < lotData.Cassettes.Count; idx++) { Assert.AreEqual<string>(lotData.Cassettes[idx].CassetteId, simulator.Cassettes[idx].Id); } for (int idx = lotData.Cassettes.Count; idx < 12; idx++) { Assert.AreEqual<string>("", simulator.Cassettes[idx].Id); } Assert.AreEqual<int>(lotData.Cassettes.Count, simulator.CassetteQuantityInLot); Assert.AreEqual<LotDataTransmission>(LotDataTransmission.Cleared, simulator.LotDataTransmission); Assert.AreEqual<int>(lotData.Wafers.Count, simulator.WaferQuantity); Assert.AreEqual<int>(lotData.NGWaferCount, simulator.NotGoodWaferQuantity); Assert.AreEqual<WaferSize>(lotData.WaferSize, simulator.Size); Assert.AreEqual<OfType>(lotData.OfType, simulator.Type); Assert.AreEqual<PolishDivision>(lotData.PolishDivision, simulator.Division); Assert.AreEqual<int>(lotData.Assembly1.CarrierPlateCount, simulator.CarrierPlateQuantity1); Assert.AreEqual<int>(lotData.Assembly1.WaferCount, simulator.WaferQuantity1); Assert.AreEqual<int>(lotData.Assembly2.CarrierPlateCount, simulator.CarrierPlateQuantity2); Assert.AreEqual<int>(lotData.Assembly2.WaferCount, simulator.WaferQuantity2); for (int idx = 0; idx < lotData.Wafers.Count; idx++) { Assert.AreEqual<int>(lotData.Wafers[idx].CassetteNumber, simulator.Wafers[idx].WaferCassetteNumber); Assert.AreEqual<int>(lotData.Wafers[idx].SlotNumber, simulator.Wafers[idx].WaferSlotNumber); } // Check lot data - END }
private string GetWriteCommandSetLotWaferDataString(ILotData lotData) { return (new PlcMemoryWriteCommand(PlcHelper.GetAddressSpace(), 0x189, new LotWaferInfoToStreamConverter().TryConvert(lotData))).CommandToString(); }