Commit 73c46d62 LN

伺服增加STB

1 个父辈 5ef664e8
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
<!--<add key="ServerAddr" value="http://10.85.17.233"/>--> <!--<add key="ServerAddr" value="http://10.85.17.233"/>-->
<add key="ConfigPath_Robot" value="\RobotConfig\Config_Robot.csv" /> <add key="ConfigPath_Robot" value="\RobotConfig\Config_Robot.csv" />
<add key="ConfigPath_XRay" value="\RobotConfig\Config_XRay.csv" /> <add key="ConfigPath_XRay" value="\RobotConfig\Config_XRay.csv" />
<add key="ConfigPath_InputEquip" value="\RobotConfig\Config_InputEquip.csv" /> <add key="ConfigPath_InputEquip" value="\RobotConfig\Config_InputEquip.csv" />
...@@ -28,7 +27,7 @@ ...@@ -28,7 +27,7 @@
<!--流水线监听端口--> <!--流水线监听端口-->
<add key="TCPServerPort" value="5246" /> <add key="TCPServerPort" value="5246" />
<!--AGV调度服务器地址--> <!--AGV调度服务器地址-->
<add key="AgvServerIp" value="10.85.160.20" /> <add key="AgvServerIp" value="10.85.199.20" />
<!--IO配置--> <!--IO配置-->
<add key="DIMS" value="60" /> <add key="DIMS" value="60" />
<add key="DOMS" value="300" /> <add key="DOMS" value="300" />
......
...@@ -74,6 +74,8 @@ ...@@ -74,6 +74,8 @@
this.txtAxisValue = new System.Windows.Forms.TextBox(); this.txtAxisValue = new System.Windows.Forms.TextBox();
this.txtAxisDeviceName = new System.Windows.Forms.TextBox(); this.txtAxisDeviceName = new System.Windows.Forms.TextBox();
this.lblServerOn = new System.Windows.Forms.Label(); this.lblServerOn = new System.Windows.Forms.Label();
this.txtStb = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.groupAxis.SuspendLayout(); this.groupAxis.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
...@@ -91,13 +93,15 @@ ...@@ -91,13 +93,15 @@
this.groupAxis.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupAxis.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupAxis.Location = new System.Drawing.Point(9, 4); this.groupAxis.Location = new System.Drawing.Point(9, 4);
this.groupAxis.Name = "groupAxis"; this.groupAxis.Name = "groupAxis";
this.groupAxis.Size = new System.Drawing.Size(716, 297); this.groupAxis.Size = new System.Drawing.Size(716, 309);
this.groupAxis.TabIndex = 218; this.groupAxis.TabIndex = 218;
this.groupAxis.TabStop = false; this.groupAxis.TabStop = false;
this.groupAxis.Text = "伺服运动"; this.groupAxis.Text = "伺服运动";
// //
// groupBox1 // groupBox1
// //
this.groupBox1.Controls.Add(this.txtStb);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.txtBusyStatus); this.groupBox1.Controls.Add(this.txtBusyStatus);
this.groupBox1.Controls.Add(this.label11); this.groupBox1.Controls.Add(this.label11);
this.groupBox1.Controls.Add(this.txtHomeStatus); this.groupBox1.Controls.Add(this.txtHomeStatus);
...@@ -113,9 +117,9 @@ ...@@ -113,9 +117,9 @@
this.groupBox1.Controls.Add(this.txtLimit1); this.groupBox1.Controls.Add(this.txtLimit1);
this.groupBox1.Controls.Add(this.label6); this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.txtHomeSingle); this.groupBox1.Controls.Add(this.txtHomeSingle);
this.groupBox1.Location = new System.Drawing.Point(553, 11); this.groupBox1.Location = new System.Drawing.Point(553, 12);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(154, 277); this.groupBox1.Size = new System.Drawing.Size(154, 290);
this.groupBox1.TabIndex = 302; this.groupBox1.TabIndex = 302;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "状态"; this.groupBox1.Text = "状态";
...@@ -123,7 +127,7 @@ ...@@ -123,7 +127,7 @@
// txtBusyStatus // txtBusyStatus
// //
this.txtBusyStatus.Enabled = false; this.txtBusyStatus.Enabled = false;
this.txtBusyStatus.Location = new System.Drawing.Point(120, 80); this.txtBusyStatus.Location = new System.Drawing.Point(120, 104);
this.txtBusyStatus.Name = "txtBusyStatus"; this.txtBusyStatus.Name = "txtBusyStatus";
this.txtBusyStatus.Size = new System.Drawing.Size(25, 23); this.txtBusyStatus.Size = new System.Drawing.Size(25, 23);
this.txtBusyStatus.TabIndex = 288; this.txtBusyStatus.TabIndex = 288;
...@@ -131,7 +135,7 @@ ...@@ -131,7 +135,7 @@
// label11 // label11
// //
this.label11.AutoSize = true; this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(6, 113); this.label11.Location = new System.Drawing.Point(6, 135);
this.label11.Name = "label11"; this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(105, 17); this.label11.Size = new System.Drawing.Size(105, 17);
this.label11.TabIndex = 292; this.label11.TabIndex = 292;
...@@ -140,7 +144,7 @@ ...@@ -140,7 +144,7 @@
// txtHomeStatus // txtHomeStatus
// //
this.txtHomeStatus.Enabled = false; this.txtHomeStatus.Enabled = false;
this.txtHomeStatus.Location = new System.Drawing.Point(120, 110); this.txtHomeStatus.Location = new System.Drawing.Point(120, 132);
this.txtHomeStatus.Name = "txtHomeStatus"; this.txtHomeStatus.Name = "txtHomeStatus";
this.txtHomeStatus.Size = new System.Drawing.Size(25, 23); this.txtHomeStatus.Size = new System.Drawing.Size(25, 23);
this.txtHomeStatus.TabIndex = 291; this.txtHomeStatus.TabIndex = 291;
...@@ -148,7 +152,7 @@ ...@@ -148,7 +152,7 @@
// label10 // label10
// //
this.label10.AutoSize = true; this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(45, 83); this.label10.Location = new System.Drawing.Point(45, 107);
this.label10.Name = "label10"; this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(66, 17); this.label10.Size = new System.Drawing.Size(66, 17);
this.label10.TabIndex = 289; this.label10.TabIndex = 289;
...@@ -157,7 +161,7 @@ ...@@ -157,7 +161,7 @@
// label3 // label3
// //
this.label3.AutoSize = true; this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(52, 53); this.label3.Location = new System.Drawing.Point(52, 51);
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(59, 17); this.label3.Size = new System.Drawing.Size(59, 17);
this.label3.TabIndex = 286; this.label3.TabIndex = 286;
...@@ -166,7 +170,7 @@ ...@@ -166,7 +170,7 @@
// label24 // label24
// //
this.label24.AutoSize = true; this.label24.AutoSize = true;
this.label24.Location = new System.Drawing.Point(40, 203); this.label24.Location = new System.Drawing.Point(40, 219);
this.label24.Name = "label24"; this.label24.Name = "label24";
this.label24.Size = new System.Drawing.Size(71, 17); this.label24.Size = new System.Drawing.Size(71, 17);
this.label24.TabIndex = 316; this.label24.TabIndex = 316;
...@@ -176,7 +180,7 @@ ...@@ -176,7 +180,7 @@
// label5 // label5
// //
this.label5.AutoSize = true; this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(54, 23); this.label5.Location = new System.Drawing.Point(52, 23);
this.label5.Name = "label5"; this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(59, 17); this.label5.Size = new System.Drawing.Size(59, 17);
this.label5.TabIndex = 328; this.label5.TabIndex = 328;
...@@ -186,7 +190,7 @@ ...@@ -186,7 +190,7 @@
// //
this.btnGetAlarm.BackColor = System.Drawing.Color.White; this.btnGetAlarm.BackColor = System.Drawing.Color.White;
this.btnGetAlarm.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnGetAlarm.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnGetAlarm.Location = new System.Drawing.Point(35, 233); this.btnGetAlarm.Location = new System.Drawing.Point(35, 251);
this.btnGetAlarm.Name = "btnGetAlarm"; this.btnGetAlarm.Name = "btnGetAlarm";
this.btnGetAlarm.Size = new System.Drawing.Size(110, 34); this.btnGetAlarm.Size = new System.Drawing.Size(110, 34);
this.btnGetAlarm.TabIndex = 284; this.btnGetAlarm.TabIndex = 284;
...@@ -197,7 +201,7 @@ ...@@ -197,7 +201,7 @@
// txtAlarmStatus // txtAlarmStatus
// //
this.txtAlarmStatus.Enabled = false; this.txtAlarmStatus.Enabled = false;
this.txtAlarmStatus.Location = new System.Drawing.Point(120, 50); this.txtAlarmStatus.Location = new System.Drawing.Point(120, 48);
this.txtAlarmStatus.Name = "txtAlarmStatus"; this.txtAlarmStatus.Name = "txtAlarmStatus";
this.txtAlarmStatus.Size = new System.Drawing.Size(25, 23); this.txtAlarmStatus.Size = new System.Drawing.Size(25, 23);
this.txtAlarmStatus.TabIndex = 285; this.txtAlarmStatus.TabIndex = 285;
...@@ -205,7 +209,7 @@ ...@@ -205,7 +209,7 @@
// txtLimit2 // txtLimit2
// //
this.txtLimit2.Enabled = false; this.txtLimit2.Enabled = false;
this.txtLimit2.Location = new System.Drawing.Point(120, 200); this.txtLimit2.Location = new System.Drawing.Point(120, 216);
this.txtLimit2.Name = "txtLimit2"; this.txtLimit2.Name = "txtLimit2";
this.txtLimit2.Size = new System.Drawing.Size(25, 23); this.txtLimit2.Size = new System.Drawing.Size(25, 23);
this.txtLimit2.TabIndex = 313; this.txtLimit2.TabIndex = 313;
...@@ -221,7 +225,7 @@ ...@@ -221,7 +225,7 @@
// label22 // label22
// //
this.label22.AutoSize = true; this.label22.AutoSize = true;
this.label22.Location = new System.Drawing.Point(40, 173); this.label22.Location = new System.Drawing.Point(40, 191);
this.label22.Name = "label22"; this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(71, 17); this.label22.Size = new System.Drawing.Size(71, 17);
this.label22.TabIndex = 312; this.label22.TabIndex = 312;
...@@ -231,7 +235,7 @@ ...@@ -231,7 +235,7 @@
// txtLimit1 // txtLimit1
// //
this.txtLimit1.Enabled = false; this.txtLimit1.Enabled = false;
this.txtLimit1.Location = new System.Drawing.Point(120, 170); this.txtLimit1.Location = new System.Drawing.Point(120, 188);
this.txtLimit1.Name = "txtLimit1"; this.txtLimit1.Name = "txtLimit1";
this.txtLimit1.Size = new System.Drawing.Size(25, 23); this.txtLimit1.Size = new System.Drawing.Size(25, 23);
this.txtLimit1.TabIndex = 309; this.txtLimit1.TabIndex = 309;
...@@ -239,7 +243,7 @@ ...@@ -239,7 +243,7 @@
// label6 // label6
// //
this.label6.AutoSize = true; this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(52, 143); this.label6.Location = new System.Drawing.Point(52, 163);
this.label6.Name = "label6"; this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(59, 17); this.label6.Size = new System.Drawing.Size(59, 17);
this.label6.TabIndex = 300; this.label6.TabIndex = 300;
...@@ -248,7 +252,7 @@ ...@@ -248,7 +252,7 @@
// txtHomeSingle // txtHomeSingle
// //
this.txtHomeSingle.Enabled = false; this.txtHomeSingle.Enabled = false;
this.txtHomeSingle.Location = new System.Drawing.Point(120, 140); this.txtHomeSingle.Location = new System.Drawing.Point(120, 160);
this.txtHomeSingle.Name = "txtHomeSingle"; this.txtHomeSingle.Name = "txtHomeSingle";
this.txtHomeSingle.Size = new System.Drawing.Size(25, 23); this.txtHomeSingle.Size = new System.Drawing.Size(25, 23);
this.txtHomeSingle.TabIndex = 297; this.txtHomeSingle.TabIndex = 297;
...@@ -654,12 +658,29 @@ ...@@ -654,12 +658,29 @@
this.lblServerOn.Size = new System.Drawing.Size(0, 19); this.lblServerOn.Size = new System.Drawing.Size(0, 19);
this.lblServerOn.TabIndex = 268; this.lblServerOn.TabIndex = 268;
// //
// txtStb
//
this.txtStb.Enabled = false;
this.txtStb.Location = new System.Drawing.Point(120, 76);
this.txtStb.Name = "txtStb";
this.txtStb.Size = new System.Drawing.Size(25, 23);
this.txtStb.TabIndex = 329;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(54, 79);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(57, 17);
this.label2.TabIndex = 330;
this.label2.Text = "STB状态:";
//
// AxisMoveControl // AxisMoveControl
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.Controls.Add(this.groupAxis); this.Controls.Add(this.groupAxis);
this.Name = "AxisMoveControl"; this.Name = "AxisMoveControl";
this.Size = new System.Drawing.Size(731, 305); this.Size = new System.Drawing.Size(731, 317);
this.groupAxis.ResumeLayout(false); this.groupAxis.ResumeLayout(false);
this.groupAxis.PerformLayout(); this.groupAxis.PerformLayout();
this.groupBox1.ResumeLayout(false); this.groupBox1.ResumeLayout(false);
...@@ -718,5 +739,7 @@ ...@@ -718,5 +739,7 @@
private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.ComboBox comjSpeed; private System.Windows.Forms.ComboBox comjSpeed;
private System.Windows.Forms.LinkLabel linkLabel1; private System.Windows.Forms.LinkLabel linkLabel1;
private System.Windows.Forms.TextBox txtStb;
private System.Windows.Forms.Label label2;
} }
} }
...@@ -158,6 +158,7 @@ namespace OnlineStore.AutoCountClient ...@@ -158,6 +158,7 @@ namespace OnlineStore.AutoCountClient
{ {
this.txtAlarmStatus.Text = ACServerManager.GetAlarmStatus(PortName, SlvAddr).ToString(); this.txtAlarmStatus.Text = ACServerManager.GetAlarmStatus(PortName, SlvAddr).ToString();
this.txtBusyStatus.Text = ACServerManager.GetBusyStatus(PortName, SlvAddr).ToString(); this.txtBusyStatus.Text = ACServerManager.GetBusyStatus(PortName, SlvAddr).ToString();
this.txtStb.Text = ACServerManager.GetSTBState(PortName, SlvAddr).ToString();
this.txtHomeStatus.Text = ACServerManager.GetHomeEndStatus(PortName, SlvAddr).ToString(); this.txtHomeStatus.Text = ACServerManager.GetHomeEndStatus(PortName, SlvAddr).ToString();
this.txtHomeSingle.Text = ACServerManager.GetHomeSingle(PortName, SlvAddr).ToString(); this.txtHomeSingle.Text = ACServerManager.GetHomeSingle(PortName, SlvAddr).ToString();
this.txtLimit1.Text = ACServerManager.GetLimitPositiveSingle(PortName, SlvAddr).ToString(); this.txtLimit1.Text = ACServerManager.GetLimitPositiveSingle(PortName, SlvAddr).ToString();
......
...@@ -4,8 +4,8 @@ PRO,0,左入料线体相机名称,LeftCamera,GigE:MV-CE200-10GC (00E02588201),,,,, ...@@ -4,8 +4,8 @@ PRO,0,左入料线体相机名称,LeftCamera,GigE:MV-CE200-10GC (00E02588201),,,,,
PRO,0,右入料线体相机名称,RightCamera,GigE:MV-CE200-10GC (00E02588199),,,,, PRO,0,右入料线体相机名称,RightCamera,GigE:MV-CE200-10GC (00E02588199),,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,, PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,0,左侧上料口AGV站号名称,LeftAgvName,F1,,,,, PRO,0,左侧上料口AGV站号名称,LeftAgvName,D4,,,,,
PRO,0,右侧上料口AGV站号名称,RightAgvName,F2,,,,, PRO,0,右侧上料口AGV站号名称,RightAgvName,D3,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,0,左侧提升轴待机点 P1,L_BatchAxisP1,100,,,,, PRO,0,左侧提升轴待机点 P1,L_BatchAxisP1,100,,,,,
,0,左侧提升轴下降位置P2,L_BatchAxisP2,-48000,,,,, ,0,左侧提升轴下降位置P2,L_BatchAxisP2,-48000,,,,,
......
类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义 类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,0,空料架入口AGV站号名称,AgvInName,F3,,,,, PRO,0,空料串入口AGV站号名称,AgvInName,D1,,,,,
PRO,0,料架出口AGV站号名称,AgvOutName,F4,,,,, PRO,0,料串出口AGV站号名称,AgvOutName,D2,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,0,相机名称,CameraName,GigE:MV-CE200-10GC (00E02588177),,,,, PRO,0,相机名称,CameraName,GigE:MV-CE200-10GC (00E02588177),,,,,
,,,,,,,,, ,,,,,,,,,
......
...@@ -73,7 +73,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -73,7 +73,7 @@ namespace OnlineStore.DeviceLibrary
int index = shelfId.IndexOf(','); int index = shelfId.IndexOf(',');
if (index > 0) if (index > 0)
{ {
//紧急出料模块,料架离开时,mark=紧急料或者分配料,rfid=料架 //紧急出料模块,料串离开时,mark=紧急料或者分配料,rfid=料串
mark = shelfId.Substring(index + 1, shelfId.Length - index - 1); mark = shelfId.Substring(index + 1, shelfId.Length - index - 1);
shelfId = shelfId.Substring(0, index); shelfId = shelfId.Substring(0, index);
} }
...@@ -97,6 +97,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -97,6 +97,9 @@ namespace OnlineStore.DeviceLibrary
else if (RobotManager.robot.inputEquip.Config.RightAgvName.Equals(id)) else if (RobotManager.robot.inputEquip.Config.RightAgvName.Equals(id))
{ {
RobotManager.robot.inputEquip.LeftBatchMove.AgvReady(id, rfid); RobotManager.robot.inputEquip.LeftBatchMove.AgvReady(id, rfid);
}else if (RobotManager.robot.outputEquip.Config.AgvInName.Equals(id)|| RobotManager.robot.outputEquip.Config.AgvOutName.Equals(id))
{
RobotManager.robot.outputEquip.AgvReady(id, rfid);
} }
else else
{ {
......
...@@ -3,6 +3,7 @@ using OnlineStore.Common; ...@@ -3,6 +3,7 @@ using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
...@@ -78,7 +79,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -78,7 +79,7 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
if (Robot.AutoInput&& Robot.IOValue(IO_LineIn_Check).Equals(IO_VALUE.HIGH)) if (Robot.AutoInput && Robot.IOValue(IO_LineIn_Check).Equals(IO_VALUE.HIGH))
{ {
StartWorking(new WorkParam()); StartWorking(new WorkParam());
} }
...@@ -92,8 +93,26 @@ namespace OnlineStore.DeviceLibrary ...@@ -92,8 +93,26 @@ namespace OnlineStore.DeviceLibrary
{ {
WorkingProcess(); WorkingProcess();
} }
//判断是否无料串
if (Robot.IOValue(IO_LineIn_Check).Equals(IO_VALUE.LOW)
&& Robot.IOValue(IO_LineEnd_Check).Equals(IO_VALUE.LOW)
&& Robot.CylinderIsOk(IO_LocationUp_1, IO_LocationDown_1)
&& Robot.CylinderIsOk(IO_LocationUp_2, IO_LocationDown_2))
{
if (RobotManager.checkWatch(shelfWatch, 3000, true))
{
AgvClient.NeedEnter(AgvName, "", Asa.ClientLevel.High);
}
}
else
{
shelfWatch.Stop();
AgvClient.SetToNone(AgvName);
} }
}
private Stopwatch shelfWatch = new Stopwatch();
public bool Reset(bool needStop = false) public bool Reset(bool needStop = false)
{ {
if (Robot.CanStartRun()) if (Robot.CanStartRun())
......
...@@ -12,7 +12,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -12,7 +12,7 @@ namespace OnlineStore.DeviceLibrary
{ {
partial class BatchMoveBean partial class BatchMoveBean
{ {
#region 入料处理 #region 入料处理
internal string CurrShelfId = ""; internal string CurrShelfId = "";
...@@ -34,7 +34,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -34,7 +34,7 @@ namespace OnlineStore.DeviceLibrary
//runStatus = RobotRunStatus.Busy; //runStatus = RobotRunStatus.Busy;
MoveInfo.NewMove(RobotMoveType.Working); MoveInfo.NewMove(RobotMoveType.Working);
MoveInfo.MoveParam = new WorkParam(); MoveInfo.MoveParam = new WorkParam();
//判断是哪个工位有料 //判断是哪个工位有料
IB05_WaitTime(); IB05_WaitTime();
} }
...@@ -54,13 +54,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -54,13 +54,13 @@ namespace OnlineStore.DeviceLibrary
{ {
try try
{ {
//判断料的编码是否正确 //判断料的编码是否正确
RFIDData rfidD = RFIDManager.ReadRFID(RfidIP); RFIDData rfidD = RFIDManager.ReadRFID(RfidIP);
CurrShelfId = rfidD.NumStr; CurrShelfId = rfidD.NumStr;
//发送料信息给调度系统 //发送料信息给调度系统
// AgvClient.SendRFID(Config.AgvInName, CurrShelfId); // AgvClient.SendRFID(Config.AgvInName, CurrShelfId);
LogUtil.info(Name + "读取到料编号:" + CurrShelfId); LogUtil.info(Name + "读取到料编号:" + CurrShelfId);
} }
catch (Exception ex) catch (Exception ex)
{ {
...@@ -72,7 +72,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -72,7 +72,7 @@ namespace OnlineStore.DeviceLibrary
private void IB04_LineStart() private void IB04_LineStart()
{ {
MoveInfo.NextMoveStep(StepEnum.IB04_LineStart); MoveInfo.NextMoveStep(StepEnum.IB04_LineStart);
WorkLog(" 入口检测到料,流水线转动 3000,等待料串完全进入轨道"); WorkLog(" 入口检测到料,流水线转动 3000,等待料串完全进入轨道");
LineRun(MoveInfo); LineRun(MoveInfo);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_LineIn_Check, IO_VALUE.HIGH)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_LineIn_Check, IO_VALUE.HIGH));
...@@ -81,9 +81,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -81,9 +81,9 @@ namespace OnlineStore.DeviceLibrary
private void IB05_WaitTime() private void IB05_WaitTime()
{ {
// 定位工位有料,等待1秒后再次检测 // 定位工位有料,等待1秒后再次检测
MoveInfo.NextMoveStep(StepEnum.IB05_WaitTime); MoveInfo.NextMoveStep(StepEnum.IB05_WaitTime);
WorkLog("定位工位检测到料: 链条转动, 3秒再次检测"); WorkLog("定位工位检测到料: 链条转动, 3秒再次检测");
LineRun(); LineRun();
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
} }
...@@ -98,7 +98,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -98,7 +98,7 @@ namespace OnlineStore.DeviceLibrary
{ {
return; return;
} }
#region 入料:料进入并开始检测托盘 #region 入料:料进入并开始检测托盘
if (MoveInfo.IsStep(StepEnum.IB01_Wait)) if (MoveInfo.IsStep(StepEnum.IB01_Wait))
{ {
WorkLog("料串入料 :提升伺服移动到P1,顶升气缸下降"); WorkLog("料串入料 :提升伺服移动到P1,顶升气缸下降");
...@@ -128,7 +128,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -128,7 +128,7 @@ namespace OnlineStore.DeviceLibrary
{ {
LineStop(); LineStop();
MoveInfo.EndMove(); MoveInfo.EndMove();
LogUtil.info(" 未检测到料,入料结束"); LogUtil.info(" 未检测到料,入料结束");
} }
} }
else if (MoveInfo.IsStep(StepEnum.IB05_WaitTime)) else if (MoveInfo.IsStep(StepEnum.IB05_WaitTime))
...@@ -139,21 +139,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -139,21 +139,21 @@ namespace OnlineStore.DeviceLibrary
// UpdateShelfId(); // UpdateShelfId();
//if (CurrShelfId.EndsWith("00")) //if (CurrShelfId.EndsWith("00"))
//{ //{
// SendShelfOut(" 料号【" + CurrShelfId + "】无效 "); // SendShelfOut(" 料号【" + CurrShelfId + "】无效 ");
//} //}
//else //else
// { // {
MoveInfo.ShelfNoTray = false; MoveInfo.ShelfNoTray = false;
//定位工位有料,直接开始入料 //定位工位有料,直接开始入料
MoveInfo.NextMoveStep(StepEnum.IB06_LocationUp); MoveInfo.NextMoveStep(StepEnum.IB06_LocationUp);
WorkLog("检测到料:链条停止转动,定位气缸上升"); WorkLog("检测到料:链条停止转动,定位气缸上升");
LocationUp(MoveInfo); LocationUp(MoveInfo);
// } // }
} }
else else
{ {
MoveInfo.EndMove(); MoveInfo.EndMove();
WorkLog(" 未检测到料,链条停止转动,入料结束"); WorkLog(" 未检测到料,链条停止转动,入料结束");
} }
} }
...@@ -208,7 +208,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -208,7 +208,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(StepEnum.IB22_LocationDown)) else if (MoveInfo.IsStep(StepEnum.IB22_LocationDown))
{ {
MoveInfo.NextMoveStep(StepEnum.IB23_ShelfOut); MoveInfo.NextMoveStep(StepEnum.IB23_ShelfOut);
WorkLog("上料完成 :通知agv来取料,等待料串离开"); WorkLog("上料完成 :通知agv来取料,等待料串离开");
AgvClient.NeedLeave(AgvName, CurrShelfId, ClientLevel.High); AgvClient.NeedLeave(AgvName, CurrShelfId, ClientLevel.High);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_LineIn_Check, IO_VALUE.LOW)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_LineIn_Check, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(60000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(60000));
...@@ -463,7 +463,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -463,7 +463,7 @@ namespace OnlineStore.DeviceLibrary
{ {
Task.Factory.StartNew(delegate Task.Factory.StartNew(delegate
{ {
string logName = Name + "AGV料架进入 [" + AgvName + "] "; string logName = Name + "料串 [AGV->" + AgvName + "] ";
try try
{ {
if (Robot.IOValue(IO_LineIn_Check).Equals(IO_VALUE.LOW) && Robot.IOValue(IO_LineEnd_Check).Equals(IO_VALUE.LOW)) if (Robot.IOValue(IO_LineIn_Check).Equals(IO_VALUE.LOW) && Robot.IOValue(IO_LineEnd_Check).Equals(IO_VALUE.LOW))
...@@ -499,7 +499,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -499,7 +499,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(logName + "等待3000后,停止链条转动"); LogUtil.info(logName + "等待3000后,停止链条转动");
LineStop(); LineStop();
//料可离开 //料可离开
AgvClient.SetStatus(AgvName, "", ClientAction.FinishEnter, ClientLevel.High, true); AgvClient.SetStatus(AgvName, "", ClientAction.FinishEnter, ClientLevel.High, true);
Task.Factory.StartNew(delegate Task.Factory.StartNew(delegate
{ {
...@@ -511,7 +511,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -511,7 +511,7 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
//入口有料,暂不处理 //入口有料,暂不处理
} }
} }
catch (TimeoutException te) catch (TimeoutException te)
...@@ -550,10 +550,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -550,10 +550,10 @@ namespace OnlineStore.DeviceLibrary
internal void ShelfOutProcess() internal void ShelfOutProcess()
{ {
//AGV已到达,将料送入AGV中 //AGV已到达,将料送入AGV中
Task.Factory.StartNew(delegate Task.Factory.StartNew(delegate
{ {
string logName = Name + "[" + AgvName + "] 料架送入AGV "; string logName = Name + "[" + AgvName + "->AGV ] ";
try try
{ {
LogUtil.info(logName + "开始,先设置状态为None"); LogUtil.info(logName + "开始,先设置状态为None");
...@@ -581,11 +581,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -581,11 +581,11 @@ namespace OnlineStore.DeviceLibrary
AgvClient.SetStatus(AgvName, "", ClientAction.None, ClientLevel.High, true); AgvClient.SetStatus(AgvName, "", ClientAction.None, ClientLevel.High, true);
}); });
ProcessShelfOut = false; ProcessShelfOut = false;
LogUtil.info(logName + ",停止转动,清空料[" + CurrShelfId + "], 结束"); LogUtil.info(logName + ",停止转动,清空料[" + CurrShelfId + "], 结束");
} }
else else
{ {
LogUtil.info(logName + "开始,未检测到料信号,不处理"); LogUtil.info(logName + "开始,未检测到料信号,不处理");
} }
} }
catch (TimeoutException te) catch (TimeoutException te)
......
...@@ -360,7 +360,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -360,7 +360,7 @@ namespace OnlineStore.DeviceLibrary
string msg = ""; string msg = "";
int tLength = 15; int tLength = 15;
msg += "左侧料架:" + LeftBatchMove.CurrShelfId + " 右侧料架:"+RightBatchMove.CurrShelfId+" \r\n"; msg += "左侧料串:" + LeftBatchMove.CurrShelfId + " 右侧料串:"+RightBatchMove.CurrShelfId+" \r\n";
msg += "runS: " + runStatus + "\n"; msg += "runS: " + runStatus + "\n";
msg += "alarm: " + alarmType + " " + LeftBatchMove.alarmType +" " + RightBatchMove.alarmType +"\n"; msg += "alarm: " + alarmType + " " + LeftBatchMove.alarmType +" " + RightBatchMove.alarmType +"\n";
......
...@@ -3,6 +3,7 @@ using OnlineStore.LoadCSVLibrary; ...@@ -3,6 +3,7 @@ using OnlineStore.LoadCSVLibrary;
using System; using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
...@@ -136,6 +137,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -136,6 +137,8 @@ namespace OnlineStore.DeviceLibrary
ShelfMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.O_WLine_WorkStop, IO_VALUE.LOW)); ShelfMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.O_WLine_WorkStop, IO_VALUE.LOW));
isInPro = false; isInPro = false;
} }
protected override void ResetProcess() protected override void ResetProcess()
{ {
if (MoveInfo.MoveType.Equals(RobotMoveType.Reset) || MoveInfo.MoveType.Equals(RobotMoveType.RHome)) if (MoveInfo.MoveType.Equals(RobotMoveType.Reset) || MoveInfo.MoveType.Equals(RobotMoveType.RHome))
...@@ -388,7 +391,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -388,7 +391,8 @@ namespace OnlineStore.DeviceLibrary
} }
} }
} }
private Stopwatch needEnterWatch = new Stopwatch();
private Stopwatch needLeaveWatch = new Stopwatch();
protected override void BaseTimerProcess() protected override void BaseTimerProcess()
{ {
if (isInSuddenDown || isNoAirCheck) if (isInSuddenDown || isNoAirCheck)
...@@ -414,14 +418,45 @@ namespace OnlineStore.DeviceLibrary ...@@ -414,14 +418,45 @@ namespace OnlineStore.DeviceLibrary
{ {
if (NoErrorAlarm() && IOValue(IO_Type.Out_TrayCheck).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.X_OLine_Run).Equals(IO_VALUE.LOW)) if (NoErrorAlarm() && IOValue(IO_Type.Out_TrayCheck).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.X_OLine_Run).Equals(IO_VALUE.LOW))
{ {
//料准备好才能取料 //料准备好才能取料
if (OutReelCount >= 0&& SecMoveInfo.MoveType.Equals(RobotMoveType.None)) if (OutReelCount >= 0 && SecMoveInfo.MoveType.Equals(RobotMoveType.None))
{ {
StartWorking(new WorkParam()); StartWorking(new WorkParam());
} }
} }
} }
//入口无信号NeedEnter
if (IOValue(IO_Type.O_ELine_InCheck).Equals(IO_VALUE.LOW) && IOValue(IO_Type.O_WLine_InCheck).Equals(IO_VALUE.LOW) && CylinderIsOk(IO_Type.O_ELine_TopUp, IO_Type.O_ELine_TopDown))
{
if (RobotManager.checkWatch(needEnterWatch, 3000))
{
AgvClient.NeedEnter(Config.AgvInName, "", Asa.ClientLevel.High);
}
}
else
{
needEnterWatch.Stop();
AgvClient.SetToNone(Config.AgvInName);
}
//出口有信号NeedLeave
if (IOValue(IO_Type.O_WLine_OutCheck).Equals(IO_VALUE.HIGH))
{
if (RobotManager.checkWatch(needLeaveWatch, 3000))
{
AgvClient.NeedEnter(Config.AgvOutName, "", Asa.ClientLevel.High);
}
}
else
{
needLeaveWatch.Stop();
AgvClient.SetToNone(Config.AgvOutName);
}
if (NoErrorAlarm()) if (NoErrorAlarm())
{ {
CheckAxisAlarm(); CheckAxisAlarm();
...@@ -473,12 +508,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -473,12 +508,12 @@ namespace OnlineStore.DeviceLibrary
msg += "alarm: " + alarmType + "\n"; msg += "alarm: " + alarmType + "\n";
msg += "取料状态:" + MoveInfo.MoveType + " " + MoveInfo.MoveStep + "\n"; msg += "取料状态:" + MoveInfo.MoveType + " " + MoveInfo.MoveStep + "\n";
msg += "贴标状态:" + SecMoveInfo.MoveType + " " + SecMoveInfo.MoveStep + "\n"; msg += "贴标状态:" + SecMoveInfo.MoveType + " " + SecMoveInfo.MoveStep + "\n";
msg += "料状态:" + ShelfMoveInfo.MoveType + " " + ShelfMoveInfo.MoveStep + "\n"; msg += "料状态:" + ShelfMoveInfo.MoveType + " " + ShelfMoveInfo.MoveStep + "\n";
//msg += "料盘信息:" + MoveInfo.MoveParam.ToStr() + " \r\n"; //msg += "料盘信息:" + MoveInfo.MoveParam.ToStr() + " \r\n";
// msg += "标签信息:" + Out_ReelInfo.ToStr() + " \r\n"; // msg += "标签信息:" + Out_ReelInfo.ToStr() + " \r\n";
msg += "当前料:" + WorkShelfId + ",累积出料 "+OutReelCount+" 盘共 "+OutReelHeight+" mm \r\n"; msg += "当前料:" + WorkShelfId + ",累积出料 "+OutReelCount+" 盘共 "+OutReelHeight+" mm \r\n";
msg += "打印机["+RobotManager.PrintName+"]:" + RobotManager.LastPrintStatus + "\n"; msg += "打印机["+RobotManager.PrintName+"]:" + RobotManager.LastPrintStatus + "\n";
return msg; return msg;
...@@ -647,5 +682,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -647,5 +682,8 @@ namespace OnlineStore.DeviceLibrary
#endregion #endregion
} }
} }
...@@ -189,7 +189,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -189,7 +189,7 @@ namespace OnlineStore.DeviceLibrary
else else
{ {
MoveInfo.NextMoveStep(StepEnum.OT11_WaitShelfOk); MoveInfo.NextMoveStep(StepEnum.OT11_WaitShelfOk);
WorkLog("取料完成,等待料可放料 "); WorkLog("取料完成,等待料可放料 ");
} }
} }
else if (MoveInfo.IsStep(StepEnum.OT11_WaitShelfOk)) else if (MoveInfo.IsStep(StepEnum.OT11_WaitShelfOk))
...@@ -199,7 +199,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -199,7 +199,7 @@ namespace OnlineStore.DeviceLibrary
if (shelfOk || debugOk) if (shelfOk || debugOk)
{ {
MoveInfo.NextMoveStep(StepEnum.OT12_MoveXToP3); MoveInfo.NextMoveStep(StepEnum.OT12_MoveXToP3);
WorkLog("放料:料可放料,取料X轴移动到P3 "); WorkLog("放料:料可放料,取料X轴移动到P3 ");
MoveXAxis.AbsMove(MoveInfo, Config.MoveX_P3, Config.MoveX_P3Speed); MoveXAxis.AbsMove(MoveInfo, Config.MoveX_P3, Config.MoveX_P3Speed);
if (shelfOk) if (shelfOk)
...@@ -217,7 +217,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -217,7 +217,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.IsTimeOut(120)) else if (MoveInfo.IsTimeOut(120))
{ {
WarnMsg = MoveInfo.Name + "等待出料料准备完成(OS_18_ShelfReady)超时[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]秒"; WarnMsg = MoveInfo.Name + "等待出料料准备完成(OS_18_ShelfReady)超时[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]秒";
LogUtil.error(WarnMsg); LogUtil.error(WarnMsg);
Alarm(AlarmType.IoSingleTimeOut); Alarm(AlarmType.IoSingleTimeOut);
} }
...@@ -234,7 +234,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -234,7 +234,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.IsTimeOut(60)) else if (MoveInfo.IsTimeOut(60))
{ {
WarnMsg = MoveInfo.Name + "等待出料料可放料(OS_22_WaitTray)超时[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]秒"; WarnMsg = MoveInfo.Name + "等待出料料可放料(OS_22_WaitTray)超时[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]秒";
LogUtil.error(WarnMsg); LogUtil.error(WarnMsg);
Alarm(AlarmType.IoSingleTimeOut); Alarm(AlarmType.IoSingleTimeOut);
} }
...@@ -256,7 +256,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -256,7 +256,7 @@ namespace OnlineStore.DeviceLibrary
OutReelHeight += MoveInfo.MoveParam.PlateH; OutReelHeight += MoveInfo.MoveParam.PlateH;
OutReelCount += 1; OutReelCount += 1;
ShelfMoveInfo.NextMoveStep(StepEnum.OS_23_TrayOK); ShelfMoveInfo.NextMoveStep(StepEnum.OS_23_TrayOK);
ShelfWorkLog("料盘已放入料,累积出料 【" + OutReelHeight + "】盘共 " + OutReelHeight + " mm"); ShelfWorkLog("料盘已放入料,累积出料 【" + OutReelHeight + "】盘共 " + OutReelHeight + " mm");
} }
} }
else if (MoveInfo.IsStep(StepEnum.OT15_MoveZToP1)) else if (MoveInfo.IsStep(StepEnum.OT15_MoveZToP1))
...@@ -356,7 +356,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -356,7 +356,8 @@ namespace OnlineStore.DeviceLibrary
else if (SecMoveInfo.IsStep(StepEnum.OL02_TakeForward)) else if (SecMoveInfo.IsStep(StepEnum.OL02_TakeForward))
{ {
SecMoveInfo.NextMoveStep(StepEnum.OL03_PrintLabel); SecMoveInfo.NextMoveStep(StepEnum.OL03_PrintLabel);
SecWorkLog("贴标: 开始打印标签 ,等待2000ms"); RobotManager.LastPrintStatus = Asa.PrintLabel.PrinterStatus.Unknown;
SecWorkLog("贴标: 开始打印标签 ,重置状态=Unknown,等待2000ms");
SecMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000)); SecMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
StartPrintLabel(SecMoveInfo.MoveParam.WareCode, SecMoveInfo.MoveParam.WareCount.ToString()); StartPrintLabel(SecMoveInfo.MoveParam.WareCode, SecMoveInfo.MoveParam.WareCount.ToString());
} }
...@@ -364,14 +365,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -364,14 +365,19 @@ namespace OnlineStore.DeviceLibrary
{ {
SecMoveInfo.NextMoveStep(StepEnum.OL04_PrintOk); SecMoveInfo.NextMoveStep(StepEnum.OL04_PrintOk);
SecWorkLog("贴标: 等待 贴标机打码OK信号"); SecWorkLog("贴标: 等待 贴标机打码OK信号");
SecMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000)); // SecMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
} }
else if (SecMoveInfo.IsStep(StepEnum.OL04_PrintOk)) else if (SecMoveInfo.IsStep(StepEnum.OL04_PrintOk))
{ {
bool isPrintOk = RobotManager.LastPrintStatus.Equals(Asa.PrintLabel.PrinterStatus.Idle);
bool isTimeOut = SecMoveInfo.IsTimeOut(120);
if (isPrintOk || isTimeOut)
{
SecMoveInfo.NextMoveStep(StepEnum.OL05_TakeBack); SecMoveInfo.NextMoveStep(StepEnum.OL05_TakeBack);
SecWorkLog("贴标: 取码气缸后退"); SecWorkLog("贴标: 打印结束["+ RobotManager.LastPrintStatus + "]["+(isTimeOut?"超时120秒":"")+"],取码气缸后退");
CylinderMove(SecMoveInfo, IO_Type.TakeCode_Forward, IO_Type.TakeCode_Back); CylinderMove(SecMoveInfo, IO_Type.TakeCode_Forward, IO_Type.TakeCode_Back);
} }
}
else if (SecMoveInfo.IsStep(StepEnum.OL05_TakeBack)) else if (SecMoveInfo.IsStep(StepEnum.OL05_TakeBack))
{ {
SecMoveInfo.NextMoveStep(StepEnum.OL06_XYRToP2); SecMoveInfo.NextMoveStep(StepEnum.OL06_XYRToP2);
......
...@@ -45,7 +45,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -45,7 +45,7 @@ namespace OnlineStore.DeviceLibrary
IsDebug = Config.IsDebug.Equals(1); IsDebug = Config.IsDebug.Equals(1);
AgvClient.Init();
List<string> ioList = new List<string>(); List<string> ioList = new List<string>();
ioList = new List<string>(DeviceConfig.ProIOIpMap.Values); ioList = new List<string>(DeviceConfig.ProIOIpMap.Values);
...@@ -58,7 +58,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -58,7 +58,10 @@ namespace OnlineStore.DeviceLibrary
IOManager.Init(); IOManager.Init();
CodeManager.LoadConfig(); CodeManager.LoadConfig();
AgvClient.NodeList.Add(outputEquip.Config.AgvInName);
AgvClient.NodeList.Add(outputEquip.Config.AgvOutName);
AgvClient.NodeList.Add(inputEquip.Config.RightAgvName);
AgvClient.NodeList.Add(inputEquip.Config.LeftAgvName);
Task.Factory.StartNew(delegate Task.Factory.StartNew(delegate
{ {
LogUtil.info(Name + "开始连接IO模块 "); LogUtil.info(Name + "开始连接IO模块 ");
......
...@@ -92,7 +92,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -92,7 +92,7 @@ namespace OnlineStore.DeviceLibrary
} }
internal static bool IsRealRfid(string shelfRfid) internal static bool IsRealRfid(string shelfRfid)
{ {
//判断料架号是否是真实的料架 //判断料串号是否是真实的料串
if (shelfRfid.StartsWith("C") || shelfRfid.StartsWith("D")) if (shelfRfid.StartsWith("C") || shelfRfid.StartsWith("D"))
{ {
int num = -1; int num = -1;
......
...@@ -4,6 +4,7 @@ using OnlineStore.Common; ...@@ -4,6 +4,7 @@ using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
...@@ -176,6 +177,24 @@ namespace OnlineStore.DeviceLibrary ...@@ -176,6 +177,24 @@ namespace OnlineStore.DeviceLibrary
} }
public static bool checkWatch(Stopwatch watch, int targetMs, bool isStop = true)
{
if (!watch.IsRunning)
{
watch.Restart();
return false;
}
else if (watch.ElapsedMilliseconds >= targetMs)
{
if (isStop)
{
watch.Stop();
}
return true;
}
return false;
}
private static List<int> trayHeightList = new List<int>() { 8, 12, 16, 24, 32, 44, 56 }; private static List<int> trayHeightList = new List<int>() { 8, 12, 16, 24, 32, 44, 56 };
public static List<int> GetTrayList() public static List<int> GetTrayList()
......
...@@ -116,7 +116,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -116,7 +116,7 @@ namespace OnlineStore.DeviceLibrary
return codeStr; return codeStr;
} }
//// 分盘料/紧急料放上料串或料时调用 /rest/api/qisda/device/afterPutCut //// 分盘料/紧急料放上料串或料时调用 /rest/api/qisda/device/afterPutCut
//private static string Addr_afterPutCut = "/rest/api/qisda/device/afterPutCut"; //private static string Addr_afterPutCut = "/rest/api/qisda/device/afterPutCut";
//public static string afterPutCut(string deviceName, string rfid, string barcode, string cid, int rfidLoc, out TaskData afterData) //public static string afterPutCut(string deviceName, string rfid, string barcode, string cid, int rfidLoc, out TaskData afterData)
//{ //{
...@@ -128,12 +128,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -128,12 +128,12 @@ namespace OnlineStore.DeviceLibrary
// //cid: 料仓cid,流水线可传入空 // //cid: 料仓cid,流水线可传入空
// //barcode : 条码 // //barcode : 条码
// //rfid : RFID // //rfid : RFID
// //rfidLoc: 料位置,流水线可传-1 // //rfidLoc: 料位置,流水线可传-1
// Dictionary<string, string> paramMap = new Dictionary<string, string>(); // Dictionary<string, string> paramMap = new Dictionary<string, string>();
// paramMap.Add("barcode", barcode); // 参数: barcode=料盘的条码 // paramMap.Add("barcode", barcode); // 参数: barcode=料盘的条码
// paramMap.Add("rfid", rfid); // rfid = 料的RFID信息 // paramMap.Add("rfid", rfid); // rfid = 料的RFID信息
// paramMap.Add("rfidLoc", rfidLoc.ToString()); // rfidLoc=料的架位信息 // paramMap.Add("rfidLoc", rfidLoc.ToString()); // rfidLoc=料的架位信息
// paramMap.Add("cid", cid); // 料仓cid,流水线可传入空 // paramMap.Add("cid", cid); // 料仓cid,流水线可传入空
// string server = GetAddr(Addr_afterPutCut, paramMap); // string server = GetAddr(Addr_afterPutCut, paramMap);
// DateTime startTime = DateTime.Now; // DateTime startTime = DateTime.Now;
......
...@@ -243,7 +243,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -243,7 +243,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
IB04_LineStart, IB04_LineStart,
/// <summary> /// <summary>
/// 料串入料:等待料稳定 /// 料串入料:等待料稳定
/// </summary> /// </summary>
IB05_WaitTime, IB05_WaitTime,
/// <summary> /// <summary>
...@@ -291,7 +291,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -291,7 +291,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
IB22_LocationDown, IB22_LocationDown,
/// <summary> /// <summary>
/// 入料结束:通知agv来拉料 /// 入料结束:通知agv来拉料
/// </summary> /// </summary>
IB23_ShelfOut, IB23_ShelfOut,
#endregion #endregion
...@@ -481,7 +481,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -481,7 +481,7 @@ namespace OnlineStore.DeviceLibrary
OLR08_LabelRToP1, OLR08_LabelRToP1,
#endregion #endregion
#region 批量轴模块复位 #region 批量轴模块复位
/// <summary> /// <summary>
/// 出料模块复位: 阻挡气缸上升 /// 出料模块复位: 阻挡气缸上升
...@@ -565,11 +565,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -565,11 +565,11 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 取料: 取料完成,等待料可放料 /// 取料: 取料完成,等待料可放料
/// </summary> /// </summary>
OT11_WaitShelfOk, OT11_WaitShelfOk,
/// <summary> /// <summary>
/// 取料: 料可放料,取料X轴移动到P3,提升轴下降指定高度 /// 取料: 料可放料,取料X轴移动到P3,提升轴下降指定高度
/// </summary> /// </summary>
OT12_MoveXToP3, OT12_MoveXToP3,
/// <summary> /// <summary>
...@@ -719,82 +719,82 @@ namespace OnlineStore.DeviceLibrary ...@@ -719,82 +719,82 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
OL19_XYRBackToP1, OL19_XYRBackToP1,
#endregion #endregion
#region 出料模块料处理 3701 开始 #region 出料模块料处理 3701 开始
/// <summary> /// <summary>
/// 出料料:升降盘不在后退端,提升伺服到P2 /// 出料料:升降盘不在后退端,提升伺服到P2
/// </summary> /// </summary>
OS_01_BatchAxisToP2 = 3701, OS_01_BatchAxisToP2 = 3701,
/// <summary> /// <summary>
/// 出料料:升降盘定位气缸后退 /// 出料料:升降盘定位气缸后退
/// </summary> /// </summary>
OS_02_TrayL_After, OS_02_TrayL_After,
/// <summary> /// <summary>
/// 出料料:定位气缸下降 /// 出料料:定位气缸下降
/// </summary> /// </summary>
OS_03_LocationDown, OS_03_LocationDown,
/// <summary> /// <summary>
/// 出料料:提升轴移动到高处待机点P1 /// 出料料:提升轴移动到高处待机点P1
/// </summary> /// </summary>
OS_04_BatchAxisToP1, OS_04_BatchAxisToP1,
/// <summary> /// <summary>
/// 出料料,等待空料串入料口有信号 /// 出料料,等待空料串入料口有信号
/// </summary> /// </summary>
OS_05_WaitECheck, OS_05_WaitECheck,
/// <summary> /// <summary>
/// 出料料:空料串,接料线体,入口顶升上升 /// 出料料:空料串,接料线体,入口顶升上升
/// </summary> /// </summary>
OS_06_TopUp, OS_06_TopUp,
/// <summary> /// <summary>
/// 出料料:空料串阻挡下降,横移电机运转 /// 出料料:空料串阻挡下降,横移电机运转
/// </summary> /// </summary>
OS_07_SWLineRun, OS_07_SWLineRun,
/// <summary> /// <summary>
/// 出料料:等待入料线进口信号亮 /// 出料料:等待入料线进口信号亮
/// </summary> /// </summary>
OS_08_WLineInCheck, OS_08_WLineInCheck,
/// <summary> /// <summary>
/// 出料料架:空料串阻挡上升,等待1000毫秒料架到达接料线体 /// 出料料串:空料串阻挡上升,等待1000毫秒料串到达接料线体
/// </summary> /// </summary>
OS_09_WaitInWLine, OS_09_WaitInWLine,
/// <summary> /// <summary>
/// 出料料:空料串阻挡上升,顶升下降,线体停止转动, /// 出料料:空料串阻挡上升,顶升下降,线体停止转动,
/// </summary> /// </summary>
OS_10_TopDown, OS_10_TopDown,
/// <summary> /// <summary>
/// 出料料:接料线体工位阻挡上升,接料线体转动,等待工位检测信号, /// 出料料:接料线体工位阻挡上升,接料线体转动,等待工位检测信号,
/// </summary> /// </summary>
OS_11_WLineRun, OS_11_WLineRun,
/// <summary> /// <summary>
/// 出料料:工位检测信号亮,,在转动3000ms, /// 出料料:工位检测信号亮,,在转动3000ms,
/// </summary> /// </summary>
OS_12_WorkCheck, OS_12_WorkCheck,
/// <summary> /// <summary>
/// 出料料:接料线体停止转动, /// 出料料:接料线体停止转动,
/// </summary> /// </summary>
OS_13_StopLineRun, OS_13_StopLineRun,
/// <summary> /// <summary>
/// 出料料:工位定位气缸上升, /// 出料料:工位定位气缸上升,
/// </summary> /// </summary>
OS_14_WLocationUp, OS_14_WLocationUp,
/// <summary> /// <summary>
/// 出料料:提升轴下降到P2, /// 出料料:提升轴下降到P2,
/// </summary> /// </summary>
OS_15_BatchAxisToP2, OS_15_BatchAxisToP2,
/// <summary> /// <summary>
/// 出料料:托盘定位前进, /// 出料料:托盘定位前进,
/// </summary> /// </summary>
OS_16_WTrayLForward, OS_16_WTrayLForward,
/// <summary> /// <summary>
/// 出料料:批量轴匀速到P3点, /// 出料料:批量轴匀速到P3点,
/// </summary> /// </summary>
OS_17_BatchAxisToP3, OS_17_BatchAxisToP3,
/// <summary> /// <summary>
/// 出料料架:料架准备完成, /// 出料料串:料串准备完成,
/// </summary> /// </summary>
OS_18_ShelfReady, OS_18_ShelfReady,
...@@ -804,11 +804,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -804,11 +804,11 @@ namespace OnlineStore.DeviceLibrary
OS_21_BatchDownH, OS_21_BatchDownH,
/// <summary> /// <summary>
/// 放料:等待料盘放入料 /// 放料:等待料盘放入料
/// </summary> /// </summary>
OS_22_WaitTray, OS_22_WaitTray,
/// <summary> /// <summary>
/// 放料:等待料盘放入料 /// 放料:等待料盘放入料
/// </summary> /// </summary>
OS_23_TrayOK, OS_23_TrayOK,
/// <summary> /// <summary>
...@@ -828,43 +828,43 @@ namespace OnlineStore.DeviceLibrary ...@@ -828,43 +828,43 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 送出料架:开始送出料架 /// 送出料串:开始送出料串
/// </summary> /// </summary>
OS_31_ShendShelfOut, OS_31_ShendShelfOut,
/// <summary> /// <summary>
/// 送出料:批量轴下降到P2, /// 送出料:批量轴下降到P2,
/// </summary> /// </summary>
OS_32_BatchToP2, OS_32_BatchToP2,
/// <summary> /// <summary>
/// 送出料:托盘定位气缸后退, /// 送出料:托盘定位气缸后退,
/// </summary> /// </summary>
OS_33_TrayFixedBack, OS_33_TrayFixedBack,
/// <summary> /// <summary>
/// 送出料:定位气缸下降, /// 送出料:定位气缸下降,
/// </summary> /// </summary>
OS_34_LocationDown, OS_34_LocationDown,
/// <summary> /// <summary>
/// 送出料:批量轴到P1, /// 送出料:批量轴到P1,
/// </summary> /// </summary>
OS_35_BatchAxisToP1, OS_35_BatchAxisToP1,
/// <summary> /// <summary>
/// 送出料架:等待出口无料架 /// 送出料串:等待出口无料串
/// </summary> /// </summary>
OS_36_WaitOutNoShelf, OS_36_WaitOutNoShelf,
/// <summary> /// <summary>
/// 送出料:出口阻挡上升 /// 送出料:出口阻挡上升
/// </summary> /// </summary>
OS_37_OutStopUp, OS_37_OutStopUp,
/// <summary> /// <summary>
/// 送出料:链条正转到出口有检测信号 /// 送出料:链条正转到出口有检测信号
/// </summary> /// </summary>
OS_38_LineRun, OS_38_LineRun,
......
...@@ -465,7 +465,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -465,7 +465,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
Labelling = 4, Labelling = 4,
/// <summary> /// <summary>
/// 料处理 /// 料处理
/// </summary> /// </summary>
ShelfPro = 5, ShelfPro = 5,
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!