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

@@ -2,62 +2,62 @@
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<connectionStrings>
<add name="NX_CLEAR_MAC_20200915Entities" connectionString="metadata=res://*/Entitys.Model1.csdl|res://*/Entitys.Model1.ssdl|res://*/Entitys.Model1.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=.;initial catalog=NX_CLEAR_MAC_20200915;persist security info=True;user id=sa;password=1q2w3e4r!@;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient"/>
<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="NX_CLEAR_MAC_20200915Entities" connectionString="metadata=res://*/Entitys.Model1.csdl|res://*/Entitys.Model1.ssdl|res://*/Entitys.Model1.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=.;initial catalog=NX_CLEAR_MAC_20200915;persist security info=True;user id=sa;password=1q2w3e4r!@;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
<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>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<appSettings>
<add key="GlobalPaletteMode" value="Professionaloffice2003"/>
<add key="GlobalPaletteMode" value="Professionaloffice2003" />
<!--<add key="LanguageCode" value="Chinese"/>-->
<add key="LanguageCode" value="English"/>
<add key="sqlmapConfigPath" value="Config/sqlmap.config"/>
<add key="LanguageCode" value="English" />
<add key="sqlmapConfigPath" value="Config/sqlmap.config" />
<!--MySql数据库连接字符串-->
<add key="LeadMySql" value="Data Source = localhost; Port=3306;Initial Catalog = testasrs; Persist Security Info=True;User ID = root; Password=sa1234567;"/>
<add key="LeadMySql" value="Data Source = localhost; Port=3306;Initial Catalog = testasrs; Persist Security Info=True;User ID = root; Password=sa1234567;" />
<!--SqlServer数据库连接字符串-->
<add key="LeadSqlServer" value="Data Source =localhost;Initial Catalog =NX_CLEAR_MAC;User Id = sa;Password =syl.syl503601;"/>
<add key="LeadSqlServer" value="Data Source =localhost;Initial Catalog =NX_CLEAR_MAC;User Id = sa;Password =syl.syl503601;" />
<!--Oracle数据库连接字符串-->
<add key="LeadOracle" value="Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=ORCL)));User Id=LEADASRS; Password=LEADASRS;"/>
<add key="LeadOracle" value="Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=ORCL)));User Id=LEADASRS; Password=LEADASRS;" />
<!--SQLite数据库连接字符串-->
<!--<add key="LeadSQLite" value="Data Source=|DataDirectory|\\clearMac.db;Pooling=true;FailIfMissing=false"/>-->
<add key="LeadSQLite" value="Data Source=DataBase/clearMac.db"/>
<add key="LeadSQLite" value="Data Source=DataBase/clearMac.db" />
<!--串口名称-->
<add key="PortName" value="COM3"/>
<add key="PortName" value="COM3" />
<!--串口波特率-->
<add key="BaudRate" value="9600"/>
<add key="BaudRate" value="9600" />
<!--串口数据位-->
<add key="DataBits" value="8"/>
<add key="DataBits" value="8" />
<!--停止位。 0:不使用停止位;1:使用一个停止位;2:使用两个停止位;3:使用 1.5 个停止位。-->
<add key="StopBits" value="1"/>
<add key="StopBits" value="1" />
<!--奇偶校验。0:无校验;1:奇校验;2:偶校验;-->
<add key="ParityMsg" value="2"/>
<add key="ParityMsg" value="2" />
<!--托盘序列号前缀-->
<add key="PalletIndexPrefix" value="Pallet"/>
<add key="PalletIndexPrefix" value="Pallet" />
<!--托盘序列号生成日期-->
<add key="PalletIndexDateMsg" value="20201107"/>
<add key="PalletIndexDateMsg" value="20201107" />
<!--托盘序列号长度-->
<add key="PalletIndexLen" value="6"/>
<add key="PalletIndexLen" value="6" />
<!--当前托盘序列号值-->
<add key="PalletIndexValue" value="1"/>
<add key="PalletIndexValue" value="1" />
<!--记录上一次登录用户名-->
<add key="LastTimeUserCode" value=""/>
<add key="ClientSettingsProvider.ServiceUri" value=""/>
<add key="LastTimeUserCode" value="" />
<add key="ClientSettingsProvider.ServiceUri" value="" />
</appSettings>
<system.web>
<membership defaultProvider="ClientAuthenticationMembershipProvider">
<providers>
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri=""/>
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
</providers>
</membership>
<roleManager defaultProvider="ClientRoleProvider" enabled="true">
<providers>
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400"/>
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
</providers>
</roleManager>
</system.web>

View File

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

View File

@@ -1267,8 +1267,7 @@ namespace CleanMachineHMI.FrmUserControl
{
while (GlobalHelper.SysThIsRunFlag)
{
try
{
if (Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("CleanMacRunStatusNew", PlcItemTypeDesc.M)))
{
Invoke(new Action(() => { cbt_RunStatusTran.BackColor = Color.Lime; }));
@@ -1531,11 +1530,8 @@ namespace CleanMachineHMI.FrmUserControl
//autoCleanNum = 0;
}
FinishWorkingPallet();
}
catch
{
}
Thread.Sleep(200);
}
}

View File

@@ -12,7 +12,7 @@ namespace CleanMachineHMI.Properties {
[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 {
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);
}
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
{