Commit 9fe2d15c 刘韬

优化手动伺服防撞

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