2 Commits

Author SHA1 Message Date
gongxh
4feca19852 11 2022-01-19 15:50:55 +08:00
gongxh
990b27a267 1 2022-01-19 15:48:30 +08:00
5 changed files with 31 additions and 46 deletions

View File

@@ -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.6"/> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup> </startup>
<appSettings> <appSettings>

View File

@@ -8,7 +8,7 @@
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<RootNamespace>CleanMachineHMI</RootNamespace> <RootNamespace>CleanMachineHMI</RootNamespace>
<AssemblyName>CleanMachineHMI</AssemblyName> <AssemblyName>CleanMachineHMI</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
<TargetFrameworkProfile /> <TargetFrameworkProfile />

View File

@@ -1267,8 +1267,7 @@ 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; }));
@@ -1531,11 +1530,8 @@ namespace CleanMachineHMI.FrmUserControl
//autoCleanNum = 0; //autoCleanNum = 0;
} }
FinishWorkingPallet(); FinishWorkingPallet();
}
catch
{
}
Thread.Sleep(200); Thread.Sleep(200);
} }
} }

View File

@@ -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.10.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.7.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())));

View File

@@ -792,18 +792,7 @@ 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
{ {