Commit 9fe2d15c 刘韬

优化手动伺服防撞

1 个父辈 9e6c3456
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OnlineStore.Common</RootNamespace> <RootNamespace>OnlineStore.Common</RootNamespace>
<AssemblyName>MyCommon</AssemblyName> <AssemblyName>MyCommon</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
......
...@@ -40,6 +40,10 @@ namespace OnlineStore.Common ...@@ -40,6 +40,10 @@ namespace OnlineStore.Common
[MyConfigComment("屏蔽升降轴调试保护")] [MyConfigComment("屏蔽升降轴调试保护")]
public static MyConfig<bool> Device_DisableUpdownProtect = false; public static MyConfig<bool> Device_DisableUpdownProtect = false;
[MyConfigComment("屏蔽湿度报警")]
public static MyConfig<bool> Device_Disable_Humidity_Alarm = false;
[MyConfigComment("湿度超限吹气启动相对值=服务器设定湿度报警值-本相对值")] [MyConfigComment("湿度超限吹气启动相对值=服务器设定湿度报警值-本相对值")]
public static MyConfig<int> Device_HumidityStartOffser = 1; public static MyConfig<int> Device_HumidityStartOffser = 1;
[MyConfigComment("湿度超限吹气停止相对值=服务器设定湿度报警值-本相对值")] [MyConfigComment("湿度超限吹气停止相对值=服务器设定湿度报警值-本相对值")]
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DeviceLibrary</RootNamespace> <RootNamespace>DeviceLibrary</RootNamespace>
<AssemblyName>DeviceLibrary</AssemblyName> <AssemblyName>DeviceLibrary</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
......
...@@ -16,7 +16,8 @@ namespace DeviceLibrary ...@@ -16,7 +16,8 @@ namespace DeviceLibrary
{ {
void ioMonitor() void ioMonitor()
{ {
airprocess(); if (!Setting_Init.Device_Disable_Humidity_Alarm)
airprocess();
} }
DateTime LastHumiCheckTime = DateTime.Now.AddHours(2); DateTime LastHumiCheckTime = DateTime.Now.AddHours(2);
void airprocess() void airprocess()
......
...@@ -140,7 +140,7 @@ namespace DeviceLibrary ...@@ -140,7 +140,7 @@ namespace DeviceLibrary
{ {
ProcessLefCfg(MachineLedStateE.SystemPause); ProcessLefCfg(MachineLedStateE.SystemPause);
} }
if ((DateTime.Now - LastHumiCheckTime).TotalSeconds > 30) if (!Setting_Init.Device_Disable_Humidity_Alarm && (DateTime.Now - LastHumiCheckTime).TotalSeconds > 30)
{ {
ProcessLefCfg(MachineLedStateE.THoutRangeOver30m); ProcessLefCfg(MachineLedStateE.THoutRangeOver30m);
} }
......
...@@ -237,6 +237,9 @@ namespace DeviceLibrary ...@@ -237,6 +237,9 @@ namespace DeviceLibrary
} }
private (bool, string) InOut_Axis_interference(int from, int to) private (bool, string) InOut_Axis_interference(int from, int to)
{ {
if (Middle_Axis.IsBusy || UpDown_Axis.IsBusy)
return (true, crc.GetString("Res0046.95729a30","旋转或升降轴在运动,进出轴不可运动"));
if (to != Config.InOut_P2) if (to != Config.InOut_P2)
return (false, ""); return (false, "");
......
...@@ -147,6 +147,11 @@ namespace DeviceLibrary ...@@ -147,6 +147,11 @@ namespace DeviceLibrary
{ {
return; return;
} }
if (!currentAxis.IsSafe(AxisManager.GetActualtPosition(PortName, SlvAddr), out string msg))
{
MessageBox.Show(msg);
return;
}
int speed = FormUtil.GetIntValue(txtASpeed); int speed = FormUtil.GetIntValue(txtASpeed);
//LogUtil.info(""+"点击【匀速运动】,【" + PortName + "_" + SlvAddr + "】 速度【" + speed + "】"); //LogUtil.info(""+"点击【匀速运动】,【" + PortName + "_" + SlvAddr + "】 速度【" + speed + "】");
//AxisManager.SpeedMove(PortName, SlvAddr, speed,acc,dec); //AxisManager.SpeedMove(PortName, SlvAddr, speed,acc,dec);
...@@ -188,7 +193,11 @@ namespace DeviceLibrary ...@@ -188,7 +193,11 @@ namespace DeviceLibrary
{ {
return; return;
} }
if (!currentAxis.IsSafe(AxisManager.GetActualtPosition(PortName, SlvAddr), out string msg))
{
MessageBox.Show(msg);
return;
}
LogUtil.info("" + "点击【原点返回】,【" + PortName + "_" + SlvAddr + "】 速度【" + currentAxis.Config.HomeHighSpeed + "】"); LogUtil.info("" + "点击【原点返回】,【" + PortName + "_" + SlvAddr + "】 速度【" + currentAxis.Config.HomeHighSpeed + "】");
var HomeLowSpeed = currentAxis.Config.HomeLowSpeed > 0 ? currentAxis.Config.HomeLowSpeed : currentAxis.Config.HomeHighSpeed / 10; var HomeLowSpeed = currentAxis.Config.HomeLowSpeed > 0 ? currentAxis.Config.HomeLowSpeed : currentAxis.Config.HomeHighSpeed / 10;
...@@ -287,6 +296,12 @@ namespace DeviceLibrary ...@@ -287,6 +296,12 @@ namespace DeviceLibrary
{ {
return; return;
} }
if (!currentAxis.IsSafe(AxisManager.GetActualtPosition(PortName, SlvAddr), out string msg))
{
MessageBox.Show(msg);
return;
}
if (btnAddMove.BackColor.Equals(Color.White)) if (btnAddMove.BackColor.Equals(Color.White))
{ {
int speed = Convert.ToInt32(comjSpeed.Text); int speed = Convert.ToInt32(comjSpeed.Text);
...@@ -316,6 +331,11 @@ namespace DeviceLibrary ...@@ -316,6 +331,11 @@ namespace DeviceLibrary
{ {
return; return;
} }
if (!currentAxis.IsSafe(AxisManager.GetActualtPosition(PortName, SlvAddr), out string msg))
{
MessageBox.Show(msg);
return;
}
if (btnDelMove.BackColor.Equals(Color.White)) if (btnDelMove.BackColor.Equals(Color.White))
{ {
int speed = Convert.ToInt32(comjSpeed.Text); int speed = Convert.ToInt32(comjSpeed.Text);
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OnlineStore.LoadCSVLibrary</RootNamespace> <RootNamespace>OnlineStore.LoadCSVLibrary</RootNamespace>
<AssemblyName>LoadCSVLibrary</AssemblyName> <AssemblyName>LoadCSVLibrary</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
</root>--> </root>-->
</log4net> </log4net>
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup> </startup>
<runtime> <runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
......
using OnlineStore.Common; using OnlineStore;
using OnlineStore.Common;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
...@@ -20,13 +21,13 @@ namespace TheMachine ...@@ -20,13 +21,13 @@ namespace TheMachine
c1.Text = ""; c1.Text = "";
c1.Width = 0; c1.Width = 0;
ColumnHeader c2 = new ColumnHeader(); ColumnHeader c2 = new ColumnHeader();
c2.Text = "模块"; c2.Text = crc.GetString("Res0185","模块");
c2.Width = 120; c2.Width = 120;
ColumnHeader c3 = new ColumnHeader(); ColumnHeader c3 = new ColumnHeader();
c3.Text = "步骤"; c3.Text = crc.GetString("Res0186","步骤");
c3.Width = 120; c3.Width = 120;
ColumnHeader c4 = new ColumnHeader(); ColumnHeader c4 = new ColumnHeader();
c4.Text = "信息"; c4.Text = crc.GetString("Form1_tabc_tabP1_tabP1_Text","信息");
c4.Width = 370; c4.Width = 370;
stateViewL.Columns.Add(c1); stateViewL.Columns.Add(c1);
...@@ -42,10 +43,10 @@ namespace TheMachine ...@@ -42,10 +43,10 @@ namespace TheMachine
emptycol.Text = ""; emptycol.Text = "";
emptycol.Width = 0; emptycol.Width = 0;
ColumnHeader msgcol = new ColumnHeader(); ColumnHeader msgcol = new ColumnHeader();
msgcol.Text = "信息"; msgcol.Text = crc.GetString("Form1_tabc_tabP1_tabP1_Text","信息");
msgcol.Width = 480; msgcol.Width = 480;
ColumnHeader timecol = new ColumnHeader(); ColumnHeader timecol = new ColumnHeader();
timecol.Text = "时间"; timecol.Text = crc.GetString("Res0184","时间");
timecol.Width = 100; timecol.Width = 100;
listViewL.Columns.Add(emptycol); listViewL.Columns.Add(emptycol);
listViewL.Columns.Add(timecol); listViewL.Columns.Add(timecol);
...@@ -83,4 +84,4 @@ namespace TheMachine ...@@ -83,4 +84,4 @@ namespace TheMachine
} }
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -41,7 +41,13 @@ namespace TheMachine ...@@ -41,7 +41,13 @@ namespace TheMachine
{ {
if (tabc.TabCount > tabpagecount) if (tabc.TabCount > tabpagecount)
addTablePage(); addTablePage();
listViewL.Clear();
Common.AlertListViewSet(listViewL);
stateViewL.Clear();
stateViewR.Clear();
Common.StateListViewSet(stateViewL);
Common.StateListViewSet(stateViewR);
LanguageProcess(); LanguageProcess();
} }
...@@ -622,6 +628,7 @@ namespace TheMachine ...@@ -622,6 +628,7 @@ namespace TheMachine
private void 启用调试模式ToolStripMenuItem_Click_1(object sender, EventArgs e) private void 启用调试模式ToolStripMenuItem_Click_1(object sender, EventArgs e)
{ {
configpass = false; configpass = false;
tabc.SelectedIndex = 0;
} }
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<RootNamespace>TheMachine</RootNamespace> <RootNamespace>TheMachine</RootNamespace>
<AssemblyName>SBDH</AssemblyName> <AssemblyName>SBDH</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>false</Deterministic> <Deterministic>false</Deterministic>
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
<Compile Include="AxisControl.Designer.cs"> <Compile Include="AxisControl.Designer.cs">
<DependentUpon>AxisControl.cs</DependentUpon> <DependentUpon>AxisControl.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Common.cs" /> <Compile Include="Coma.cs" />
<Compile Include="Form1.cs"> <Compile Include="Form1.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!