Compare commits
1 Commits
dev2
...
dev2022031
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b1f7a52fd7 |
@@ -9,7 +9,7 @@
|
|||||||
<add name="CleanMachineHMI.Properties.Settings.NX_CLEAR_MAC_20200915ConnectionString" connectionString="Data Source=.;Initial Catalog=NX_CLEAR_MAC_20200915;Persist Security Info=True;User ID=sa;Password=1q2w3e4r!@" providerName="System.Data.SqlClient"/>
|
<add name="CleanMachineHMI.Properties.Settings.NX_CLEAR_MAC_20200915ConnectionString" connectionString="Data Source=.;Initial Catalog=NX_CLEAR_MAC_20200915;Persist Security Info=True;User ID=sa;Password=1q2w3e4r!@" providerName="System.Data.SqlClient"/>
|
||||||
</connectionStrings>
|
</connectionStrings>
|
||||||
<startup>
|
<startup>
|
||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/>
|
||||||
</startup>
|
</startup>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<RootNamespace>CleanMachineHMI</RootNamespace>
|
<RootNamespace>CleanMachineHMI</RootNamespace>
|
||||||
<AssemblyName>CleanMachineHMI</AssemblyName>
|
<AssemblyName>CleanMachineHMI</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<Deterministic>true</Deterministic>
|
<Deterministic>true</Deterministic>
|
||||||
<TargetFrameworkProfile />
|
<TargetFrameworkProfile />
|
||||||
|
|||||||
@@ -1267,7 +1267,8 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
{
|
{
|
||||||
while (GlobalHelper.SysThIsRunFlag)
|
while (GlobalHelper.SysThIsRunFlag)
|
||||||
{
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
if (Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("CleanMacRunStatusNew", PlcItemTypeDesc.M)))
|
if (Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("CleanMacRunStatusNew", PlcItemTypeDesc.M)))
|
||||||
{
|
{
|
||||||
Invoke(new Action(() => { cbt_RunStatusTran.BackColor = Color.Lime; }));
|
Invoke(new Action(() => { cbt_RunStatusTran.BackColor = Color.Lime; }));
|
||||||
@@ -1530,8 +1531,11 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
//autoCleanNum = 0;
|
//autoCleanNum = 0;
|
||||||
}
|
}
|
||||||
FinishWorkingPallet();
|
FinishWorkingPallet();
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
Thread.Sleep(200);
|
Thread.Sleep(200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
2
CleanMachineHMI/Properties/Settings.Designer.cs
generated
2
CleanMachineHMI/Properties/Settings.Designer.cs
generated
@@ -12,7 +12,7 @@ namespace CleanMachineHMI.Properties {
|
|||||||
|
|
||||||
|
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.7.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
|
||||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||||
|
|
||||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||||
|
|||||||
@@ -792,7 +792,18 @@ namespace CleanMachineHMI
|
|||||||
WritePlcItem("PlcHeartbeatWriteData", wcsToPlcHeartDataNew.ToString(), PlcItemTypeDesc.D);
|
WritePlcItem("PlcHeartbeatWriteData", wcsToPlcHeartDataNew.ToString(), PlcItemTypeDesc.D);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (DateTime.Now > HeartbeatTime.AddSeconds(5))//心跳超时
|
||||||
|
{
|
||||||
|
isConn = false;
|
||||||
|
//报警处理。
|
||||||
|
frmMainNew.Show_Plc_Alarm("PLC heartbeat data is abnormal, PLC loses connection!");
|
||||||
|
if (ReConnNum % 5 == 0)
|
||||||
|
{
|
||||||
|
ClosePlcConn();
|
||||||
|
PlcInit();
|
||||||
|
}
|
||||||
|
ReConnNum++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user