예제 #1
0
        private static void SubmitResult(string result)
        {
            var outPort = result == resultOK ? OUT_OK :
                          result == resultNoProduct ? OUT_NO_PRODUCT :
                          OUT_NG;

            IOC0640.ioc_write_outbit(0, outPort, 0);
            Thread.Sleep(100);
            IOC0640.ioc_write_outbit(0, outPort, 1);
        }
예제 #2
0
        public static void Listen()
        {
            var temp1 = 0;

            while (true)
            {
                lock (mu_alive)
                {
                    if (!applicationIsRunning)
                    {
                        break;
                    }
                }

                Thread.Sleep(3);


                temp1 = IOC0640.ioc_read_inbit(0, IN_TRIGER);

                //工位1
                if (triger1 != temp1)
                {
                    triger1 = temp1;
                    if (triger1 == 0)
                    {
                        switch (triger1)
                        {
                        case 0:
                            _formMain.ShowAndSaveMsg_Invoke("收到触发信号");
                            cond_ReadyToRun.Set();
                            break;
                        }
                    }
                }
            }
        }
예제 #3
0
 public static void cleanUp()
 {
     CloseVPP();
     IOC0640.ioc_board_close();
 }