diff --git a/UserClass/AsyncTcpServer.cs b/UserClass/AsyncTcpServer.cs index 1292100..386b199 100644 --- a/UserClass/AsyncTcpServer.cs +++ b/UserClass/AsyncTcpServer.cs @@ -251,7 +251,7 @@ namespace DyeingComputer.UserClass MainWindowViewModel.WORK_RUN = 2;// // client.SendAsync("SC821" + SYSKEY + SYSDAT); - } + }//运行 else if (dat_821.GetValue("INSTRUCTION").ToString() == "JUMP") { MainWindowViewModel.RUN_DATATABLE = MainWindowViewModel.dt_TP;//缓存表 @@ -259,7 +259,7 @@ namespace DyeingComputer.UserClass MainWindowViewModel.STEP_START(dat_821.GetValue("Numder").ToString(), Convert.ToDouble(dat_821.GetValue("P1")), Convert.ToDouble(dat_821.GetValue("P2")), Convert.ToDouble(dat_821.GetValue("P3")), Convert.ToDouble(dat_821.GetValue("P4")), Convert.ToDouble(dat_821.GetValue("P5"))); - } + }//跳步 else if (dat_821.GetValue("INSTRUCTION").ToString() == "INSERT") { int d = Convert.ToInt16(dat_821.GetValue("ID")); @@ -433,6 +433,7 @@ namespace DyeingComputer.UserClass try { Dictionary Chart_new = new Dictionary();//缓存函数 + Chart_new.Add("ERR", MainWindowViewModel.ERR_JOG); Chart_new.Add("UserButton", MainWindowViewModel._UserButton); Chart_new.Add("WORK_RUN", MainWindowViewModel.WORK_RUN); Chart_new.Add("RUN_STEPID", MainWindowViewModel.RUN_STEPID); diff --git a/ViewModel/MainWindowViewModel.cs b/ViewModel/MainWindowViewModel.cs index 6908c89..678bf66 100644 --- a/ViewModel/MainWindowViewModel.cs +++ b/ViewModel/MainWindowViewModel.cs @@ -184,7 +184,7 @@ namespace DyeingComputer.ViewModel public static object Process_step = "-----"; public static string ProgramName = "-----";//工艺名 public static Int32 DIDETime; //空闲计时器 - bool ERR_JOG;//故障状态 + public static bool ERR_JOG;//故障状态 private int timer1s_ = 0; private int timer5s_ = 0; public MainWindowViewModel() @@ -433,9 +433,10 @@ namespace DyeingComputer.ViewModel Status_Str = ERRinf.ERRinf_r(errTabler); Alert_red = true; Alert_bell = true; + ERR_JOG = true; Status_Str_coloer = Status_red; } - else { Status_Str_coloer = Status_Black; } + else { Status_Str_coloer = Status_Black; ERR_JOG = false; } Updata_dtd("3001", Alert_red); Updata_dtd("3003", Alert_yellow); Updata_dtd("3004", Alert_bell); @@ -463,7 +464,6 @@ namespace DyeingComputer.ViewModel if (Selet_dtd("2016")) { ERRinf.ERRinf_w(errTabler, Resources.Fault + ":" + Resources.Pump + "-3", "ERR104-3"); } //加料泵 else { ERRinf.ERRinf_d(errTabler, "ERR104-3"); } } - uint TX_t; void Tick_Event_5S()//Tick_Event周期执行事件5S {