Commit 0f79d20c authored by wangjunqiang's avatar wangjunqiang

添加624X输出限制开关

parent b0741b9c
...@@ -91,7 +91,7 @@ namespace GcDevicePc.GCBuffer ...@@ -91,7 +91,7 @@ namespace GcDevicePc.GCBuffer
gcpcinfo.pcworkinfo.system_Statue = false; gcpcinfo.pcworkinfo.system_Statue = false;
gcpcinfo.pcworkinfo.work_Statue = 0; gcpcinfo.pcworkinfo.work_Statue = 0;
gcpcinfo.moduleinfo.ip = "192.168.1.54"; gcpcinfo.moduleinfo.ip = "";
string file = System.Windows.Forms.Application.StartupPath + "\\startup.ini"; string file = System.Windows.Forms.Application.StartupPath + "\\startup.ini";
......
...@@ -369,7 +369,7 @@ namespace GcDevicePc ...@@ -369,7 +369,7 @@ namespace GcDevicePc
if (i != 99) if (i != 99)
{ {
worker.ReportProgress(i); worker.ReportProgress(i);
break; //break;
} }
} }
...@@ -585,6 +585,7 @@ namespace GcDevicePc ...@@ -585,6 +585,7 @@ namespace GcDevicePc
dataVOC.CKvocUpdataStart(); dataVOC.CKvocUpdataStart();
mytcptest.DataRcvStart(); mytcptest.DataRcvStart();
if (!String.IsNullOrEmpty(globaldata.m_pcbuffer.gcpcinfo.moduleinfo.ip))
wtd624xOutput.DataOutStart(); wtd624xOutput.DataOutStart();
} }
...@@ -601,6 +602,7 @@ namespace GcDevicePc ...@@ -601,6 +602,7 @@ namespace GcDevicePc
mymodbus.ChannelDataStop(); mymodbus.ChannelDataStop();
} }
if (!String.IsNullOrEmpty(globaldata.m_pcbuffer.gcpcinfo.moduleinfo.ip))
wtd624xOutput.DataOutStop(); wtd624xOutput.DataOutStop();
} }
...@@ -998,7 +1000,7 @@ namespace GcDevicePc ...@@ -998,7 +1000,7 @@ namespace GcDevicePc
conmre.Set(); conmre.Set();
globaldata.m_pcbuffer.gcpcinfo.pcthreadinfo.HMI_Monitor_TH = 1; globaldata.m_pcbuffer.gcpcinfo.pcthreadinfo.HMI_Monitor_TH = 1;
Thread.Sleep(1500); Thread.Sleep(1000);
count = 0; count = 0;
......
...@@ -15,7 +15,7 @@ namespace GcDevicePc.ProThread ...@@ -15,7 +15,7 @@ namespace GcDevicePc.ProThread
ManualResetEvent outputmre = new ManualResetEvent(false); ManualResetEvent outputmre = new ManualResetEvent(false);
Thread t_DataOut; Thread t_DataOut;
private WTD624X wtd624x = new WTD624X(globaldata.m_pcbuffer.gcpcinfo.moduleinfo.ip, 502); private WTD624X wtd624x;
private bool c6h6 = false; private bool c6h6 = false;
private bool c7h8 = false; private bool c7h8 = false;
...@@ -156,6 +156,13 @@ namespace GcDevicePc.ProThread ...@@ -156,6 +156,13 @@ namespace GcDevicePc.ProThread
} }
public void DataOutStart() public void DataOutStart()
{
if (!String.IsNullOrEmpty(globaldata.m_pcbuffer.gcpcinfo.moduleinfo.ip))
{
wtd624x = new WTD624X(globaldata.m_pcbuffer.gcpcinfo.moduleinfo.ip, 502);
}
if (wtd624x!= null)
{ {
if (outputmre != null) if (outputmre != null)
{ {
...@@ -172,13 +179,19 @@ namespace GcDevicePc.ProThread ...@@ -172,13 +179,19 @@ namespace GcDevicePc.ProThread
} }
} }
}
public void DataOutStop() public void DataOutStop()
{
if (wtd624x != null)
{ {
outputmre.Set(); outputmre.Set();
if (wtd624x.GetWorkFlag()) if (wtd624x.GetWorkFlag())
{ {
wtd624x.WTD624X_Open(); wtd624x.WTD624X_Open();
} }
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment