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); }
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; } } } } }
public static void cleanUp() { CloseVPP(); IOC0640.ioc_board_close(); }