Commit 2b40314a LN

配置结构修改

1 个父辈 6a9b44ec
正在显示 41 个修改的文件 包含 280 行增加358 行删除
...@@ -19,7 +19,7 @@ namespace OnlineStore.Common ...@@ -19,7 +19,7 @@ namespace OnlineStore.Common
public static Dictionary<int, DateTime> lastErrorLogTime = new Dictionary<int, DateTime>(); public static Dictionary<int, DateTime> lastErrorLogTime = new Dictionary<int, DateTime>();
public static System.Windows.Forms.RichTextBox logBox = null; public static System.Windows.Forms.RichTextBox logBox = null;
public static int showCount = 20; public static int showCount = 30;
public static bool debug_opened = false; public static bool debug_opened = false;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
</configSections> </configSections>
<appSettings> <appSettings>
<!--是否开机自动启动料仓--> <!--是否开机自动启动料仓-->
<add key="App_AutoRun" value="1" /> <add key="App_AutoRun" value="0" />
<add key="App_Title" value="包装料料仓" /> <add key="App_Title" value="包装料料仓" />
<!-- 开始吹气的判断值(配置值=服务器发送的湿度值-开始吹气值)--> <!-- 开始吹气的判断值(配置值=服务器发送的湿度值-开始吹气值)-->
<add key="StartBlowValue" value="4" /> <add key="StartBlowValue" value="4" />
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
</appSettings> </appSettings>
<log4net> <log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"> <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="logs/Packing-store-19-20.log" /> <file value="logs/duoStore.log" />
<param name="Encoding" value="UTF-8" /> <param name="Encoding" value="UTF-8" />
<appendToFile value="true" /> <appendToFile value="true" />
<rollingStyle value="Date" /> <rollingStyle value="Date" />
...@@ -72,8 +72,8 @@ ...@@ -72,8 +72,8 @@
<conversionPattern value="[%date][%t]%-5p %m%n" /> <conversionPattern value="[%date][%t]%-5p %m%n" />
</layout> </layout>
</appender> </appender>
<appender name="TheRFID" type="log4net.Appender.RollingFileAppender"> <appender name="AIOBOX" type="log4net.Appender.RollingFileAppender">
<file value="logs/TheRFID.log" /> <file value="logs/aio/AIOBOX.log" />
<param name="Encoding" value="UTF-8" /> <param name="Encoding" value="UTF-8" />
<appendToFile value="true" /> <appendToFile value="true" />
<rollingStyle value="Date" /> <rollingStyle value="Date" />
...@@ -86,9 +86,9 @@ ...@@ -86,9 +86,9 @@
<level value="Info" /> <level value="Info" />
<appender-ref ref="RollingLogFileAppender" /> <appender-ref ref="RollingLogFileAppender" />
</logger> </logger>
<logger name="TheRFID"> <logger name="AIOBOX">
<level value="Debug" /> <level value="Debug" />
<appender-ref ref="TheRFID" /> <appender-ref ref="AIOBOX" />
</logger> </logger>
<root> <root>
<level value="Info" /> <level value="Info" />
......
...@@ -49,25 +49,25 @@ namespace OnlineStore.ACPackingStore ...@@ -49,25 +49,25 @@ namespace OnlineStore.ACPackingStore
} }
} }
private static FrmIOStatus frmIo = null; private static FrmIOStatus frmIo = null;
public static void ShowIOShow(BoxBean store) //public static void ShowIOShow(BoxBean store)
{ //{
if (frmIo == null) // if (frmIo == null)
{ // {
frmIo = new FrmIOStatus(store); // frmIo = new FrmIOStatus(store);
frmIo.Show(); // frmIo.Show();
} // }
else // else
{ // {
if (frmIo.IsDisposed) // if (frmIo.IsDisposed)
{ // {
frmIo = new FrmIOStatus(store); // frmIo = new FrmIOStatus(store);
frmIo.Show(); // frmIo.Show();
} // }
else // else
{ // {
frmIo.Activate(); // frmIo.Activate();
} // }
} // }
} //}
} }
} }
...@@ -62,17 +62,17 @@ namespace OnlineStore.ACPackingStore ...@@ -62,17 +62,17 @@ namespace OnlineStore.ACPackingStore
txtMiddleP1.Text = BoxBean.Config.MiddleAxis_P1.ToString(); txtMiddleP1.Text = BoxBean.Config.MiddleAxis_P1.ToString();
txtUpDownP1.Text = BoxBean.Config.UpDownAxis_P1.ToString(); txtUpDownP1.Text = BoxBean.Config.UpDownAxis_P1.ToString();
txtInOutP1.Text = BoxBean.Config.InOutAxis_P1_Position.ToString(); txtInOutP1.Text = BoxBean.Config.InOutAxis_P1 .ToString();
txtComP1.Text = BoxBean.Config.CompAxis_P1_Position.ToString(); txtComP1.Text = BoxBean.Config.CompAxis_P1 .ToString();
txtUpDownP2.Text = BoxBean.Config.UpDownAxis_P2.ToString(); txtUpDownP2.Text = BoxBean.Config.UpDownAxis_P2.ToString();
txtInOutP2.Text = BoxBean.Config.InOutAxis_P2_Position.ToString(); txtInOutP2.Text = BoxBean.Config.InOutAxis_P2 .ToString();
txtMiddleP11.Text = BoxBean.Config.MiddleAxis_P11.ToString(); txtMiddleP11.Text = BoxBean.Config.MiddleAxis_P11.ToString();
txtUpdownP11.Text = BoxBean.Config.UpDownAxis_P11.ToString(); txtUpdownP11.Text = BoxBean.Config.UpDownAxis_P11.ToString();
txtUpdownP12.Text = BoxBean.Config.UpDownAxis_P12.ToString(); txtUpdownP12.Text = BoxBean.Config.UpDownAxis_P12.ToString();
txtInOutP2.Text = BoxBean.Config.InOutAxis_P2_Position.ToString(); txtInOutP2.Text = BoxBean.Config.InOutAxis_P2 .ToString();
txtInoutP11.Text = BoxBean.Config.InOutAxis_P11_Position.ToString(); txtInoutP11.Text = BoxBean.Config.InOutAxis_P11 .ToString();
//txtInOutP2.Text = BoxBean.Config.InOutAxis_DoorPosition_P2.ToString(); //txtInOutP2.Text = BoxBean.Config.InOutAxis_DoorPosition_P2.ToString();
txtUpDownP1.Text = BoxBean.Config.UpDownAxis_P1.ToString(); txtUpDownP1.Text = BoxBean.Config.UpDownAxis_P1.ToString();
LoadPData(ktkPosition); LoadPData(ktkPosition);
...@@ -80,7 +80,7 @@ namespace OnlineStore.ACPackingStore ...@@ -80,7 +80,7 @@ namespace OnlineStore.ACPackingStore
chbDebug.Checked = BoxBean.IsDebug; chbDebug.Checked = BoxBean.IsDebug;
this.ShowInTaskbar = true; this.ShowInTaskbar = true;
txtTempPort.Text = BoxBean.Config.Humiture_Port; // txtTempPort.Text = BoxBean.Config.Humiture_Port;
timer1.Start(); timer1.Start();
LoadOk = true; LoadOk = true;
} }
...@@ -123,11 +123,11 @@ namespace OnlineStore.ACPackingStore ...@@ -123,11 +123,11 @@ namespace OnlineStore.ACPackingStore
lblMoveInfo.Text = BoxBean.GetMoveStr(); lblMoveInfo.Text = BoxBean.GetMoveStr();
if (BoxBean.MoveInfo.MoveType.Equals(StoreMoveType.InStore)) if (BoxBean.MoveInfo.MoveType.Equals(StoreMoveType.InStore))
{ {
lblMoveEquipInfo.Text = "入库:" + BoxBean.MoveInfo.MoveParam.ToShortStr(); lblMoveEquipInfo.Text = "入库:" + BoxBean.MoveInfo.MoveParam.ToStr();
} }
else if (BoxBean.MoveInfo.MoveType.Equals(StoreMoveType.OutStore)) else if (BoxBean.MoveInfo.MoveType.Equals(StoreMoveType.OutStore))
{ {
lblMoveEquipInfo.Text = "出库:" + BoxBean.MoveInfo.MoveParam.ToShortStr(); lblMoveEquipInfo.Text = "出库:" + BoxBean.MoveInfo.MoveParam.ToStr();
} }
else else
{ {
...@@ -294,15 +294,15 @@ namespace OnlineStore.ACPackingStore ...@@ -294,15 +294,15 @@ namespace OnlineStore.ACPackingStore
txtUpDownP6.Text = acPosition.UpdownAxis_OL_P6.ToString(); txtUpDownP6.Text = acPosition.UpdownAxis_OL_P6.ToString();
int comP2 = BoxBean.Config.GetComP2(acPosition.BagHigh).TargetComP2(); int comP2 = BoxBean.Config.GetComP2(acPosition.BagHigh);
txtComP2.Text = comP2.ToString(); txtComP2.Text = comP2.ToString();
txtComP3.Text = (comP2 + BoxBean.Config.GetCom_P3_P2(acPosition.BagWidth)).ToString(); txtComP3.Text =BoxBean.Config.CompAxis_P3.ToString();
btnComP2.Text = "" + acPosition.BagHigh + "mm压紧点P2:"; btnComP2.Text = "" + acPosition.BagHigh + "mm压紧点P2:";
btnComP3.Text = "" + acPosition.BagHigh + "mm压紧前点P3:"; btnComP3.Text = "" + acPosition.BagHigh + "mm压紧前点P3:";
lblSize.Text = "尺寸:" + acPosition.BagWidth + "*" + acPosition.BagHigh; lblSize.Text = "尺寸:" + acPosition.BagWidth + "*" + acPosition.BagHigh;
txtInOutP3.Text = acPosition.InoutAxis_P3.ToString(); txtInOutP3.Text = acPosition.InoutAxis_P3.ToString();
txtInOutP2.Text = BoxBean.Config.InOutAxis_P2_Position.ToString(); txtInOutP2.Text = BoxBean.Config.InOutAxis_P2 .ToString();
//txtUpDownP2.Text = ktkPosition.UpDownAxis_P2.ToString(); //txtUpDownP2.Text = ktkPosition.UpDownAxis_P2.ToString();
//txtUpDownP7.Text = ktkPosition.UpDownAxis_DoorOBPosition_P7.ToString(); //txtUpDownP7.Text = ktkPosition.UpDownAxis_DoorOBPosition_P7.ToString();
...@@ -340,7 +340,7 @@ namespace OnlineStore.ACPackingStore ...@@ -340,7 +340,7 @@ namespace OnlineStore.ACPackingStore
//位置配置 //位置配置
string appPath = Application.StartupPath; string appPath = Application.StartupPath;
//如果总配置文件存在,保存到总的配置文件 //如果总配置文件存在,保存到总的配置文件
string positionConfigFile = appPath + ConfigAppSettings.GetValue(Setting_Init.Store_Position_Config); string positionConfigFile = appPath + ConfigAppSettings.GetValue(Setting_Init.BOX_ConfigPath);
if (!File.Exists(positionConfigFile)) if (!File.Exists(positionConfigFile))
{ {
string nameStr = BoxBean.ID.ToString(); string nameStr = BoxBean.ID.ToString();
...@@ -364,19 +364,19 @@ namespace OnlineStore.ACPackingStore ...@@ -364,19 +364,19 @@ namespace OnlineStore.ACPackingStore
needUpdate = true; needUpdate = true;
} }
if (BoxBean.Config.InOutAxis_P1_Position != FormUtil.GetIntValue(txtInOutP1)) if (BoxBean.Config.InOutAxis_P1 != FormUtil.GetIntValue(txtInOutP1))
{ {
BoxBean.Config.InOutAxis_P1_Position = FormUtil.GetIntValue(txtInOutP1); BoxBean.Config.InOutAxis_P1 = FormUtil.GetIntValue(txtInOutP1);
needUpdate = true; needUpdate = true;
} }
if (BoxBean.Config.InOutAxis_P11_Position != FormUtil.GetIntValue(txtInoutP11)) if (BoxBean.Config.InOutAxis_P11 != FormUtil.GetIntValue(txtInoutP11))
{ {
BoxBean.Config.InOutAxis_P11_Position = FormUtil.GetIntValue(txtInoutP11); BoxBean.Config.InOutAxis_P11 = FormUtil.GetIntValue(txtInoutP11);
needUpdate = true; needUpdate = true;
} }
if (BoxBean.Config.CompAxis_P1_Position != FormUtil.GetIntValue(txtComP1)) if (BoxBean.Config.CompAxis_P1 != FormUtil.GetIntValue(txtComP1))
{ {
BoxBean.Config.CompAxis_P1_Position = FormUtil.GetIntValue(txtComP1); BoxBean.Config.CompAxis_P1 = FormUtil.GetIntValue(txtComP1);
needUpdate = true; needUpdate = true;
} }
if (BoxBean.Config.UpDownAxis_P2 != FormUtil.GetIntValue(txtUpDownP2)) if (BoxBean.Config.UpDownAxis_P2 != FormUtil.GetIntValue(txtUpDownP2))
...@@ -400,9 +400,9 @@ namespace OnlineStore.ACPackingStore ...@@ -400,9 +400,9 @@ namespace OnlineStore.ACPackingStore
BoxBean.Config.UpDownAxis_P12 = FormUtil.GetIntValue(txtUpdownP12); BoxBean.Config.UpDownAxis_P12 = FormUtil.GetIntValue(txtUpdownP12);
needUpdate = true; needUpdate = true;
} }
if (BoxBean.Config.InOutAxis_P2_Position != FormUtil.GetIntValue(txtInOutP2)) if (BoxBean.Config.InOutAxis_P2 != FormUtil.GetIntValue(txtInOutP2))
{ {
BoxBean.Config.InOutAxis_P2_Position = FormUtil.GetIntValue(txtInOutP2); BoxBean.Config.InOutAxis_P2 = FormUtil.GetIntValue(txtInOutP2);
needUpdate = true; needUpdate = true;
} }
//if (BoxBean.Config.InOutAxis_DoorPosition_P2 != FormUtil.GetIntValue(txtInOutP2)) //if (BoxBean.Config.InOutAxis_DoorPosition_P2 != FormUtil.GetIntValue(txtInOutP2))
...@@ -415,9 +415,9 @@ namespace OnlineStore.ACPackingStore ...@@ -415,9 +415,9 @@ namespace OnlineStore.ACPackingStore
BoxBean.Config.UpDownAxis_P1 = FormUtil.GetIntValue(txtUpDownP1); BoxBean.Config.UpDownAxis_P1 = FormUtil.GetIntValue(txtUpDownP1);
needUpdate = true; needUpdate = true;
} }
//if (BoxBean.Config.CompAxis_P3_Position != FormUtil.GetIntValue(txtComP3 )) //if (BoxBean.Config.CompAxis_P3 != FormUtil.GetIntValue(txtComP3 ))
//{ //{
// BoxBean.Config.CompAxis_P3_Position = FormUtil.GetIntValue(txtComP3); // BoxBean.Config.CompAxis_P3 = FormUtil.GetIntValue(txtComP3);
// needUpdate = true; // needUpdate = true;
//} //}
if (needUpdate) if (needUpdate)
...@@ -646,7 +646,7 @@ namespace OnlineStore.ACPackingStore ...@@ -646,7 +646,7 @@ namespace OnlineStore.ACPackingStore
private void 查看IOToolStripMenuItem_Click(object sender, EventArgs e) private void 查看IOToolStripMenuItem_Click(object sender, EventArgs e)
{ {
FormManager.ShowIOShow(BoxBean); // FormManager.ShowIOShow(BoxBean);
} }
private void 料仓运转ONToolStripMenuItem_Click(object sender, EventArgs e) private void 料仓运转ONToolStripMenuItem_Click(object sender, EventArgs e)
...@@ -767,44 +767,20 @@ namespace OnlineStore.ACPackingStore ...@@ -767,44 +767,20 @@ namespace OnlineStore.ACPackingStore
} }
} }
} }
private void btnScanTest_Click(object sender, EventArgs e)
{
BoxBean.IOMove(IO_Type.Camera_Led, IO_VALUE.HIGH);
List<string> codes = CodeManager.CameraScan(BoxBean.Config.GetCameraList(), BoxBean.Name);
BoxBean.IOMove(IO_Type.Camera_Led, IO_VALUE.LOW);
string result = "";
if (codes.Count > 0)
{
foreach (string s in codes)
{
result += s + "\r\n";
}
MessageBox.Show("扫到二维码:" + result);
LogUtil.info("扫到二维码:" + result);
}
else
{
MessageBox.Show("未扫到二维码");
}
}
private void btnUpdown_Click(object sender, EventArgs e) private void btnUpdown_Click(object sender, EventArgs e)
{ {
string PortName = BoxBean.Config.UpDown_Axis.DeviceName; //string PortName = BoxBean.Config.UpDown_Axis.DeviceName;
int slvAddr = BoxBean.Config.UpDown_Axis.GetAxisValue(); //int slvAddr = BoxBean.Config.UpDown_Axis.GetAxisValue();
string ioIP = "192.168.200.13"; //string ioIP = "192.168.200.13";
int ioIndex = 0; //int ioIndex = 0;
// if (store.Config.StoreDIList.ContainsKey(IO_Type.UpdownPositionSingal)) //// if (store.Config.StoreDIList.ContainsKey(IO_Type.UpdownPositionSingal))
if (BoxBean.Config.DIList.ContainsKey(IO_Type.Compress_Check)) //if (BoxBean.Config.DIList.ContainsKey(IO_Type.Compress_Check))
{ //{
ioIP = BoxBean.Config.DIList[IO_Type.Compress_Check].IO_IP; // ioIP = BoxBean.Config.DIList[IO_Type.Compress_Check].IO_IP;
ioIndex = BoxBean.Config.DIList[IO_Type.Compress_Check].GetIOAddr(); // ioIndex = BoxBean.Config.DIList[IO_Type.Compress_Check].GetIOAddr();
} //}
FrmPositionTool frm = new FrmPositionTool(PortName, slvAddr, ioIP, ioIndex, Text, BoxBean.ID); //FrmPositionTool frm = new FrmPositionTool(PortName, slvAddr, ioIP, ioIndex, Text, BoxBean.ID);
frm.ShowDialog(); //frm.ShowDialog();
} }
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
this.btnCamerLed = new System.Windows.Forms.Button(); this.btnCamerLed = new System.Windows.Forms.Button();
this.btnTopDown = new System.Windows.Forms.Button(); this.btnTopDown = new System.Windows.Forms.Button();
this.btnTopUp = new System.Windows.Forms.Button(); this.btnTopUp = new System.Windows.Forms.Button();
this.txtSlaveId = new System.Windows.Forms.TextBox();
this.btnOpenDo = new System.Windows.Forms.Button(); this.btnOpenDo = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button(); this.button2 = new System.Windows.Forms.Button();
this.txtDOIndex = new System.Windows.Forms.TextBox(); this.txtDOIndex = new System.Windows.Forms.TextBox();
...@@ -72,7 +71,6 @@ ...@@ -72,7 +71,6 @@
this.groupBox1.Controls.Add(this.btnCamerLed); this.groupBox1.Controls.Add(this.btnCamerLed);
this.groupBox1.Controls.Add(this.btnTopDown); this.groupBox1.Controls.Add(this.btnTopDown);
this.groupBox1.Controls.Add(this.btnTopUp); this.groupBox1.Controls.Add(this.btnTopUp);
this.groupBox1.Controls.Add(this.txtSlaveId);
this.groupBox1.Controls.Add(this.btnOpenDo); this.groupBox1.Controls.Add(this.btnOpenDo);
this.groupBox1.Controls.Add(this.button2); this.groupBox1.Controls.Add(this.button2);
this.groupBox1.Controls.Add(this.txtDOIndex); this.groupBox1.Controls.Add(this.txtDOIndex);
...@@ -164,17 +162,6 @@ ...@@ -164,17 +162,6 @@
this.btnTopUp.UseVisualStyleBackColor = false; this.btnTopUp.UseVisualStyleBackColor = false;
this.btnTopUp.Click += new System.EventHandler(this.btnTopUp_Click); this.btnTopUp.Click += new System.EventHandler(this.btnTopUp_Click);
// //
// txtSlaveId
//
this.txtSlaveId.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtSlaveId.Location = new System.Drawing.Point(6, 138);
this.txtSlaveId.MaxLength = 10;
this.txtSlaveId.Name = "txtSlaveId";
this.txtSlaveId.Size = new System.Drawing.Size(43, 23);
this.txtSlaveId.TabIndex = 283;
this.txtSlaveId.Text = "0";
this.txtSlaveId.Visible = false;
//
// btnOpenDo // btnOpenDo
// //
this.btnOpenDo.BackColor = System.Drawing.Color.White; this.btnOpenDo.BackColor = System.Drawing.Color.White;
...@@ -324,6 +311,7 @@ ...@@ -324,6 +311,7 @@
this.tableLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.tableLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.tableLayoutPanel2.AutoScroll = true;
this.tableLayoutPanel2.ColumnCount = 1; this.tableLayoutPanel2.ColumnCount = 1;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Location = new System.Drawing.Point(5, 14); this.tableLayoutPanel2.Location = new System.Drawing.Point(5, 14);
...@@ -351,6 +339,7 @@ ...@@ -351,6 +339,7 @@
this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.tableLayoutPanel1.AutoScroll = true;
this.tableLayoutPanel1.ColumnCount = 1; this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Location = new System.Drawing.Point(6, 14); this.tableLayoutPanel1.Location = new System.Drawing.Point(6, 14);
...@@ -406,7 +395,6 @@ ...@@ -406,7 +395,6 @@
private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button btnOpenDo; private System.Windows.Forms.Button btnOpenDo;
private System.Windows.Forms.Button button2; private System.Windows.Forms.Button button2;
private System.Windows.Forms.TextBox txtSlaveId;
private System.Windows.Forms.Button btnTopDown; private System.Windows.Forms.Button btnTopDown;
private System.Windows.Forms.Button btnTopUp; private System.Windows.Forms.Button btnTopUp;
private System.Windows.Forms.Button btnCamerLed; private System.Windows.Forms.Button btnCamerLed;
......
...@@ -65,6 +65,8 @@ ...@@ -65,6 +65,8 @@
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.timer1 = new System.Windows.Forms.Timer(this.components); this.timer1 = new System.Windows.Forms.Timer(this.components);
this.扫码测试ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout(); this.tabPage1.SuspendLayout();
this.menuStrip1.SuspendLayout(); this.menuStrip1.SuspendLayout();
...@@ -302,7 +304,9 @@ ...@@ -302,7 +304,9 @@
this.toolStripMenuItem2, this.toolStripMenuItem2,
this.toolStripSeparator6, this.toolStripSeparator6,
this.二维码学习ToolStripMenuItem, this.二维码学习ToolStripMenuItem,
this.toolStripSeparator7}); this.toolStripSeparator7,
this.扫码测试ToolStripMenuItem,
this.toolStripSeparator9});
this.设置TToolStripMenuItem.Name = "设置TToolStripMenuItem"; this.设置TToolStripMenuItem.Name = "设置TToolStripMenuItem";
this.设置TToolStripMenuItem.Size = new System.Drawing.Size(91, 25); this.设置TToolStripMenuItem.Size = new System.Drawing.Size(91, 25);
this.设置TToolStripMenuItem.Text = "设备调试 "; this.设置TToolStripMenuItem.Text = "设备调试 ";
...@@ -388,6 +392,18 @@ ...@@ -388,6 +392,18 @@
this.timer1.Interval = 1000; this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick); this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
// //
// 扫码测试ToolStripMenuItem
//
this.扫码测试ToolStripMenuItem.Name = "扫码测试ToolStripMenuItem";
this.扫码测试ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.扫码测试ToolStripMenuItem.Text = "扫码测试";
this.扫码测试ToolStripMenuItem.Click += new System.EventHandler(this.扫码测试ToolStripMenuItem_Click);
//
// toolStripSeparator9
//
this.toolStripSeparator9.Name = "toolStripSeparator9";
this.toolStripSeparator9.Size = new System.Drawing.Size(177, 6);
//
// FrmStore // FrmStore
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
...@@ -455,6 +471,8 @@ ...@@ -455,6 +471,8 @@
private System.Windows.Forms.ToolStripSeparator toolStripSeparator8; private System.Windows.Forms.ToolStripSeparator toolStripSeparator8;
private System.Windows.Forms.CheckBox chbDoorCanMove; private System.Windows.Forms.CheckBox chbDoorCanMove;
private System.Windows.Forms.Label lblServerMsg; private System.Windows.Forms.Label lblServerMsg;
private System.Windows.Forms.ToolStripMenuItem 扫码测试ToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator9;
} }
} }
...@@ -532,5 +532,26 @@ namespace OnlineStore.ACPackingStore ...@@ -532,5 +532,26 @@ namespace OnlineStore.ACPackingStore
} }
} }
private void 扫码测试ToolStripMenuItem_Click(object sender, EventArgs e)
{
store.IOMove(IO_Type.Camera_Led, IO_VALUE.HIGH);
List<string> codes = CodeManager.CameraScan(store.Config.GetCameraList(), store.Name);
store.IOMove(IO_Type.Camera_Led, IO_VALUE.LOW);
string result = "";
if (codes.Count > 0)
{
foreach (string s in codes)
{
result += s + "\r\n";
}
MessageBox.Show("扫到二维码:" + result);
LogUtil.info("扫到二维码:" + result);
}
else
{
MessageBox.Show("未扫到二维码");
}
}
} }
} }
...@@ -25,7 +25,7 @@ namespace OnlineStore.ACPackingStore ...@@ -25,7 +25,7 @@ namespace OnlineStore.ACPackingStore
private int SlvAddr = 0; private int SlvAddr = 0;
private string IoIp = ""; private string IoIp = "";
private int IoIndex = 0; private int IoIndex = 0;
public string Axis_Brake = IO_Type.Axis_Brake; public string Axis_Brake = IO_Type.UpdownAxis_Break;
private int subType = 0; private int subType = 0;
private System.Timers.Timer toolTimer = new System.Timers.Timer(); private System.Timers.Timer toolTimer = new System.Timers.Timer();
private string boxName = ""; private string boxName = "";
......
...@@ -126,12 +126,6 @@ ...@@ -126,12 +126,6 @@
<None Include="StoreConfig\linePositions_1.csv"> <None Include="StoreConfig\linePositions_1.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="StoreConfig\shelfPosition_1.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="StoreConfig\shelfPosition_2.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="StoreConfig\StoreConfig.csv"> <None Include="StoreConfig\StoreConfig.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
......
类型,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义,SlaveID, 类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速时间,减速时间,原点低速度,原点高速,原点加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
PRO,IO模块对应的DI数量,IO_DILength,192.168.104.21#16;192.168.104.22#16;192.168.104.23#16,,,,, AXIS,,T1_提升机构升降轴,T1_Batch_Axis,1,COM3,,250,500,500,100,200,1000,10,1000,0,0
PRO,IO模块对应的DO数量,IO_DOLength,192.168.104.21#16;192.168.104.22#16;192.168.104.23#16,,,,, AXIS,,T2_取料机构旋转轴,T2_Middle_Axis,2,COM3,,1000,1000,1000,200,500,500,10,1000,0,0
PRO,第一块IO模块IP,PRO_AOI_IP_1,192.168.104.21,,,,,,, AXIS,,T3_取料机构上下轴,T3_Updown_Axis,3,COM3,,800,1000,1000,200,500,500,10,1000,0,0
PRO,第二块IO模块IP,PRO_AOI_IP_2,192.168.104.22,,,,,,, ,,,,,,,,,,,,,,,,
PRO,第三块IO模块IP,PRO_AOI_IP_3,192.168.104.23,,,,,,, ,,,,,,,,,,,,,,,,
,,,,,,,,,, PRO,,IO模块对应的DI数量,IO_DILength,192.168.200.21#16;192.168.200.22#16;192.168.200.23#8,,,,,,,,,,,,
,,,,,,,,,, PRO,,IO模块对应的DO数量,IO_DOLength,192.168.200.21#16;192.168.200.22#16;192.168.200.23#8,,,,,,,,,,,,
DI,急停,SuddenStop_BTN,0,PRO_AOI_IP_1,0,急停,X01,DI-01,0, PRO,,第一块IO模块IP,PRO_AIO_IP_1,192.168.200.21,,,,,,,,,,,,
DI,复位,Reset_BTN,1,PRO_AOI_IP_1,0,复位,X02,DI-02,0, PRO,,第二块IO模块IP,PRO_AIO_IP_2,192.168.200.22,,,,,,,,,,,,
DI,气压检测,Airpressure_Check,2,PRO_AOI_IP_1,0,门禁,X03,DI-03,0, PRO,,第三块IO模块IP,PRO_AIO_IP_3,192.168.200.23,,,,,,,,,,,,
DI,L侧门禁,DoorLimit_L,3,PRO_AOI_IP_1,0,料盘检测1(进料口),X04,DI-04,0, ,,,,,,,,,,,,,,,,
DI,R侧门禁,DoorLimit_R,4,PRO_AOI_IP_1,0,料盘检测2(料叉),X05,DI-05,0, ,,,,,,,,,,,,,,,,
,,,5,PRO_AOI_IP_1,0,气压检测,X06,DI-06,0, DI,0,急停,SuddenStop_BTN,0,PRO_AIO_IP_1,X01,,,,,,,,,,
,,,6,PRO_AOI_IP_1,0,进料口门上升端,X07,DI-07,0, DI,0,复位,Reset_BTN,1,PRO_AIO_IP_1,X02,,,,,,,,,,
,,,7,PRO_AOI_IP_1,0,进料口门下降端,X08,DI-08,0, DI,0,启动,AutoRun_BTN,2,PRO_AIO_IP_1,X03,,,,,,,,,,
,,,8,PRO_AOI_IP_1,0,,X09,DI-09,0, DI,0,气压检测,Airpressure_Check,3,PRO_AIO_IP_1,X04,,,,,,,,,,
,,,9,PRO_AOI_IP_1,0,,X10,DI-10,0, DI,0,线体入口料串检测,Line_InCheck,4,PRO_AIO_IP_1,X05,,,,,,,,,,
,,,10,PRO_AOI_IP_1,0,,X11,DI-11,0, DI,0,线体上料等待区检测,Line_WaitCheck,5,PRO_AIO_IP_1,X06,,,,,,,,,,
,,,11,PRO_AOI_IP_1,0,,X12,DI-12,0, DI,0,线体上料区料串检测,Line_WorkCheck,6,PRO_AIO_IP_1,X07,,,,,,,,,,
,,,12,PRO_AOI_IP_1,0,,X13,DI-13,0, DI,0,料串识别检测1,ShelfCheck1,7,PRO_AIO_IP_1,X08,,,,,,,,,,
,,,13,PRO_AOI_IP_1,0,,X14,DI-14,0, DI,0,料串识别检测2,ShelfCheck2,8,PRO_AIO_IP_1,X09,,,,,,,,,,
,,,14,PRO_AOI_IP_1,0,,X15,DI-15,0, DI,0,料串识别检测3,ShelfCheck3,9,PRO_AIO_IP_1,X10,,,,,,,,,,
,,,15,PRO_AOI_IP_1,0,,X16,DI-16,0, DI,0,料串识别检测4,ShelfCheck4,10,PRO_AIO_IP_1,X11,,,,,,,,,,
,,,,,,,,,, DI,0,线体后端料串堆积检测,Line_BufferCheck,11,PRO_AIO_IP_1,X12,,,,,,,,,,
DO,自动指示灯,AutoRun_HddLed,0,PRO_AOI_IP_1,0,自动指示灯,Y01,DO-01,0, DI,0,线体后端料串检测,Line_OutCheck,12,PRO_AIO_IP_1,X13,,,,,,,,,,
DO,故障指示灯,Alarm_HddLed,1,PRO_AOI_IP_1,0,故障指示灯,Y02,DO-02,0, DI,0,线体顶升气缸上升端,TopCylinder_Up,13,PRO_AIO_IP_1,X14,,,,,,,,,,
DO,待机指示灯,RunSign_HddLed,2,PRO_AOI_IP_1,0,待机指示灯,Y03,DO-03,0, DI,0,线体顶升气缸下降端,TopCylinder_Down,14,PRO_AIO_IP_1,X15,,,,,,,,,,
DO,报警蜂鸣器,Alarm_Buzzer,3,PRO_AOI_IP_1,0,报警蜂鸣器,Y04,DO-04,0, DI,0,取料提升机构前进端,Hoister_Forward,15,PRO_AIO_IP_1,X16,,,,,,,,,,
DO,NG料线体电机运转,NGLine_Run,4,PRO_AOI_IP_1,0,NG料线体电机运转,Y05,DO-05,0, ,,,,,,,,,,,,,,,,
,,,5,PRO_AOI_IP_1,0,,Y06,DO-06,0, DO,0,自动指示灯,AutoRun_HddLed,0,PRO_AIO_IP_1,Y01,,,,,,,,,,
,,,6,PRO_AOI_IP_1,0,,Y07,DO-07,0, DO,0,故障指示灯,Alarm_HddLed,1,PRO_AIO_IP_1,Y02,,,,,,,,,,
,,,7,PRO_AOI_IP_1,0,,Y08,DO-08,0, DO,0,待机指示灯,RunSign_HddLed,2,PRO_AIO_IP_1,Y03,,,,,,,,,,
,,,8,PRO_AOI_IP_1,0,,Y09,DO-09,0, DO,0,报警蜂鸣器,Alarm_Buzzer,3,PRO_AIO_IP_1,Y04,,,,,,,,,,
,,,9,PRO_AOI_IP_1,0,,Y10,DO-10,0, DO,1,左侧料口物料指示灯绿色,DoorLed_Green,4,PRO_AIO_IP_1,Y05,,,,,,,,,,
,,,10,PRO_AOI_IP_1,0,,Y11,DO-11,0, DO,1,左侧料口物料指示灯红色,DoorLed_Red,5,PRO_AIO_IP_1,Y06,,,,,,,,,,
,,,11,PRO_AOI_IP_1,0,,Y12,DO-12,0, DO,2,右侧料口物料指示灯绿色,DoorLed_Green,6,PRO_AIO_IP_1,Y07,,,,,,,,,,
,,,12,PRO_AOI_IP_1,0,,Y13,DO-13,0, DO,2,右侧料口物料指示灯红色,DoorLed_Red,7,PRO_AIO_IP_1,Y08,,,,,,,,,,
,,,13,PRO_AOI_IP_1,0,,Y14,DO-14,0, DO,0,取料提升机构电机前进,Hoister_Forward,8,PRO_AIO_IP_1,Y09,,,,,,,,,,
,,,14,PRO_AOI_IP_1,0,,Y15,DO-15,0, DO,0,取料提升机构电机后退,Hoister_Back,9,PRO_AIO_IP_1,Y10,,,,,,,,,,
,,,15,PRO_AOI_IP_1,0,,Y16,DO-16,0, DO,0,相机光源ON,Camera_Led,10,PRO_AIO_IP_1,Y11,,,,,,,,,,
,,,,,,,,,, DO,1,左侧料仓升降轴刹车ON,UpdownAxis_Break,11,PRO_AIO_IP_1,Y12,,,,,,,,,,
,,,,,,,,,, DO,2,右侧料仓升降轴刹车ON,UpdownAxis_Break,12,PRO_AIO_IP_1,Y13,,,,,,,,,,
PRO,气压检测IO关闭需要持续的时间,AirCheckSeconds,3,,,,,,, DO,0,提升机构升降轴刹车ON,BatchAxis_Break,13,PRO_AIO_IP_1,Y14,,,,,,,,,,
DO,0,移栽机构上下轴刹车ON,MoveAxis_Break,14,PRO_AIO_IP_1,Y15,,,,,,,,,,
DO,1,左侧料仓伺服ON,Axis_Run,15,PRO_AIO_IP_1,Y16,,,,,,,,,,
,,,,,,, ,,,,,,,,,
DI,0,取料提升机构后退端,Hoister_Back,0,PRO_AIO_IP_2,X21, ,,,,,,,,,
DI,0,提升机构料盘检测,BatchAxis_Check,1,PRO_AIO_IP_2,X22,,,,,,,,,,
DI,0,取料气缸放松端,ClampCylinder_Relax,2,PRO_AIO_IP_2,X23,,,,,,,,,,
DI,0,取料气缸夹紧端,ClampCylinder_Clamp,3,PRO_AIO_IP_2,X24,,,,,,,,,,
DI,1,左侧出料口安全光栅,OutDoor_SafeSignal,4,PRO_AIO_IP_2,X25,,,,,,,,,,
DI,1,左侧暂存区料盘检测,InDoor_Check,5,PRO_AIO_IP_2,X26,,,,,,,,,,
DI,1,左侧出料口门上升端,OutDoor_Up,6,PRO_AIO_IP_2,X27,,,,,,,,,,
DI,1,左侧出料口门下降端,OutDoor_Down,7,PRO_AIO_IP_2,X28,,,,,,,,,,
DI,1,左侧出料口料盘检测,OutDoor_Check,8,PRO_AIO_IP_2,X29,,,,,,,,,,
DI,1,左侧料叉料盘检测,Fixture_Check,9,PRO_AIO_IP_2,X30,,,,,,,,,,
DI,2,右侧出料口安全光栅,OutDoor_SafeSignal,10,PRO_AIO_IP_2,X31,,,,,,,,,,
DI,2,右侧暂存区料盘检测,InDoor_Check,11,PRO_AIO_IP_2,X32,,,,,,,,,,
DI,2,右侧出料口门上升端,OutDoor_Up,12,PRO_AIO_IP_2,X33,,,,,,,,,,
DI,2,右侧出料口门下降端,OutDoor_Down,13,PRO_AIO_IP_2,X34,,,,,,,,,,
DI,2,右侧料叉料盘检测,OutDoor_Check,14,PRO_AIO_IP_2,X35,,,,,,,,,,
DI,2,右侧出料口料盘检测,Fixture_Check,15,PRO_AIO_IP_2,X36,,,,,,,,,,
,,,,,,,,,,,,,,,,
DO,2,右侧料仓伺服ON,Axis_Run,0,PRO_AIO_IP_2,Y21,,,,,,,,,,
DO,0,取料机构伺服ON,MoveAxis_Run,1,PRO_AIO_IP_2,Y22,,,,,,,,,,
DO,0,线体皮带正转,Line_Run,2,PRO_AIO_IP_2,Y23,,,,,,,,,,
DO,0,线体皮带反转,Line_BackRun,3,PRO_AIO_IP_2,Y24,,,,,,,,,,
DO,0,线体等待区阻挡1上升,Line_Stop1_Wait,4,PRO_AIO_IP_2,Y25,,,,,,,,,,
DO,0,线体上料区阻挡2上升,Line_Stop2_Work,5,PRO_AIO_IP_2,Y26,,,,,,,,,,
DO,0,线体出料区阻挡3上升,Line_Stop3_Buffer,6,PRO_AIO_IP_2,Y27,,,,,,,,,,
DO,0,线体放行阻挡4上升,Line_Stop4_Out,7,PRO_AIO_IP_2,Y28,,,,,,,,,,
DO,0,线体顶升气缸上升SOL,TopCylinder_Up,8,PRO_AIO_IP_2,Y29,,,,,,,,,,
DO,0,线体顶升气缸下降SOL,TopCylinder_Down,9,PRO_AIO_IP_2,Y30,,,,,,,,,,
DO,0,取料气缸放松SOL,ClampCylinder_Relax,10,PRO_AIO_IP_2,Y31,,,,,,,,,,
DO,0,取料气缸夹紧SOL,ClampCylinder_Clamp,11,PRO_AIO_IP_2,Y32,,,,,,,,,,
DO,1,左侧出料口门上升SOL,OutDoor_Up,12,PRO_AIO_IP_2,Y33,,,,,,,,,,
DO,1,左侧出料口门下降SOL,OutDoor_Down,13,PRO_AIO_IP_2,Y34,,,,,,,,,,
DO,2,右侧出料口门上升SOL,OutDoor_Up,14,PRO_AIO_IP_2,Y35,,,,,,,,,,
DO,2,右侧出料口门下降SOL,OutDoor_Down,15,PRO_AIO_IP_2,Y36,,,,,,,,,,
,,,,,,,,,,,,,,,,
DI,0,取料气缸料盘检测,ClampCylinder_Check,0,PRO_AIO_IP_3,X41,,,,,,,,,,
DI,0,线体出口放行信号,LineOut_BTN,1,PRO_AIO_IP_3,X42,,,,,,,,,,
,0,,,2,PRO_AIO_IP_3,X43,,,,,,,,,,
,0,,,3,PRO_AIO_IP_3,X44,,,,,,,,,,
,0,,,4,PRO_AIO_IP_3,X45,,,,,,,,,,
,0,,,5,PRO_AIO_IP_3,X46,,,,,,,,,,
,0,,,6,PRO_AIO_IP_3,X47,,,,,,,,,,
,0,,,7,PRO_AIO_IP_3,X48,,,,,,,,,,
,,,,,,,,,,,,,,,,
DO,0,线体入口指示灯,LineIn_Led,0,PRO_AIO_IP_3,Y41,,,,,,,,,,
DO,0,线体出口指示灯,LineOut_Led,1,PRO_AIO_IP_3,Y42,,,,,,,,,,
DO,0,设备内部照明ON,Device_Led,2,PRO_AIO_IP_3,Y43,,,,,,,,,,
,0,,,3,PRO_AIO_IP_3,Y44,,,,,,,,,,
,0,,,4,PRO_AIO_IP_3,Y45,,,,,,,,,,
,0,,,5,PRO_AIO_IP_3,Y46,,,,,,,,,,
,0,,,6,PRO_AIO_IP_3,Y47,,,,,,,,,,
,0,,,7,PRO_AIO_IP_3,Y48,,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,,预警温度,WarnTemperate,80,,,,,,,,,,,,
PRO,,预警湿度,WarnHumidity,80,,,,,,,,,,,,
PRO,,出入库多少次,会自动重置旋转轴,Box_ResetMCount,1000,,,,,,,,,,,,
PRO,,出入库多少次,会自动重置所有轴操作,Box_ResetACount,100,,,,,,,,,,,,
PRO,,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,,,,,,,
PRO,,需要吹气的温度(温度标准),Max_Temperature,0,,,,,,,,,,,,
PRO,,需要吹气的湿度(湿度标准),Max_Humidity,10,,,,,,,,,,,,
PRO,,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,,,,,,,
PRO,,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,是否调试状态(1=调试,0=正常),IsDebug,1,,,,,,,,,,,,
PRO,,气压检测IO关闭需要持续的时间,AirCheckSeconds,3,,,,,,,,,,,,
PRO,,所有料仓的CID(用#号分隔),All_CIDs,packing-1#packing-2,,,,,,,,,,,,
PRO,,扫码的相机名称(多个用#分隔),CameraNameList,GigE:MV-CE200-10GC (00D76546875),,,,,,,,,,,,
位置,优先级,高度,宽度,料仓ID,旋转轴位置P101,升降轴低点P101,升降轴高点P102,进出轴位置P101
191,8,8,7,1,309100,490000,507000,140000
192,7,8,7,1,309100,432000,448000,140000
193,6,8,7,1,309100,374000,392000,140000
194,5,8,7,1,309100,317000,334000,140000
195,4,8,7,1,309100,261000,278000,140000
196,3,8,7,1,309100,203000,220000,140000
197,2,8,7,1,309100,146000,163000,140000
198,1,8,7,1,309100,90000,108000,140000
\ No newline at end of file \ No newline at end of file
位置,优先级,高度,宽度,料仓ID,旋转轴位置P101,升降轴低点P101,升降轴高点P102,进出轴位置P101
201,8,8,7,2,308300,487000,506000,140000
202,7,8,7,2,308300,431500,450000,140000
203,6,8,7,2,308300,374000,389000,140000
204,5,8,7,2,308300,316000,333000,140000
205,4,8,7,2,308300,260000,276000,140000
206,3,8,7,2,308300,204000,219000,140000
207,2,8,7,2,308300,146000,163000,140000
208,1,8,7,2,308300,90000,107000,140000
\ No newline at end of file \ No newline at end of file
...@@ -410,11 +410,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -410,11 +410,11 @@ namespace OnlineStore.DeviceLibrary
{ {
if (configIO.ProType.Equals(ConfigItemType.DI)) if (configIO.ProType.Equals(ConfigItemType.DI))
{ {
return GetDIValue(configIO.IO_IP, configIO.SlaveID, configIO.GetIOAddr()); return GetDIValue(configIO.IO_IP, 0, configIO.GetIOAddr());
} }
else if (configIO.ProType.Equals(ConfigItemType.DO)) else if (configIO.ProType.Equals(ConfigItemType.DO))
{ {
return GetDOValue(configIO.IO_IP, configIO.SlaveID, configIO.GetIOAddr()); return GetDOValue(configIO.IO_IP, 0, configIO.GetIOAddr());
} }
} }
catch (Exception ex) catch (Exception ex)
......
...@@ -22,7 +22,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -22,7 +22,7 @@ namespace OnlineStore.DeviceLibrary
ConfigIO configIo = GetDO(ioType, subType); ConfigIO configIo = GetDO(ioType, subType);
if (configIo != null) if (configIo != null)
{ {
instance.WriteSingleDO(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr(), ioValue); instance.WriteSingleDO(configIo.IO_IP, 0, configIo.GetIOAddr(), ioValue);
Thread.Sleep(1); Thread.Sleep(1);
} }
else else
...@@ -45,11 +45,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -45,11 +45,11 @@ namespace OnlineStore.DeviceLibrary
if (configIo.ProType.Equals(ConfigItemType.DI)) if (configIo.ProType.Equals(ConfigItemType.DI))
{ {
ioValue = instance.GetDIValue(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr()); ioValue = instance.GetDIValue(configIo.IO_IP, 0, configIo.GetIOAddr());
} }
else else
{ {
ioValue = instance.GetDOValue(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr()); ioValue = instance.GetDOValue(configIo.IO_IP, 0, configIo.GetIOAddr());
} }
} }
else else
...@@ -65,7 +65,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -65,7 +65,7 @@ namespace OnlineStore.DeviceLibrary
if (configIo != null) if (configIo != null)
{ {
ioValue = instance.GetDOValue(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr()); ioValue = instance.GetDOValue(configIo.IO_IP, 0, configIo.GetIOAddr());
} }
else else
{ {
...@@ -125,7 +125,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -125,7 +125,7 @@ namespace OnlineStore.DeviceLibrary
{ {
foreach (ConfigIO io in DoList) foreach (ConfigIO io in DoList)
{ {
instance.WriteSingleDO(io.IO_IP, io.SlaveID, io.GetIOAddr(), IO_VALUE.LOW); instance.WriteSingleDO(io.IO_IP, 0, io.GetIOAddr(), IO_VALUE.LOW);
Thread.Sleep(60); Thread.Sleep(60);
} }
} }
......
...@@ -30,7 +30,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -30,7 +30,6 @@ namespace OnlineStore.DeviceLibrary
public Store_Config Config { get; set; } public Store_Config Config { get; set; }
public bool UseBuzzer = ConfigAppSettings.GetIntValue(Setting_Init.UseBuzzer).Equals(1); public bool UseBuzzer = ConfigAppSettings.GetIntValue(Setting_Init.UseBuzzer).Equals(1);
public bool AutoShelfInstore = ConfigAppSettings.GetIntValue(Setting_Init.AutoShelfInstore).Equals(1); public bool AutoShelfInstore = ConfigAppSettings.GetIntValue(Setting_Init.AutoShelfInstore).Equals(1);
List<string> rfidList = new List<string>();
#region 初始化 #region 初始化
internal bool canStart = false; internal bool canStart = false;
...@@ -62,7 +61,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -62,7 +61,6 @@ namespace OnlineStore.DeviceLibrary
AddDeviceName(ioList, config.IOIPList); AddDeviceName(ioList, config.IOIPList);
BoxMap.Add(config.Id, equip); BoxMap.Add(config.Id, equip);
BoxConfigMap.Add(config.Id, config); BoxConfigMap.Add(config.Id, config);
rfidList.Add(config.RFID_IP);
} }
IOManager.Init(); IOManager.Init();
...@@ -382,17 +380,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -382,17 +380,6 @@ namespace OnlineStore.DeviceLibrary
WarnMsg = msg; WarnMsg = msg;
} }
internal bool AGVProcess(string name, string rfid, ClientAction action)
{
foreach (BoxBean box in this.BoxMap.Values)
{
if (box.Config.AgvNodeName.Equals(name))
{
return box.ProcessAGVAction(name,rfid, action);
}
}
return false;
}
public override void Alarm(StoreAlarmType alarmType, string alarmDetial, string alarmMsg, StoreMoveType storeMoveType) public override void Alarm(StoreAlarmType alarmType, string alarmDetial, string alarmMsg, StoreMoveType storeMoveType)
{ {
......
...@@ -9,7 +9,7 @@ using System.Threading.Tasks; ...@@ -9,7 +9,7 @@ using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary namespace OnlineStore.DeviceLibrary
{ {
public class EnteryDoorBean public class HoisterCylinder
{ {
public bool IsRun = false; public bool IsRun = false;
private string LastMoveDO = ""; private string LastMoveDO = "";
...@@ -17,7 +17,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -17,7 +17,7 @@ namespace OnlineStore.DeviceLibrary
private int subType = 0; private int subType = 0;
internal DateTime LastEndTime = DateTime.Now; internal DateTime LastEndTime = DateTime.Now;
public EnteryDoorBean(int subType) public HoisterCylinder(int subType)
{ {
this.subType = subType; this.subType = subType;
} }
...@@ -48,13 +48,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -48,13 +48,13 @@ namespace OnlineStore.DeviceLibrary
LastMoveDO = moveDO; LastMoveDO = moveDO;
LastCheckDI = checkDI; LastCheckDI = checkDI;
LogUtil.debug("写入信号:" + moveDO + ",等待信号:" + checkDI + ""); LogUtil.debug("写入信号:" + moveDO + ",等待信号:" + checkDI + "");
if (moveDO.Equals(IO_Type.EntranceDoor_Open)) if (moveDO.Equals(IO_Type.Hoister_Back))
{ {
IOManager.IOMove(IO_Type.EntranceDoor_Close, IO_VALUE.LOW, subType); IOManager.IOMove(IO_Type.Hoister_Forward, IO_VALUE.LOW, subType);
} }
else else
{ {
IOManager.IOMove(IO_Type.EntranceDoor_Open, IO_VALUE.LOW, subType); IOManager.IOMove(IO_Type.Hoister_Back, IO_VALUE.LOW, subType);
} }
IOManager.IOMove(moveDO, IO_VALUE.HIGH, subType); IOManager.IOMove(moveDO, IO_VALUE.HIGH, subType);
...@@ -101,7 +101,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -101,7 +101,7 @@ namespace OnlineStore.DeviceLibrary
} }
} }
public bool StartOpen(StoreMoveInfo moveInfo) public bool StartBack(StoreMoveInfo moveInfo)
{ {
bool UseDoor = ConfigAppSettings.GetIntValue(Setting_Init.UseDoor).Equals(1); bool UseDoor = ConfigAppSettings.GetIntValue(Setting_Init.UseDoor).Equals(1);
if (!UseDoor) if (!UseDoor)
...@@ -110,21 +110,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -110,21 +110,21 @@ namespace OnlineStore.DeviceLibrary
} }
//如果门已打开直接返回 //如果门已打开直接返回
if (IOManager.IOValue(IO_Type.EntranceDoor_Open, subType).Equals(IO_VALUE.HIGH) && if (IOManager.IOValue(IO_Type.Hoister_Back, subType).Equals(IO_VALUE.HIGH) &&
IOManager.IOValue(IO_Type.EntranceDoor_Close, subType).Equals(IO_VALUE.LOW)) IOManager.IOValue(IO_Type.Hoister_Forward, subType).Equals(IO_VALUE.LOW))
{ {
return true; return true;
} }
if (moveInfo != null) if (moveInfo != null)
{ {
moveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.EntranceDoor_Open, IO_VALUE.HIGH)); moveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Hoister_Back, IO_VALUE.HIGH));
moveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.EntranceDoor_Close, IO_VALUE.LOW)); moveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Hoister_Forward, IO_VALUE.LOW));
} }
return Start(IO_Type.EntranceDoor_Open, IO_Type.EntranceDoor_Open); return Start(IO_Type.Hoister_Back, IO_Type.Hoister_Back);
} }
public bool StartClose(StoreMoveInfo moveInfo) public bool StartForward(StoreMoveInfo moveInfo)
{ {
bool UseDoor = ConfigAppSettings.GetIntValue(Setting_Init.UseDoor).Equals(1); bool UseDoor = ConfigAppSettings.GetIntValue(Setting_Init.UseDoor).Equals(1);
if (!UseDoor) if (!UseDoor)
...@@ -133,17 +133,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -133,17 +133,17 @@ namespace OnlineStore.DeviceLibrary
} }
//如果门已关闭直接返回 //如果门已关闭直接返回
if (IOManager.IOValue(IO_Type.EntranceDoor_Close, subType).Equals(IO_VALUE.HIGH) && if (IOManager.IOValue(IO_Type.Hoister_Forward, subType).Equals(IO_VALUE.HIGH) &&
IOManager.IOValue(IO_Type.EntranceDoor_Open, subType).Equals(IO_VALUE.LOW)) IOManager.IOValue(IO_Type.Hoister_Back, subType).Equals(IO_VALUE.LOW))
{ {
return true; return true;
} }
if (moveInfo != null) if (moveInfo != null)
{ {
moveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.EntranceDoor_Close, IO_VALUE.HIGH)); moveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Hoister_Forward, IO_VALUE.HIGH));
moveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.EntranceDoor_Open, IO_VALUE.LOW)); moveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Hoister_Back, IO_VALUE.LOW));
} }
return Start(IO_Type.EntranceDoor_Close, IO_Type.EntranceDoor_Close); return Start(IO_Type.Hoister_Forward, IO_Type.Hoister_Forward);
} }
} }
} }
...@@ -13,12 +13,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -13,12 +13,7 @@ namespace OnlineStore.DeviceLibrary
{ {
public class StoreManager public class StoreManager
{ {
/// <summary>
/// 当前出入库的模式
/// </summary>
public static int CurrInOutType = 0;
// public static readonly ILog LOGGER = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
public static DUOStoreBean Store = null; public static DUOStoreBean Store = null;
public static Store_Config Config = null; public static Store_Config Config = null;
public static Dictionary<int, BaseConfig> AllConfigMap = null; public static Dictionary<int, BaseConfig> AllConfigMap = null;
...@@ -122,10 +117,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -122,10 +117,6 @@ namespace OnlineStore.DeviceLibrary
} }
return Store; return Store;
} }
/// <summary>
/// 修改了料仓配置,更新缓存,更新配置文件(只能更新PRO的配置)
/// </summary>
/// <param name="kTK_LA_Store_Config"></param>
public static bool UpdateBoxConfig(BOX_Config storeConfig) public static bool UpdateBoxConfig(BOX_Config storeConfig)
{ {
try try
...@@ -188,23 +179,23 @@ namespace OnlineStore.DeviceLibrary ...@@ -188,23 +179,23 @@ namespace OnlineStore.DeviceLibrary
} }
p.ComPress_P1 = box.Config.CompAxis_P1_Position; p.ComPress_P1 = box.Config.CompAxis_P1;
p.InOut_P1 = box.Config.InOutAxis_P1_Position; p.InOut_P1 = box.Config.InOutAxis_P1;
p.Middle_P1 = box.Config.MiddleAxis_P1; p.Middle_P1 = box.Config.MiddleAxis_P1;
p.InOut_P2 = box.Config.InOutAxis_P2_Position; p.InOut_P2 = box.Config.InOutAxis_P2 ;
p.UpDown_P1 = box.Config.UpDownAxis_P1; p.UpDown_P1 = box.Config.UpDownAxis_P1;
// p.UpDown_P8 = box.Config.UpDownAxis_DoorIBPosition_P8; // p.UpDown_P8 = box.Config.UpDownAxis_DoorIBPosition_P8;
p.UpDown_P2 = box.Config.UpDownAxis_P2; p.UpDown_P2 = box.Config.UpDownAxis_P2;
// p.UpDown_P7 = box.Config.UpDownAxis_DoorOBPosition_P7; // p.UpDown_P7 = box.Config.UpDownAxis_DoorOBPosition_P7;
p.InOut_P11 = box.Config.InOutAxis_P11_Position; p.InOut_P11 = box.Config.InOutAxis_P11 ;
p.Middle_P11 = box.Config.MiddleAxis_P11; p.Middle_P11 = box.Config.MiddleAxis_P11;
p.UpDown_P11 = box.Config.UpDownAxis_P11; p.UpDown_P11 = box.Config.UpDownAxis_P11;
p.UpDown_P12 = box.Config.UpDownAxis_P12; p.UpDown_P12 = box.Config.UpDownAxis_P12;
p.ComPress_P2 = box.Config.GetComP2(position.BagHigh).TargetComP2(); p.ComPress_P2 = box.Config.GetComP2(position.BagHigh);
p.ComPress_P3 = p.ComPress_P2 + box.Config.GetCom_P3_P2(param.PlateW); p.ComPress_P3 = box.Config.CompAxis_P3;
p.InOut_P3 = position.InoutAxis_P3; p.InOut_P3 = position.InoutAxis_P3;
p.Middle_P2 = position.MiddleAxis_P2; p.Middle_P2 = position.MiddleAxis_P2;
p.UpDown_P3 = position.UpdownAxis_IH_P3; p.UpDown_P3 = position.UpdownAxis_IH_P3;
...@@ -599,7 +590,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -599,7 +590,7 @@ namespace OnlineStore.DeviceLibrary
// 参数:cids: 多个 cid // 参数:cids: 多个 cid
//code: 条码内容 //code: 条码内容
Dictionary<string, string> paramMap = new Dictionary<string, string>(); Dictionary<string, string> paramMap = new Dictionary<string, string>();
paramMap.Add("cids", boxConfig.All_CIDs.Replace('#', ',')); paramMap.Add("cids", Config.All_CIDs.Replace('#', ','));
paramMap.Add("code", barcode); paramMap.Add("code", barcode);
paramMap.Add(ParamDefine.rfid, rfid); paramMap.Add(ParamDefine.rfid, rfid);
paramMap.Add("rfidLoc", rfidLoc.ToString()); paramMap.Add("rfidLoc", rfidLoc.ToString());
......
...@@ -81,7 +81,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -81,7 +81,7 @@ namespace OnlineStore.DeviceLibrary
//param.NeedOutShelf = false; //param.NeedOutShelf = false;
//param.NeedEnterShelf = false; //param.NeedEnterShelf = false;
//判断是否需要重置 //判断是否需要重置
if (CurrInOutACount >= boxBean.Config.Box_ResetACount) if (CurrInOutACount >= StoreManager.Config.Box_ResetACount)
{ {
boxBean.LogInfo("自动进入下一个出库:posid=" + posid + ",当时已经出入库" + CurrInOutACount + "次,需要重置BOX,先把出库信息存入排队列表中"); boxBean.LogInfo("自动进入下一个出库:posid=" + posid + ",当时已经出入库" + CurrInOutACount + "次,需要重置BOX,先把出库信息存入排队列表中");
boxBean.Reset(false); boxBean.Reset(false);
...@@ -119,7 +119,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -119,7 +119,7 @@ namespace OnlineStore.DeviceLibrary
InOutParam param = new InOutParam("AAAA", posid, shelfPosId); InOutParam param = new InOutParam("AAAA", posid, shelfPosId);
// param.NeedOutShelf = false; // param.NeedOutShelf = false;
//判断是否需要重置 //判断是否需要重置
if (CurrInOutACount >= boxBean.Config.Box_ResetACount) if (CurrInOutACount >= StoreManager.Config.Box_ResetACount)
{ {
boxBean.LogInfo("自动进入下一个入库:posid=" + posid + ",当时已经出入库" + CurrInOutACount + "次,需要重置BOX,先把入库信息存入排队列表中"); boxBean.LogInfo("自动进入下一个入库:posid=" + posid + ",当时已经出入库" + CurrInOutACount + "次,需要重置BOX,先把入库信息存入排队列表中");
boxBean.Reset(false); boxBean.Reset(false);
......
...@@ -10,47 +10,26 @@ using System.Text; ...@@ -10,47 +10,26 @@ using System.Text;
namespace OnlineStore.DeviceLibrary namespace OnlineStore.DeviceLibrary
{ {
/// <summary>
/// 出入仓参数(出入库操作时传入的参数类)
/// </summary>
public class InOutParam public class InOutParam
{ {
public InOutParam(string wareNo="", string posId="", string ShelfPosID="", string platew = "", string plateh = "", bool urgentReel = false, bool cutReel = false, bool smallReel = false, string rfid = "", int rfidLoc = 0,int taskCount=0,string realRfid="") public InOutParam(string wareNo="", string posId="", string platew = "", string plateh = "")
{ {
this.ShelfPosID = ShelfPosID;
WareCode = wareNo; WareCode = wareNo;
PosID = posId; PosID = posId;
MoveP = null; MoveP = null;
this.PlateW = platew; this.PlateW = platew;
this.PlateH = plateh; this.PlateH = plateh;
this.urgentReel = urgentReel;
this.cutReel = cutReel;
this.smallReel = smallReel;
this.rfid = rfid;
this.rfidLoc = rfidLoc;
this.taskCount = taskCount;
this.realRfid = realRfid;
} }
public InOutParam(string wareNo, string posId, string ShelfPosID,LineMoveP linePosition ) public InOutParam(string wareNo, string posId, string ShelfPosID,LineMoveP linePosition )
{ {
WareCode = wareNo; WareCode = wareNo;
this.ShelfPosID = ShelfPosID;
PosID = posId; PosID = posId;
MoveP = linePosition; MoveP = linePosition;
//NeedEnterShelf = false;
//NeedOutShelf = false;
this.urgentReel = false ;
this.cutReel = false ;
this.smallReel = false ;
this.rfid = "";
this.rfidLoc = 0;
this.taskCount = 0;
this.realRfid = "";
} }
public InOutParam NewParam() public InOutParam NewParam()
{ {
InOutParam newp = new InOutParam(WareCode,PosID,ShelfPosID, PlateW, PlateH, urgentReel,cutReel,smallReel,rfid,rfidLoc,taskCount,realRfid); InOutParam newp = new InOutParam(WareCode,PosID, PlateW, PlateH);
return newp; return newp;
} }
/// <summary> /// <summary>
...@@ -61,10 +40,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -61,10 +40,7 @@ namespace OnlineStore.DeviceLibrary
/// 位置坐标名(对应配置表的位置) /// 位置坐标名(对应配置表的位置)
/// </summary> /// </summary>
public string PosID { get; set; } public string PosID { get; set; }
/// <summary>
/// 料架对应的库位号
/// </summary>
public string ShelfPosID = "";
public LineMoveP MoveP { get; set; } public LineMoveP MoveP { get; set; }
/// <summary> /// <summary>
/// 料盘高度 /// 料盘高度
...@@ -76,42 +52,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -76,42 +52,6 @@ namespace OnlineStore.DeviceLibrary
public string PlateW { get; set; } public string PlateW { get; set; }
/// <summary> /// <summary>
/// urgentReel: true 表示紧急料,需要出到料串上
/// </summary>
public bool urgentReel { get; set; }
/// <summary>
/// cutReel: true 表示分盘料,需要出到料串上
/// </summary>
public bool cutReel { get; set; }
/// <summary>
/// smallReel: true 小料(7x8),放置到小料架上
/// </summary>
public bool smallReel { get; set; }
/// <summary>
/// rfid: 分配的料架RFID
/// </summary>
public string rfid = "";
/// <summary>
/// rfidLoc: 料架的架位,值为 - 1时,可以自由分配皮带线,
/// 小料时,架位为1 - 46优先走1 / 2号皮带线,47 - 92优先走3 / 4号皮带线,
/// 70,71,72时只能分配到3 / 4号皮带线;
/// 大料时,架位1 - 6优先走1 / 2号皮带线, 7 - 12优先走3/ 4号皮带线
/// </summary>
public int rfidLoc = 0;
/// <summary>
/// 剩余任务数量,当剩余任务 《=1时,出库完成需要送出料架
/// 剩余任务数为0, 或者料架已放满,或者料架rfid与上一个任务不同,料架就要放出去
/// 剩余任务数为1时, 当前的料放完就可以把料架放出去了
///当前料放完,料架已满,也把料架放出去
/// </summary>
public int taskCount = 0;
/// <summary>
/// 真实料架号
/// </summary>
public string realRfid = "";
/// <summary>
/// 根据PosId获取对应的料仓ID,若PosId=="",返回-1 /// 根据PosId获取对应的料仓ID,若PosId=="",返回-1
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
...@@ -129,7 +69,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -129,7 +69,6 @@ namespace OnlineStore.DeviceLibrary
if (arr.Length >= 2) if (arr.Length >= 2)
{ {
return int.Parse(arr[0]); return int.Parse(arr[0]);
} }
else else
{ {
...@@ -145,16 +84,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -145,16 +84,9 @@ namespace OnlineStore.DeviceLibrary
} }
public string ToStr() public string ToStr()
{ {
return " 库位 [" + PosID + "] [" + ShelfPosID + "], [" + WareCode + "], [" + PlateW + "x" + PlateH + "] ," + return " 库位 [" + PosID + "] [" + WareCode + "], [" + PlateW + "x" + PlateH + "] ";
"urgentReel [" + urgentReel + "],cutReel [" + cutReel + "],smallReel [" + smallReel + "],rfid [" + rfid + "],rfidLoc [" + rfidLoc + "],taskCount ["+ taskCount + "]";
}
public string ToShortStr()
{
return "["+rfid+"][" + PosID + "][" + ShelfPosID + "][" + PlateW + "x" + PlateH + "][" + WareCode + "]";
} }
internal void UpdatePosId(string message, string posId, string plateW, string plateH,int comP2,int comP3) internal void UpdatePosId(string message, string posId, string plateW, string plateH,int comP2,int comP3)
{ {
this.WareCode = message; this.WareCode = message;
...@@ -179,13 +111,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -179,13 +111,9 @@ namespace OnlineStore.DeviceLibrary
MoveP.UpDown_P6 = position.UpdownAxis_OL_P6; MoveP.UpDown_P6 = position.UpdownAxis_OL_P6;
} }
internal void UpdatePosIdAndShelfId(string wareNo,string rfid,string posId, string ShelfPosID) internal void UpdatePosIdAndShelfId(string wareNo,string rfid,string posId )
{ {
WareCode = wareNo; WareCode = wareNo;
this.ShelfPosID = ShelfPosID;
this.rfid = rfid;
PosID = posId; PosID = posId;
ACBoxPosition position = CSVPositionReader<ACBoxPosition>.GetPositon(posId); ACBoxPosition position = CSVPositionReader<ACBoxPosition>.GetPositon(posId);
......
...@@ -484,8 +484,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -484,8 +484,7 @@ namespace OnlineStore.DeviceLibrary
protected void InOutStoreLog(string msg) protected void InOutStoreLog(string msg)
{ {
string posId = MoveInfo.MoveParam != null ? "["+MoveInfo.MoveParam.PosID+"]" : ""; string posId = MoveInfo.MoveParam != null ? "["+MoveInfo.MoveParam.PosID+"]" : "";
string shelfId = MoveInfo.MoveParam != null ? "[" + MoveInfo.MoveParam.ShelfPosID+"]" : ""; LogInfo(" " + posId +" :" + msg);
LogInfo(" " + posId +""+ shelfId + " :" + msg);
} }
protected int GetAlarmCodeByAxis(ConfigMoveAxis axis) protected int GetAlarmCodeByAxis(ConfigMoveAxis axis)
{ {
......
...@@ -19,8 +19,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -19,8 +19,8 @@ namespace OnlineStore.DeviceLibrary
} }
public LineMoveP(BOX_Config Config) public LineMoveP(BOX_Config Config)
{ {
this.ComPress_P1 = Config.CompAxis_P1_Position; this.ComPress_P1 = Config.CompAxis_P1 ;
this.InOut_P1 = Config.InOutAxis_P1_Position; this.InOut_P1 = Config.InOutAxis_P1 ;
this.Middle_P1 = Config.MiddleAxis_P1; this.Middle_P1 = Config.MiddleAxis_P1;
this.UpDown_P1 = Config.UpDownAxis_P1; this.UpDown_P1 = Config.UpDownAxis_P1;
this.UpDown_P2 = Config.UpDownAxis_P2; this.UpDown_P2 = Config.UpDownAxis_P2;
...@@ -30,8 +30,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -30,8 +30,8 @@ namespace OnlineStore.DeviceLibrary
this.Middle_P11 = Config.MiddleAxis_P11; this.Middle_P11 = Config.MiddleAxis_P11;
this.InOut_P11 = Config.InOutAxis_P11_Position; this.InOut_P11 = Config.InOutAxis_P11;
this.InOut_P2 = Config.InOutAxis_P2_Position; this.InOut_P2 = Config.InOutAxis_P2;
} }
/// <summary> /// <summary>
/// 轴2( 升降轴) 扫码放料低点 P1 /// 轴2( 升降轴) 扫码放料低点 P1
......
...@@ -187,7 +187,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -187,7 +187,7 @@ namespace OnlineStore.DeviceLibrary
//设置取料位置 //设置取料位置
MoveParam.UpdatePosIdAndShelfId(shelfLockDatas[currShelfIndex].barcode, MoveParam.UpdatePosIdAndShelfId(shelfLockDatas[currShelfIndex].barcode,
shelfLockDatas[currShelfIndex].rfid, shelfLockDatas[currShelfIndex].rfid,
shelfLockDatas[currShelfIndex].lockPos, currShelfPosId); shelfLockDatas[currShelfIndex].lockPos);
return true; return true;
......
...@@ -128,6 +128,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -128,6 +128,7 @@ namespace OnlineStore.LoadCSVLibrary
} }
} }
bllIns.CheckField(); bllIns.CheckField();
bllIns.ConfigStr = line.Replace(",,,","");
configList.Add(bllIns); configList.Add(bllIns);
} }
index++; index++;
......
...@@ -149,7 +149,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -149,7 +149,7 @@ namespace OnlineStore.LoadCSVLibrary
{ {
public ConfigIO() public ConfigIO()
{ {
SlaveID = 0;
} }
private string IP = ""; private string IP = "";
...@@ -178,8 +178,6 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -178,8 +178,6 @@ namespace OnlineStore.LoadCSVLibrary
[CSVAttribute("电器定义")] [CSVAttribute("电器定义")]
public string ElectricalDefinition { get; set; } public string ElectricalDefinition { get; set; }
[CSVAttribute("SlaveID")]
public byte SlaveID { get; set; }
public string DisplayStr public string DisplayStr
{ {
get get
......
...@@ -10,48 +10,43 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -10,48 +10,43 @@ namespace OnlineStore.LoadCSVLibrary
{ {
public class BaseConfig public class BaseConfig
{ {
private bool codeAutoLog = false ;
public static Dictionary<int, Dictionary<string, ConfigIO>> SubDIList { get; set; } public static Dictionary<int, Dictionary<string, ConfigIO>> SubDIList { get; set; }
public static Dictionary<int, Dictionary<string, ConfigIO>> SubDOList { get; set; } public static Dictionary<int, Dictionary<string, ConfigIO>> SubDOList { get; set; }
// public static readonly ILog LOGGER = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
public static Dictionary<string, string> ProIOIpMap = null; public static Dictionary<string, string> ProIOIpMap = null;
public const string IOIP_Str = "PRO_AOI_IP"; public const string IOIP_Str = "PRO_AIO_IP";
/// <summary>
/// ID
/// </summary>
public int Id { get; set; } public int Id { get; set; }
public string CID { get; set; } public string CID { get; set; }
/// <summary> /// <summary>
/// 设备类型 /// 设备类型
/// </summary> /// </summary>
public string DType { get; set; } public string DType { get; set; }
/// <summary>
/// 配置文件路径
/// </summary>
public string ConfigFilePath { get; set; } public string ConfigFilePath { get; set; }
public Dictionary<String, ConfigIO> DIList { get; set; } public Dictionary<String, ConfigIO> DIList { get; set; }
public Dictionary<String, ConfigIO> DOList { get; set; } public Dictionary<String, ConfigIO> DOList { get; set; }
/// <summary>
/// 料仓所有用到的IO卡名称
/// </summary>
public List<string> IOIPList { get; set; } public List<string> IOIPList { get; set; }
public BaseConfig() public BaseConfig()
{ {
SubDIList = new Dictionary<int, Dictionary<string, ConfigIO>>();
SubDOList = new Dictionary<int, Dictionary<string, ConfigIO>>();
} }
public BaseConfig(int id,string CID, string type, string filepath) public BaseConfig(int id, string CID, string type, string filepath)
{ {
this.CID = CID; this.CID = CID;
this.Id = id; this.Id = id;
this.DType = type; this.DType = type;
this.ConfigFilePath = filepath; this.ConfigFilePath = filepath;
SubDIList = new Dictionary<int, Dictionary<string, ConfigIO>>();
SubDOList = new Dictionary<int, Dictionary<string, ConfigIO>>();
} }
public virtual void LoadConfig(List<ConfigBase> configList) public virtual void LoadConfig(List<ConfigBase> configList)
{ {
...@@ -61,8 +56,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -61,8 +56,7 @@ namespace OnlineStore.LoadCSVLibrary
StringBuilder proBuilder = new StringBuilder("\r\n"); StringBuilder proBuilder = new StringBuilder("\r\n");
DIList = new Dictionary<string, ConfigIO>(); DIList = new Dictionary<string, ConfigIO>();
DOList = new Dictionary<string, ConfigIO>(); DOList = new Dictionary<string, ConfigIO>();
// SubDIList = new Dictionary<int, Dictionary<string, ConfigIO>>();
// SubDOList = new Dictionary<int, Dictionary<string, ConfigIO>>();
IOIPList = new List<string>(); IOIPList = new List<string>();
//取得属性集合 //取得属性集合
PropertyInfo[] props = GetType().GetProperties(); PropertyInfo[] props = GetType().GetProperties();
...@@ -99,11 +93,11 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -99,11 +93,11 @@ namespace OnlineStore.LoadCSVLibrary
LogUtil.error("配置文件:" + this.ConfigFilePath + ",属性名=" + con.ProName + "的属性未找到匹配字段!"); LogUtil.error("配置文件:" + this.ConfigFilePath + ",属性名=" + con.ProName + "的属性未找到匹配字段!");
} }
} }
else if (!ProIOIpMap.ContainsKey(con.ProName) && con.ProName.ToUpper().Contains(IOIP_Str.ToUpper())) if (!ProIOIpMap.ContainsKey(con.ProName) && con.ProName.ToUpper().Contains(IOIP_Str.ToUpper()))
{ {
ProIOIpMap.Add(con.ProName, con.ProValue); ProIOIpMap.Add(con.ProName, con.ProValue);
} }
else else if (codeAutoLog || (!proMap.ContainsKey(con.ProName)))
{ {
AddProBuffer(con, proBuilder); AddProBuffer(con, proBuilder);
LogUtil.error("配置文件:" + this.ConfigFilePath + ",属性名=" + con.ProName + "的属性未找到匹配字段!"); LogUtil.error("配置文件:" + this.ConfigFilePath + ",属性名=" + con.ProName + "的属性未找到匹配字段!");
...@@ -140,7 +134,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -140,7 +134,7 @@ namespace OnlineStore.LoadCSVLibrary
SubDIList[io.SubType].Add(io.ProName, io); SubDIList[io.SubType].Add(io.ProName, io);
} }
if (!ioTypeList.Contains(con.ProName)) if (!ioTypeList.Contains(con.ProName) || codeAutoLog)
{ {
AddBuffer(con, builder); AddBuffer(con, builder);
} }
...@@ -174,7 +168,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -174,7 +168,7 @@ namespace OnlineStore.LoadCSVLibrary
{ {
SubDOList[io.SubType].Add(io.ProName, io); SubDOList[io.SubType].Add(io.ProName, io);
} }
if (!ioTypeList.Contains(con.ProName)) if (!ioTypeList.Contains(con.ProName) || codeAutoLog)
{ {
AddBuffer(con, builder); AddBuffer(con, builder);
} }
...@@ -224,34 +218,10 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -224,34 +218,10 @@ namespace OnlineStore.LoadCSVLibrary
} }
} }
} }
////DI检测
//foreach (string di in MustHaveDIList)
//{
// if (!DIList.ContainsKey(di))
// {
// throw new CVSFieldNotMatchingExection(this.ToString() + "的DI属性" + di + "必须配置值!");
// }
//}
////DO检测
//foreach (string io in MustHaveDOList)
//{
// if (!this.DOList.ContainsKey(io))
// {
// throw new CVSFieldNotMatchingExection(this.ToString() + "的DO属性" + io + "必须配置值!");
// }
//}
} }
} }
private void AddProBuffer(ConfigBase con, StringBuilder builder) private void AddProBuffer(ConfigBase con, StringBuilder builder)
{ {
// /// <summary>
// /// PRO 是否使用定位气缸 IsHasLocationCylinder 0
// /// </summary>
//[ConfigProAttribute("IsHasLocationCylinder")]
//public int IsHasLocationCylinder { get; set; }
builder.Append(" /// <summary>\r\n"); builder.Append(" /// <summary>\r\n");
builder.Append(" /// " + con.ConfigStr + "\r\n"); builder.Append(" /// " + con.ConfigStr + "\r\n");
builder.Append(" /// </summary>\r\n"); builder.Append(" /// </summary>\r\n");
...@@ -337,6 +307,4 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -337,6 +307,4 @@ namespace OnlineStore.LoadCSVLibrary
} }
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!