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); }