Commit 41340f0c 几米阳光

伺服若已在原点但未回过原点,需要匀速走1500秒,再回原点

1 个父辈 635719e6
...@@ -1698,6 +1698,7 @@ ...@@ -1698,6 +1698,7 @@
// //
// btnClearLog // btnClearLog
// //
this.btnClearLog.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnClearLog.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnClearLog.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClearLog.Location = new System.Drawing.Point(313, 515); this.btnClearLog.Location = new System.Drawing.Point(313, 515);
this.btnClearLog.Name = "btnClearLog"; this.btnClearLog.Name = "btnClearLog";
...@@ -2305,6 +2306,7 @@ ...@@ -2305,6 +2306,7 @@
// //
// btnCloseLed // btnCloseLed
// //
this.btnCloseLed.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnCloseLed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnCloseLed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseLed.Location = new System.Drawing.Point(149, 568); this.btnCloseLed.Location = new System.Drawing.Point(149, 568);
this.btnCloseLed.Name = "btnCloseLed"; this.btnCloseLed.Name = "btnCloseLed";
...@@ -2316,6 +2318,7 @@ ...@@ -2316,6 +2318,7 @@
// //
// btnOpenLed // btnOpenLed
// //
this.btnOpenLed.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnOpenLed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnOpenLed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenLed.Location = new System.Drawing.Point(32, 568); this.btnOpenLed.Location = new System.Drawing.Point(32, 568);
this.btnOpenLed.Name = "btnOpenLed"; this.btnOpenLed.Name = "btnOpenLed";
...@@ -2327,6 +2330,7 @@ ...@@ -2327,6 +2330,7 @@
// //
// btnCloseDoor // btnCloseDoor
// //
this.btnCloseDoor.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnCloseDoor.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnCloseDoor.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseDoor.Location = new System.Drawing.Point(149, 515); this.btnCloseDoor.Location = new System.Drawing.Point(149, 515);
this.btnCloseDoor.Name = "btnCloseDoor"; this.btnCloseDoor.Name = "btnCloseDoor";
...@@ -2337,6 +2341,7 @@ ...@@ -2337,6 +2341,7 @@
// //
// btnOpenDoor // btnOpenDoor
// //
this.btnOpenDoor.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnOpenDoor.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnOpenDoor.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenDoor.Location = new System.Drawing.Point(32, 515); this.btnOpenDoor.Location = new System.Drawing.Point(32, 515);
this.btnOpenDoor.Name = "btnOpenDoor"; this.btnOpenDoor.Name = "btnOpenDoor";
......
...@@ -58,6 +58,8 @@ ...@@ -58,6 +58,8 @@
4.客户端启动时默认状态是复位中。 4.客户端启动时默认状态是复位中。
20190326修改:
伺服若已在原点但未回过原点,需要匀速走1500秒,再回原点
......
...@@ -299,9 +299,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -299,9 +299,9 @@ namespace OnlineStore.DeviceLibrary
int homeSingle = GetHomeSingle(portName, slvAddr); int homeSingle = GetHomeSingle(portName, slvAddr);
if (homeSingle.Equals(1)) if (homeSingle.Equals(1))
{ {
//int isHomeEnd = GetHomeEndStatus(portName, slvAddr); int isHomeEnd = GetHomeEndStatus(portName, slvAddr);
//if (isHomeEnd.Equals(1)) if (isHomeEnd.Equals(1))
//{ {
int value = 2000; int value = 2000;
LogUtil.info("轴【" + portName + "_" + slvAddr + "】原点返回时发现原点已亮且回过原点,需要先相对走" + value); LogUtil.info("轴【" + portName + "_" + slvAddr + "】原点返回时发现原点已亮且回过原点,需要先相对走" + value);
RelMove(portName, slvAddr, value); RelMove(portName, slvAddr, value);
...@@ -321,7 +321,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -321,7 +321,20 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info("轴【" + portName + "_" + slvAddr + "】相对走" + value + "已等待2分钟,直接停止"); LogUtil.info("轴【" + portName + "_" + slvAddr + "】相对走" + value + "已等待2分钟,直接停止");
SuddenStop(portName, slvAddr); SuddenStop(portName, slvAddr);
} }
//} }
else
{
int volSpeed = Math.Abs(speed / 5);
int time = 1500;
LogUtil.info("轴【" + portName + "_" + slvAddr + "】原点返回时发现原点已亮但未回过原点,先匀速向上走" + time + ",速度[" + volSpeed + "]");
//需要匀速向上走
ACServerManager.SpeedMove(portName, slvAddr, volSpeed);
Thread.Sleep(time);
LogUtil.info("轴【" + portName + "_" + slvAddr + "】匀速 已等待" + time + ",直接停止");
SuddenStop(portName, slvAddr);
Thread.Sleep(100);
}
} }
} }
catch (Exception ex) catch (Exception ex)
......
...@@ -19,8 +19,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -19,8 +19,7 @@ namespace OnlineStore.DeviceLibrary
public static int CurrInOutType = 0; public static int CurrInOutType = 0;
private static string api_communication = "service/store/communication"; //流水线状态通信接口
private static string api_nextFeeder = "service/store/nextFeeder"; // 出库站位列表切换接口
public static readonly ILog LOGGER = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); public static readonly ILog LOGGER = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
public static AC_SA_BoxBean Store = null; public static AC_SA_BoxBean Store = null;
public static AC_SA_Config Config = null; public static AC_SA_Config Config = null;
...@@ -141,6 +140,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -141,6 +140,8 @@ namespace OnlineStore.DeviceLibrary
LOGGER.Error("出错:", ex); LOGGER.Error("出错:", ex);
} }
} }
private static string api_communication = "service/store/communication"; //流水线状态通信接口
private static string api_nextFeeder = "service/store/nextFeeder"; // 出库站位列表切换接口
public static string GetPostApi(string host) public static string GetPostApi(string host)
{ {
if (host == "") if (host == "")
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!