Commit 62dc420a 刘韬

优化手动伺服防撞

1 个父辈 503de5bb
...@@ -275,8 +275,8 @@ namespace OnlineStore ...@@ -275,8 +275,8 @@ namespace OnlineStore
} }
//string className = cc.ClassName; //string className = cc.ClassName;
CurrLanguage = CodeResourceControl.GetLanguage(); CurrLanguage = CodeResourceControl.GetLanguage();
//string name = CodeResourceControl.GetString(CodeResourceControl.GetTextIdStr(className), cc.Text); string name = CodeResourceControl.GetString(className, cc.Text);
//if (!name.Equals("")) { cc.Text = name; } if (!name.Equals("")) { cc.Text = name; }
PreControlLanaguage(cc, className); PreControlLanaguage(cc, className);
RefreshLanguageEvent?.Invoke(); RefreshLanguageEvent?.Invoke();
......
...@@ -41,6 +41,10 @@ namespace OnlineStore.Common ...@@ -41,6 +41,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()
...@@ -25,7 +26,7 @@ namespace DeviceLibrary ...@@ -25,7 +26,7 @@ namespace DeviceLibrary
var temp = HumitureController.LastData; var temp = HumitureController.LastData;
var Current_Humidity = temp.Humidity; var Current_Humidity = temp.Humidity;
var Current_Temperate = temp.Temperate; var Current_Temperate = temp.Temperate;
//var tempIsOK = Current_Temperate < ServerCM.Max_Temperature; //var tempIsOK = Current_Temperate < ServerCM.Max_Temperature;
var humiNeedStart = Current_Humidity > ServerCM.Max_Humidity - Setting_Init.Device_HumidityStartOffser; var humiNeedStart = Current_Humidity > ServerCM.Max_Humidity - Setting_Init.Device_HumidityStartOffser;
var humiNeedStop = Current_Humidity < ServerCM.Max_Humidity - Setting_Init.Device_HumidityEndOffser; var humiNeedStop = Current_Humidity < ServerCM.Max_Humidity - Setting_Init.Device_HumidityEndOffser;
......
...@@ -142,7 +142,7 @@ namespace DeviceLibrary ...@@ -142,7 +142,7 @@ namespace DeviceLibrary
//AlarmLed.LedState = LedState.blink; //AlarmLed.LedState = LedState.blink;
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);
} }
......
...@@ -192,6 +192,9 @@ namespace DeviceLibrary ...@@ -192,6 +192,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("Res0056.95729a30","旋转或升降轴在运动,进出轴不可运动"));
if (to != Config.InOut_P2) if (to != Config.InOut_P2)
return (false, ""); return (false, "");
......
...@@ -34,9 +34,10 @@ namespace DeviceLibrary ...@@ -34,9 +34,10 @@ namespace DeviceLibrary
} }
public bool DoorRelease(RequestLoadInfo requestLoadInfo) public bool DoorRelease(RequestLoadInfo requestLoadInfo)
{ {
var s = IOValue(IO_Type.TrayCheck_Door);
if (requestLoadInfo.IsEmpty) if (requestLoadInfo.IsEmpty)
{ {
var s = IOValue(IO_Type.TrayCheck_Door);
StoreMoveInfo.log("释放舱门时 TrayCheck_Door=" + s); StoreMoveInfo.log("释放舱门时 TrayCheck_Door=" + s);
return s.Equals(IO_VALUE.LOW); return s.Equals(IO_VALUE.LOW);
} }
...@@ -44,7 +45,7 @@ namespace DeviceLibrary ...@@ -44,7 +45,7 @@ namespace DeviceLibrary
{ {
StoreMoveInfo.NextMoveStep(MoveStep.StoreIn01); StoreMoveInfo.NextMoveStep(MoveStep.StoreIn01);
StoreMoveInfo.MoveParam = requestLoadInfo.LoadParam.clone(); StoreMoveInfo.MoveParam = requestLoadInfo.LoadParam.clone();
StoreMoveInfo.log("释放舱门时收到物料信息:"+ StoreMoveInfo.MoveParam.ToStr()); StoreMoveInfo.log("释放舱门时收到物料信息:"+ StoreMoveInfo.MoveParam.ToStr()+ ",TrayCheck_Door=" + s);
Setting_Init.Runtime_IsInStore = true; Setting_Init.Runtime_IsInStore = true;
Setting_Init.Runtime_PosID = StoreMoveInfo.MoveParam.PosID; Setting_Init.Runtime_PosID = StoreMoveInfo.MoveParam.PosID;
Setting_Init.Runtime_PlateH = StoreMoveInfo.MoveParam.PlateH; Setting_Init.Runtime_PlateH = StoreMoveInfo.MoveParam.PlateH;
......
...@@ -163,6 +163,7 @@ ...@@ -163,6 +163,7 @@
this.lblAlarmcode.Tag = "not"; this.lblAlarmcode.Tag = "not";
this.lblAlarmcode.Text = "ErrCode:160"; this.lblAlarmcode.Text = "ErrCode:160";
this.lblAlarmcode.Visible = false; this.lblAlarmcode.Visible = false;
this.lblAlarmcode.Click += new System.EventHandler(this.lblAlarmcode_Click);
// //
// label4 // label4
// //
......
...@@ -146,6 +146,11 @@ namespace DeviceLibrary ...@@ -146,6 +146,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);
...@@ -187,7 +192,11 @@ namespace DeviceLibrary ...@@ -187,7 +192,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;
...@@ -286,6 +295,12 @@ namespace DeviceLibrary ...@@ -286,6 +295,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);
...@@ -315,6 +330,11 @@ namespace DeviceLibrary ...@@ -315,6 +330,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);
...@@ -444,5 +464,10 @@ namespace DeviceLibrary ...@@ -444,5 +464,10 @@ namespace DeviceLibrary
lbl.BackColor = this.BackColor; lbl.BackColor = this.BackColor;
} }
} }
private void lblAlarmcode_Click(object sender, EventArgs e)
{
MessageBox.Show(string.Join(",", HuichuanLibrary.HCBoardManager.GetAxisErrorDetail(currentAxis.Config.GetAxisValue())));
}
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -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>
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,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">
......
...@@ -161,10 +161,10 @@ namespace TheMachine ...@@ -161,10 +161,10 @@ namespace TheMachine
// uC_SetUserPassword1 // uC_SetUserPassword1
// //
this.uC_SetUserPassword1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.uC_SetUserPassword1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.uC_SetUserPassword1.Location = new System.Drawing.Point(335, 8); this.uC_SetUserPassword1.Location = new System.Drawing.Point(18, 182);
this.uC_SetUserPassword1.Margin = new System.Windows.Forms.Padding(5); this.uC_SetUserPassword1.Margin = new System.Windows.Forms.Padding(5);
this.uC_SetUserPassword1.Name = "uC_SetUserPassword1"; this.uC_SetUserPassword1.Name = "uC_SetUserPassword1";
this.uC_SetUserPassword1.Size = new System.Drawing.Size(533, 596); this.uC_SetUserPassword1.Size = new System.Drawing.Size(533, 431);
this.uC_SetUserPassword1.TabIndex = 7; this.uC_SetUserPassword1.TabIndex = 7;
// //
// SettingControl // SettingControl
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<RootNamespace>TheMachine</RootNamespace> <RootNamespace>TheMachine</RootNamespace>
<AssemblyName>SBSH</AssemblyName> <AssemblyName>SBSH</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>
......
...@@ -17,6 +17,7 @@ namespace TheMachine ...@@ -17,6 +17,7 @@ namespace TheMachine
public FrmPassCheck() public FrmPassCheck()
{ {
InitializeComponent(); InitializeComponent();
crc.LanguageProcess(this);
} }
public static bool CheckPassword() { public static bool CheckPassword() {
......
...@@ -263,7 +263,7 @@ namespace OnlineStore.ACSingleStore ...@@ -263,7 +263,7 @@ namespace OnlineStore.ACSingleStore
} }
LogUtil.info(LogName + "伺服已停止运动,停止定时器,记录数据"); LogUtil.info(LogName + "伺服已停止运动,停止定时器,记录数据");
List<string> strList = new List<string>(); List<string> strList = new List<string>();
strList.Add(crc.GetString("Res0056","编号,标准位置,升降轴库位入料高点P3,升降轴库位入料低点P4")); strList.Add($"编号,标准位置,升降轴库位入料高点P3,升降轴库位入料低点P4");
int index = 1; int index = 1;
foreach (int p in PositionList) foreach (int p in PositionList)
{ {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!