Commit 407fa49b 刘韬

1

1 个父辈 3f2df859
...@@ -15,6 +15,9 @@ ...@@ -15,6 +15,9 @@
<add key="StartBlowValue" value="0.5" /> <add key="StartBlowValue" value="0.5" />
<!-- 停止吹气的判断值(配置值=服务器发送的湿度值-停止吹气值)--> <!-- 停止吹气的判断值(配置值=服务器发送的湿度值-停止吹气值)-->
<add key="StopBlowValue" value="1" /> <add key="StopBlowValue" value="1" />
<add key="humidityadjust" value="-11"/>
<add key="humiditylimited" value="4"/>
<!--Server address--> <!--Server address-->
<!--<add key="http.server" value="" />--> <!--<add key="http.server" value="" />-->
<add key="http.server" value="http://localhost/myproject/" /> <add key="http.server" value="http://localhost/myproject/" />
......
...@@ -63,6 +63,8 @@ namespace OnlineStore.AutoInOutStore ...@@ -63,6 +63,8 @@ namespace OnlineStore.AutoInOutStore
txtMiddleP1.Text = store.Config.MiddleAxis_P1_Position.ToString(); txtMiddleP1.Text = store.Config.MiddleAxis_P1_Position.ToString();
txtInOutP1.Text = store.Config.InOutAxis_P1_Position.ToString(); txtInOutP1.Text = store.Config.InOutAxis_P1_Position.ToString();
txtComP1.Text = store.Config.CompressAxis_P1_Position.ToString(); txtComP1.Text = store.Config.CompressAxis_P1_Position.ToString();
txtBatchP1.Text = store.Config.BatchAxis_P1.ToString();
txtBatchP3.Text = store.Config.BatchAxis_P3.ToString();
txtUpdownP8.Text = store.Config.UpDownAxis_OutLow_P8.ToString(); txtUpdownP8.Text = store.Config.UpDownAxis_OutLow_P8.ToString();
txtUpdownP2.Text = store.Config.UpDownAxis_OutHigh_P2.ToString(); txtUpdownP2.Text = store.Config.UpDownAxis_OutHigh_P2.ToString();
...@@ -103,6 +105,8 @@ namespace OnlineStore.AutoInOutStore ...@@ -103,6 +105,8 @@ namespace OnlineStore.AutoInOutStore
setAxisPopup(txtComP1, btnComP1, store.Config.Comp_Axis); setAxisPopup(txtComP1, btnComP1, store.Config.Comp_Axis);
setAxisPopup(txtComP2, btnComP2, store.Config.Comp_Axis); setAxisPopup(txtComP2, btnComP2, store.Config.Comp_Axis);
setAxisPopup(txtComP3, btnComP3, store.Config.Comp_Axis); setAxisPopup(txtComP3, btnComP3, store.Config.Comp_Axis);
setAxisPopup(txtBatchP1, btnBatchP1, store.Config.Batch_Axis);
setAxisPopup(txtBatchP3, btnBatchP3, store.Config.Batch_Axis);
setAxisPopup(txtInOutP1, btnInOutP1, store.Config.InOut_Axis); setAxisPopup(txtInOutP1, btnInOutP1, store.Config.InOut_Axis);
setAxisPopup(txtInOutP2, btnInOutP2, store.Config.InOut_Axis); setAxisPopup(txtInOutP2, btnInOutP2, store.Config.InOut_Axis);
...@@ -680,7 +684,16 @@ namespace OnlineStore.AutoInOutStore ...@@ -680,7 +684,16 @@ namespace OnlineStore.AutoInOutStore
store.Config.UpDownAxis_OutLow_P8 = FormUtil.GetIntValue(txtUpdownP8); store.Config.UpDownAxis_OutLow_P8 = FormUtil.GetIntValue(txtUpdownP8);
needUpdate = true; needUpdate = true;
} }
if (store.Config.BatchAxis_P1 != FormUtil.GetIntValue(txtBatchP1))
{
store.Config.BatchAxis_P1 = FormUtil.GetIntValue(txtBatchP1);
needUpdate = true;
}
if (store.Config.BatchAxis_P3 != FormUtil.GetIntValue(txtBatchP3))
{
store.Config.BatchAxis_P3 = FormUtil.GetIntValue(txtBatchP3);
needUpdate = true;
}
if (needUpdate) if (needUpdate)
{ {
//更新缓存 //更新缓存
...@@ -917,6 +930,11 @@ namespace OnlineStore.AutoInOutStore ...@@ -917,6 +930,11 @@ namespace OnlineStore.AutoInOutStore
private void 扫码测试ToolStripMenuItem_Click(object sender, EventArgs e) private void 扫码测试ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
if (Camera._cam != null)
{
Camera._cam.CloseAll();
}
IOManager.IOMove(IO_Type.CameraLight_Power, IO_VALUE.HIGH); IOManager.IOMove(IO_Type.CameraLight_Power, IO_VALUE.HIGH);
string message = ""; string message = "";
string outMsg = ""; string outMsg = "";
...@@ -1133,6 +1151,10 @@ namespace OnlineStore.AutoInOutStore ...@@ -1133,6 +1151,10 @@ namespace OnlineStore.AutoInOutStore
{ {
return; return;
} }
if (Camera._cam != null)
{
Camera._cam.CloseAll();
}
IOManager.IOMove(IO_Type.CameraLight_Power, IO_VALUE.HIGH); IOManager.IOMove(IO_Type.CameraLight_Power, IO_VALUE.HIGH);
CodeLibrary.FrmCodeDecode frm = new FrmCodeDecode(); CodeLibrary.FrmCodeDecode frm = new FrmCodeDecode();
frm.chbZxing.Checked = false; frm.chbZxing.Checked = false;
...@@ -1564,5 +1586,22 @@ namespace OnlineStore.AutoInOutStore ...@@ -1564,5 +1586,22 @@ namespace OnlineStore.AutoInOutStore
StoreManager.UpdateBoxConfig(store.Config); StoreManager.UpdateBoxConfig(store.Config);
} }
} }
private void btnBatchP1_Click(object sender, EventArgs e)
{
int value = FormUtil.GetIntValue(txtBatchP1);
AxisABSMove(store.Config.Batch_Axis, value, store.Config.BatchAxis_P1_Speed);
}
private void btnBatchP3_Click(object sender, EventArgs e)
{
int value = FormUtil.GetIntValue(txtBatchP3);
AxisABSMove(store.Config.Batch_Axis, value, store.Config.BatchAxis_P1_Speed);
}
private void uc_boxdebug1_Load(object sender, EventArgs e)
{
}
} }
} }
...@@ -9,7 +9,7 @@ using System.Runtime.InteropServices; ...@@ -9,7 +9,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SO815-AutoInOutStore-newui 5072d6b64fa922fb976758170e2bcb644ff8bf92")] [assembly: AssemblyProduct("SO815-AutoInOutStore-newui 3f2df85964baa20c171b0ce228d8bc29c4a2eb1f")]
[assembly: AssemblyCopyright("edf7e3d07d3c8cafa890a08f4b855e559a36d414")] [assembly: AssemblyCopyright("edf7e3d07d3c8cafa890a08f4b855e559a36d414")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
......
...@@ -239,7 +239,13 @@ namespace OnlineStore.AutoInOutStore ...@@ -239,7 +239,13 @@ namespace OnlineStore.AutoInOutStore
NoIdLog(id, defaultStr); NoIdLog(id, defaultStr);
} }
} }
return String.Format(strCurLanguage, param); try
{
return String.Format(strCurLanguage, param);
}
catch {
return strCurLanguage;
}
} }
......
...@@ -34,8 +34,8 @@ namespace OnlineStore.ACSingleStore.useControl ...@@ -34,8 +34,8 @@ namespace OnlineStore.ACSingleStore.useControl
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.groupInout = new System.Windows.Forms.GroupBox(); this.groupInout = new System.Windows.Forms.GroupBox();
this.label_verify = new System.Windows.Forms.Label();
this.btnInOutP1 = new System.Windows.Forms.Button(); this.btnInOutP1 = new System.Windows.Forms.Button();
this.checkBox_Double_Alternate = new System.Windows.Forms.CheckBox();
this.cmbPosition = new System.Windows.Forms.Label(); this.cmbPosition = new System.Windows.Forms.Label();
this.txtJiange = new System.Windows.Forms.TextBox(); this.txtJiange = new System.Windows.Forms.TextBox();
this.lblMsg = new System.Windows.Forms.Label(); this.lblMsg = new System.Windows.Forms.Label();
...@@ -50,8 +50,6 @@ namespace OnlineStore.ACSingleStore.useControl ...@@ -50,8 +50,6 @@ namespace OnlineStore.ACSingleStore.useControl
this.txtUpDownP5 = new System.Windows.Forms.TextBox(); this.txtUpDownP5 = new System.Windows.Forms.TextBox();
this.txtUpDownP6 = new System.Windows.Forms.TextBox(); this.txtUpDownP6 = new System.Windows.Forms.TextBox();
this.txtUpDownP3 = new System.Windows.Forms.TextBox(); this.txtUpDownP3 = new System.Windows.Forms.TextBox();
this.btnInStore = new System.Windows.Forms.Button();
this.btnOutStore = new System.Windows.Forms.Button();
this.txtUpDownP4 = new System.Windows.Forms.TextBox(); this.txtUpDownP4 = new System.Windows.Forms.TextBox();
this.btnInOutP2 = new System.Windows.Forms.Button(); this.btnInOutP2 = new System.Windows.Forms.Button();
this.btnComP3 = new System.Windows.Forms.Button(); this.btnComP3 = new System.Windows.Forms.Button();
...@@ -70,8 +68,8 @@ namespace OnlineStore.ACSingleStore.useControl ...@@ -70,8 +68,8 @@ namespace OnlineStore.ACSingleStore.useControl
// //
// groupInout // groupInout
// //
this.groupInout.Controls.Add(this.label_verify);
this.groupInout.Controls.Add(this.btnInOutP1); this.groupInout.Controls.Add(this.btnInOutP1);
this.groupInout.Controls.Add(this.checkBox_Double_Alternate);
this.groupInout.Controls.Add(this.cmbPosition); this.groupInout.Controls.Add(this.cmbPosition);
this.groupInout.Controls.Add(this.txtJiange); this.groupInout.Controls.Add(this.txtJiange);
this.groupInout.Controls.Add(this.lblMsg); this.groupInout.Controls.Add(this.lblMsg);
...@@ -86,8 +84,6 @@ namespace OnlineStore.ACSingleStore.useControl ...@@ -86,8 +84,6 @@ namespace OnlineStore.ACSingleStore.useControl
this.groupInout.Controls.Add(this.txtUpDownP5); this.groupInout.Controls.Add(this.txtUpDownP5);
this.groupInout.Controls.Add(this.txtUpDownP6); this.groupInout.Controls.Add(this.txtUpDownP6);
this.groupInout.Controls.Add(this.txtUpDownP3); this.groupInout.Controls.Add(this.txtUpDownP3);
this.groupInout.Controls.Add(this.btnInStore);
this.groupInout.Controls.Add(this.btnOutStore);
this.groupInout.Controls.Add(this.txtUpDownP4); this.groupInout.Controls.Add(this.txtUpDownP4);
this.groupInout.Controls.Add(this.btnInOutP2); this.groupInout.Controls.Add(this.btnInOutP2);
this.groupInout.Controls.Add(this.btnComP3); this.groupInout.Controls.Add(this.btnComP3);
...@@ -105,6 +101,16 @@ namespace OnlineStore.ACSingleStore.useControl ...@@ -105,6 +101,16 @@ namespace OnlineStore.ACSingleStore.useControl
this.groupInout.TabStop = false; this.groupInout.TabStop = false;
this.groupInout.Text = "料仓操作"; this.groupInout.Text = "料仓操作";
// //
// label_verify
//
this.label_verify.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label_verify.AutoSize = true;
this.label_verify.Location = new System.Drawing.Point(856, 0);
this.label_verify.Name = "label_verify";
this.label_verify.Size = new System.Drawing.Size(41, 12);
this.label_verify.TabIndex = 228;
this.label_verify.Text = "label1";
//
// btnInOutP1 // btnInOutP1
// //
this.btnInOutP1.AutoSize = true; this.btnInOutP1.AutoSize = true;
...@@ -124,17 +130,6 @@ namespace OnlineStore.ACSingleStore.useControl ...@@ -124,17 +130,6 @@ namespace OnlineStore.ACSingleStore.useControl
this.btnInOutP1.UseVisualStyleBackColor = false; this.btnInOutP1.UseVisualStyleBackColor = false;
this.btnInOutP1.Click += new System.EventHandler(this.btnInOutP1_Click); this.btnInOutP1.Click += new System.EventHandler(this.btnInOutP1_Click);
// //
// checkBox_Double_Alternate
//
this.checkBox_Double_Alternate.AutoSize = true;
this.checkBox_Double_Alternate.Location = new System.Drawing.Point(97, 154);
this.checkBox_Double_Alternate.Name = "checkBox_Double_Alternate";
this.checkBox_Double_Alternate.Size = new System.Drawing.Size(120, 16);
this.checkBox_Double_Alternate.TabIndex = 225;
this.checkBox_Double_Alternate.Text = "Double Alternate";
this.checkBox_Double_Alternate.UseVisualStyleBackColor = true;
this.checkBox_Double_Alternate.CheckedChanged += new System.EventHandler(this.checkBox_Double_Alternate_CheckedChanged);
//
// cmbPosition // cmbPosition
// //
this.cmbPosition.AutoSize = true; this.cmbPosition.AutoSize = true;
...@@ -149,7 +144,7 @@ namespace OnlineStore.ACSingleStore.useControl ...@@ -149,7 +144,7 @@ namespace OnlineStore.ACSingleStore.useControl
this.txtJiange.Name = "txtJiange"; this.txtJiange.Name = "txtJiange";
this.txtJiange.Size = new System.Drawing.Size(37, 21); this.txtJiange.Size = new System.Drawing.Size(37, 21);
this.txtJiange.TabIndex = 221; this.txtJiange.TabIndex = 221;
this.txtJiange.Text = "0"; this.txtJiange.Text = "1";
// //
// lblMsg // lblMsg
// //
...@@ -180,7 +175,7 @@ namespace OnlineStore.ACSingleStore.useControl ...@@ -180,7 +175,7 @@ namespace OnlineStore.ACSingleStore.useControl
this.btnStartAuTo.BackColor = System.Drawing.SystemColors.Control; this.btnStartAuTo.BackColor = System.Drawing.SystemColors.Control;
this.btnStartAuTo.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnStartAuTo.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStartAuTo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnStartAuTo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStartAuTo.Location = new System.Drawing.Point(97, 116); this.btnStartAuTo.Location = new System.Drawing.Point(97, 49);
this.btnStartAuTo.Name = "btnStartAuTo"; this.btnStartAuTo.Name = "btnStartAuTo";
this.btnStartAuTo.Size = new System.Drawing.Size(149, 32); this.btnStartAuTo.Size = new System.Drawing.Size(149, 32);
this.btnStartAuTo.TabIndex = 222; this.btnStartAuTo.TabIndex = 222;
...@@ -318,32 +313,6 @@ namespace OnlineStore.ACSingleStore.useControl ...@@ -318,32 +313,6 @@ namespace OnlineStore.ACSingleStore.useControl
this.txtUpDownP3.TabIndex = 162; this.txtUpDownP3.TabIndex = 162;
this.txtUpDownP3.Text = "-1"; this.txtUpDownP3.Text = "-1";
// //
// btnInStore
//
this.btnInStore.BackColor = System.Drawing.SystemColors.Control;
this.btnInStore.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnInStore.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnInStore.Location = new System.Drawing.Point(6, 44);
this.btnInStore.Name = "btnInStore";
this.btnInStore.Size = new System.Drawing.Size(117, 32);
this.btnInStore.TabIndex = 102;
this.btnInStore.Text = "入库测试";
this.btnInStore.UseVisualStyleBackColor = false;
this.btnInStore.Click += new System.EventHandler(this.btnInStore_Click);
//
// btnOutStore
//
this.btnOutStore.BackColor = System.Drawing.SystemColors.Control;
this.btnOutStore.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOutStore.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOutStore.Location = new System.Drawing.Point(129, 44);
this.btnOutStore.Name = "btnOutStore";
this.btnOutStore.Size = new System.Drawing.Size(117, 32);
this.btnOutStore.TabIndex = 101;
this.btnOutStore.Text = "出库测试";
this.btnOutStore.UseVisualStyleBackColor = false;
this.btnOutStore.Click += new System.EventHandler(this.btnOutStore_Click);
//
// txtUpDownP4 // txtUpDownP4
// //
this.txtUpDownP4.AcceptsReturn = true; this.txtUpDownP4.AcceptsReturn = true;
...@@ -373,7 +342,7 @@ namespace OnlineStore.ACSingleStore.useControl ...@@ -373,7 +342,7 @@ namespace OnlineStore.ACSingleStore.useControl
this.btnInOutP2.RightToLeft = System.Windows.Forms.RightToLeft.No; this.btnInOutP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnInOutP2.Size = new System.Drawing.Size(185, 29); this.btnInOutP2.Size = new System.Drawing.Size(185, 29);
this.btnInOutP2.TabIndex = 211; this.btnInOutP2.TabIndex = 211;
this.btnInOutP2.Text = "进出轴取料点P2:"; this.btnInOutP2.Text = "进出轴夹爪取料点P2:";
this.btnInOutP2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnInOutP2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnInOutP2.UseVisualStyleBackColor = false; this.btnInOutP2.UseVisualStyleBackColor = false;
this.btnInOutP2.Click += new System.EventHandler(this.btnInOutP2_Click); this.btnInOutP2.Click += new System.EventHandler(this.btnInOutP2_Click);
...@@ -427,7 +396,7 @@ namespace OnlineStore.ACSingleStore.useControl ...@@ -427,7 +396,7 @@ namespace OnlineStore.ACSingleStore.useControl
this.btnInOutP3.RightToLeft = System.Windows.Forms.RightToLeft.No; this.btnInOutP3.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnInOutP3.Size = new System.Drawing.Size(185, 29); this.btnInOutP3.Size = new System.Drawing.Size(185, 29);
this.btnInOutP3.TabIndex = 193; this.btnInOutP3.TabIndex = 193;
this.btnInOutP3.Text = "进出轴料点P3:"; this.btnInOutP3.Text = "进出轴库位取放料点P3:";
this.btnInOutP3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnInOutP3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnInOutP3.UseVisualStyleBackColor = false; this.btnInOutP3.UseVisualStyleBackColor = false;
this.btnInOutP3.Click += new System.EventHandler(this.btnInOutP3_Click); this.btnInOutP3.Click += new System.EventHandler(this.btnInOutP3_Click);
...@@ -574,7 +543,7 @@ namespace OnlineStore.ACSingleStore.useControl ...@@ -574,7 +543,7 @@ namespace OnlineStore.ACSingleStore.useControl
this.dataGridView1.ShowCellToolTips = false; this.dataGridView1.ShowCellToolTips = false;
this.dataGridView1.ShowEditingIcon = false; this.dataGridView1.ShowEditingIcon = false;
this.dataGridView1.ShowRowErrors = false; this.dataGridView1.ShowRowErrors = false;
this.dataGridView1.Size = new System.Drawing.Size(909, 209); this.dataGridView1.Size = new System.Drawing.Size(909, 309);
this.dataGridView1.TabIndex = 103; this.dataGridView1.TabIndex = 103;
this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick); this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick);
this.dataGridView1.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataGridView1_CellMouseDown); this.dataGridView1.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataGridView1_CellMouseDown);
...@@ -597,7 +566,6 @@ namespace OnlineStore.ACSingleStore.useControl ...@@ -597,7 +566,6 @@ namespace OnlineStore.ACSingleStore.useControl
#endregion #endregion
private System.Windows.Forms.GroupBox groupInout; private System.Windows.Forms.GroupBox groupInout;
private System.Windows.Forms.Label lblMsg;
private System.Windows.Forms.Button btnSavePosition; private System.Windows.Forms.Button btnSavePosition;
private System.Windows.Forms.Button btnStartAuTo; private System.Windows.Forms.Button btnStartAuTo;
private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label9;
...@@ -610,8 +578,6 @@ namespace OnlineStore.ACSingleStore.useControl ...@@ -610,8 +578,6 @@ namespace OnlineStore.ACSingleStore.useControl
public System.Windows.Forms.TextBox txtUpDownP5; public System.Windows.Forms.TextBox txtUpDownP5;
public System.Windows.Forms.TextBox txtUpDownP6; public System.Windows.Forms.TextBox txtUpDownP6;
public System.Windows.Forms.TextBox txtUpDownP3; public System.Windows.Forms.TextBox txtUpDownP3;
private System.Windows.Forms.Button btnInStore;
private System.Windows.Forms.Button btnOutStore;
public System.Windows.Forms.TextBox txtUpDownP4; public System.Windows.Forms.TextBox txtUpDownP4;
public System.Windows.Forms.Button btnInOutP2; public System.Windows.Forms.Button btnInOutP2;
public System.Windows.Forms.Button btnComP3; public System.Windows.Forms.Button btnComP3;
...@@ -625,7 +591,8 @@ namespace OnlineStore.ACSingleStore.useControl ...@@ -625,7 +591,8 @@ namespace OnlineStore.ACSingleStore.useControl
private System.Windows.Forms.Timer timer1; private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.DataGridView dataGridView1; private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.Label cmbPosition; private System.Windows.Forms.Label cmbPosition;
private System.Windows.Forms.CheckBox checkBox_Double_Alternate;
public System.Windows.Forms.Button btnInOutP1; public System.Windows.Forms.Button btnInOutP1;
private System.Windows.Forms.Label lblMsg;
private System.Windows.Forms.Label label_verify;
} }
} }
...@@ -91,6 +91,7 @@ namespace OnlineStore.ACSingleStore.useControl ...@@ -91,6 +91,7 @@ namespace OnlineStore.ACSingleStore.useControl
var cells = dataGridView1.Rows[pp.row].Cells[pp.col]; var cells = dataGridView1.Rows[pp.row].Cells[pp.col];
cells.Style = GetStyle(arg1); cells.Style = GetStyle(arg1);
} }
checkVerify();
} }
DataGridViewCellStyle GetStyle(string posid) { DataGridViewCellStyle GetStyle(string posid) {
if (htpp.ContainsKey(posid) && posState.ContainsKey(posid)) if (htpp.ContainsKey(posid) && posState.ContainsKey(posid))
...@@ -300,6 +301,7 @@ namespace OnlineStore.ACSingleStore.useControl ...@@ -300,6 +301,7 @@ namespace OnlineStore.ACSingleStore.useControl
if (dataGridView1.SelectedCells.Count > 0) if (dataGridView1.SelectedCells.Count > 0)
setData(dataGridView1.SelectedCells[0].Tag.ToString()); setData(dataGridView1.SelectedCells[0].Tag.ToString());
checkVerify();
} }
void setData(string posid) { void setData(string posid) {
AutoStorePosition ktkPosition = CSVPositionReader<AutoStorePosition>.GetPositon(posid); AutoStorePosition ktkPosition = CSVPositionReader<AutoStorePosition>.GetPositon(posid);
...@@ -353,39 +355,57 @@ namespace OnlineStore.ACSingleStore.useControl ...@@ -353,39 +355,57 @@ namespace OnlineStore.ACSingleStore.useControl
if (store.autoNext) if (store.autoNext)
{ {
store.autoNext = false; store.autoNext = false;
btnStartAuTo.Text = StartAuto; //btnStart.Text = StartAuto;
} }
else else
{ {
DialogResult res = MyMessage.Show("确定开始自动出入库?", "提示", MessageBoxButtons.YesNo); DialogResult res = MessageBox.Show(ResourceCulture.GetString("确定开始自动出入库?", "确定开始自动出入库?"), ResourceCulture.GetString(ResourceCulture.MsgTitle, "提示"), MessageBoxButtons.YesNo);
if (res.Equals(DialogResult.Yes)) if (res.Equals(DialogResult.Yes))
{ {
store.autoNext = true; int jiange = int.Parse(txtJiange.Text);
int jiange = FormUtil.GetIntValue(txtJiange);
store.autoJiange = jiange; store.autoJiange = jiange;
if (!string.IsNullOrEmpty(cmbPosition.Text)) if (cmbPosition.Text.Length >= 0)
{ {
int currIndex = store.PositionNumList.IndexOf(cmbPosition.Text); int currIndex = store.PositionNumList.FindIndex(new Predicate<string>((pos)=>{ return pos == cmbPosition.Text; }));
store.autoPositionIndex = currIndex; store.autoPositionIndex = currIndex;
store.AutoStartIndex = currIndex; store.AutoStartIndex = currIndex;
//store.Double_Alternate = checkBox_Double_Alternate.Checked;
//store.Alternate = false;
//store.hasDoublePlate = false;
string poText = cmbPosition.Text; string poText = cmbPosition.Text;
store.autoMsg = AutoIn + ":" + poText; ConfigAppSettings.SaveValue(Setting_Init.DebugPosId, poText);
LogUtil.info(LOGGER, store.StoreName + "开启自动出入库模式,开始位置【" + poText + "】(索引=" + currIndex + "),间隔=" + jiange + ",入库开始!");
//store.StartOutStoreMove(new InOutStoreParam("", poText)); store.autoMsg = ResourceCulture.GetString("自动出入库", "自动出入库") + ":" + poText;
store.StartInStoreMove(new InOutStoreParam("", poText)); store.autoNext = true;
LogUtil.info(LOGGER, store.StoreName + "开启自动出入库模式,开始位置【" + poText + "】(索引=" + currIndex + "),间隔=" + jiange + "");
//btnStart.Text = StopAuto;
//DebugStatus(false);
string msg = AutomaticBaiting.doStartBatchIn();
LogUtil.info("自动出入库: 开始自动入库:库位号【" + poText + "】,开始入库,结果:" + msg);
} }
btnStartAuTo.Text = StopAuto;
} }
} }
} }
else else
{ {
MyMessage.Show("请先启动料仓!"); MessageBox.Show(ResourceCulture.GetString(ResourceCulture.PleaseStartStore, "请先启动料仓!"));
} }
} }
void checkVerify()
{
int finish = 0;
for (int i = 0; i < store.PositionNumList.Count; i++)
{
var posid = store.PositionNumList[i];
if (htpp.ContainsKey(posid) && posState.ContainsKey(posid))
{
var pps = (PosState)posState[posid];
if (pps.InStoreCheck == 1 && pps.OutStoreCheck == 1)
{
finish++;
}
}
}
double s = (double)finish / store.PositionNumList.Count*100;
label_verify.Text = s.ToString("0.0") + "%";
}
private LineMoveP LoadPostion() private LineMoveP LoadPostion()
{ {
LineMoveP ktk = new LineMoveP(); LineMoveP ktk = new LineMoveP();
...@@ -552,18 +572,7 @@ namespace OnlineStore.ACSingleStore.useControl ...@@ -552,18 +572,7 @@ namespace OnlineStore.ACSingleStore.useControl
} }
bool preOpen = false; bool preOpen = false;
public void StoreOpenStatus(bool isOpen)
{
if (preOpen.Equals(isOpen))
{
return;
}
preOpen = isOpen;
btnOutStore.Enabled = isOpen;
btnInStore.Enabled = isOpen;
}
private void timer1_Tick(object sender, EventArgs e) private void timer1_Tick(object sender, EventArgs e)
{ {
if (!Visible) if (!Visible)
......
...@@ -118,5 +118,8 @@ namespace OnlineStore.Common ...@@ -118,5 +118,8 @@ namespace OnlineStore.Common
public static string code_block_size_list= "code_block_size_list"; public static string code_block_size_list= "code_block_size_list";
public static string DisableFixTray = "DisableFixTray"; public static string DisableFixTray = "DisableFixTray";
public static string InOutFixPos = "InOutFixPos"; public static string InOutFixPos = "InOutFixPos";
public static string wait_take_reel_sec = "wait_take_reel_sec";
public static string humidityadjust = "humidityadjust";
public static string humiditylimited = "humiditylimited";
} }
} }
...@@ -104,9 +104,9 @@ namespace OnlineStore.Common ...@@ -104,9 +104,9 @@ namespace OnlineStore.Common
} }
return a; return a;
} }
public static int GetIntValue(string key) public static int GetIntValue(string key, int defalut=0)
{ {
int a = 0; int a = defalut;
System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
if (config.AppSettings.Settings[key] == null) if (config.AppSettings.Settings[key] == null)
{ {
......
...@@ -20,7 +20,8 @@ namespace OnlineStore.Common ...@@ -20,7 +20,8 @@ namespace OnlineStore.Common
private static int dataBits = 8;//数据位 private static int dataBits = 8;//数据位
private static StopBits stopBits = StopBits.One; //停止位 private static StopBits stopBits = StopBits.One; //停止位
private static AcSerialBean sb = null; private static AcSerialBean sb = null;
static double humidityadjust = (double)ConfigAppSettings.GetNumValue(Setting_Init.humidityadjust);
static double humiditylimited = (double)ConfigAppSettings.GetNumValue(Setting_Init.humiditylimited);
private static string LogName = ""; private static string LogName = "";
public static bool Init(string port) public static bool Init(string port)
{ {
...@@ -32,8 +33,8 @@ namespace OnlineStore.Common ...@@ -32,8 +33,8 @@ namespace OnlineStore.Common
{ {
Release(); Release();
} }
LogName = "温湿度传感器[" + port + "]"; LogName = "温湿度传感器[" + port + $"]{humidityadjust},{humiditylimited}";
LogUtil.info(LogName);
if (sb == null) if (sb == null)
{ {
serialPort = port; serialPort = port;
...@@ -77,6 +78,15 @@ namespace OnlineStore.Common ...@@ -77,6 +78,15 @@ namespace OnlineStore.Common
List<double> data = queryData(); List<double> data = queryData();
if (data.Count.Equals(2)) if (data.Count.Equals(2))
{ {
if (humidityadjust != 0 && humiditylimited != 0)
{
if (data[0] + humidityadjust < humiditylimited)
{
data[0] = humiditylimited;
}
else
data[0] += humidityadjust;
}
param = new ASTemperateParam(data[1], data[0]); param = new ASTemperateParam(data[1], data[0]);
} }
LastData = param; LastData = param;
......
...@@ -23,7 +23,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -23,7 +23,7 @@ namespace OnlineStore.DeviceLibrary
{ {
checkTimer = new System.Timers.Timer(); checkTimer = new System.Timers.Timer();
checkTimer.AutoReset = true; checkTimer.AutoReset = true;
checkTimer.Interval += 30; checkTimer.Interval += 10;
checkTimer.Elapsed += CheckTimer_Elapsed; checkTimer.Elapsed += CheckTimer_Elapsed;
checkTimer.Enabled = false; checkTimer.Enabled = false;
} }
......
...@@ -12,6 +12,8 @@ using CodeLibrary; ...@@ -12,6 +12,8 @@ using CodeLibrary;
using System.Drawing.Imaging; using System.Drawing.Imaging;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Runtime.Serialization.Formatters.Binary;
using System.Threading;
namespace OnlineStore.DeviceLibrary namespace OnlineStore.DeviceLibrary
{ {
...@@ -69,7 +71,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -69,7 +71,7 @@ namespace OnlineStore.DeviceLibrary
continue; continue;
} }
string file = GetCodeParamFilePath(str.Trim()); string file = GetCodeParamFilePath(str.Trim());
LogUtil.info("加载到配置二维码类型:" + str.Trim() + ",配置文件:" + file); LogUtil.info("加载到配置二维码类型:" + str.Trim() + ",配置文件:" + file+ ",QRCodeCount:"+ QRCodeCount.ToString());
codeTypeList.Add(str.Trim()); codeTypeList.Add(str.Trim());
} }
...@@ -142,80 +144,86 @@ namespace OnlineStore.DeviceLibrary ...@@ -142,80 +144,86 @@ namespace OnlineStore.DeviceLibrary
Camera._cam.CloseAll(); Camera._cam.CloseAll();
} }
[HandleProcessCorruptedStateExceptions] [HandleProcessCorruptedStateExceptions]
public static List<string> CameraScan( ) public static List<string> CameraScan()
{ {
int codeCount = 1; int codeCount = QRCodeCount;
List<string> codeList = new List<string>(); List<string> codeList = new List<string>();
if (cameraNameList == null || cameraNameList.Count <= 0) if (cameraNameList == null || cameraNameList.Count <= 0)
{ {
return codeList; return codeList;
} }
try Task[] cameraTask = new Task[cameraNameList.Count()];
LogUtil.info(cameraNameList.Count()+" 开始取图片");
for (int i = 0; i < cameraNameList.Count(); i++)
{ {
//Task[] cameraTask = new Task[cameraNameList.Count()]; cameraTask[i] = Task.Run(() =>
for(int i= 0;i < cameraNameList.Count();i++)
{ {
var cameraName = cameraNameList[i]; var cameraName = cameraNameList[i];
//cameraTask[i] = Task.Run(() =>
//{ if (cameraName.Trim().Equals(""))
if (cameraName.Trim().Equals("")) {
{ return;
continue; }
} DateTime startTime = DateTime.Now;
DateTime startTime = DateTime.Now; LogUtil.info(" 【" + cameraName + "】开始取图片");
LogUtil.info(" 【" + cameraName + "】开始取图片"); HalconDotNet.HObject ho_Image = null;
HalconDotNet.HObject ho_Image = null; Bitmap bmp = null;
Bitmap bmp = null; try
{
ho_Image = Camera._cam.CaptureOnImage(cameraName, out bmp, true);
}
catch (AccessViolationException e)
{
LogUtil.error(" 扫码出现AccessViolationException异常,关闭相机【" + cameraName + "】:" + e.ToString());
Camera._cam.Close(cameraName);
}
catch (Exception ex)
{
LogUtil.error(" 扫码出错:" + ex.ToString());
}
try try
{ {
bool nohalcon = false;
ho_Image = Camera._cam.CaptureOnImage(cameraName, out bmp, nohalcon);
if (ho_Image == null && !nohalcon)
{
LogUtil.error(" 【" + cameraName + "】取图片失败[" + Camera._cam.ErrInfo + "],关闭相机");
CloseCamera(cameraName);
continue;
}
LogUtil.info(" 【" + cameraName + "】取图片完成,开始扫码"); LogUtil.info(" 【" + cameraName + "】取图片完成,开始扫码");
string r = ""; string r = "";
RemoteDecodeHelper.RemoteDecodeParam remoteDecodeParam = new RemoteDecodeHelper.RemoteDecodeParam RemoteDecodeHelper.RemoteDecodeParam remoteDecodeParam = new RemoteDecodeHelper.RemoteDecodeParam
{ {
codeTypeList = codeTypeList.ToArray(), codeTypeList = codeTypeList.ToArray(),
codeCount = codeCount, codeCount = codeCount,
timeout = 4000 timeout = 2000
}; };
var cc = RemoteDecodeHelper.DecodeRequest(bmp, remoteDecodeParam); var cc = RemoteDecodeHelper.DecodeRequest(bmp, remoteDecodeParam);
if (cc != null) LogUtil.info(" 【" + cameraName + "】取图片完成,开始扫码1");
lock (codeList)
{ {
foreach (CodeInfo c in cc) if (cc != null)
{ {
string str = CodeManager.ReplaceCode(c.CodeStr);
if (!codeList.Contains(str)) foreach (CodeInfo c in cc)
{ {
codeList.Add(str); string str = CodeManager.ReplaceCode(c.CodeStr);
r = r + "##" + str; if (!codeList.Contains(str))
{
codeList.Add(str);
r = r + "##" + str;
}
} }
}
if (codeList.Count() == 0)
{
SaveImageToFile("mimo", cameraName, bmp);
} }
}
if (codeList.Count() == 0)
{
SaveImageToFile("mimo", cameraName, bmp);
} }
LogUtil.info(" 【" + cameraName + "】" + " 扫码完成【" + FormUtil.GetSpanStr(DateTime.Now - startTime) + "】 :" + r); LogUtil.info(" 【" + cameraName + "】" + " 扫码完成【" + FormUtil.GetSpanStr(DateTime.Now - startTime) + "】 :" + r);
} }
catch (AccessViolationException e)
{
LogUtil.error(" 扫码出现AccessViolationException异常,关闭相机【" + cameraName + "】:" + e.ToString());
Camera._cam.Close(cameraName);
// GC.Collect();
}
catch (Exception ex) catch (Exception ex)
{ {
LogUtil.error(" 扫码出错:" + ex.ToString()); LogUtil.error(" 识别出错:" + ex.ToString());
} }
finally finally
{ {
...@@ -224,24 +232,45 @@ namespace OnlineStore.DeviceLibrary ...@@ -224,24 +232,45 @@ namespace OnlineStore.DeviceLibrary
ho_Image.Dispose(); ho_Image.Dispose();
} }
if (bmp != null) if (bmp != null)
{
bmp.Dispose(); bmp.Dispose();
}
} }
// }); });
//cameraTask[i].Wait(); Thread.Sleep(500);
}
//Task.WaitAll(cameraTask);
} }
catch (AccessViolationException e) //Thread.Sleep(1000);
//Task.WaitAll(cameraTask, 10 * 1000);
while(!cameraTask[0].IsCompleted || !cameraTask[1].IsCompleted)
{ {
LogUtil.error( " 扫码出现AccessViolationException异常:" + e.ToString()); Application.DoEvents();
// GC.Collect(); Thread.Sleep(100);
} }
catch (Exception ex)
return codeList;
}
[HandleProcessCorruptedStateExceptions]
public static T DeepClone<T>(T _object)
{
try
{
T dstobject;
using (MemoryStream mStream = new MemoryStream())
{
BinaryFormatter bf = new BinaryFormatter();
bf.Serialize(mStream, _object);
mStream.Seek(0, SeekOrigin.Begin);//指定当前流的位置为流的开头。
dstobject = (T)bf.Deserialize(mStream);
mStream.Close();
}
return dstobject;
}
catch (Exception e)
{ {
LogUtil.error( " 扫码出错:" + ex.ToString()); LogUtil.info("GetStringCenterA" + e.ToString());
return default;
} }
return codeList;
} }
private static void SaveImageToFile(string deviceName, string cameraName, Bitmap bitmap) private static void SaveImageToFile(string deviceName, string cameraName, Bitmap bitmap)
{ {
......
...@@ -50,61 +50,62 @@ AXIS,(轴四)压紧轴,Comp_Axis,3,HC,0,,,, ...@@ -50,61 +50,62 @@ AXIS,(轴四)压紧轴,Comp_Axis,3,HC,0,,,,
AXIS,(轴五)批量上下料轴,Batch_Axis,4,HC,0,,,, AXIS,(轴五)批量上下料轴,Batch_Axis,4,HC,0,,,,
,,,,,,,,, ,,,,,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,升降轴 仓门位置P7(人工拿走盘的位置),UpDownAxis_Door_P7,3377,,,,,, PRO,升降轴 仓门位置P7(人工拿走盘的位置),UpDownAxis_Door_P7,606179,,,,,,
PRO,升降轴 出库高点P2,UpDownAxis_OutHigh_P2,2276,,,,,, PRO,升降轴 出库高点P2,UpDownAxis_OutHigh_P2,389483,,,,,,
PRO,升降轴 出库低点P8,UpDownAxis_OutLow_P8,2073,,,,,, PRO,升降轴 出库低点P8,UpDownAxis_OutLow_P8,359087,,,,,,
PRO,升降轴从吸盘下方接料后下降的高度,UpDownAxis_DownValue,100,,,,,, PRO,升降轴从吸盘下方接料后下降的高度,UpDownAxis_DownValue,20000,,,,,,
PRO,升降轴 入库P1点集合,UpDownAxis_P1_List,8#3917;12#3893;16#3840;20#3800;24#3789;,,,,,, PRO,升降轴 入库P1点集合,UpDownAxis_P1_List,8#684265;12#678000;16#670280;24#658742;28#652000,,,,,,
PRO,旋转轴(轴一)P1 待机原位点,MiddleAxis_P1_Position,2995,,,,,, PRO,旋转轴(轴一)P1 待机原位点,MiddleAxis_P1_Position,166268,,,,,,
PRO,进出轴(轴三)P1待机原位点,InOutAxis_P1_Position,100,,,,,, PRO,进出轴(轴三)P1待机原位点,InOutAxis_P1_Position,100,,,,,,
PRO,压紧轴(轴四)P1待机原位点,CompressAxis_P1_Position,7000,,,,,, PRO,压紧轴(轴四)P1待机原位点,CompressAxis_P1_Position,7000,,,,,,
PRO,压紧轴(轴四)P2压紧点集合,CompressAxis_P2_List,8#44201;12#38557;16#34550;20#30540;24#26030;,,,,,, PRO,压紧轴(轴四)P2压紧点集合,CompressAxis_P2_List,8#43000;12#42000;16#40000;24#30000;28#26000,,,,,,
PRO,是否使用定位气缸,IsHasLocationCylinder,0,,,,,, PRO,是否使用定位气缸,IsHasLocationCylinder,0,,,,,,
PRO,是否有左右侧门,IsHasDoorLimit,1,,,,,, PRO,是否有左右侧门,IsHasDoorLimit,1,,,,,,
PRO,是否使用压紧轴(1=使用),IsHasCompress_Axis,1,,,,,, PRO,是否使用压紧轴(1=使用),IsHasCompress_Axis,1,,,,,,
PRO,设备是否调试状态(1=调试,0=正常),IsInDebug,1,,,,,, PRO,设备是否调试状态(1=调试,0=正常),IsInDebug,0,,,,,,
PRO,默认的料盘宽度(不可更改),Default_TrayWidth,0,,,,, , PRO,默认的料盘宽度(不可更改),Default_TrayWidth,0,,,,,,
PRO,默认的料盘宽度(不可更改),Default_TrayHeight,0,,,,,,
PRO,气压检测IO关闭需要持续的时间,AirCheckSeconds,180,,,,,, PRO,气压检测IO关闭需要持续的时间,AirCheckSeconds,180,,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,预警温度,WarnTemperate,80,,,,,, PRO,预警温度,WarnTemperate,80,,,,,,
PRO,预警湿度,WarnHumidity,80,,,,,, PRO,预警湿度,WarnHumidity,80,,,,,,
PRO,(轴一)旋转轴目标速度,MiddleAxis_TargetSpeed,800,,,,,, PRO,(轴一)旋转轴目标速度,MiddleAxis_TargetSpeed,25000,,,,,,
PRO,(轴一)旋转轴加速度,MiddleAxis_AddSpeed,2400,,,,,, PRO,(轴一)旋转轴加速度,MiddleAxis_AddSpeed,100000,,,,,,
PRO,(轴一)旋转轴减速度,MiddleAxis_DelSpeed,2400,,,,,, PRO,(轴一)旋转轴减速度,MiddleAxis_DelSpeed,100000,,,,,,
PRO,(轴一)旋转轴原点低速度,MiddleAxis_HomeLowSpeed,100,,,,,, PRO,(轴一)旋转轴原点低速度,MiddleAxis_HomeLowSpeed,1000,,,,,,
PRO,(轴一)旋转轴原点高速,MiddleAxis_HomeHighSpeed,100,,,,,, PRO,(轴一)旋转轴原点高速,MiddleAxis_HomeHighSpeed,20000,,,,,,
PRO,(轴一)旋转轴原点加速度,MiddleAxis_HomeAddSpeed,500,,,,,, PRO,(轴一)旋转轴原点加速度,MiddleAxis_HomeAddSpeed,50000,,,,,,
PRO,(轴二)升降轴轴目标速度,UpdownAxis_TargetSpeed,2000,,,,,, PRO,(轴二)升降轴轴目标速度,UpdownAxis_TargetSpeed,50000,,,,,,
PRO,(轴二)升降轴轴加速度,UpdownAxis_AddSpeed,6000,,,,,, PRO,(轴二)升降轴轴加速度,UpdownAxis_AddSpeed,600000,,,,,,
PRO,(轴二)升降轴轴减速度,UpdownAxis_DelSpeed,6000,,,,,, PRO,(轴二)升降轴轴减速度,UpdownAxis_DelSpeed,600000,,,,,,
PRO,(轴二)升降轴轴原点低速度,UpdownAxis_HomeLowSpeed,20,,,,,, PRO,(轴二)升降轴轴原点低速度,UpdownAxis_HomeLowSpeed,3000,,,,,,
PRO,(轴二)升降轴轴原点高速,UpdownAxis_HomeHighSpeed,250,,,,,, PRO,(轴二)升降轴轴原点高速,UpdownAxis_HomeHighSpeed,40000,,,,,,
PRO,(轴二)升降轴轴原点加速度,UpdownAxis_HomeAddSpeed,3000,,,,,, PRO,(轴二)升降轴轴原点加速度,UpdownAxis_HomeAddSpeed,120000,,,,,,
PRO,(轴三)进出轴目标速度,InoutAxis_TargetSpeed,1000,,,,,, PRO,(轴三)进出轴目标速度,InoutAxis_TargetSpeed,200000,,,,,,
PRO,(轴三)进出轴加速度,InoutAxis_AddSpeed,5000,,,,,, PRO,(轴三)进出轴加速度,InoutAxis_AddSpeed,600000,,,,,,
PRO,(轴三)进出轴减速度,InoutAxis_DelSpeed,5000,,,,,, PRO,(轴三)进出轴减速度,InoutAxis_DelSpeed,600000,,,,,,
PRO,(轴三)进出轴原点低速,InoutAxis_HomeLowSpeed,80,,,,,, PRO,(轴三)进出轴原点低速,InoutAxis_HomeLowSpeed,1000,,,,,,
PRO,(轴三)进出轴原点高速,InoutAxis_HomeHighSpeed,200,,,,,, PRO,(轴三)进出轴原点高速,InoutAxis_HomeHighSpeed,40000,,,,,,
PRO,(轴三)进出轴原点加速度,InoutAxis_HomeAddSpeed,3000,,,,,, PRO,(轴三)进出轴原点加速度,InoutAxis_HomeAddSpeed,120000,,,,,,
PRO,升降轴(轴二)P1速度,UpDownAxis_P1_Speed,2000,,,,,, PRO,升降轴(轴二)P1速度,UpDownAxis_P1_Speed,200000,,,,,,
PRO,升降轴(轴二)P2速度,UpDownAxis_P2_Speed,2000,,,,,, PRO,升降轴(轴二)P2速度,UpDownAxis_P2_Speed,200000,,,,,,
PRO,升降轴(轴二)P3速度,UpDownAxis_P3_Speed,2000,,,,,, PRO,升降轴(轴二)P3速度,UpDownAxis_P3_Speed,200000,,,,,,
PRO,升降轴(轴二)P4速度,UpDownAxis_P4_Speed,150,,,,,, PRO,升降轴(轴二)P4速度,UpDownAxis_P4_Speed,100000,,,,,,
PRO,升降轴(轴二)P5速度,UpDownAxis_P5_Speed,2000,,,,,, PRO,升降轴(轴二)P5速度,UpDownAxis_P5_Speed,200000,,,,,,
PRO,升降轴(轴二)P6速度,UpDownAxis_P6_Speed,150,,,,,, PRO,升降轴(轴二)P6速度,UpDownAxis_P6_Speed,100000,,,,,,
PRO,升降轴(轴二)到仓门P7速度,UpDownAxis_P7_Speed,2000,,,,,, PRO,升降轴(轴二)到仓门P7速度,UpDownAxis_P7_Speed,100000,,,,,,
PRO,升降轴(轴二)P8速度,UpDownAxis_P8_Speed,100,,,,,, PRO,升降轴(轴二)P8速度,UpDownAxis_P8_Speed,100000,,,,,,
PRO,旋转轴(轴一)P1速度,MiddleAxis_P1_Speed,800,,,,,, PRO,旋转轴(轴一)P1速度,MiddleAxis_P1_Speed,40000,,,,,,
PRO,旋转轴(轴一)P2速度,MiddleAxis_P2_Speed,800,,,,,, PRO,旋转轴(轴一)P2速度,MiddleAxis_P2_Speed,40000,,,,,,
PRO,进出轴(轴三)P1速度,InOutAxis_P1_Speed,1600,,,,,, PRO,进出轴(轴三)P1速度,InOutAxis_P1_Speed,200000,,,,,,
PRO,进出轴(轴三)P2速度,InOutAxis_P2_Speed,1800,,,,,, PRO,进出轴(轴三)P2速度,InOutAxis_P2_Speed,200000,,,,,,
PRO,进出轴(轴三)P3速度,InOutAxis_P3_Speed,1800,,,,,, PRO,进出轴(轴三)P3速度,InOutAxis_P3_Speed,200000,,,,,,
PRO,(轴一)旋转轴最小误差脉冲值,MiddleAxis_ErrorCountMin,5,,,,,, PRO,(轴一)旋转轴最小误差脉冲值,MiddleAxis_ErrorCountMin,5,,,,,,
PRO,(轴二)升降轴轴最小误差脉冲值,UpdownAxis_ErrorCountMin,5,,,,,, PRO,(轴二)升降轴轴最小误差脉冲值,UpdownAxis_ErrorCountMin,5,,,,,,
PRO,(轴三)进出轴最小误差脉冲值,InoutAxis_ErrorCountMin,5,,,,,, PRO,(轴三)进出轴最小误差脉冲值,InoutAxis_ErrorCountMin,5,,,,,,
PRO,(轴一)旋转轴最大误差脉冲值,MiddleAxis_ErrorCountMax,20,,,,,, PRO,(轴一)旋转轴最大误差脉冲值,MiddleAxis_ErrorCountMax,250,,,,,,
PRO,(轴二)升降轴轴最大误差脉冲值,UpdownAxis_ErrorCountMax,20,,,,,, PRO,(轴二)升降轴轴最大误差脉冲值,UpdownAxis_ErrorCountMax,1000,,,,,,
PRO,(轴三)进出轴最大误差脉冲值,InoutAxis_ErrorCountMax,20,,,,,, PRO,(轴三)进出轴最大误差脉冲值,InoutAxis_ErrorCountMax,300,,,,,,
PRO,出入库多少次,会自动重置旋转轴,Box_ResetMCount,1000,,,,,, PRO,出入库多少次,会自动重置旋转轴,Box_ResetMCount,1000,,,,,,
PRO,出入库多少次,会自动重置所有轴操作,Box_ResetACount,500,,,,,, PRO,出入库多少次,会自动重置所有轴操作,Box_ResetACount,500,,,,,,
PRO,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,, PRO,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,
...@@ -123,37 +124,37 @@ PRO,温湿度端口号,Humiture_Port,COM5,,,,,, ...@@ -123,37 +124,37 @@ PRO,温湿度端口号,Humiture_Port,COM5,,,,,,
,,,,,,,,, ,,,,,,,,,
,,,,,,,,, ,,,,,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,(轴五)上料轴目标速度,BatchAxis_TargetSpeed,13000,,,,,, PRO,(轴五)上料轴目标速度,BatchAxis_TargetSpeed,40000,,,,,,
PRO,(轴五)上料轴慢速匀速上升速度,BatchAxis_SlowSpeed,8000,,,,,, PRO,(轴五)上料轴慢速匀速上升速度,BatchAxis_SlowSpeed,3000,,,,,,
PRO,(轴五)上料轴加速度,BatchAxis_AddSpeed,60000,,,,,, PRO,(轴五)上料轴加速度,BatchAxis_AddSpeed,20000,,,,,,
PRO,(轴五)上料轴减速度,BatchAxis_DelSpeed,60000,,,,,, PRO,(轴五)上料轴减速度,BatchAxis_DelSpeed,20000,,,,,,
PRO,(轴五)上料轴原点低速,BatchAxis_HomeLowSpeed,9000,,,,,, PRO,(轴五)上料轴原点低速,BatchAxis_HomeLowSpeed,800,,,,,,
PRO,(轴五)上料轴原点高速,BatchAxis_HomeHighSpeed,15000,,,,,, PRO,(轴五)上料轴原点高速,BatchAxis_HomeHighSpeed,8000,,,,,,
PRO,(轴五)上料轴原点加速度,BatchAxis_HomeAddSpeed,100000,,,,,, PRO,(轴五)上料轴原点加速度,BatchAxis_HomeAddSpeed,25000,,,,,,
PRO,(轴五)上料轴P1点(出库时接料盘的位置),BatchAxis_P1,285778,,,,,, PRO,(轴五)上料轴P1点(出库时接料盘的位置),BatchAxis_P1,310178,,,,,,
PRO,(轴五)上料轴P2点(待机点),BatchAxis_P2,3000,,,,,, PRO,(轴五)上料轴P2点(待机点),BatchAxis_P2,3000,,,,,,
PRO,(轴五)上料轴P2速度,BatchAxis_P2_Speed,20000,,,,,, PRO,(轴五)上料轴P2速度,BatchAxis_P2_Speed,25000,,,,,,
PRO,(轴五)上料轴最小误差脉冲值,BatchAxis_ErrorCountMin,100,,,,,, PRO,(轴五)上料轴最小误差脉冲值,BatchAxis_ErrorCountMin,100,,,,,,
PRO,(轴五)上料轴最大误差脉冲值,BatchAxis_ErrorCountMax,200,,,,,, PRO,(轴五)上料轴最大误差脉冲值,BatchAxis_ErrorCountMax,200,,,,,,
PRO,(轴五)上料轴最小限位,BatchAxis_PositionMin,0,,,,,, PRO,(轴五)上料轴最小限位,BatchAxis_PositionMin,0,,,,,,
PRO,(轴五)上料轴最大限位,BatchAxis_PositionMax,0,,,,,, PRO,(轴五)上料轴最大限位,BatchAxis_PositionMax,0,,,,,,
PRO,(轴五)上料轴出料时距离检测信号需要下降的高度,BatchAxis_OutDownPosition,30000,,,,,, PRO,(轴五)上料轴出料时距离检测信号需要下降的高度,BatchAxis_OutDownPosition,15000,,,,,,
PRO,(轴五)上料轴出料时检测到料盘需要下降的高度,BatchAxis_DownPosition2,60000,,,,,, PRO,(轴五)上料轴出料时检测到料盘需要下降的高度,BatchAxis_DownPosition2,3000,,,,,,
PRO,(轴五)上料轴P1速度,BatchAxis_P1_Speed,22000,,,,,, PRO,(轴五)上料轴P1速度,BatchAxis_P1_Speed,50000,,,,,,
PRO,(轴五)上料轴最最大料盘高度,到达后无法批量出库,BatchAxis_MaxHeight,250,,,,,, PRO,(轴五)上料轴最最大料盘高度,到达后无法批量出库,BatchAxis_MaxHeight,25000,,,,,,
PRO,最后一盘料需要补充的高度,LastTrayAddHeight,9,,,,,, PRO,最后一盘料需要补充的高度,LastTrayAddHeight,6,,,,,,
PRO,(轴五)上料轴P3点(上料目标位置),BatchAxis_P3,358243,,,,,, PRO,(轴五)上料轴P3点(上料目标位置),BatchAxis_P3,340874,,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,(轴二)升降轴单盘入库抬升料盘的高度,UpdownAxis_UpPosition,100,,,,,, PRO,(轴二)升降轴单盘入库抬升料盘的高度,UpdownAxis_UpPosition,100,,,,,,
PRO,(轴五)上料轴出库上升最大高度,BatchAxis_OutMaxValue,100,,,,,, PRO,(轴五)上料轴出库上升最大高度,BatchAxis_OutMaxValue,100,,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,(轴四)压紧轴目标速度,CompAxis_TargetSpeed,10000,,,,,, PRO,(轴四)压紧轴目标速度,CompAxis_TargetSpeed,50000,,,,,,
PRO,(轴四)压紧轴加速度,CompAxis_AddSpeed,95000,,,,,, PRO,(轴四)压紧轴加速度,CompAxis_AddSpeed,1200000,,,,,,
PRO,(轴四)压紧轴减速度,CompAxis_DelSpeed,95000,,,,,, PRO,(轴四)压紧轴减速度,CompAxis_DelSpeed,1200000,,,,,,
PRO,(轴四)压紧轴原点低速,CompAxis_HomeLowSpeed,3000,,,,,, PRO,(轴四)压紧轴原点低速,CompAxis_HomeLowSpeed,800,,,,,,
PRO,(轴四)压紧轴原点高速,CompAxis_HomeHighSpeed,5000,,,,,, PRO,(轴四)压紧轴原点高速,CompAxis_HomeHighSpeed,8000,,,,,,
PRO,(轴四)压紧轴原点加速度,CompAxis_HomeAddSpeed,10000,,,,,, PRO,(轴四)压紧轴原点加速度,CompAxis_HomeAddSpeed,25000,,,,,,
PRO,(轴四)压紧轴P1速度,CompAxis_P1_Speed,10000,,,,,, PRO,(轴四)压紧轴P1速度,CompAxis_P1_Speed,200000,,,,,,
PRO,(轴四)压紧轴P2速度,CompAxis_P2_Speed,20000,,,,,, PRO,(轴四)压紧轴P2速度,CompAxis_P2_Speed,200000,,,,,,
PRO,(轴四)压紧轴P3速度,CompAxis_P3_Speed,30000,,,,,, PRO,(轴四)压紧轴P3速度,CompAxis_P3_Speed,200000,,,,,,
PRO,特殊二维码尺寸配置,CodeSizeConfig,T,PartNum,1=330x81,,,, PRO,特殊二维码尺寸配置,CodeSizeConfig,T=13x28#S=7x8,,,,,,
...@@ -89,6 +89,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -89,6 +89,7 @@ namespace OnlineStore.DeviceLibrary
IOManager.IOMove(IO_Type.AutoRun_HddLed, IO_VALUE.LOW); IOManager.IOMove(IO_Type.AutoRun_HddLed, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.RunSign_HddLed, IO_VALUE.LOW); IOManager.IOMove(IO_Type.RunSign_HddLed, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.Buzzer_Sign, IO_VALUE.LOW); IOManager.IOMove(IO_Type.Buzzer_Sign, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.HIGH);
mainTimer.Enabled = (isAuto == 1); mainTimer.Enabled = (isAuto == 1);
LoadOk = true; LoadOk = true;
}); });
...@@ -358,6 +359,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -358,6 +359,9 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NewMove(StoreMoveType.StoreReset); StoreMove.NewMove(StoreMoveType.StoreReset);
//WarnMsg = ""; //WarnMsg = "";
SetWarnMsg(""); SetWarnMsg("");
if (!RunAxis(true)) if (!RunAxis(true))
{ {
LogUtil.info(LOGGER, StoreName + "复位时打开轴失败,需要再次复位,直接报警停止复位"); LogUtil.info(LOGGER, StoreName + "复位时打开轴失败,需要再次复位,直接报警停止复位");
...@@ -377,6 +381,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -377,6 +381,10 @@ namespace OnlineStore.DeviceLibrary
//LocationDownAndWait(); //LocationDownAndWait();
} }
AutomaticBaiting.StartReset(); AutomaticBaiting.StartReset();
IoCheckTimer.Enabled = true;
serverConnectTimer.Enabled = true;
ledCheckTimer.Enabled = true;
isInPro = false; isInPro = false;
} }
private void InoutStartReset() private void InoutStartReset()
...@@ -493,7 +501,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -493,7 +501,7 @@ namespace OnlineStore.DeviceLibrary
case StoreMoveStep.BOX_R42_OpenDoor: case StoreMoveStep.BOX_R42_OpenDoor:
StoreMove.NextMoveStep(StoreMoveStep.BOX_R43_WaitTrayGo); StoreMove.NextMoveStep(StoreMoveStep.BOX_R43_WaitTrayGo);
ResetLog("复位时清料: 等待操作人员拿走料盘 "); ResetLog("复位时清料: 等待操作人员拿走料盘 ");
StoreMove.TimeOutSeconds = 120; StoreMove.TimeOutSeconds = wait_take_reel_sec;
AutomaticBaiting.IsWaitTragGo = true; AutomaticBaiting.IsWaitTragGo = true;
AutomaticBaiting.IsGetTrayGo = false; AutomaticBaiting.IsGetTrayGo = false;
StoreMove.WaitList.Add(WaitResultInfo.WaitTakeTray()); StoreMove.WaitList.Add(WaitResultInfo.WaitTakeTray());
...@@ -1875,9 +1883,18 @@ namespace OnlineStore.DeviceLibrary ...@@ -1875,9 +1883,18 @@ namespace OnlineStore.DeviceLibrary
DateTime time = DateTime.Now; DateTime time = DateTime.Now;
//构建发送给服务器的对象 //构建发送给服务器的对象
Operation lineOperation = getLineBoxStatus(); Operation lineOperation = getLineBoxStatus();
if (Max_Humidity <= 0 || (Max_Temperature <= 0))
{
lineOperation.op = 5;
LogUtil.info(LOGGER, StoreName + "没有湿度预警范围,需要从服务器获取,发送OP=" + lineOperation.op);
}
string server = ConfigAppSettings.GetValue(Setting_Init.http_server); string server = ConfigAppSettings.GetValue(Setting_Init.http_server);
Operation resultOperation = HttpHelper.PostOP(StoreManager.GetPostApi(server), lineOperation); Operation resultOperation = null;
lock (StoreManager.Store)
{
resultOperation = HttpHelper.PostOP(StoreManager.GetPostApi(server), lineOperation);
}
//发送状态信息到服务器 //发送状态信息到服务器
if (resultOperation == null) if (resultOperation == null)
{ {
...@@ -1895,7 +1912,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1895,7 +1912,7 @@ namespace OnlineStore.DeviceLibrary
public void OperationProcess(Operation resultOperation) public void OperationProcess(Operation resultOperation)
{ {
if (resultOperation.data != null) if (resultOperation.op.Equals(5))
{ {
ProcessHumidityCMD(resultOperation); ProcessHumidityCMD(resultOperation);
} }
......
...@@ -17,13 +17,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -17,13 +17,14 @@ namespace OnlineStore.DeviceLibrary
private static int StartMovePosition = 0; private static int StartMovePosition = 0;
private static int EndMovePosition = 0; private static int EndMovePosition = 0;
//public static int AutoAxisIsMove = 0; //public static int AutoAxisIsMove = 0;
private static void ACAxisSpeedMove(ConfigMoveAxis moveAxis,int targetPosition, int targetSpeed,string targetSingle) private static void ACAxisSpeedMove(ConfigMoveAxis moveAxis,int targetPosition, int targetSpeed,string targetSingle, bool needwait = true)
{ {
//AutoAxisIsMove = 1; //AutoAxisIsMove = 1;
StartMovePosition = ACServerManager.GetActualtPosition(moveAxis.DeviceName, moveAxis.GetAxisValue()); StartMovePosition = ACServerManager.GetActualtPosition(moveAxis.DeviceName, moveAxis.GetAxisValue());
EndMovePosition = StartMovePosition; EndMovePosition = StartMovePosition;
LogUtil.debug("当前坐标:"+StartMovePosition+",批量上料轴开始匀速"+targetSpeed+"上升"); LogUtil.debug("当前坐标:"+StartMovePosition+",批量上料轴开始匀速"+targetSpeed+ "上升,needwait="+ needwait.ToString());
StoreMove.WaitList.Add(WaitResultInfo.WaitBatchAxisStop(moveAxis,targetPosition, targetSingle)); if (needwait)
StoreMove.WaitList.Add(WaitResultInfo.WaitBatchAxisStop(moveAxis,targetPosition, targetSingle));
BatchAxisController.StartCheck(targetSingle); BatchAxisController.StartCheck(targetSingle);
ACServerManager.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition,targetSpeed, moveAxis.AddSpeed, moveAxis.DelSpeed); ACServerManager.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition,targetSpeed, moveAxis.AddSpeed, moveAxis.DelSpeed);
} }
...@@ -404,6 +405,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -404,6 +405,7 @@ namespace OnlineStore.DeviceLibrary
if (LastCode.Equals("")) if (LastCode.Equals(""))
{ {
StoreManager.Store.CodeOrInoutMsg = ResourceControl.GetString(ResourceControl.InStoreNoCode, "未扫到二维码,需要将料盘送出"); StoreManager.Store.CodeOrInoutMsg = ResourceControl.GetString(ResourceControl.InStoreNoCode, "未扫到二维码,需要将料盘送出");
LogUtil.error("未扫到二维码,需要将料盘送出"); LogUtil.error("未扫到二维码,需要将料盘送出");
} }
TimeSpan span = DateTime.Now - startTime; TimeSpan span = DateTime.Now - startTime;
...@@ -430,19 +432,22 @@ namespace OnlineStore.DeviceLibrary ...@@ -430,19 +432,22 @@ namespace OnlineStore.DeviceLibrary
//string[] codeArray = LastCode.Split(new string[] { spiltStr}); //string[] codeArray = LastCode.Split(new string[] { spiltStr});
if (LastCodeList.Count > 0) if (LastCodeList.Count > 0)
{ {
foreach (string cc in LastCodeList) foreach (string cc in LastCodeList.ToArray())
{ {
string code = cc.Trim(); string code = cc;
if (!code.Equals("")) if (!code.Trim().Equals(""))
{ {
string codeSize = StoreManager.Config.GetCodeSize(ref code); string codeSize = StoreManager.Config.GetCodeSize(ref code);
if (String.IsNullOrEmpty(codeSize)) LogUtil.info(Name + $"code:{code},codeSize:{codeSize}");
if (!String.IsNullOrEmpty(codeSize))
{ {
msg = msg + "=1+0x0-" + LastWidth + "x" + LastHeight + "=" + code + spiltStr; LastCodeList.Remove(cc);
} //msg = msg + "=1+0x0-" + codeSize + "=" + code + spiltStr;
else var w = codeSize.Substring(0, codeSize.IndexOf("x"));
{ var h = codeSize.Substring(codeSize.IndexOf("x") + 1);
msg = msg + "=1+0x0-" + codeSize + "=" + code + spiltStr; LastWidth = int.Parse(w);
LastHeight = int.Parse(h);
LogUtil.info(Name + $"弃用条码:{cc},LastWidth:{LastWidth},LastHeight:{LastHeight}");
} }
} }
} }
...@@ -451,6 +456,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -451,6 +456,17 @@ namespace OnlineStore.DeviceLibrary
{ {
msg = msg + "=1+0x0-" + LastWidth + "x" + LastHeight + "=" + LastCode + spiltStr; msg = msg + "=1+0x0-" + LastWidth + "x" + LastHeight + "=" + LastCode + spiltStr;
} }
if (LastCodeList.Count > 0)
{
foreach (string cc in LastCodeList.ToArray())
{
string code = cc;
if (!code.Trim().Equals(""))
{
msg = msg + "=1+0x0-" + LastWidth + "x" + LastHeight + "=" + code + spiltStr;
}
}
}
msg = CodeManager.ReplaceCode(msg); msg = CodeManager.ReplaceCode(msg);
LastSendCode = msg; LastSendCode = msg;
return msg; return msg;
...@@ -514,7 +530,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -514,7 +530,7 @@ namespace OnlineStore.DeviceLibrary
} }
} }
public static InOutStoreParam GetInStoreParam(string LogName, string message) public static InOutStoreParam GetInStoreParam(string LogName, string message, bool singlein = false)
{ {
//message = CodeManager.ReplaceCode(message); //message = CodeManager.ReplaceCode(message);
if (message.Equals("") || string.IsNullOrEmpty(message)) if (message.Equals("") || string.IsNullOrEmpty(message))
...@@ -536,7 +552,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -536,7 +552,7 @@ namespace OnlineStore.DeviceLibrary
operation.data.Add("code", message); operation.data.Add("code", message);
operation.data.Add("boxId", StoreManager.Store.StoreID.ToString()); operation.data.Add("boxId", StoreManager.Store.StoreID.ToString());
if (LastHeight.Equals(0) && LastWidth.Equals(0)) if ((LastHeight.Equals(0) && LastWidth.Equals(0)) || singlein)
{ {
//singleIn 单盘入库 //singleIn 单盘入库
operation.data.Add("singleIn", "true"); operation.data.Add("singleIn", "true");
...@@ -545,6 +561,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -545,6 +561,8 @@ namespace OnlineStore.DeviceLibrary
{ {
operation.data.Add("singleIn", "false"); operation.data.Add("singleIn", "false");
} }
string autoposId = StoreManager.Store.GetAutoPosid(true); string autoposId = StoreManager.Store.GetAutoPosid(true);
if (StoreManager.Store.autoNext && (!String.IsNullOrEmpty(autoposId))) if (StoreManager.Store.autoNext && (!String.IsNullOrEmpty(autoposId)))
{ {
...@@ -552,18 +570,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -552,18 +570,17 @@ namespace OnlineStore.DeviceLibrary
LogUtil.debug("添加自动入库库位号:" + autoposId); LogUtil.debug("添加自动入库库位号:" + autoposId);
} }
string server = ConfigAppSettings.GetValue(Setting_Init.http_server); string server = ConfigAppSettings.GetValue(Setting_Init.http_server);
Operation resultOperation = HttpHelper.PostOP(StoreManager.GetPostApi(server), operation, 2000); Operation resultOperation = null;
lock (StoreManager.Store)
if (resultOperation == null)
{ {
LogUtil.info(LogName + "二维码【" + message + "】没有收到服务器反馈"); resultOperation = HttpHelper.PostOP(StoreManager.GetPostApi(server), operation, 2000);
return null;
} }
else if (!string.IsNullOrEmpty(resultOperation.msg)) if (resultOperation == null)
{ {
LogUtil.info(LogName + "服务器反馈 二维码【" + message + "】【" + autoposId + "】 :" + resultOperation.msg); LogUtil.info(LogName + "二维码【" + message + "】没有收到服务器反馈");
return null; return null;
} }
Dictionary<string, string> data = resultOperation.data; Dictionary<string, string> data = resultOperation.data;
if (data != null && data.ContainsKey(ParamDefine.posId) && data.ContainsKey(ParamDefine.plateH) && data.ContainsKey(ParamDefine.plateW)) if (data != null && data.ContainsKey(ParamDefine.posId) && data.ContainsKey(ParamDefine.plateH) && data.ContainsKey(ParamDefine.plateW))
...@@ -602,6 +619,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -602,6 +619,11 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(LogName + "解析服务发送的入库【" + posId + "】出错" + ex.StackTrace); LogUtil.error(LogName + "解析服务发送的入库【" + posId + "】出错" + ex.StackTrace);
} }
} }
else if (!string.IsNullOrEmpty(resultOperation.msg))
{
LogUtil.info(LogName + "服务器反馈 二维码【" + message + "】【" + autoposId + "】 :" + resultOperation.msg);
return null;
}
else else
{ {
LogUtil.error(LogName + "二维码【" + message + "】获取入库库位失败 "); LogUtil.error(LogName + "二维码【" + message + "】获取入库库位失败 ");
......
...@@ -600,6 +600,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -600,6 +600,8 @@ namespace OnlineStore.DeviceLibrary
/// 等待1秒钟后在下降 /// 等待1秒钟后在下降
/// </summary> /// </summary>
AUTO_O07_WaitDown = 1307, AUTO_O07_WaitDown = 1307,
AUTO_I02_1 = 1309,
AUTO_I02_2 = 1310,
#endregion #endregion
......
...@@ -603,6 +603,11 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -603,6 +603,11 @@ namespace OnlineStore.LoadCSVLibrary
[ConfigProAttribute("Default_TrayWidth")] [ConfigProAttribute("Default_TrayWidth")]
public int Default_TrayWidth { get; set; } public int Default_TrayWidth { get; set; }
/// <summary> /// <summary>
/// PRO,默认的料盘高度(不可更改),Default_TrayHeight,7
/// </summary>
[ConfigProAttribute("Default_TrayHeight")]
public int Default_TrayHeight { get; set; }
/// <summary>
/// PRO IO模块对应的DI数量 IO_DILength 192.168.200.10#16;192.168.200.11#4 /// PRO IO模块对应的DI数量 IO_DILength 192.168.200.10#16;192.168.200.11#4
/// </summary> /// </summary>
[ConfigProAttribute("IO_DILength",false)] [ConfigProAttribute("IO_DILength",false)]
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!