static void onEveryWorkingUnit(int unitTime) { if (stopWhenNoTask && taskCount == 0) { ConveyorBasicController.mrS(0); ConveyorCleverController.cleanDelegate(); RfidCleverController.cleanDelegate(); running = false; } else if (!stopWhenNoTask) { for (int t = 0; t < ChQueue.Length; t++) { goodPositionBetweenSpecificNumber__minLimit = ChTime[t] - TimeD; goodPositionBetweenSpecificNumber__maxLimit = goodPositionBetweenSpecificNumber__minLimit + unitTime; GoodOnConveyor good = Goods.Find(goodPositionBetweenSpecificNumber); if (good != null && good.rfidTag != null && GoodsHandleMethod.ContainsKey(good.rfidTag)) { HandleMethod handleMethod = GoodsHandleMethod[good.rfidTag]; if (handleMethod.exitPoint == t) { handleGood(ChQueue[t], good, handleMethod.upload); } } } } }
static void chHoldNextGoodThreadMain(object po) { object[] pa = (object[])po; int chId = (int)pa[0]; // parameters deserialization finished int stId = (int)chId * 2 + (chId <= 1 ? 1 : 0); int inputBitIndex = (int)ConveyorInputDevice.Senser5 + chId; ConveyorCleverController.waitForInput(inputBitIndex, false, 1); ConveyorCleverController.waitForInput(inputBitIndex, true, 1); ConveyorBasicController.stU(stId); ConveyorCleverController.waitForMainRoller(ConveyorMRState.Clockwise, TimeB); ConveyorBasicController.mrS(chId); ConveyorBasicController.chU(chId); ConveyorCleverController.waitForChangeover(chId, ConveyorChState.Up, TimeA); }
private void _button_mr_stop_Click(object sender, EventArgs e) { ConveyorBasicController.mrS(1); }