Commit b657c1cc LN

rfid更新,增加ng线体按钮

1 个父辈 18693286
......@@ -14,6 +14,11 @@
RFID读卡器
</summary>
</member>
<member name="M:Asa.RFID.Reader.#ctor(System.String)">
<summary>
RFID读卡器
</summary>
</member>
<member name="P:Asa.RFID.Reader.IsConn">
<summary>
是否连接
......@@ -34,18 +39,21 @@
错误代码
</summary>
</member>
<member name="P:Asa.RFID.Reader.IP">
<summary>
IP地址
</summary>
</member>
<member name="P:Asa.RFID.Reader.ID">
<summary>
ID号码
</summary>
</member>
<member name="M:Asa.RFID.Reader.Connect(System.String,System.Boolean)">
<member name="M:Asa.RFID.Reader.Connect(System.Boolean)">
<summary>
连接
</summary>
<param name="ip">设备IP地址</param>
<param name="autoScan">自动扫描</param>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader.Close">
<summary>
......@@ -64,14 +72,6 @@
</summary>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader.Read(System.Int32,System.Int32)">
<summary>
读取电子标签
</summary>
<param name="start"></param>
<param name="len"></param>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader.Write(System.Byte[])">
<summary>
写入数据到电子标签,扫描模式不能使用
......@@ -79,168 +79,44 @@
<param name="buff">数据,必须小于等于112字节</param>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader.Write(System.Byte[],System.Int32)">
<summary>
写入数据到电子标签,扫描模式不能使用
</summary>
<param name="buff"></param>
<param name="start"></param>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader.Receive">
<summary>
自动扫描接受数据事件
</summary>
</member>
<member name="M:Asa.RFID.Reader.ReadRFID">
<summary>
读取电子标签内所有数据
</summary>
</member>
<member name="M:Asa.RFID.Reader.ReadRFID(System.Int32)">
<summary>
读取电子标签指定块
</summary>
<param name="num"></param>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader.WriteRFID(System.Int32)">
<summary>
写入指定块数据到电子标签
</summary>
<param name="num"></param>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader.InitBuff(System.Int32,System.Int32)">
<summary>
初始buff为0
</summary>
<param name="start"></param>
<param name="len"></param>
</member>
<member name="T:Asa.RFID.Reader2">
<member name="T:Asa.RFID.ReaderAll">
<summary>
RFID读卡器
</summary>
</member>
<member name="M:Asa.RFID.Reader2.#ctor">
<member name="M:Asa.RFID.ReaderAll.#ctor">
<summary>
RFID读卡器
RFID
</summary>
</member>
<member name="M:Asa.RFID.Reader2.IsConn(System.Int32)">
<member name="P:Asa.RFID.ReaderAll.LogPath">
<summary>
是否连接
日志目录
</summary>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader2.AddIP(System.String[])">
<member name="M:Asa.RFID.ReaderAll.Open(System.String[])">
<summary>
添加设备IP地址
打开所有
</summary>
<param name="ip"></param>
</member>
<member name="M:Asa.RFID.Reader2.Connect(System.Boolean)">
<summary>
连接
</summary>
<param name="autoScan">自动扫描</param>
</member>
<member name="M:Asa.RFID.Reader2.Connect(System.Int32,System.Boolean)">
<summary>
连接
</summary>
<param name="index"></param>
<param name="autoScan">自动扫描</param>
</member>
<member name="M:Asa.RFID.Reader2.Close">
<member name="M:Asa.RFID.ReaderAll.Close">
<summary>
关闭所有
</summary>
</member>
<member name="M:Asa.RFID.Reader2.Close(System.Int32)">
<summary>
关闭
</summary>
<param name="index"></param>
</member>
<member name="M:Asa.RFID.Reader2.FindRFID(System.Int32)">
<summary>
查找电子标签
</summary>
<param name="index"></param>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader2.GetID(System.Int32)">
<summary>
ID号码
</summary>
<param name="index"></param>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader2.Read(System.Int32)">
<summary>
读取电子标签
</summary>
<param name="index"></param>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader2.Read(System.Int32,System.Int32,System.Int32)">
<summary>
读取电子标签
</summary>
<param name="index"></param>
<param name="start"></param>
<param name="len"></param>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader2.Write(System.Int32,System.Byte[],System.Int32)">
<member name="M:Asa.RFID.ReaderAll.Read(System.String)">
<summary>
写入数据到电子标签
读取
</summary>
<param name="index"></param>
<param name="buff"></param>
<param name="start"></param>
<param name="ip"></param>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader2.AutoScan(System.Int32,System.Boolean)">
<summary>
自动读取扫描,扫描模式只读
</summary>
<param name="idx"></param>
<param name="open"></param>
</member>
<member name="M:Asa.RFID.Reader2.Receive(System.Object)">
<summary>
自动扫描接受数据事件
</summary>
</member>
<member name="M:Asa.RFID.Reader2.Find(System.Int32)">
<member name="M:Asa.RFID.ReaderAll.Clear(System.String)">
<summary>
查找电子标签
清零
</summary>
<param name="idx"></param>
</member>
<member name="M:Asa.RFID.Reader2.ReadRFID(System.Int32)">
<summary>
读取电子标签内所有数据
</summary>
<param name="idx"></param>
</member>
<member name="M:Asa.RFID.Reader2.ReadRFID(System.Int32,System.Int32)">
<summary>
读取电子标签指定块
</summary>
<param name="idx"></param>
<param name="num"></param>
</member>
<member name="M:Asa.RFID.Reader2.WriteRFID(System.Int32,System.Int32)">
<summary>
写入指定块数据到电子标签
</summary>
<param name="idx"></param>
<param name="num"></param>
<returns></returns>
<param name="ip"></param>
</member>
<member name="T:Asa.RFID.IP">
<summary>
......
此文件类型无法预览
......@@ -122,6 +122,10 @@
this.btnTempClose = new System.Windows.Forms.Button();
this.btnTempInit = new System.Windows.Forms.Button();
this.axisMoveControl1 = new OnlineStore.ACPackingStore.AxisMoveControl();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.txtCID = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.btnSaveCID = new System.Windows.Forms.Button();
this.groupShelf.SuspendLayout();
this.panel1.SuspendLayout();
this.tabControl1.SuspendLayout();
......@@ -131,6 +135,7 @@
this.groupBox3.SuspendLayout();
this.tabPage1.SuspendLayout();
this.groupBox7.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
// timer1
......@@ -1438,6 +1443,7 @@
//
// tabPage1
//
this.tabPage1.Controls.Add(this.groupBox2);
this.tabPage1.Controls.Add(this.groupBox7);
this.tabPage1.Controls.Add(this.axisMoveControl1);
this.tabPage1.Location = new System.Drawing.Point(4, 29);
......@@ -1570,6 +1576,50 @@
this.axisMoveControl1.Size = new System.Drawing.Size(547, 449);
this.axisMoveControl1.TabIndex = 0;
//
// groupBox2
//
this.groupBox2.Controls.Add(this.txtCID);
this.groupBox2.Controls.Add(this.label4);
this.groupBox2.Controls.Add(this.btnSaveCID);
this.groupBox2.Location = new System.Drawing.Point(560, 177);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(532, 88);
this.groupBox2.TabIndex = 273;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "CID修改";
//
// txtCID
//
this.txtCID.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtCID.Location = new System.Drawing.Point(95, 28);
this.txtCID.MaxLength = 30;
this.txtCID.Name = "txtCID";
this.txtCID.Size = new System.Drawing.Size(184, 26);
this.txtCID.TabIndex = 243;
this.txtCID.Text = "package-store-1";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label4.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label4.Location = new System.Drawing.Point(41, 33);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(32, 17);
this.label4.TabIndex = 242;
this.label4.Text = "CID:";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// btnSaveCID
//
this.btnSaveCID.Location = new System.Drawing.Point(322, 24);
this.btnSaveCID.Name = "btnSaveCID";
this.btnSaveCID.Size = new System.Drawing.Size(100, 33);
this.btnSaveCID.TabIndex = 88;
this.btnSaveCID.Text = "保存";
this.btnSaveCID.UseVisualStyleBackColor = true;
this.btnSaveCID.Click += new System.EventHandler(this.btnSaveCID_Click);
//
// FrmBox
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
......@@ -1598,6 +1648,8 @@
this.tabPage1.ResumeLayout(false);
this.groupBox7.ResumeLayout(false);
this.groupBox7.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.ResumeLayout(false);
}
......@@ -1702,6 +1754,10 @@
public System.Windows.Forms.Button btnUpdownP12;
public System.Windows.Forms.TextBox txtInoutP11;
public System.Windows.Forms.Button btnInoutP11;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.TextBox txtCID;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Button btnSaveCID;
}
}
......@@ -53,6 +53,7 @@ namespace OnlineStore.ACPackingStore
this.Close();
return;
}
txtCID.Text = BoxBean.CID.ToString();
this.groupBox3.Text = "设备[" + BoxBean.CID + "]状态";
this.Text = BoxBean.Name;
axisMoveControl1.LoadData(BoxBean, BoxBean.moveAxisList.ToArray());
......@@ -906,5 +907,15 @@ namespace OnlineStore.ACPackingStore
AxisABSMove(BoxBean.Config.Comp_Axis, value, BoxBean.Config.CompAxis_P2_Speed);
}
}
private void btnSaveCID_Click(object sender, EventArgs e)
{
string cid = txtCID.Text.Trim();
DialogResult result = MessageBox.Show("确定将CID修改为【" + cid + "】,修改后需要重启生效", "", MessageBoxButtons.YesNo);
if (result.Equals(DialogResult.Yes))
{
ConfigAppSettings.SaveValue(Setting_Init.Store_CID + "_" + BoxBean.DeviceID, cid);
}
}
}
}
......@@ -48,6 +48,8 @@
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.btnNGlineStop = new System.Windows.Forms.Button();
this.btnNgLine = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.groupBox4.SuspendLayout();
this.groupBox3.SuspendLayout();
......@@ -73,6 +75,8 @@
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.groupBox1.Controls.Add(this.btnNGlineStop);
this.groupBox1.Controls.Add(this.btnNgLine);
this.groupBox1.Controls.Add(this.btnDoorStop);
this.groupBox1.Controls.Add(this.btnBlow);
this.groupBox1.Controls.Add(this.btnStoreOn);
......@@ -182,7 +186,7 @@
//
this.btnTopDown.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnTopDown.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnTopDown.Location = new System.Drawing.Point(175, 272);
this.btnTopDown.Location = new System.Drawing.Point(175, 296);
this.btnTopDown.Name = "btnTopDown";
this.btnTopDown.Size = new System.Drawing.Size(125, 34);
this.btnTopDown.TabIndex = 289;
......@@ -194,7 +198,7 @@
//
this.btnTopUp.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnTopUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnTopUp.Location = new System.Drawing.Point(12, 272);
this.btnTopUp.Location = new System.Drawing.Point(12, 296);
this.btnTopUp.Name = "btnTopUp";
this.btnTopUp.Size = new System.Drawing.Size(125, 34);
this.btnTopUp.TabIndex = 288;
......@@ -206,7 +210,7 @@
//
this.btnNGDoorDown.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnNGDoorDown.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnNGDoorDown.Location = new System.Drawing.Point(175, 227);
this.btnNGDoorDown.Location = new System.Drawing.Point(175, 251);
this.btnNGDoorDown.Name = "btnNGDoorDown";
this.btnNGDoorDown.Size = new System.Drawing.Size(125, 34);
this.btnNGDoorDown.TabIndex = 287;
......@@ -218,7 +222,7 @@
//
this.btnNGDoorUp.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnNGDoorUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnNGDoorUp.Location = new System.Drawing.Point(12, 227);
this.btnNGDoorUp.Location = new System.Drawing.Point(12, 251);
this.btnNGDoorUp.Name = "btnNGDoorUp";
this.btnNGDoorUp.Size = new System.Drawing.Size(125, 34);
this.btnNGDoorUp.TabIndex = 286;
......@@ -332,7 +336,7 @@
//
this.btnLocationDown.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLocationDown.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLocationDown.Location = new System.Drawing.Point(175, 317);
this.btnLocationDown.Location = new System.Drawing.Point(175, 341);
this.btnLocationDown.Name = "btnLocationDown";
this.btnLocationDown.Size = new System.Drawing.Size(125, 34);
this.btnLocationDown.TabIndex = 251;
......@@ -357,7 +361,7 @@
//
this.btnLocationUp.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLocationUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLocationUp.Location = new System.Drawing.Point(12, 317);
this.btnLocationUp.Location = new System.Drawing.Point(12, 341);
this.btnLocationUp.Name = "btnLocationUp";
this.btnLocationUp.Size = new System.Drawing.Size(125, 34);
this.btnLocationUp.TabIndex = 250;
......@@ -459,6 +463,30 @@
this.tableLayoutPanel1.Size = new System.Drawing.Size(218, 570);
this.tableLayoutPanel1.TabIndex = 102;
//
// btnNGlineStop
//
this.btnNGlineStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnNGlineStop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnNGlineStop.Location = new System.Drawing.Point(175, 210);
this.btnNGlineStop.Name = "btnNGlineStop";
this.btnNGlineStop.Size = new System.Drawing.Size(125, 34);
this.btnNGlineStop.TabIndex = 298;
this.btnNGlineStop.Text = "NG线体停止";
this.btnNGlineStop.UseVisualStyleBackColor = false;
this.btnNGlineStop.Click += new System.EventHandler(this.btnNGlineStop_Click);
//
// btnNgLine
//
this.btnNgLine.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnNgLine.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnNgLine.Location = new System.Drawing.Point(12, 210);
this.btnNgLine.Name = "btnNgLine";
this.btnNgLine.Size = new System.Drawing.Size(125, 34);
this.btnNgLine.TabIndex = 297;
this.btnNgLine.Text = "NG线体运转";
this.btnNgLine.UseVisualStyleBackColor = false;
this.btnNgLine.Click += new System.EventHandler(this.btnNgLine_Click);
//
// FrmIOStatus
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
......@@ -517,6 +545,8 @@
private System.Windows.Forms.Button btnStoreOn;
private System.Windows.Forms.Button btnBlow;
private System.Windows.Forms.Button btnDoorStop;
private System.Windows.Forms.Button btnNGlineStop;
private System.Windows.Forms.Button btnNgLine;
}
}
......@@ -348,5 +348,15 @@ namespace OnlineStore.ACPackingStore
{
boxBean.DoorBean.Stop();
}
private void btnNgLine_Click(object sender, EventArgs e)
{
boxBean.IOMove(IO_Type.NGLine_Run, IO_VALUE.HIGH);
}
private void btnNGlineStop_Click(object sender, EventArgs e)
{
boxBean.IOMove(IO_Type.NGLine_Run, IO_VALUE.LOW);
}
}
}
......@@ -61,7 +61,7 @@ namespace OnlineStore.ACPackingStore
private void button1_Click(object sender, EventArgs e)
{
string ip = txtIP.Text;
RFIDData data = RFIDManager.ReadData(ip);
RFIDData data = RFIDManager.ReadRFID(ip);
string resul = "";
if (data != null)
{
......
......@@ -262,8 +262,7 @@ namespace OnlineStore.DeviceLibrary
LogInfo(MoveInfo.MoveType + ": 开始料架入库,线体停止,进出轴先原点返回");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
IOMove(IO_Type.Line_BackRun, IO_VALUE.LOW);
IOMove(IO_Type.Line_Run, IO_VALUE.LOW);
LineStop();
ACAxisHomeMove(Config.InOut_Axis);
}
......@@ -285,9 +284,8 @@ namespace OnlineStore.DeviceLibrary
case StoreMoveStep.BOX_H01_InOutBack:
Thread.Sleep(200);
MoveInfo.NextMoveStep(StoreMoveStep.BOX_H02_InoutTOP1_TopDown);
LogInfo(MoveInfo.MoveType + ": ,线体停止,进出轴到待机点P1,顶升气缸下降,NG门下降,入料移门关闭");
IOMove(IO_Type.Line_BackRun, IO_VALUE.LOW);
IOMove(IO_Type.Line_Run, IO_VALUE.LOW);
LogInfo(MoveInfo.MoveType + ": 线体停止,进出轴到待机点P1,顶升气缸下降,NG门下降,入料移门关闭");
LineStop();
AxisCountClear(Config.InOut_Axis);
ACAxisMove(Config.InOut_Axis, Config.InOutAxis_P1_Position, Config.InOutAxis_P1_Speed);
CylinderMove(MoveInfo, IO_Type.NGDoowCylinder_Up, IO_Type.NGDoorCylinder_Down);
......@@ -299,28 +297,20 @@ namespace OnlineStore.DeviceLibrary
if (IOValue(IO_Type.LineTake_Check).Equals(IO_VALUE.HIGH))
{
LogInfo(MoveInfo.MoveType + ":取料工位有料架,线体停止 ");
IOMove(IO_Type.Line_BackRun, IO_VALUE.LOW);
IOMove(IO_Type.Line_Run, IO_VALUE.LOW);
LineStop();
}
else
{
LogInfo(MoveInfo.MoveType + ":取料工位无料架, 线体先正转3000");
IOMove(IO_Type.Line_BackRun, IO_VALUE.LOW);
IOMove(IO_Type.Line_Run, IO_VALUE.HIGH);
LogInfo(MoveInfo.MoveType + ":取料工位无料架, 线体先正转3000或等待取料工位有料架");
LineRun();
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LineTake_Check, IO_VALUE.HIGH));
MoveInfo.OneWaitCanEndStep = true;
}
break;
// Thread.Sleep(200);
// MoveInfo.NextMoveStep(StoreMoveStep.BOX_H04_InOutToP1);
// LogInfo(MoveInfo.MoveType + ": 进出轴到待机点P1,关闭舱门,关闭入料移门");
// //进出轴原点返回完成,将进出轴的位置设置=0
// AxisCountClear(Config.InOut_Axis);
// ACAxisMove(Config.InOut_Axis, Config.InOutAxis_P1_Position, Config.InOutAxis_P1_Speed);
// CylinderMove(MoveInfo, IO_Type.NGDoowCylinder_Up, IO_Type.NGDoorCylinder_Down);
// DoorBean.StartClose(MoveInfo);
// break;
//case StoreMoveStep.BOX_H04_InOutToP1:
case StoreMoveStep.BOX_H03_LineRun:
LineStop();
//如果此时轴三还在报警,需要提示错误并等待
if (ACServerManager.GetAlarmStatus(Config.InOut_Axis.DeviceName, Config.InOut_Axis.GetAxisValue()) > 0)
{
......@@ -330,7 +320,7 @@ namespace OnlineStore.DeviceLibrary
return;
}
//复位和回原点要等轴3进出轴ORG亮了以后才能返回其他轴
LogInfo(MoveInfo.MoveType + ": 压紧轴,旋转轴,上下轴开始 原点返回");
LogInfo(MoveInfo.MoveType + ": 线体停止转动, 压紧轴,旋转轴,上下轴开始 原点返回");
MoveInfo.NextMoveStep(StoreMoveStep.BOX_H05_OtherAxisBack);
ACAxisHomeMove(Config.Comp_Axis);
ACAxisHomeMove(Config.Middle_Axis);
......@@ -1079,5 +1069,21 @@ namespace OnlineStore.DeviceLibrary
}
#endregion
public void LineRun()
{
IOMove(IO_Type.Line_BackRun, IO_VALUE.LOW);
IOMove(IO_Type.Line_Run, IO_VALUE.HIGH);
}
public void LineBackRun()
{
IOMove(IO_Type.Line_Run, IO_VALUE.LOW);
IOMove(IO_Type.Line_BackRun, IO_VALUE.HIGH);
}
public void LineStop()
{
IOMove(IO_Type.Line_BackRun, IO_VALUE.LOW);
IOMove(IO_Type.Line_Run, IO_VALUE.LOW);
}
}
}
\ No newline at end of file
......@@ -61,7 +61,7 @@ namespace OnlineStore.DeviceLibrary
wait.IsEnd = IOValue(wait.IoType).Equals(wait.IoValue);
int timeOutMs = Config.IOSingle_TimerOut;
if ((!wait.IsEnd) && span.TotalMilliseconds > timeOutMs&&NoAlarm())
if ((!wait.IsEnd) && span.TotalMilliseconds > timeOutMs && NoAlarm())
{
ConfigIO io = Config.getWaitIO(wait.IoType);
WarnMsg = Name + " 等待信号" + io.DisplayStr + "=" + wait.IoValue + "超时!";
......@@ -69,14 +69,14 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(Name + wait.IoType + "等待信号(" + io.DisplayStr + "=" + wait.IoValue + ") 超时", 14);
isOk = false;
break;
}
}
}
else if (wait.WaitType.Equals(WaitEnum.W003_Time))
{
wait.IsEnd = (span.TotalMilliseconds >= wait.TimeMSeconds);
}
else if (wait.WaitType.Equals(WaitEnum.W007_ReelHeight))
{
{
}
else if (wait.WaitType.Equals(WaitEnum.W008_Compress))
{
......@@ -88,7 +88,7 @@ namespace OnlineStore.DeviceLibrary
else
{
bool result = ACAxisMoveIsEnd(wait.AxisInfo, wait.TargetPosition, wait.TargetSpeed, out msg);
if (!result)
if (!result && (!msg.Equals("")))
{
LogUtil.error(msg);
}
......@@ -256,7 +256,7 @@ namespace OnlineStore.DeviceLibrary
private void UpdateShelfId()
{
//读取RFID
RFIDData data = RFIDManager.ReadData(Config.RFID_IP);
RFIDData data = RFIDManager.ReadRFID(Config.RFID_IP);
//TODO 判断料架是否正确
if (data.RFType.Equals("A"))
{
......@@ -733,7 +733,7 @@ namespace OnlineStore.DeviceLibrary
}
if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_01_ReadyShelf))
{
// MoveInfo.ShelfPositionList = new List<string>(ShelfPosList);
// MoveInfo.ShelfPositionList = new List<string>(ShelfPosList);
InOutStoreLog(moveName + MoveInfo.SLog + "调用AgvClient.MayEnter,小车已到达,打开入料口移门");
MoveInfo.NextMoveStep(StoreMoveStep.BI_02_DoorOpen);
......@@ -744,8 +744,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(StoreMoveStep.BI_03_LineRun);
InOutStoreLog(moveName + MoveInfo.SLog + "调用AgvClient.MayEnter,线体正转,等待取料位检测到信号");
AgvClient.MayEnter(Config.AgvNodeName);
IOMove(IO_Type.Line_BackRun, IO_VALUE.LOW);
IOMove(IO_Type.Line_Run, IO_VALUE.HIGH);
LineRun();
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LineIn_Check, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LineTake_Check, IO_VALUE.HIGH));
......@@ -754,7 +753,7 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo.NextMoveStep(StoreMoveStep.BI_04_LineStop);
InOutStoreLog(moveName + MoveInfo.SLog + "调用AgvClient.FinishEnter,取料位检测到信号,停止线体正转");
IOMove(IO_Type.Line_Run, IO_VALUE.LOW);
LineStop();
AgvClient.FinishEnter(Config.AgvNodeName);
if (!instoreShelf)
......@@ -796,19 +795,27 @@ namespace OnlineStore.DeviceLibrary
}
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_05_DoorClose))
{
MoveInfo.NextMoveStep(StoreMoveStep.BI_06_LocationUp);
InOutStoreLog(moveName + MoveInfo.SLog + MoveInfo.SLog + "定位装置上升");
MoveInfo.NextMoveStep(StoreMoveStep.BI_06_LineRun);
InOutStoreLog(moveName + MoveInfo.SLog + "继续转动1500");
LineRun();
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1500));
}
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_06_LineRun))
{
LineStop();
MoveInfo.NextMoveStep(StoreMoveStep.BI_07_LocationUp);
InOutStoreLog(moveName + MoveInfo.SLog + "线体停止转动,定位装置上升");
// CylinderMove(MoveInfo, IO_Type.LocationCylinder_Down, IO_Type.LocationCylinder_Up);
if (!instoreShelf)
{
InOutStoreLog("出库 " + MoveInfo.SLog + ":叉子进入库位中, 进出轴至P3(库位取放料点) ");
ACAxisMove(Config.InOut_Axis, MoveInfo.MoveParam.MoveP.InOut_P3, Config.InOutAxis_P3_Speed);
}
}
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_06_LocationUp))
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_07_LocationUp))
{
MoveInfo.NextMoveStep(StoreMoveStep.BI_07_TopCylinderUp);
MoveInfo.NextMoveStep(StoreMoveStep.BI_08_StartGetTray);
InOutStoreLog(moveName + MoveInfo.SLog + "顶升装置上升");
CylinderMove(MoveInfo, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_Up);
......@@ -819,7 +826,7 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove(Config.UpDown_Axis, MoveInfo.MoveParam.MoveP.UpDown_P6, Config.UpDownAxis_P6_Speed);
}
}
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_07_TopCylinderUp))
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_08_StartGetTray))
{
if (instoreShelf)
{
......@@ -837,8 +844,7 @@ namespace OnlineStore.DeviceLibrary
lastPosId = posId;
lastPosIdStatus = StoreStatus.OutStoreBoxEnd;
storeStatus = StoreStatus.OutStoreBoxEnd;
}
}
}
}
......@@ -896,8 +902,7 @@ namespace OnlineStore.DeviceLibrary
InOutStoreLog(moveName + MoveInfo.SLog + ": 调用AgvClient.MayOut,线体开始反转");
}
AgvClient.MayOut(Config.AgvNodeName);
IOMove(IO_Type.Line_Run, IO_VALUE.LOW);
IOMove(IO_Type.Line_BackRun, IO_VALUE.HIGH);
LineBackRun();
}
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_04_LineBack))
{
......@@ -922,8 +927,7 @@ namespace OnlineStore.DeviceLibrary
EmprtShelfList = new ConcurrentQueue<string>();
InOutStoreLog(moveName + MoveInfo.SLog + ":停止转动,料架入料结束");
IOMove(IO_Type.Line_Run, IO_VALUE.LOW);
IOMove(IO_Type.Line_BackRun, IO_VALUE.LOW);
LineStop();
}
}
......
......@@ -39,8 +39,8 @@
<Reference Include="Asa.IOModule.AIOBOX">
<HintPath>..\..\dll\Asa.IOModule.AIOBOX.dll</HintPath>
</Reference>
<Reference Include="ClassLibrary1">
<HintPath>..\..\..\RC1250-AssemblyLine\dll\RFID\ClassLibrary1.dll</HintPath>
<Reference Include="Asa.RFID">
<HintPath>..\..\dll\RFID\Asa.RFID.dll</HintPath>
</Reference>
<Reference Include="Client">
<HintPath>..\..\dll\Client.dll</HintPath>
......

using Asa;
using Asa.RFID;
using OnlineStore.Common;
using System;
using System.Collections.Generic;
......@@ -7,53 +7,33 @@ using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace OnlineStore.DeviceLibrary
{
public class RFIDManager
{
public static RFID RfidReader = new RFID();
// private static int DefaultTrayNum = ConfigAppSettings.GetIntValue(Setting_Init.DefaultTrayNum);
///// <summary>
///// 获取托盘编码
///// </summary>
//public static int GetTrayNum(int subType, bool isClear = false)
//{
// if (DefaultTrayNum > 0)
// {
// return DefaultTrayNum;
// }
// // return 9;
// if (subType.Equals(104))
// {
// return LineManager.Line.Sw23TrayNum;
// }
// else if (subType.Equals(101))
// {
// return LineManager.Line.Sw41TrayNum;
// }
// string ip = GetRFIP(subType);
// //获取盘号
// RFIDData data = ReadRFID(ip, isClear);
// if (data != null)
// {
// if (data.RFType.Equals((byte)'E'))
// {
// return data.Num;
// }
// return 0;
// }
// return 0;
//}
{
public static ReaderAll RfidReader = new Asa.RFID.ReaderAll();
public static void Open(string[] iparray)
{
string path = Application.StartupPath + @"\logs\rfid\";
RFIDManager.RfidReader.LogPath = path;
// string[] rfidArray = rfidList.ToArray();
//连接rfip
RFIDManager.RfidReader.Open(iparray);
RfidReader.GetValue += RfidReader_GetValue;
}
public static RFIDData ReadData(string ip, bool isClear = false)
private static void RfidReader_GetValue(string s)
{
LogUtil.info("RfidReader_GetValue:" + s);
}
public static RFIDData ReadRFID(string ip, bool isClear = false)
{
try
{
// if (String.IsNullOrEmpty(ip).Equals(false) && LineManager.Line.rfidList.Contains(ip))
if (String.IsNullOrEmpty(ip).Equals(false) )
{
RFIDData data = new RFIDData(RfidReader.Read(ip));
if (isClear)
......@@ -70,20 +50,19 @@ namespace OnlineStore.DeviceLibrary
return new RFIDData(-1, -1);
}
//public static string GetRFIP(int subType, int rtType = 0)
//{
// string ip = "";
// string rtName = DeviceConfig.RFIP_Str + "_" + subType.ToString().PadLeft(3, '0');
// if (rtType > 0)
// {
// rtName += "-" + rtType.ToString();
// }
// if (DeviceConfig.ProRFIpMap.ContainsKey(rtName))
// {
// ip = DeviceConfig.ProRFIpMap[rtName];
// }
// return ip;
//}
public static void Close()
{
try
{
RfidReader.Close();
}
catch (Exception ex)
{
LogUtil.error("关闭RFID出错:" + ex.ToString());
}
}
}
public class RFIDData
{
......
......@@ -182,13 +182,17 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
BI_05_DoorClose = 1005,
/// <summary>
/// 线体再正转1秒
/// </summary>
BI_06_LineRun=1006,
/// <summary>
/// 料架入库:定位装置上升
/// </summary>
BI_06_LocationUp = 1006,
BI_07_LocationUp = 1007,
/// <summary>
/// 料架入库:顶升装置上升
/// </summary>
BI_07_TopCylinderUp = 1007,
BI_08_TopCylinderUp = 1008,
#endregion
......
......@@ -17,9 +17,9 @@ namespace OnlineStore.LoadCSVLibrary
/// 所有的位置集合,key=位置
/// </summary>
public static Dictionary<string, Dictionary<string, T>> AllPositionMap = new Dictionary<string, Dictionary<string, T>>();
private static List<string> hasReadFileList = new List<string>();
/// <summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!