Commit 5e69d37f LN

连不上环形线问题修改

1 个父辈 b63bd98f
......@@ -28,7 +28,7 @@ namespace OnlineStore.DeviceLibrary
{
isInit = true;
agvClient = new AsaPL.AgvClient(ServerIp);
agvClient.CancelState = false;
agvClient.CancelState = true ;
agvClient.ReadyEnter += AgvClient_ReadyEnter;
agvClient.ReadyLeave += AgvClient_ReadyLeave;
......
......@@ -58,7 +58,8 @@ namespace OnlineStore.DeviceLibrary
public EquipBean(EquipConfig config)
{
Init();
InitTimer();
this.DeviceID = config.DeviceID;
this.baseConfig = config;
......
......@@ -24,12 +24,12 @@ namespace OnlineStore.DeviceLibrary
private int ClientKeepSecond = 10;
private TcpClient client = null;
private int StoreId = 0;
private int StoreId = 7;
private string CID = "";
public LineConnect (int sId,string cid)
{
this.StoreId = sId;
//this.StoreId = sId;
this.CID = cid;
}
......@@ -68,7 +68,7 @@ namespace OnlineStore.DeviceLibrary
Interlocked.Increment(ref seq);
return seq;
}
public static string HeartMsg = "";
public void SendHeart(StoreSendBean store)
{
if (client == null)
......@@ -79,7 +79,7 @@ namespace OnlineStore.DeviceLibrary
{
store.Cmd = cmd_heart;
string heartMsg = ToParamStr(store);
HeartMsg = DateTime.Now.ToLongTimeString() + " " + heartMsg;
client.send(heartMsg);
}
catch (Exception ex)
......@@ -230,7 +230,7 @@ namespace OnlineStore.DeviceLibrary
{
public StoreSendBean(int ss, int runs, int doorHasTray, int alarmType)
{
this.StoreId = 0;
this.StoreId = 7;
this.Cid = "";
this.SStatus = ss;
this.SRunStatus = runs;
......@@ -245,7 +245,7 @@ namespace OnlineStore.DeviceLibrary
}
public string Cmd = LineConnect.cmd_heart;
public int StoreId = 0;
public int StoreId = 7;
public string Cid = "";
public int Seq = 0;
public int SStatus = 0;
......
......@@ -31,7 +31,7 @@
<add key="UseHCBoard" value="1" />
<!--流水线地址和端口配置-->
<add key="LineServerIp" value="10.85.162.124" />
<add key="LineServerIp" value="192.168.100.14" />
<add key="LineServerPort" value="5246" />
<!--是否调试状态-->
<add key="IsInDebug" value="1" />
......
......@@ -28,6 +28,7 @@
this.panel2 = new System.Windows.Forms.Panel();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.lblHeartMsg = new System.Windows.Forms.Label();
this.logBox = new System.Windows.Forms.RichTextBox();
this.lblMoveStr = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
......@@ -164,6 +165,7 @@
//
// tabPage2
//
this.tabPage2.Controls.Add(this.lblHeartMsg);
this.tabPage2.Controls.Add(this.logBox);
this.tabPage2.Controls.Add(this.lblMoveStr);
this.tabPage2.Controls.Add(this.groupBox2);
......@@ -177,6 +179,19 @@
this.tabPage2.Text = " 设备状态 ";
this.tabPage2.UseVisualStyleBackColor = true;
//
// lblHeartMsg
//
this.lblHeartMsg.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lblHeartMsg.AutoSize = true;
this.lblHeartMsg.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblHeartMsg.ForeColor = System.Drawing.Color.Black;
this.lblHeartMsg.Location = new System.Drawing.Point(3, 572);
this.lblHeartMsg.Name = "lblHeartMsg";
this.lblHeartMsg.Size = new System.Drawing.Size(56, 17);
this.lblHeartMsg.TabIndex = 279;
this.lblHeartMsg.Text = "等待启动";
this.lblHeartMsg.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// logBox
//
this.logBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
......@@ -185,7 +200,7 @@
this.logBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.logBox.Location = new System.Drawing.Point(4, 127);
this.logBox.Name = "logBox";
this.logBox.Size = new System.Drawing.Size(970, 458);
this.logBox.Size = new System.Drawing.Size(970, 438);
this.logBox.TabIndex = 278;
this.logBox.Text = "";
this.logBox.VisibleChanged += new System.EventHandler(this.logBox_VisibleChanged);
......@@ -195,7 +210,7 @@
this.lblMoveStr.AutoSize = true;
this.lblMoveStr.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblMoveStr.ForeColor = System.Drawing.Color.Black;
this.lblMoveStr.Location = new System.Drawing.Point(787, 9);
this.lblMoveStr.Location = new System.Drawing.Point(690, 9);
this.lblMoveStr.Name = "lblMoveStr";
this.lblMoveStr.Size = new System.Drawing.Size(56, 17);
this.lblMoveStr.TabIndex = 277;
......@@ -264,7 +279,7 @@
//
this.chbDebug.AutoSize = true;
this.chbDebug.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbDebug.Location = new System.Drawing.Point(682, 8);
this.chbDebug.Location = new System.Drawing.Point(584, 8);
this.chbDebug.Name = "chbDebug";
this.chbDebug.Size = new System.Drawing.Size(93, 25);
this.chbDebug.TabIndex = 271;
......@@ -430,6 +445,7 @@
this.btnInoutP4.Text = "进出轴NG口出料点P4:";
this.btnInoutP4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnInoutP4.UseVisualStyleBackColor = false;
this.btnInoutP4.Click += new System.EventHandler(this.btnInoutP4_Click);
//
// txtMiddleP3
//
......@@ -462,6 +478,7 @@
this.btnMiddleP3.Text = "旋转轴NG口出料点P3:";
this.btnMiddleP3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnMiddleP3.UseVisualStyleBackColor = false;
this.btnMiddleP3.Click += new System.EventHandler(this.btnMiddleP3_Click);
//
// lblSize
//
......@@ -1204,19 +1221,19 @@
// toolStripMenuItem2
//
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(180, 26);
this.toolStripMenuItem2.Size = new System.Drawing.Size(176, 26);
this.toolStripMenuItem2.Text = "启用调试";
this.toolStripMenuItem2.Click += new System.EventHandler(this.toolStripMenuItem2_Click);
//
// toolStripSeparator6
//
this.toolStripSeparator6.Name = "toolStripSeparator6";
this.toolStripSeparator6.Size = new System.Drawing.Size(177, 6);
this.toolStripSeparator6.Size = new System.Drawing.Size(173, 6);
//
// 板卡调试ToolStripMenuItem
//
this.板卡调试ToolStripMenuItem.Name = "板卡调试ToolStripMenuItem";
this.板卡调试ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.板卡调试ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
this.板卡调试ToolStripMenuItem.Text = "板卡调试";
this.板卡调试ToolStripMenuItem.Visible = false;
this.板卡调试ToolStripMenuItem.Click += new System.EventHandler(this.板卡调试ToolStripMenuItem_Click);
......@@ -1224,25 +1241,25 @@
// toolStripSeparator7
//
this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(177, 6);
this.toolStripSeparator7.Size = new System.Drawing.Size(173, 6);
this.toolStripSeparator7.Visible = false;
//
// 打开设备照明ToolStripMenuItem
//
this.打开设备照明ToolStripMenuItem.Name = "打开设备照明ToolStripMenuItem";
this.打开设备照明ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.打开设备照明ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
this.打开设备照明ToolStripMenuItem.Text = "打开设备照明";
this.打开设备照明ToolStripMenuItem.Click += new System.EventHandler(this.打开设备照明ToolStripMenuItem_Click);
//
// toolStripSeparator14
//
this.toolStripSeparator14.Name = "toolStripSeparator14";
this.toolStripSeparator14.Size = new System.Drawing.Size(177, 6);
this.toolStripSeparator14.Size = new System.Drawing.Size(173, 6);
//
// 关闭设备照明ToolStripMenuItem
//
this.关闭设备照明ToolStripMenuItem.Name = "关闭设备照明ToolStripMenuItem";
this.关闭设备照明ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.关闭设备照明ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
this.关闭设备照明ToolStripMenuItem.Text = "关闭设备照明";
this.关闭设备照明ToolStripMenuItem.Click += new System.EventHandler(this.关闭设备照明ToolStripMenuItem_Click);
//
......@@ -1478,6 +1495,7 @@
private System.Windows.Forms.ToolStripSeparator toolStripSeparator8;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
private System.Windows.Forms.Timer timer2;
private System.Windows.Forms.Label lblHeartMsg;
}
}
......@@ -43,6 +43,7 @@ namespace OnlineStore.ACSingleStore
private void FrmTest_Load(object sender, EventArgs e)
{
string version = GetVersion(true);
equip = EquipManager.InitStore();
if (equip == null)
{
......@@ -167,7 +168,7 @@ namespace OnlineStore.ACSingleStore
chbDebug.Checked = equip.IsDebug;
LoadOk = true;
}
lblHeartMsg.Text = LineConnect.HeartMsg;
lblThisSta.Text = equip.GetRunStr();
lblMoveStr.Text = equip.GetMoveStr();
//ReadPosistion();
......@@ -318,7 +319,9 @@ namespace OnlineStore.ACSingleStore
equip.Config.CompressAxis_P1 = GetV(equip.Config.CompressAxis_P1, txtComP1, ref needUpdate);
equip.Config.UpDownAxis_DoorH_P2 = GetV(equip.Config.UpDownAxis_DoorH_P2, txtUpDownP2 , ref needUpdate);
equip.Config.UpDownAxis_DoorH_P5 = GetV(equip.Config.UpDownAxis_DoorH_P5, txtUpDownP5, ref needUpdate);
equip.Config.UpDownAxis_DoorH_P6 = GetV(equip.Config.UpDownAxis_DoorH_P6, txtUpDownP6, ref needUpdate);
equip.Config.UpDownAxis_DoorH_P6 = GetV(equip.Config.UpDownAxis_DoorH_P6, txtUpDownP6, ref needUpdate);
equip.Config.MiddleAxis_P3 = GetV(equip.Config.MiddleAxis_P3, txtMiddleP3, ref needUpdate);
equip.Config.InOutAxis_P4 = GetV(equip.Config.InOutAxis_P4, txtInoutP4, ref needUpdate);
if (needUpdate)
{
......@@ -755,12 +758,9 @@ namespace OnlineStore.ACSingleStore
}
private void btnInoutP4_Click(object sender, EventArgs e)
{
if (InoutInP1())
{
int value = FormUtil.GetIntValue(txtInoutP4);
AxisABSMove(equip.Config.InOut_Axis, value, equip.Config.InOutAxis_P4_Speed);
}
{
int value = FormUtil.GetIntValue(txtInoutP4);
AxisABSMove(equip.Config.InOut_Axis, value, equip.Config.InOutAxis_P4_Speed);
}
private void btnNGMove_Click(object sender, EventArgs e)
{
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!