Commit 5eaf354a 几米阳光

1

1 个父辈 1324f387
...@@ -147,13 +147,23 @@ namespace OnlineStore.AutoInOutStore ...@@ -147,13 +147,23 @@ namespace OnlineStore.AutoInOutStore
private bool LoadOk = false; private bool LoadOk = false;
private void FrmTest_Load(object sender, EventArgs e) private void FrmTest_Load(object sender, EventArgs e)
{ {
int slvAddrStr = 1;
LogUtil.logBox = this.richTextBox1; LogUtil.logBox = this.richTextBox1;
this.ShowInTaskbar = true; this.ShowInTaskbar = true;
this.Text = ConfigAppSettings.GetValue(Setting_Init.App_Title); this.Text = ConfigAppSettings.GetValue(Setting_Init.App_Title);
HideForm(); HideForm();
initValue(); initValue();
//string msg = "=1+0x0-7x8 =700020106;4500866784;20;1804162053;10000;XVB38DV4##";
//AutomaticBaiting.GetInStorePosId(msg);
//DateTime time = DateTime.Now;
////构建发送给服务器的对象
//Operation lineOperation =store.getLineBoxStatus();
//string server = ConfigAppSettings.GetValue(Setting_Init.http_server);
//Operation resultOperation = HttpHelper.Post(StoreManager.GetPostApi(server), lineOperation, false);
txtTempPort.Text = store.Config.Humiture_Port; txtTempPort.Text = store.Config.Humiture_Port;
LoadOk = true; LoadOk = true;
cmbHomeType.SelectedIndex = 1; cmbHomeType.SelectedIndex = 1;
......
...@@ -106,6 +106,7 @@ namespace OnlineStore.Common ...@@ -106,6 +106,7 @@ namespace OnlineStore.Common
wc.Headers.Add("Content-Type", "application/json;charset=UTF-8"); wc.Headers.Add("Content-Type", "application/json;charset=UTF-8");
wc.Encoding = encoding; wc.Encoding = encoding;
//paramData = Uri.EscapeDataString(paramData);
result = wc.UploadString(url, "POST", paramData); result = wc.UploadString(url, "POST", paramData);
//LogUtil.info(result); //LogUtil.info(result);
} }
......
...@@ -300,12 +300,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -300,12 +300,15 @@ 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);
if (isHomeEnd.Equals(1))
{
int value = 2000; int value = 2000;
if (portName.Equals(StoreManager.Config.Batch_Axis.DeviceName)) if (portName.Equals(StoreManager.Config.Batch_Axis.DeviceName))
{ {
value = 8000; value = 8000;
} }
LogUtil.info("轴【" + portName + "】原点返回时发现原点已亮,需要先相对走" + value); LogUtil.info("轴【" + portName + "】原点返回时发现原点已亮且回过原点,需要先相对走" + value);
RelMove(portName, slvAddr, value); RelMove(portName, slvAddr, value);
bool isStop = false; bool isStop = false;
for (int i = 0; i <= 10; i++) for (int i = 0; i <= 10; i++)
...@@ -324,6 +327,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -324,6 +327,7 @@ namespace OnlineStore.DeviceLibrary
SuddenStop(portName, slvAddr); SuddenStop(portName, slvAddr);
} }
} }
}
}catch(Exception ex) }catch(Exception ex)
{ {
LogUtil.error("轴【" + portName + "】原点返回前验证是否在原点出错:" + ex.StackTrace); LogUtil.error("轴【" + portName + "】原点返回前验证是否在原点出错:" + ex.StackTrace);
......
...@@ -330,7 +330,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -330,7 +330,7 @@ namespace OnlineStore.DeviceLibrary
{ {
if (!code.Equals("")) if (!code.Equals(""))
{ {
msg = msg + "=1+0x0-" + LastSize + "x" + LastHeight + " =" + code + spiltStr + spiltStr; msg = msg + "=1+0x0-" + LastSize + "x" + LastHeight + "=" + code + spiltStr + spiltStr;
} }
} }
return msg; return msg;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!