public static void ReadStrechMachinePLC(MachinesDTO communicationMachine) { easyModbusCommunication = new EasyModbusCommunication(communicationMachine.IpAddress, 502); var readedData = easyModbusCommunication.ReadFromPLC(0, 40); var obj = ObjectAssign.IntArrayToObject_RD(readedData, communicationMachine); readedDataAcces.InsertReadedData(obj); if (true /*obj.MW200 == 0*/) { int productId = 0;//plc okuma sonrası netleşecek alanlar belki barcoda göre gidip tekrar sorgu atması gerekecek InsertPreProductionNotification(new PreProductionNotification { ProductId = 0, PaletteBarcode = "", BatchNo = "BT382020", PreNotificationTime = DateTime.Now, Lot = "", ReadOnTheConveyor = false }); //insert başarılı ve bufferda aynı üründen varsa adresinin tüp ağzında da aynı üründen varsa //adrese mekik shuttle taşıma işi oluştur var address = addressData.GetFirstRowIsEmptyByProductId(productId); var buffer = buffersData.GetPaletteInfoByProductId(productId); if (!address.FirstRowIsEmpty && buffer.Id > 0) { CreateTasksForShuttleRelocation(address.Code); } } }