Beispiel #1
0
        static void chResetThreadMain(object po)
        {
            object[] pa   = (object[])po;
            int      chId = (int)pa[0];

            // parameters deserialization finished
            ConveyorBasicController.stD(chId * 2 + (chId <= 1 ? 1 : 0));
            ConveyorBasicController.chD(chId);
            if (!stopWhenNoTask || taskCount != 0)
            {
                ConveyorBasicController.mrC(0);
            }
        }
Beispiel #2
0
 public static void start(ArtificialIntelligenceInterface artificialIntelligenceInterface)
 {
     if (ConveyorBasicController.connected && Server.connected && RfidBasicController.connected)
     {
         ArtificialIntelligence.artificialIntelligenceInterface = artificialIntelligenceInterface;
         ConveyorBasicController.resetAll();
         Goods.Clear();
         GoodsHandleMethod.Clear();
         taskCount      = 0;
         stopWhenNoTask = false;
         for (int t = 0; t < ChQueue.Length; t++)
         {
             UploadCount[t] = 0;
         }
         for (int t = 0; t < Locker.Length; t++)
         {
             Locker[t] = new object();
         }
         ConveyorBasicController.mrC(0);
         ConveyorCleverController.OnSenserTriggerOn[0] = onSenser0TriggerOn;
         ConveyorCleverController.onEveryWorkingUnit   = onEveryWorkingUnit;
         ConveyorCleverController.OnOutputOn[(int)ConveyorOutputDevice.MainRollerClockwise] = onMainRollerClockwise;
         RfidCleverController.onDetectRfid = onDetectRfid;
         running = true;
     }
     else
     {
         if (!ConveyorBasicController.connected)
         {
             artificialIntelligenceInterface.onStartFailed("Conveyor connect fail");
         }
         if (!Server.connected)
         {
             artificialIntelligenceInterface.onStartFailed("Server connect fail");
         }
         if (!RfidBasicController.connected)
         {
             artificialIntelligenceInterface.onStartFailed("RFID reader connect fail");
         }
     }
 }
Beispiel #3
0
 private void _button_mr_clockwise_Click(object sender, EventArgs e)
 {
     ConveyorBasicController.mrC(1);
 }