Commit 0f79d20c authored by wangjunqiang's avatar wangjunqiang

添加624X输出限制开关

parent b0741b9c
......@@ -91,7 +91,7 @@ namespace GcDevicePc.GCBuffer
gcpcinfo.pcworkinfo.system_Statue = false;
gcpcinfo.pcworkinfo.work_Statue = 0;
gcpcinfo.moduleinfo.ip = "192.168.1.54";
gcpcinfo.moduleinfo.ip = "";
string file = System.Windows.Forms.Application.StartupPath + "\\startup.ini";
......
......@@ -369,7 +369,7 @@ namespace GcDevicePc
if (i != 99)
{
worker.ReportProgress(i);
break;
//break;
}
}
......@@ -585,6 +585,7 @@ namespace GcDevicePc
dataVOC.CKvocUpdataStart();
mytcptest.DataRcvStart();
if (!String.IsNullOrEmpty(globaldata.m_pcbuffer.gcpcinfo.moduleinfo.ip))
wtd624xOutput.DataOutStart();
}
......@@ -601,6 +602,7 @@ namespace GcDevicePc
mymodbus.ChannelDataStop();
}
if (!String.IsNullOrEmpty(globaldata.m_pcbuffer.gcpcinfo.moduleinfo.ip))
wtd624xOutput.DataOutStop();
}
......@@ -998,7 +1000,7 @@ namespace GcDevicePc
conmre.Set();
globaldata.m_pcbuffer.gcpcinfo.pcthreadinfo.HMI_Monitor_TH = 1;
Thread.Sleep(1500);
Thread.Sleep(1000);
count = 0;
......
......@@ -15,7 +15,7 @@ namespace GcDevicePc.ProThread
ManualResetEvent outputmre = new ManualResetEvent(false);
Thread t_DataOut;
private WTD624X wtd624x = new WTD624X(globaldata.m_pcbuffer.gcpcinfo.moduleinfo.ip, 502);
private WTD624X wtd624x;
private bool c6h6 = false;
private bool c7h8 = false;
......@@ -156,6 +156,13 @@ namespace GcDevicePc.ProThread
}
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)
{
......@@ -172,13 +179,19 @@ namespace GcDevicePc.ProThread
}
}
}
public void DataOutStop()
{
if (wtd624x != null)
{
outputmre.Set();
if (wtd624x.GetWorkFlag())
{
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