Commit f3aee12c LN

界面调整

1 个父辈 b5264ed2
正在显示 64 个修改的文件 包含 1139 行增加578 行删除
...@@ -100,16 +100,18 @@ ...@@ -100,16 +100,18 @@
<Compile Include="FrmIOMsg.Designer.cs"> <Compile Include="FrmIOMsg.Designer.cs">
<DependentUpon>FrmIOMsg.cs</DependentUpon> <DependentUpon>FrmIOMsg.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="FrmIOStatus.cs" />
<Compile Include="FrmIOStatus.Designer.cs">
<DependentUpon>FrmIOStatus.cs</DependentUpon>
</Compile>
<Compile Include="FrmHYEquip.cs"> <Compile Include="FrmHYEquip.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="FrmHYEquip.Designer.cs"> <Compile Include="FrmHYEquip.Designer.cs">
<DependentUpon>FrmHYEquip.cs</DependentUpon> <DependentUpon>FrmHYEquip.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="FrmLineIO.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmLineIO.Designer.cs">
<DependentUpon>FrmLineIO.cs</DependentUpon>
</Compile>
<Compile Include="FrmRFIPEdit.cs"> <Compile Include="FrmRFIPEdit.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
...@@ -185,12 +187,12 @@ ...@@ -185,12 +187,12 @@
<EmbeddedResource Include="FrmIOMsg.resx"> <EmbeddedResource Include="FrmIOMsg.resx">
<DependentUpon>FrmIOMsg.cs</DependentUpon> <DependentUpon>FrmIOMsg.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="FrmIOStatus.resx">
<DependentUpon>FrmIOStatus.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmHYEquip.resx"> <EmbeddedResource Include="FrmHYEquip.resx">
<DependentUpon>FrmHYEquip.cs</DependentUpon> <DependentUpon>FrmHYEquip.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="FrmLineIO.resx">
<DependentUpon>FrmLineIO.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmRFIPEdit.resx"> <EmbeddedResource Include="FrmRFIPEdit.resx">
<DependentUpon>FrmRFIPEdit.cs</DependentUpon> <DependentUpon>FrmRFIPEdit.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
......
...@@ -113,6 +113,7 @@ namespace OnlineStore.AssemblyLine ...@@ -113,6 +113,7 @@ namespace OnlineStore.AssemblyLine
LogUtil.info(equipBase.Name + "点击:停止运行"); LogUtil.info(equipBase.Name + "点击:停止运行");
equipBase.StopRun(); equipBase.StopRun();
FormStatus(false); FormStatus(false);
} }
} }
...@@ -134,7 +135,7 @@ namespace OnlineStore.AssemblyLine ...@@ -134,7 +135,7 @@ namespace OnlineStore.AssemblyLine
} }
} }
internal virtual void FormStatus(bool status) internal virtual void FormStatus(bool status)
{ {
} }
} }
} }
...@@ -116,9 +116,9 @@ namespace OnlineStore.AssemblyLine ...@@ -116,9 +116,9 @@ namespace OnlineStore.AssemblyLine
ReadIOList(); ReadIOList();
//lblTrayNum.Text = "托盘编码:" + TrayManager.GetTrayNum(equipBean.DeviceID); //lblTrayNum.Text = "托盘编码:" + TrayManager.GetTrayNum(equipBean.DeviceID);
} }
lblName.BackColor = equipBean.GetShowColor();
if (equipBean.runStatus > LineRunStatus.Wait) if (equipBean.runStatus > LineRunStatus.Wait)
{ {
lblName.BackColor = Color.Green;
if (btnStart.Enabled) if (btnStart.Enabled)
{ {
FormStatus(true); FormStatus(true);
...@@ -126,7 +126,7 @@ namespace OnlineStore.AssemblyLine ...@@ -126,7 +126,7 @@ namespace OnlineStore.AssemblyLine
} }
else else
{ {
lblName.BackColor= System.Drawing.Color.DodgerBlue; //lblName.BackColor= System.Drawing.Color.DodgerBlue;
if (!btnStart.Enabled) if (!btnStart.Enabled)
{ {
FormStatus(false ); FormStatus(false );
...@@ -260,30 +260,15 @@ namespace OnlineStore.AssemblyLine ...@@ -260,30 +260,15 @@ namespace OnlineStore.AssemblyLine
lblThisSta.Text = equipBean.WarnMsg; lblThisSta.Text = equipBean.WarnMsg;
txtP1.Text = equipBean.Config.UpDownAxisP1.ToString(); txtP1.Text = equipBean.Config.UpDownAxisP1.ToString();
txtUpdownP3.Text = equipBean.Config.UpDownAxisP3.ToString(); txtUpdownP3.Text = equipBean.Config.UpDownAxisP3.ToString();
if (equipBean.Config.SidesWayNum > 0) if (equipBean.Config.DOList.ContainsKey(IO_Type.SL_RollerLine_Run) )
{ {
btnSwLocationCylinder.Visible = true; btnRollerRun.Visible = true;
btnSWTop.Visible = true;
btnFL_TopCylinder.Visible = false;
btnFLStop1.Visible = false;
btnFLStop2Down.Visible = false;
} }
else else
{ {
btnSwLocationCylinder.Visible = false; btnRollerRun.Visible = false;
btnSWTop.Visible = false;
btnFL_TopCylinder.Visible = true;
btnFLStop1.Visible = true;
btnFLStop2Down.Visible = true;
}
if (equipBean.Config.SidesWayNum.Equals(2))
{
btnSwStop.Visible = true;
}
else
{
btnSwStop.Visible = false;
} }
LoadDP2(); LoadDP2();
txtBp1.Text = equipBean.Config.BatchAxisP1.ToString(); txtBp1.Text = equipBean.Config.BatchAxisP1.ToString();
txtBP2.Text = equipBean.Config.BatchAxisP2.ToString(); txtBP2.Text = equipBean.Config.BatchAxisP2.ToString();
...@@ -314,12 +299,7 @@ namespace OnlineStore.AssemblyLine ...@@ -314,12 +299,7 @@ namespace OnlineStore.AssemblyLine
{ {
ReadIOList(); ReadIOList();
} }
internal override void FormStatus(bool isStart)
{
btnStart.Enabled = !isStart;
btnStop.Enabled = true;
btnReset.Enabled = isStart;
}
private void FrmIOStatus_Shown(object sender, EventArgs e) private void FrmIOStatus_Shown(object sender, EventArgs e)
{ {
timer1.Start(); timer1.Start();
...@@ -327,21 +307,38 @@ namespace OnlineStore.AssemblyLine ...@@ -327,21 +307,38 @@ namespace OnlineStore.AssemblyLine
private void btnStart_Click(object sender, EventArgs e) private void btnStart_Click(object sender, EventArgs e)
{ {
LogUtil.info(equipBean.Name + "点击:启用调试"); if (equipBase.runStatus.Equals(LineRunStatus.Wait))
StartDebug(); {
LogUtil.info(equipBean.Name + "点击:启用调试");
StartDebug();
}
else
{
LogUtil.info(equipBean.Name + "点击:复位");
Reset();
}
} }
private void btnStop_Click(object sender, EventArgs e) internal override void FormStatus(bool isStart)
{ {
LogUtil.info(equipBean.Name + "点击:停止"); //btnStart.Enabled = !isStart;
StopRun(); btnStop.Enabled = true;
if (isStart)
{
btnStart.Text = "复位";
}
else
{
btnStart.Text = "启动调试";
}
//btnReset.Enabled = isStart;
} }
private void btnReset_Click(object sender, EventArgs e) private void btnStop_Click(object sender, EventArgs e)
{ {
LogUtil.info(equipBean.Name + "点击:复位"); LogUtil.info(equipBean.Name + "点击:停止");
Reset(); StopRun();
} }
private void chbDebug_CheckedChanged(object sender, EventArgs e) private void chbDebug_CheckedChanged(object sender, EventArgs e)
{ {
if (!IsLoad) if (!IsLoad)
...@@ -392,15 +389,7 @@ namespace OnlineStore.AssemblyLine ...@@ -392,15 +389,7 @@ namespace OnlineStore.AssemblyLine
BtnMove(btnOutTopCylinder, "SL出口顶升上升", "SL出口顶升下降", IO_Type.SL_OutTopCylinder_Down, IO_Type.SL_OutTopCylinder_Up); BtnMove(btnOutTopCylinder, "SL出口顶升上升", "SL出口顶升下降", IO_Type.SL_OutTopCylinder_Down, IO_Type.SL_OutTopCylinder_Up);
} }
private void btnFeedSideWay_Click(object sender, EventArgs e)
{
BtnMove(btnFeedSideWay, "上料横移机构上升", "上料横移机构下降", IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
}
private void btnFeedCylinder_Click(object sender, EventArgs e)
{
BtnMove(btnFeedCylinder, "夹料气缸放松", "夹料气缸夹紧", IO_Type.SL_MoveCylinder_Tighten, IO_Type.SL_MoveCylinder_Slack);
}
private void btnFeedSideWayCylinder_Click(object sender, EventArgs e) private void btnFeedSideWayCylinder_Click(object sender, EventArgs e)
{ {
if (equipBean.MoveCylineIsUp()) if (equipBean.MoveCylineIsUp())
...@@ -428,20 +417,7 @@ namespace OnlineStore.AssemblyLine ...@@ -428,20 +417,7 @@ namespace OnlineStore.AssemblyLine
} }
BtnMove(btnTrayLocationCylinder, "SL升降盘定位气缸前进", "SL升降盘定位气缸后退", IO_Type.SL_TrayLocation_After, IO_Type.SL_TrayLocation_Before); BtnMove(btnTrayLocationCylinder, "SL升降盘定位气缸前进", "SL升降盘定位气缸后退", IO_Type.SL_TrayLocation_After, IO_Type.SL_TrayLocation_Before);
} }
private void btnToroid_TopCylinder_Click(object sender, EventArgs e)
{
BtnMove(btnSWTop, "环形线横移顶升上升", "环形线横移顶升下降", IO_Type.SW_TopCylinder_Down, IO_Type.SW_TopCylinder_Up);
}
private void btnFL_TopCylinder_Click(object sender, EventArgs e)
{
BtnMove(btnFL_TopCylinder, "FL顶升上升", "FL顶升下降", IO_Type.FL_TopCylinder_Down, IO_Type.FL_TopCylinder_Up);
}
private void Toroid_LocationCylinder_Click(object sender, EventArgs e)
{
BtnMove(btnSwLocationCylinder, "环形线横移定位上升", "环形线横移定位下降", IO_Type.SW_LocationCylinder_Down, IO_Type.SW_LocationCylinder_Up);
}
private void cmbSizeList_SelectedIndexChanged(object sender, EventArgs e) private void cmbSizeList_SelectedIndexChanged(object sender, EventArgs e)
{ {
if (cmbSizeList.SelectedIndex < 0) if (cmbSizeList.SelectedIndex < 0)
...@@ -616,15 +592,7 @@ namespace OnlineStore.AssemblyLine ...@@ -616,15 +592,7 @@ namespace OnlineStore.AssemblyLine
BtnMove(btnOLine, "SL出料线体运转", "SL出料线体停止", IO_Type.SL_OutLine_Run); BtnMove(btnOLine, "SL出料线体运转", "SL出料线体停止", IO_Type.SL_OutLine_Run);
} }
private void btnFLStop1_Click(object sender, EventArgs e)
{
BtnMove(btnFLStop1, "FL阻挡1下降", "FL阻挡1上升", IO_Type.FL_StopCylinder_Down1);
}
private void btnFLStop2Down_Click(object sender, EventArgs e)
{
BtnMove(btnFLStop2Down, "FL阻挡2下降", "FL阻挡2上升", IO_Type.FL_StopCylinder_Down2);
}
private void chbBoxSendShelf_CheckedChanged(object sender, EventArgs e) private void chbBoxSendShelf_CheckedChanged(object sender, EventArgs e)
{ {
...@@ -634,11 +602,7 @@ namespace OnlineStore.AssemblyLine ...@@ -634,11 +602,7 @@ namespace OnlineStore.AssemblyLine
IsInCheck = false; IsInCheck = false;
} }
private void btnSwStop_Click(object sender, EventArgs e)
{
BtnMove(btnSwStop, "环形线阻挡气缸下降", "环形线阻挡气缸上升", IO_Type.SW_StopDown);
}
private void btnOutStopDown_Click(object sender, EventArgs e) private void btnOutStopDown_Click(object sender, EventArgs e)
{ {
...@@ -755,6 +719,26 @@ namespace OnlineStore.AssemblyLine ...@@ -755,6 +719,26 @@ namespace OnlineStore.AssemblyLine
{ {
this.Close(); this.Close();
} }
private void btnGuding_Click(object sender, EventArgs e)
{
BtnMove(btnGuding , "SL固定气缸上升", "SL固定气缸下降", IO_Type.SL_FixedCylinder_Down, IO_Type.SL_FixedCylinder_Up);
}
private void btnTopUp_Click(object sender, EventArgs e)
{
BtnMove(btnTopUp, "SL顶升上升", "SL顶升下降", IO_Type.SL_TopCylinder_Down, IO_Type.SL_TopCylinder_Up);
}
private void btnRollerRun_Click(object sender, EventArgs e)
{
BtnMove(btnRollerRun, "SL过渡滚筒运转", "SL过渡滚筒停止", IO_Type.SL_RollerLine_Run);
}
private void btnFeedCylinder_Click(object sender, EventArgs e)
{
BtnMove(btnFeedCylinder, "夹料气缸放松", "夹料气缸夹紧", IO_Type.SL_MoveCylinder_Relax, IO_Type.SL_MoveCylinder_Work);
}
} }
} }
......
...@@ -30,8 +30,6 @@ ...@@ -30,8 +30,6 @@
{ {
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
this.timer1 = new System.Windows.Forms.Timer(this.components); this.timer1 = new System.Windows.Forms.Timer(this.components);
this.lblConInfo = new System.Windows.Forms.Label();
this.lblRFID = new System.Windows.Forms.Label();
this.lblBox = new System.Windows.Forms.Label(); this.lblBox = new System.Windows.Forms.Label();
this.lblMsg = new System.Windows.Forms.Label(); this.lblMsg = new System.Windows.Forms.Label();
this.btnUpdate = new System.Windows.Forms.Button(); this.btnUpdate = new System.Windows.Forms.Button();
...@@ -43,26 +41,6 @@ ...@@ -43,26 +41,6 @@
this.timer1.Interval = 10000; this.timer1.Interval = 10000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick); this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
// //
// lblConInfo
//
this.lblConInfo.AutoSize = true;
this.lblConInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblConInfo.Location = new System.Drawing.Point(35, 62);
this.lblConInfo.Name = "lblConInfo";
this.lblConInfo.Size = new System.Drawing.Size(70, 17);
this.lblConInfo.TabIndex = 0;
this.lblConInfo.Text = "IO连接信息";
//
// lblRFID
//
this.lblRFID.AutoSize = true;
this.lblRFID.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblRFID.Location = new System.Drawing.Point(282, 62);
this.lblRFID.Name = "lblRFID";
this.lblRFID.Size = new System.Drawing.Size(71, 17);
this.lblRFID.TabIndex = 1;
this.lblRFID.Text = "RFID信息:";
//
// lblBox // lblBox
// //
this.lblBox.AutoSize = true; this.lblBox.AutoSize = true;
...@@ -112,8 +90,6 @@ ...@@ -112,8 +90,6 @@
this.Controls.Add(this.btnUpdate); this.Controls.Add(this.btnUpdate);
this.Controls.Add(this.lblMsg); this.Controls.Add(this.lblMsg);
this.Controls.Add(this.lblBox); this.Controls.Add(this.lblBox);
this.Controls.Add(this.lblRFID);
this.Controls.Add(this.lblConInfo);
this.Name = "FrmIOMsg"; this.Name = "FrmIOMsg";
this.Text = "IO连接状态"; this.Text = "IO连接状态";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FrmIOMsg_FormClosed); this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FrmIOMsg_FormClosed);
...@@ -124,10 +100,7 @@ ...@@ -124,10 +100,7 @@
} }
#endregion #endregion
private System.Windows.Forms.Label lblConInfo;
private System.Windows.Forms.Timer timer1; private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.Label lblRFID;
private System.Windows.Forms.Label lblBox; private System.Windows.Forms.Label lblBox;
private System.Windows.Forms.Label lblMsg; private System.Windows.Forms.Label lblMsg;
private System.Windows.Forms.Button btnUpdate; private System.Windows.Forms.Button btnUpdate;
......
...@@ -31,7 +31,7 @@ namespace OnlineStore.AssemblyLine ...@@ -31,7 +31,7 @@ namespace OnlineStore.AssemblyLine
private void UpdateData() private void UpdateData()
{ {
lblMsg.Text = "自动刷新时间:" + timer1.Interval + "毫秒,最后更新时间:" + DateTime.Now.ToLongTimeString(); lblMsg.Text = "自动刷新时间:" + timer1.Interval + "毫秒,最后更新时间:" + DateTime.Now.ToLongTimeString();
lblConInfo.Text = "IO连接信息:\r\n"; //lblConInfo.Text = "IO连接信息:\r\n";
string msg = ""; string msg = "";
List<string> tList = new List<string>(LineManager.Line.cioList); List<string> tList = new List<string>(LineManager.Line.cioList);
foreach (string ip in tList) foreach (string ip in tList)
...@@ -40,7 +40,7 @@ namespace OnlineStore.AssemblyLine ...@@ -40,7 +40,7 @@ namespace OnlineStore.AssemblyLine
//msg += ("IO模块[" + ip + "]").PadLeft(26, ' ') + con + "\n"; //msg += ("IO模块[" + ip + "]").PadLeft(26, ' ') + con + "\n";
} }
lblConInfo.Text += msg; //lblConInfo.Text += msg;
//lblRFID.Text = "RFID信息:\r\n"; //lblRFID.Text = "RFID信息:\r\n";
//msg = ""; //msg = "";
......
...@@ -20,10 +20,9 @@ using OnlineStore.Common; ...@@ -20,10 +20,9 @@ using OnlineStore.Common;
namespace OnlineStore.AssemblyLine namespace OnlineStore.AssemblyLine
{ {
internal partial class FrmIOStatus : FrmBase internal partial class FrmLineIO : FrmBase
{ {
//internal static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); internal FrmLineIO()
internal FrmIOStatus()
{ {
Control.CheckForIllegalCrossThreadCalls = false; Control.CheckForIllegalCrossThreadCalls = false;
InitializeComponent(); InitializeComponent();
...@@ -274,176 +273,39 @@ namespace OnlineStore.AssemblyLine ...@@ -274,176 +273,39 @@ namespace OnlineStore.AssemblyLine
} }
private void btnDriveMotor_Run_Click(object sender, EventArgs e) private void btnDriveMotor_Run_Click(object sender, EventArgs e)
{ {
if (btnDriveMotor_Run.Text.Equals("驱动电机1234正转")) if (btnDriveMotor_Run.Text.Equals("驱动电机正转"))
{ {
btnDriveMotor_Run.Text = "驱动电机1234停止"; btnDriveMotor_Run.Text = "驱动电机停止";
btnDriveMotor_Run.BackColor = Color.Aqua; btnDriveMotor_Run.BackColor = Color.Aqua;
LineManager.Line.WriteDrivetMotorRun(IO_VALUE.HIGH); LineManager.Line.WriteDrivetMotorRun(IO_VALUE.HIGH);
} }
else else
{ {
LineManager.Line.WriteDrivetMotorRun(IO_VALUE.LOW); LineManager.Line.WriteDrivetMotorRun(IO_VALUE.LOW);
btnDriveMotor_Run.Text = "驱动电机1234正转"; btnDriveMotor_Run.Text = "驱动电机正转";
btnDriveMotor_Run.BackColor = Color.White; btnDriveMotor_Run.BackColor = Color.White;
} }
} }
private void btnSWRun_Click(object sender, EventArgs e) private void btnSWRun_Click(object sender, EventArgs e)
{ {
BtnMove(btnSW4Run, "环形线横移4电机运转", "环形线横移4电机停止", IO_Type.SW4_MotorRun); BtnMove(btnTopDown, "T3-C1顶升上升", "T3-C1顶升下降", IO_Type.HY_TopCylinder_Down,IO_Type.HY_TopCylinder_UP );
}
private void btnNGCylinder_Click(object sender, EventArgs e)
{
BtnMove(btnNGCylinder, "NG料盘气缸前进", "NG料盘气缸后退", IO_Type.NGCylinder_After, IO_Type.NGCylinder_Before);
} }
private void btnCloseAll_Click(object sender, EventArgs e) private void btnCloseAll_Click(object sender, EventArgs e)
{ {
IOManager.instance.CloseAllDO(); IOManager.instance.CloseAllDO();
} }
private void btnSw1Run_Click(object sender, EventArgs e)
{
BtnMove(btnSw1Run, "环形线横移1电机运转", "环形线横移1电机停止", IO_Type.SW1_MotorRun);
}
private void btnSw2Run_Click(object sender, EventArgs e)
{
BtnMove(btnSw2Run, "环形线横移2电机运转", "环形线横移2电机停止", IO_Type.SW2_MotorRun);
}
private void btnSw3Run_Click(object sender, EventArgs e)
{
BtnMove(btnSw3Run, "环形线横移3电机运转", "环形线横移3电机停止", IO_Type.SW3_MotorRun);
}
private void btnSw1Location_Click(object sender, EventArgs e)
{
BtnMove(btnSw1Location, "环形线横移1定位上升", "环形线横移1定位下降", IO_Type.SW1_LocationCylinder_Down, IO_Type.SW1_LocationCylinder_Up);
}
private void btnSw2Location_Click(object sender, EventArgs e)
{
BtnMove(btnSw2Location, "环形线横移2定位上升", "环形线横移2定位下降", IO_Type.SW2_LocationCylinder_Down, IO_Type.SW2_LocationCylinder_Up);
}
private void btnSw3Location_Click(object sender, EventArgs e)
{
BtnMove(btnSw3Location, "环形线横移3定位上升", "环形线横移3定位下降", IO_Type.SW3_LocationCylinder_Down, IO_Type.SW3_LocationCylinder_Up);
}
private void btnSw4Location_Click(object sender, EventArgs e) private void btnSw4Location_Click(object sender, EventArgs e)
{ {
BtnMove(btnSw4Location, "环形线横移4定位上升", "环形线横移4定位下降", IO_Type.SW4_LocationCylinder_Down, IO_Type.SW4_LocationCylinder_Up); BtnMove(btnFrontStopDown, "T3-C1前阻挡上升", "T3-C1前阻挡下降", IO_Type.HY_FrontStopDown);
}
private void btnSw1Top_Click(object sender, EventArgs e)
{
BtnMove(btnSw1Top, "环形线横移1顶升上升", "环形线横移1顶升下降", IO_Type.SW1_TopCylinder_Down, IO_Type.SW1_TopCylinder_Up);
}
private void btnSw2Top_Click(object sender, EventArgs e)
{
BtnMove(btnSw2Top, "环形线横移2顶升上升", "环形线横移2顶升下降", IO_Type.SW2_TopCylinder_Down, IO_Type.SW2_TopCylinder_Up);
}
private void btnSw3Top_Click(object sender, EventArgs e)
{
BtnMove(btnSw3Top, "环形线横移3顶升上升", "环形线横移3顶升下降", IO_Type.SW3_TopCylinder_Down, IO_Type.SW3_TopCylinder_Up);
} }
private void btn34Top_Click(object sender, EventArgs e) private void btn34Top_Click(object sender, EventArgs e)
{ {
BtnMove(btnSw4Top, "环形线横移4顶升上升", "环形线横移4顶升下降", IO_Type.SW4_TopCylinder_Down, IO_Type.SW4_TopCylinder_Up); BtnMove(btnStopDown, "T3-C1前阻挡上升", "T3-C1前阻挡下降", IO_Type.HY_StopDown);
} }
private void btnsw2StopDown_Click(object sender, EventArgs e)
{
BtnMove(btnsw2StopDown, "环形线横移2阻挡下降", "环形线横移2阻挡上升", IO_Type.SW2_StopDown);
}
private void button2_Click(object sender, EventArgs e)
{
BtnMove(button2, "环形线横移4阻挡下降", "环形线横移4阻挡上升", IO_Type.SW4_StopDown);
}
private void btnShuntStop1_Click(object sender, EventArgs e)
{
BtnMove(btnShuntStop1, "分流前端阻挡下降", "分流前端阻挡上升", IO_Type.Shunt_StopDown1_Front);
}
private void btnShuntStop2_Click(object sender, EventArgs e)
{
BtnMove(btnShuntStop2, "分流后端阻挡下降", "分流后端阻挡上升", IO_Type.Shunt_StopDown2_Back);
}
private void btnShuntupdown1_Click(object sender, EventArgs e)
{
BtnMove(btnShuntupdown1 , "分流横移机构1上升", "分流横移机构1下降", IO_Type.Shunt_TopCylinder_Down1, IO_Type.Shunt_TopCylinder_Up1);
}
private void btnShuntupdown2_Click(object sender, EventArgs e)
{
BtnMove(btnShuntupdown2, "分流横移机构2上升", "分流横移机构2下降", IO_Type.Shunt_TopCylinder_Down2, IO_Type.Shunt_TopCylinder_Up2);
}
private void btnShuntRun1_Click(object sender, EventArgs e)
{
BtnMove(btnShuntRun1, "分流横移机构1皮带运行", "分流横移机构1皮带停止", IO_Type.Shunt_MotorRun1);
}
private void btnShuntRun2_Click(object sender, EventArgs e)
{
BtnMove(btnShuntRun2, "分流横移机构2皮带运行", "分流横移机构2皮带停止", IO_Type.Shunt_MotorRun2);
}
private void btnShuntClose_Click(object sender, EventArgs e)
{
IOManager.IOMove(IO_Type.Shunt_StopDown1_Front, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.Shunt_StopDown2_Back, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.Shunt_TopCylinder_Down1, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.Shunt_TopCylinder_Up1, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.Shunt_TopCylinder_Down2, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.Shunt_TopCylinder_Up2, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.Shunt_MotorRun1, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.Shunt_MotorRun2, IO_VALUE.LOW);
}
private void btnShunt2Stop1_Click(object sender, EventArgs e)
{
BtnMove(btnShunt2Stop1, "分流2-前端阻挡下降", "分流2-前端阻挡上升", IO_Type.Shunt2_StopDown1_Front);
}
private void btnShunt2Stop2_Click(object sender, EventArgs e)
{
BtnMove(btnShunt2Stop2, "分流2-后端阻挡下降", "分流2-后端阻挡上升", IO_Type.Shunt2_StopDown2_Back);
}
private void btnShunt2updown1_Click(object sender, EventArgs e)
{
BtnMove(btnShunt2updown1, "分流2-机构1上升", "分流2-机构1下降", IO_Type.Shunt2_TopCylinder_Down1, IO_Type.Shunt2_TopCylinder_Up1);
}
private void btnShunt2updown2_Click(object sender, EventArgs e)
{
BtnMove(btnShunt2updown2, "分流2-机构1上升", "分流2-机构1下降", IO_Type.Shunt2_TopCylinder_Down2, IO_Type.Shunt2_TopCylinder_Up2);
}
private void btnShunt2Run1_Click(object sender, EventArgs e)
{
BtnMove(btnShunt2Run1, "分流2-机构1皮带运行", "分流2-机构1皮带停止", IO_Type.Shunt2_MotorRun1);
}
private void btnShunt2Run2_Click(object sender, EventArgs e)
{
BtnMove(btnShunt2Run2, "分流2-机构2皮带运行", "分流2-机构2皮带停止", IO_Type.Shunt2_MotorRun2);
}
private void btnShunt2Close_Click(object sender, EventArgs e)
{
IOManager.IOMove(IO_Type.Shunt2_StopDown1_Front, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.Shunt2_StopDown2_Back, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.Shunt2_TopCylinder_Down1, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.Shunt2_TopCylinder_Up1, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.Shunt2_TopCylinder_Down2, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.Shunt2_TopCylinder_Up2, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.Shunt2_MotorRun1, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.Shunt2_MotorRun2, IO_VALUE.LOW);
}
} }
} }
...@@ -817,6 +817,9 @@ ...@@ -817,6 +817,9 @@
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
<metadata name="contextMenuStrip_control.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>510, 17</value>
</metadata>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
AAABAA8AMDAQAAEABABoBgAA9gAAACgoEAABAAQAyAQAAF4HAAAgIBAAAQAEAOgCAAAmDAAAGBgQAAEA AAABAA8AMDAQAAEABABoBgAA9gAAACgoEAABAAQAyAQAAF4HAAAgIBAAAQAEAOgCAAAmDAAAGBgQAAEA
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMoveEquip)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMoveEquip));
this.timer1 = new System.Windows.Forms.Timer(this.components); this.timer1 = new System.Windows.Forms.Timer(this.components);
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.btnCloseAll = new System.Windows.Forms.Button();
this.txtDOIndex = new System.Windows.Forms.TextBox(); this.txtDOIndex = new System.Windows.Forms.TextBox();
this.txtDoName = new System.Windows.Forms.TextBox(); this.txtDoName = new System.Windows.Forms.TextBox();
this.label17 = new System.Windows.Forms.Label(); this.label17 = new System.Windows.Forms.Label();
...@@ -34,7 +35,6 @@ ...@@ -34,7 +35,6 @@
this.groupBox3 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox5 = new System.Windows.Forms.GroupBox(); this.groupBox5 = new System.Windows.Forms.GroupBox();
this.btnCloseAll = new System.Windows.Forms.Button();
this.btnStop2Up = new System.Windows.Forms.Button(); this.btnStop2Up = new System.Windows.Forms.Button();
this.btnStop1Up = new System.Windows.Forms.Button(); this.btnStop1Up = new System.Windows.Forms.Button();
this.btnClampSlack = new System.Windows.Forms.Button(); this.btnClampSlack = new System.Windows.Forms.Button();
...@@ -46,7 +46,6 @@ ...@@ -46,7 +46,6 @@
this.lblStoreStatus = new System.Windows.Forms.Label(); this.lblStoreStatus = new System.Windows.Forms.Label();
this.btnStart = new System.Windows.Forms.Button(); this.btnStart = new System.Windows.Forms.Button();
this.btnStop = new System.Windows.Forms.Button(); this.btnStop = new System.Windows.Forms.Button();
this.btnReset = new System.Windows.Forms.Button();
this.btnInStore = new System.Windows.Forms.Button(); this.btnInStore = new System.Windows.Forms.Button();
this.btnOutStore = new System.Windows.Forms.Button(); this.btnOutStore = new System.Windows.Forms.Button();
this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabControl1 = new System.Windows.Forms.TabControl();
...@@ -118,6 +117,19 @@ ...@@ -118,6 +117,19 @@
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "DO写入"; this.groupBox1.Text = "DO写入";
// //
// btnCloseAll
//
this.btnCloseAll.BackColor = System.Drawing.Color.White;
this.btnCloseAll.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCloseAll.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseAll.Location = new System.Drawing.Point(17, 94);
this.btnCloseAll.Name = "btnCloseAll";
this.btnCloseAll.Size = new System.Drawing.Size(110, 34);
this.btnCloseAll.TabIndex = 259;
this.btnCloseAll.Text = "关闭所有DO";
this.btnCloseAll.UseVisualStyleBackColor = false;
this.btnCloseAll.Click += new System.EventHandler(this.btnCloseAll_Click);
//
// txtDOIndex // txtDOIndex
// //
this.txtDOIndex.Enabled = false; this.txtDOIndex.Enabled = false;
...@@ -312,19 +324,6 @@ ...@@ -312,19 +324,6 @@
this.groupBox5.TabStop = false; this.groupBox5.TabStop = false;
this.groupBox5.Text = "IO操作测试"; this.groupBox5.Text = "IO操作测试";
// //
// btnCloseAll
//
this.btnCloseAll.BackColor = System.Drawing.Color.White;
this.btnCloseAll.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCloseAll.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseAll.Location = new System.Drawing.Point(17, 94);
this.btnCloseAll.Name = "btnCloseAll";
this.btnCloseAll.Size = new System.Drawing.Size(110, 34);
this.btnCloseAll.TabIndex = 259;
this.btnCloseAll.Text = "关闭所有DO";
this.btnCloseAll.UseVisualStyleBackColor = false;
this.btnCloseAll.Click += new System.EventHandler(this.btnCloseAll_Click);
//
// btnStop2Up // btnStop2Up
// //
this.btnStop2Up.BackColor = System.Drawing.Color.White; this.btnStop2Up.BackColor = System.Drawing.Color.White;
...@@ -407,7 +406,7 @@ ...@@ -407,7 +406,7 @@
// //
this.chbDebug.AutoSize = true; this.chbDebug.AutoSize = true;
this.chbDebug.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.chbDebug.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbDebug.Location = new System.Drawing.Point(795, 21); this.chbDebug.Location = new System.Drawing.Point(682, 21);
this.chbDebug.Name = "chbDebug"; this.chbDebug.Name = "chbDebug";
this.chbDebug.Size = new System.Drawing.Size(84, 24); this.chbDebug.Size = new System.Drawing.Size(84, 24);
this.chbDebug.TabIndex = 247; this.chbDebug.TabIndex = 247;
...@@ -435,7 +434,7 @@ ...@@ -435,7 +434,7 @@
this.lblStoreStatus.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblStoreStatus.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblStoreStatus.ForeColor = System.Drawing.Color.Green; this.lblStoreStatus.ForeColor = System.Drawing.Color.Green;
this.lblStoreStatus.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblStoreStatus.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblStoreStatus.Location = new System.Drawing.Point(917, 23); this.lblStoreStatus.Location = new System.Drawing.Point(804, 23);
this.lblStoreStatus.Name = "lblStoreStatus"; this.lblStoreStatus.Name = "lblStoreStatus";
this.lblStoreStatus.Size = new System.Drawing.Size(65, 20); this.lblStoreStatus.Size = new System.Drawing.Size(65, 20);
this.lblStoreStatus.TabIndex = 245; this.lblStoreStatus.TabIndex = 245;
...@@ -468,26 +467,12 @@ ...@@ -468,26 +467,12 @@
this.btnStop.UseVisualStyleBackColor = false; this.btnStop.UseVisualStyleBackColor = false;
this.btnStop.Click += new System.EventHandler(this.btnStop_Click); this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
// //
// btnReset
//
this.btnReset.BackColor = System.Drawing.Color.White;
this.btnReset.Enabled = false;
this.btnReset.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnReset.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReset.Location = new System.Drawing.Point(414, 12);
this.btnReset.Name = "btnReset";
this.btnReset.Size = new System.Drawing.Size(110, 40);
this.btnReset.TabIndex = 95;
this.btnReset.Text = "复位";
this.btnReset.UseVisualStyleBackColor = false;
this.btnReset.Click += new System.EventHandler(this.btnReset_Click);
//
// btnInStore // btnInStore
// //
this.btnInStore.BackColor = System.Drawing.Color.White; this.btnInStore.BackColor = System.Drawing.Color.White;
this.btnInStore.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnInStore.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnInStore.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnInStore.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnInStore.Location = new System.Drawing.Point(640, 12); this.btnInStore.Location = new System.Drawing.Point(527, 12);
this.btnInStore.Name = "btnInStore"; this.btnInStore.Name = "btnInStore";
this.btnInStore.Size = new System.Drawing.Size(110, 40); this.btnInStore.Size = new System.Drawing.Size(110, 40);
this.btnInStore.TabIndex = 102; this.btnInStore.TabIndex = 102;
...@@ -500,7 +485,7 @@ ...@@ -500,7 +485,7 @@
this.btnOutStore.BackColor = System.Drawing.Color.White; this.btnOutStore.BackColor = System.Drawing.Color.White;
this.btnOutStore.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnOutStore.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOutStore.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnOutStore.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOutStore.Location = new System.Drawing.Point(527, 12); this.btnOutStore.Location = new System.Drawing.Point(414, 12);
this.btnOutStore.Name = "btnOutStore"; this.btnOutStore.Name = "btnOutStore";
this.btnOutStore.Size = new System.Drawing.Size(110, 40); this.btnOutStore.Size = new System.Drawing.Size(110, 40);
this.btnOutStore.TabIndex = 101; this.btnOutStore.TabIndex = 101;
...@@ -594,7 +579,7 @@ ...@@ -594,7 +579,7 @@
this.tabPage2.Location = new System.Drawing.Point(4, 26); this.tabPage2.Location = new System.Drawing.Point(4, 26);
this.tabPage2.Name = "tabPage2"; this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3); this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(1315, 479); this.tabPage2.Size = new System.Drawing.Size(1165, 519);
this.tabPage2.TabIndex = 1; this.tabPage2.TabIndex = 1;
this.tabPage2.Text = " 伺服信息 "; this.tabPage2.Text = " 伺服信息 ";
this.tabPage2.UseVisualStyleBackColor = true; this.tabPage2.UseVisualStyleBackColor = true;
...@@ -873,7 +858,6 @@ ...@@ -873,7 +858,6 @@
this.panel1.Controls.Add(this.btnStart); this.panel1.Controls.Add(this.btnStart);
this.panel1.Controls.Add(this.btnInStore); this.panel1.Controls.Add(this.btnInStore);
this.panel1.Controls.Add(this.btnStop); this.panel1.Controls.Add(this.btnStop);
this.panel1.Controls.Add(this.btnReset);
this.panel1.Location = new System.Drawing.Point(2, 1); this.panel1.Location = new System.Drawing.Point(2, 1);
this.panel1.Name = "panel1"; this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1169, 54); this.panel1.Size = new System.Drawing.Size(1169, 54);
...@@ -958,7 +942,6 @@ ...@@ -958,7 +942,6 @@
private System.Windows.Forms.Label lblStoreStatus; private System.Windows.Forms.Label lblStoreStatus;
private System.Windows.Forms.Button btnStart; private System.Windows.Forms.Button btnStart;
private System.Windows.Forms.Button btnStop; private System.Windows.Forms.Button btnStop;
private System.Windows.Forms.Button btnReset;
private System.Windows.Forms.Button btnInStore; private System.Windows.Forms.Button btnInStore;
private System.Windows.Forms.Button btnOutStore; private System.Windows.Forms.Button btnOutStore;
private System.Windows.Forms.CheckBox chbDebug; private System.Windows.Forms.CheckBox chbDebug;
......
...@@ -120,9 +120,10 @@ namespace OnlineStore.AssemblyLine ...@@ -120,9 +120,10 @@ namespace OnlineStore.AssemblyLine
ReadIOList(); ReadIOList();
//lblTrayNum.Text = "托盘编码:" + TrayManager.GetTrayNum(equipBean.DeviceID); //lblTrayNum.Text = "托盘编码:" + TrayManager.GetTrayNum(equipBean.DeviceID);
} }
lblName.BackColor = equipBean.GetShowColor();
if (equipBean.runStatus > LineRunStatus.Wait) if (equipBean.runStatus > LineRunStatus.Wait)
{ {
lblName.BackColor = Color.Green; //lblName.BackColor = Color.Green;
if (btnStart.Enabled) if (btnStart.Enabled)
{ {
FormStatus(true); FormStatus(true);
...@@ -130,7 +131,7 @@ namespace OnlineStore.AssemblyLine ...@@ -130,7 +131,7 @@ namespace OnlineStore.AssemblyLine
} }
else else
{ {
lblName.BackColor = System.Drawing.Color.DodgerBlue; //lblName.BackColor = System.Drawing.Color.DodgerBlue;
if (!btnStart.Enabled) if (!btnStart.Enabled)
{ {
FormStatus(false); FormStatus(false);
...@@ -274,15 +275,7 @@ namespace OnlineStore.AssemblyLine ...@@ -274,15 +275,7 @@ namespace OnlineStore.AssemblyLine
{ {
ReadIOList(); ReadIOList();
} }
internal override void FormStatus(bool isStart)
{
btnStart.Enabled = !isStart;
btnStop.Enabled = true;
btnReset.Enabled = isStart;
btnInStore.Enabled = isStart;
btnOutStore.Enabled = isStart;
}
private void FrmIOStatus_Shown(object sender, EventArgs e) private void FrmIOStatus_Shown(object sender, EventArgs e)
{ {
...@@ -291,8 +284,34 @@ namespace OnlineStore.AssemblyLine ...@@ -291,8 +284,34 @@ namespace OnlineStore.AssemblyLine
private void btnStart_Click(object sender, EventArgs e) private void btnStart_Click(object sender, EventArgs e)
{ {
LogUtil.info(equipBean.Name + "点击:启用调试"); if (equipBase.runStatus.Equals(LineRunStatus.Wait))
StartDebug(); {
LogUtil.info(equipBean.Name + "点击:启用调试");
StartDebug();
}
else
{
LogUtil.info(equipBean.Name + "点击:复位");
Reset();
}
}
internal override void FormStatus(bool isStart)
{
btnStart.Enabled = true;
btnStop.Enabled = true;
btnInStore.Enabled = isStart;
btnOutStore.Enabled = isStart;
btnStop.Enabled = true;
if (isStart)
{
btnStart.Text = "复位";
}
else
{
btnStart.Text = "启动调试";
}
//btnReset.Enabled = isStart;
} }
private void btnStop_Click(object sender, EventArgs e) private void btnStop_Click(object sender, EventArgs e)
{ {
......
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
this.lblDebug.AutoSize = true; this.lblDebug.AutoSize = true;
this.lblDebug.BackColor = System.Drawing.Color.Transparent; this.lblDebug.BackColor = System.Drawing.Color.Transparent;
this.lblDebug.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblDebug.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblDebug.Location = new System.Drawing.Point(183, 4); this.lblDebug.Location = new System.Drawing.Point(182, 4);
this.lblDebug.Name = "lblDebug"; this.lblDebug.Name = "lblDebug";
this.lblDebug.Size = new System.Drawing.Size(51, 20); this.lblDebug.Size = new System.Drawing.Size(51, 20);
this.lblDebug.TabIndex = 5; this.lblDebug.TabIndex = 5;
...@@ -117,9 +117,9 @@ ...@@ -117,9 +117,9 @@
this.lblBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblBox.ForeColor = System.Drawing.Color.Black; this.lblBox.ForeColor = System.Drawing.Color.Black;
this.lblBox.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.lblBox.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.lblBox.Location = new System.Drawing.Point(2, 75); this.lblBox.Location = new System.Drawing.Point(2, 73);
this.lblBox.Name = "lblBox"; this.lblBox.Name = "lblBox";
this.lblBox.Size = new System.Drawing.Size(247, 24); this.lblBox.Size = new System.Drawing.Size(246, 24);
this.lblBox.TabIndex = 6; this.lblBox.TabIndex = 6;
this.lblBox.Text = "BOX状态:"; this.lblBox.Text = "BOX状态:";
this.lblBox.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.lblBox.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
this.panName.Controls.Add(this.lblName); this.panName.Controls.Add(this.lblName);
this.panName.Location = new System.Drawing.Point(1, 1); this.panName.Location = new System.Drawing.Point(1, 1);
this.panName.Name = "panName"; this.panName.Name = "panName";
this.panName.Size = new System.Drawing.Size(248, 28); this.panName.Size = new System.Drawing.Size(247, 28);
this.panName.TabIndex = 7; this.panName.TabIndex = 7;
// //
// EquipControl // EquipControl
......
...@@ -126,39 +126,13 @@ namespace OnlineStore.AssemblyLine ...@@ -126,39 +126,13 @@ namespace OnlineStore.AssemblyLine
{ {
lblMoveInfo.Text = "暂无托盘横移"; lblMoveInfo.Text = "暂无托盘横移";
} }
SetItemColor(equip.runStatus, equip.alarmType); this.BackColor = equip.GetShowColor();
//SetItemColor(equip.runStatus, equip.alarmType);
} }
public EquipControl() public EquipControl()
{ {
InitializeComponent(); InitializeComponent();
} }
private void SetItemColor( LineRunStatus runStatus, LineAlarmType alarmType)
{
if (runStatus.Equals(LineRunStatus.Wait))
{
this.BackColor= Color.White ;
}
else if (alarmType.Equals(LineAlarmType.IoSingleTimeOut))
{
this.BackColor = Color.LightCoral;
}
else if (alarmType.Equals(LineAlarmType.None).Equals(false))
{
this.BackColor = Color.Red;
}
else if (runStatus.Equals(LineRunStatus.HomeMoving) || runStatus.Equals(LineRunStatus.Reset))
{
this.BackColor = Color.Orange;
}
else if (runStatus.Equals(LineRunStatus.Busy))
{
this.BackColor = Color.LimeGreen;
}
else if (runStatus.Equals(LineRunStatus.Runing))
{
this.BackColor = Color.LightBlue;
}
}
private void EquipControl_Load(object sender, EventArgs e) private void EquipControl_Load(object sender, EventArgs e)
{ {
//lblName.Text = ""; //lblName.Text = "";
......
...@@ -67,10 +67,9 @@ ...@@ -67,10 +67,9 @@
<Compile Include="agvClient\AgvClient.cs" /> <Compile Include="agvClient\AgvClient.cs" />
<Compile Include="assemblyLine\FeedingEquip_OutStore.cs" /> <Compile Include="assemblyLine\FeedingEquip_OutStore.cs" />
<Compile Include="assemblyLine\HY\HYEquipBase.cs" /> <Compile Include="assemblyLine\HY\HYEquipBase.cs" />
<Compile Include="assemblyLine\HY\HY_C1_SLStation.cs" />
<Compile Include="assemblyLine\HY\HY_OutLine.cs" /> <Compile Include="assemblyLine\HY\HY_OutLine.cs" />
<Compile Include="assemblyLine\HY\HY_C1Line.cs" /> <Compile Include="assemblyLine\HY\HY_C1Line.cs" />
<Compile Include="assemblyLine\LineBean_Shunt2.cs" />
<Compile Include="assemblyLine\LineBean_Shunt.cs" />
<Compile Include="assemblymanager\ALineManager.cs" /> <Compile Include="assemblymanager\ALineManager.cs" />
<Compile Include="assemblyLine\FeedingEquip_InStore.cs" /> <Compile Include="assemblyLine\FeedingEquip_InStore.cs" />
<Compile Include="assemblyLine\FeedingEquip.cs" /> <Compile Include="assemblyLine\FeedingEquip.cs" />
......
...@@ -62,7 +62,7 @@ PRO,0,上料模块T3-C1-托盘-RFID-IP,PRO_RFIP_300,192.168.210.119,, ...@@ -62,7 +62,7 @@ PRO,0,上料模块T3-C1-托盘-RFID-IP,PRO_RFIP_300,192.168.210.119,,
DI,0,急停,SuddenStop_BTN,0,HC,X00 DI,0,急停,SuddenStop_BTN,0,HC,X00
DI,0,复位,Reset_BTN,1,HC,X01 DI,0,复位,Reset_BTN,1,HC,X01
DI,0,气压检测1,Airpressure_Check,2,HC,X02 DI,0,气压检测1,Airpressure_Check,2,HC,X02
DI,217,C7-HY17阻挡托盘检测,C7-HY17阻挡托盘检测,3,HC,X03 DI,217,C7-HY17阻挡托盘检测,HY_StopTray_Check,3,HC,X03
DI,217,HY17横移托盘检测,HY_TrayCheck,4,HC,X04 DI,217,HY17横移托盘检测,HY_TrayCheck,4,HC,X04
DI,217,HY17横移顶升上升端,HY_TopCylinder_UP,5,HC,X05 DI,217,HY17横移顶升上升端,HY_TopCylinder_UP,5,HC,X05
DI,217,HY17横移顶升下降端,HY_TopCylinder_Down,6,HC,X06 DI,217,HY17横移顶升下降端,HY_TopCylinder_Down,6,HC,X06
...@@ -1058,8 +1058,8 @@ DO,205,C2-HY5阻挡下降,HY_StopDown,421,HC,Y421 ...@@ -1058,8 +1058,8 @@ DO,205,C2-HY5阻挡下降,HY_StopDown,421,HC,Y421
DO,207,HY7横移电机正转,HY_LineRun,422,HC,Y422 DO,207,HY7横移电机正转,HY_LineRun,422,HC,Y422
DO,207,HY7横移顶升上升,HY_TopCylinder_UP,423,HC,Y423 DO,207,HY7横移顶升上升,HY_TopCylinder_UP,423,HC,Y423
DO,207,HY7横移顶升下降,HY_TopCylinder_Down,424,HC,Y424 DO,207,HY7横移顶升下降,HY_TopCylinder_Down,424,HC,Y424
DO,207,C3-HY7阻挡下降,HY_StopCylinder_Up,425,HC,Y425 DO,207,C3-HY7阻挡下降,HY_StopDown,425,HC,Y425
DO,207,C8-HY7阻挡下降,HY_StopCylinder_Down,426,HC,Y426 DO,207,C8-HY7阻挡下降,HY_SideStopDown,426,HC,Y426
DO,210,HY10横移电机正转,HY_LineRun,427,HC,Y427 DO,210,HY10横移电机正转,HY_LineRun,427,HC,Y427
DO,210,HY10前阻挡下降,HY_FrontStopDown,428,HC,Y428 DO,210,HY10前阻挡下降,HY_FrontStopDown,428,HC,Y428
DO,210,HY10横移顶升上升,HY_TopCylinder_UP,429,HC,Y429 DO,210,HY10横移顶升上升,HY_TopCylinder_UP,429,HC,Y429
...@@ -1101,10 +1101,10 @@ DI,17,D9-2横移后退端,BeforeAfterCylinder_After,525,HC,X525 ...@@ -1101,10 +1101,10 @@ DI,17,D9-2横移后退端,BeforeAfterCylinder_After,525,HC,X525
DI,17,D9-2夹料气缸料盘检测,ClampCylinder_Check,526,HC,X526 DI,17,D9-2夹料气缸料盘检测,ClampCylinder_Check,526,HC,X526
DI,17,D9-2夹料放松端,ClampCylinder_Relax,527,HC,X527 DI,17,D9-2夹料放松端,ClampCylinder_Relax,527,HC,X527
DI,17,D9-2升降上升端,UpDownCylinder_Up,528,HC,X528 DI,17,D9-2升降上升端,UpDownCylinder_Up,528,HC,X528
DI,17,D9-2升降下降端,StopCheck1,529,HC,X529 DI,17,D9-2升降下降端,UpDownCylinder_Down,529,HC,X529
DI,20,D10-1阻挡1托盘检测,StopCheck2,530,HC,X530 DI,20,D10-1阻挡1托盘检测,StopCheck2,530,HC,X530
DI,20,D10-1阻挡2托盘检测,TopCylinder_UP,531,HC,X531 DI,20,D10-1阻挡2托盘检测,TopCylinder_UP,531,HC,X531
DI,20,D10-1顶升上升端,TopCylinder_Down,532,HC,X532 DI,20,D10-1顶升上升端,TopCylinder_Up,532,HC,X532
DI,20,D10-1顶升下降端,TopCylinder_Down,533,HC,X533 DI,20,D10-1顶升下降端,TopCylinder_Down,533,HC,X533
DI,20,D10-1横移前进端,BeforeAfterCylinder_Before,534,HC,X534 DI,20,D10-1横移前进端,BeforeAfterCylinder_Before,534,HC,X534
DI,20,D10-1横移后退端,BeforeAfterCylinder_After,535,HC,X535 DI,20,D10-1横移后退端,BeforeAfterCylinder_After,535,HC,X535
......
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位 类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,
PRO,0,是否使用伺服,UpDownUseAxis,0,, PRO,0,是否使用伺服,UpDownUseAxis,0,,
PRO,0,设备对应的出料流水线的编号,DLineEquipNum,1,, PRO,0,HY所在流水线,LineName,C1,,
PRO,0,设备对应的出料流水线的第几条流水线,DLineLineNum,1,, PRO,0,HY工位对应的取放料设备,WorkDevice,101,,
PRO,0,HY是否是托盘横移入口,IsSideWayIn,1,,
PRO,0,HY是否是托盘横移出口,IsSideWayOut,0,,
PRO,0,HY是否是托盘进入出料线入口,IsOutLineIn,0,,
PRO,0,HY是否是托盘离开出料线出口,IsOutLineOut,0,,
,,,,,, ,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0 AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,, PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,,
......
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位 类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,
PRO,0,是否使用伺服,UpDownUseAxis,0,, PRO,0,是否使用伺服,UpDownUseAxis,0,,
PRO,0,设备对应的出料流水线的编号,DLineEquipNum,1,, PRO,0,HY所在流水线,LineName,C1,,
PRO,0,设备对应的出料流水线的第几条流水线,DLineLineNum,1,, PRO,0,HY工位对应的取放料设备,WorkDevice,102,,
PRO,0,HY是否是托盘横移入口,IsSideWayIn,0,,
PRO,0,HY是否是托盘横移出口,IsSideWayOut,1,,
PRO,0,HY是否是托盘进入出料线入口,IsOutLineIn,0,,
PRO,0,HY是否是托盘离开出料线出口,IsOutLineOut,0,,
,,,,,, ,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0 AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,, PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,,
......
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位 类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,
PRO,0,是否使用伺服,UpDownUseAxis,0,, PRO,0,是否使用伺服,UpDownUseAxis,0,,
PRO,0,设备对应的出料流水线的编号,DLineEquipNum,1,, PRO,0,HY所在流水线,LineName,C1,,
PRO,0,设备对应的出料流水线的第几条流水线,DLineLineNum,1,, PRO,0,HY工位对应的取放料设备,WorkDevice,0,,
PRO,0,HY是否是托盘横移入口,IsSideWayIn,0,,
PRO,0,HY是否是托盘横移出口,IsSideWayOut,1,,
PRO,0,HY是否是托盘进入出料线入口,IsOutLineIn,0,,
PRO,0,HY是否是托盘离开出料线出口,IsOutLineOut,0,,
,,,,,, ,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0 AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,, PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,,
......
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位 类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,
PRO,0,是否使用伺服,UpDownUseAxis,0,, PRO,0,是否使用伺服,UpDownUseAxis,0,,
PRO,0,设备对应的出料流水线的编号,DLineEquipNum,1,, PRO,0,HY所在流水线,LineName,C1,,
PRO,0,设备对应的出料流水线的第几条流水线,DLineLineNum,1,, PRO,0,HY工位对应的取放料设备,WorkDevice,0,,
PRO,0,HY是否是托盘横移入口,IsSideWayIn,1,,
PRO,0,HY是否是托盘横移出口,IsSideWayOut,0,,
PRO,0,HY是否是托盘进入出料线入口,IsOutLineIn,1,,
PRO,0,HY是否是托盘离开出料线出口,IsOutLineOut,0,,
,,,,,, ,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0 AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,, PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,,
......
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位 类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,
PRO,0,是否使用伺服,UpDownUseAxis,0,, PRO,0,是否使用伺服,UpDownUseAxis,0,,
PRO,0,设备对应的出料流水线的编号,DLineEquipNum,1,, PRO,0,HY所在流水线,LineName,C8,,
PRO,0,设备对应的出料流水线的第几条流水线,DLineLineNum,1,, PRO,0,HY工位对应的取放料设备,WorkDevice,0,,
PRO,0,HY是否是托盘横移入口,IsSideWayIn,0,,
PRO,0,HY是否是托盘横移出口,IsSideWayOut,0,,
PRO,0,HY是否是托盘进入出料线入口,IsOutLineIn,0,,
PRO,0,HY是否是托盘离开出料线出口,IsOutLineOut,0,,
,,,,,, ,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0 AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,, PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,,
......
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位 类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,
PRO,0,是否使用伺服,UpDownUseAxis,0,, PRO,0,是否使用伺服,UpDownUseAxis,0,,
PRO,0,设备对应的出料流水线的编号,DLineEquipNum,1,, PRO,0,HY所在流水线,LineName,C1,,
PRO,0,设备对应的出料流水线的第几条流水线,DLineLineNum,1,, PRO,0,HY工位对应的取放料设备,WorkDevice,0,,
PRO,0,HY是否是托盘横移入口,IsSideWayIn,0,,
PRO,0,HY是否是托盘横移出口,IsSideWayOut,0,,
PRO,0,HY是否是托盘进入出料线入口,IsOutLineIn,1,,
PRO,0,HY是否是托盘离开出料线出口,IsOutLineOut,0,,
,,,,,, ,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0 AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,, PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,,
......
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位 类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,
PRO,0,是否使用伺服,UpDownUseAxis,0,, PRO,0,是否使用伺服,UpDownUseAxis,0,,
PRO,0,设备对应的出料流水线的编号,DLineEquipNum,1,, PRO,0,HY所在流水线,LineName,C8,,
PRO,0,设备对应的出料流水线的第几条流水线,DLineLineNum,1,, PRO,0,HY工位对应的取放料设备,WorkDevice,0,,
PRO,0,HY是否是托盘横移入口,IsSideWayIn,0,,
PRO,0,HY是否是托盘横移出口,IsSideWayOut,0,,
PRO,0,HY是否是托盘进入出料线入口,IsOutLineIn,0,,
PRO,0,HY是否是托盘离开出料线出口,IsOutLineOut,0,,
,,,,,, ,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0 AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,, PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,,
......
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位 类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,
PRO,0,是否使用伺服,UpDownUseAxis,0,, PRO,0,是否使用伺服,UpDownUseAxis,0,,
PRO,0,设备对应的出料流水线的编号,DLineEquipNum,1,, PRO,0,HY所在流水线,LineName,C1,,
PRO,0,设备对应的出料流水线的第几条流水线,DLineLineNum,1,, PRO,0,HY工位对应的取放料设备,WorkDevice,0,,
PRO,0,HY是否是托盘横移入口,IsSideWayIn,0,,
PRO,0,HY是否是托盘横移出口,IsSideWayOut,0,,
PRO,0,HY是否是托盘进入出料线入口,IsOutLineIn,0,,
PRO,0,HY是否是托盘离开出料线出口,IsOutLineOut,0,,
,,,,,, ,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0 AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,, PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,,
......
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位 类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,
PRO,0,是否使用伺服,UpDownUseAxis,0,, PRO,0,是否使用伺服,UpDownUseAxis,0,,
PRO,0,设备对应的出料流水线的编号,DLineEquipNum,1,, PRO,0,HY所在流水线,LineName,C1,,
PRO,0,设备对应的出料流水线的第几条流水线,DLineLineNum,1,, PRO,0,HY工位对应的取放料设备,WorkDevice,0,,
PRO,0,HY是否是托盘横移入口,IsSideWayIn,0,,
PRO,0,HY是否是托盘横移出口,IsSideWayOut,0,,
PRO,0,HY是否是托盘进入出料线入口,IsOutLineIn,0,,
PRO,0,HY是否是托盘离开出料线出口,IsOutLineOut,1,,
,,,,,, ,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0 AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,, PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,,
......
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位 类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,
PRO,0,是否使用伺服,UpDownUseAxis,1,, PRO,0,是否使用伺服,UpDownUseAxis,1,,
PRO,0,设备对应的出料流水线的编号,DLineEquipNum,1,, PRO,0,HY所在流水线,LineName,C8,,
PRO,0,设备对应的出料流水线的第几条流水线,DLineLineNum,1,, PRO,0,HY工位对应的取放料设备,WorkDevice,0,,
PRO,0,HY是否是托盘横移入口,IsSideWayIn,0,,
PRO,0,HY是否是托盘横移出口,IsSideWayOut,0,,
PRO,0,HY是否是托盘进入出料线入口,IsOutLineIn,0,,
PRO,0,HY是否是托盘离开出料线出口,IsOutLineOut,0,,
,,,,,, ,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0 AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,, PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,,
......
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位 类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,
PRO,0,是否使用伺服,UpDownUseAxis,0,, PRO,0,是否使用伺服,UpDownUseAxis,0,,
PRO,0,设备对应的出料流水线的编号,DLineEquipNum,1,, PRO,0,HY所在流水线,LineName,C1,,
PRO,0,设备对应的出料流水线的第几条流水线,DLineLineNum,1,, PRO,0,HY工位对应的取放料设备,WorkDevice,0,,
PRO,0,HY是否是托盘横移入口,IsSideWayIn,0,,
PRO,0,HY是否是托盘横移出口,IsSideWayOut,0,,
PRO,0,HY是否是托盘进入出料线入口,IsOutLineIn,0,,
PRO,0,HY是否是托盘离开出料线出口,IsOutLineOut,1,,
,,,,,, ,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0 AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,, PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,,
......
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位 类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,
PRO,0,是否使用伺服,UpDownUseAxis,1,, PRO,0,是否使用伺服,UpDownUseAxis,1,,
PRO,0,设备对应的出料流水线的编号,DLineEquipNum,1,, PRO,0,HY所在流水线,LineName,C9,,
PRO,0,设备对应的出料流水线的第几条流水线,DLineLineNum,1,, PRO,0,HY工位对应的取放料设备,WorkDevice,0,,
PRO,0,HY是否是托盘横移入口,IsSideWayIn,0,,
PRO,0,HY是否是托盘横移出口,IsSideWayOut,0,,
PRO,0,HY是否是托盘进入出料线入口,IsOutLineIn,0,,
PRO,0,HY是否是托盘离开出料线出口,IsOutLineOut,0,,
,,,,,, ,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0 AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,, PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,,
......
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位 类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,
PRO,0,是否使用伺服,UpDownUseAxis,0,, PRO,0,是否使用伺服,UpDownUseAxis,0,,
PRO,0,设备对应的出料流水线的编号,DLineEquipNum,1,, PRO,0,HY所在流水线,LineName,C1,,
PRO,0,设备对应的出料流水线的第几条流水线,DLineLineNum,1,, PRO,0,HY工位对应的取放料设备,WorkDevice,0,,
PRO,0,HY是否是托盘横移入口,IsSideWayIn,0,,
PRO,0,HY是否是托盘横移出口,IsSideWayOut,0,,
PRO,0,HY是否是托盘进入出料线入口,IsOutLineIn,1,,
PRO,0,HY是否是托盘离开出料线出口,IsOutLineOut,0,,
,,,,,, ,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0 AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,, PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,,
......
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位 类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,
PRO,0,是否使用伺服,UpDownUseAxis,0,, PRO,0,是否使用伺服,UpDownUseAxis,0,,
PRO,0,设备对应的出料流水线的编号,DLineEquipNum,1,, PRO,0,HY所在流水线,LineName,C9,,
PRO,0,设备对应的出料流水线的第几条流水线,DLineLineNum,1,, PRO,0,HY工位对应的取放料设备,WorkDevice,0,,
PRO,0,HY是否是托盘横移入口,IsSideWayIn,0,,
PRO,0,HY是否是托盘横移出口,IsSideWayOut,0,,
PRO,0,HY是否是托盘进入出料线入口,IsOutLineIn,0,,
PRO,0,HY是否是托盘离开出料线出口,IsOutLineOut,0,,
,,,,,, ,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0 AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,, PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,,
......
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位 类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,
PRO,0,是否使用伺服,UpDownUseAxis,0,, PRO,0,是否使用伺服,UpDownUseAxis,0,,
PRO,0,设备对应的出料流水线的编号,DLineEquipNum,1,, PRO,0,HY所在流水线,LineName,C1,,
PRO,0,设备对应的出料流水线的第几条流水线,DLineLineNum,1,, PRO,0,HY工位对应的取放料设备,WorkDevice,0,,
PRO,0,HY是否是托盘横移入口,IsSideWayIn,1,,
PRO,0,HY是否是托盘横移出口,IsSideWayOut,0,,
PRO,0,HY是否是托盘进入出料线入口,IsOutLineIn,0,,
PRO,0,HY是否是托盘离开出料线出口,IsOutLineOut,0,,
,,,,,, ,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0 AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,, PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,,
......
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位 类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,
PRO,0,是否使用伺服,UpDownUseAxis,0,, PRO,0,是否使用伺服,UpDownUseAxis,0,,
PRO,0,设备对应的出料流水线的编号,DLineEquipNum,1,, PRO,0,HY所在流水线,LineName,C1,,
PRO,0,设备对应的出料流水线的第几条流水线,DLineLineNum,1,, PRO,0,HY工位对应的取放料设备,WorkDevice,0,,
PRO,0,HY是否是托盘横移入口,IsSideWayIn,0,,
PRO,0,HY是否是托盘横移出口,IsSideWayOut,1,,
PRO,0,HY是否是托盘进入出料线入口,IsOutLineIn,1,,
PRO,0,HY是否是托盘离开出料线出口,IsOutLineOut,0,,
,,,,,, ,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0 AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,, PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,,
......
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位 类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,
PRO,0,是否使用伺服,UpDownUseAxis,1,, PRO,0,是否使用伺服,UpDownUseAxis,1,,
PRO,0,设备对应的出料流水线的编号,DLineEquipNum,1,, PRO,0,HY所在流水线,LineName,C9,,
PRO,0,设备对应的出料流水线的第几条流水线,DLineLineNum,1,, PRO,0,HY工位对应的取放料设备,WorkDevice,0,,
PRO,0,HY是否是托盘横移入口,IsSideWayIn,0,,
PRO,0,HY是否是托盘横移出口,IsSideWayOut,0,,
PRO,0,HY是否是托盘进入出料线入口,IsOutLineIn,0,,
PRO,0,HY是否是托盘离开出料线出口,IsOutLineOut,0,,
,,,,,, ,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0 AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,, PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,,
......
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位 类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,
PRO,0,是否使用伺服,UpDownUseAxis,0,, PRO,0,是否使用伺服,UpDownUseAxis,0,,
PRO,0,设备对应的出料流水线的编号,DLineEquipNum,1,, PRO,0,HY所在流水线,LineName,C1,,
PRO,0,设备对应的出料流水线的第几条流水线,DLineLineNum,1,, PRO,0,HY工位对应的取放料设备,WorkDevice,0,,
PRO,0,HY是否是托盘横移入口,IsSideWayIn,1,,
PRO,0,HY是否是托盘横移出口,IsSideWayOut,0,,
PRO,0,HY是否是托盘进入出料线入口,IsOutLineIn,0,,
PRO,0,HY是否是托盘离开出料线出口,IsOutLineOut,0,,
,,,,,, ,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0 AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,, PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,,
......
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位 类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,
PRO,0,是否使用伺服,UpDownUseAxis,0,, PRO,0,是否使用伺服,UpDownUseAxis,0,,
PRO,0,设备对应的出料流水线的编号,DLineEquipNum,1,, PRO,0,HY所在流水线,LineName,C1,,
PRO,0,设备对应的出料流水线的第几条流水线,DLineLineNum,1,, PRO,0,HY工位对应的取放料设备,WorkDevice,0,,
PRO,0,HY是否是托盘横移入口,IsSideWayIn,0,,
PRO,0,HY是否是托盘横移出口,IsSideWayOut,1,,
PRO,0,HY是否是托盘进入出料线入口,IsOutLineIn,0,,
PRO,0,HY是否是托盘离开出料线出口,IsOutLineOut,0,,
,,,,,, ,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0 AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,, PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,,
......
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位 类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,
PRO,0,是否使用伺服,UpDownUseAxis,0,, PRO,0,是否使用伺服,UpDownUseAxis,0,,
PRO,0,设备对应的出料流水线的编号,DLineEquipNum,1,, PRO,0,HY所在流水线,LineName,C1,,
PRO,0,设备对应的出料流水线的第几条流水线,DLineLineNum,1,, PRO,0,HY工位对应的取放料设备,WorkDevice,104,,
PRO,0,HY是否是托盘横移入口,IsSideWayIn,1,,
PRO,0,HY是否是托盘横移出口,IsSideWayOut,0,,
PRO,0,HY是否是托盘进入出料线入口,IsOutLineIn,0,,
PRO,0,HY是否是托盘离开出料线出口,IsOutLineOut,0,,
,,,,,, ,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0 AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,, PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,,
......
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位 类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,
PRO,0,是否使用伺服,UpDownUseAxis,0,, PRO,0,是否使用伺服,UpDownUseAxis,0,,
PRO,0,设备对应的出料流水线的编号,DLineEquipNum,1,, PRO,0,HY所在流水线,LineName,C1,,
PRO,0,设备对应的出料流水线的第几条流水线,DLineLineNum,1,, PRO,0,HY工位对应的取放料设备,WorkDevice,105,,
PRO,0,HY是否是托盘横移入口,IsSideWayIn,0,,
PRO,0,HY是否是托盘横移出口,IsSideWayOut,1,,
PRO,0,HY是否是托盘进入出料线入口,IsOutLineIn,0,,
PRO,0,HY是否是托盘离开出料线出口,IsOutLineOut,0,,
,,,,,, ,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0 AXIS,0,移栽上下轴,UpDown_Axis,100,HC,,250,1000,1000,60,80,50,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,, PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,-11000,,
......
...@@ -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.Drawing;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
...@@ -230,6 +231,22 @@ namespace OnlineStore.DeviceLibrary ...@@ -230,6 +231,22 @@ namespace OnlineStore.DeviceLibrary
LogInfo("从调试状态切换到正常状态!"); LogInfo("从调试状态切换到正常状态!");
} }
} }
else
{
if (isDebug)
{
IsDebug = true;
//两个阻挡气缸下降
lineStatus = LineStatus.Debugging;
LogInfo("从正常状态切换到调试状态!");
}
else if (lineStatus.Equals(LineStatus.Debugging))
{
IsDebug = false;
lineStatus = LineStatus.StoreOnline;
LogInfo("从调试状态切换到正常状态!");
}
}
} }
/// <summary> /// <summary>
...@@ -275,16 +292,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -275,16 +292,16 @@ namespace OnlineStore.DeviceLibrary
{ {
if (DeviceID.Equals(102)) if (DeviceID.Equals(102))
{ {
if (IOValue(IO_Type.FL_StopCylinder_Down1).Equals(IO_VALUE.HIGH) && // if (IOValue(IO_Type.FL_StopCylinder_Down1).Equals(IO_VALUE.HIGH) &&
IOValue(IO_Type.FL_StopCylinder_Down2).Equals(IO_VALUE.HIGH)) //IOValue(IO_Type.FL_StopCylinder_Down2).Equals(IO_VALUE.HIGH))
{ // {
return true; // return true;
} // }
else if (rwSpan.TotalSeconds > 5 && span.TotalSeconds > 6 && span.TotalSeconds < LineManager.Config.IOSingle_TimerOut * 2) // else if (rwSpan.TotalSeconds > 5 && span.TotalSeconds > 6 && span.TotalSeconds < LineManager.Config.IOSingle_TimerOut * 2)
{ // {
IOMove(IO_Type.FL_StopCylinder_Down1, IO_VALUE.HIGH); // IOMove(IO_Type.FL_StopCylinder_Down1, IO_VALUE.HIGH);
IOMove(IO_Type.FL_StopCylinder_Down2, IO_VALUE.HIGH); // IOMove(IO_Type.FL_StopCylinder_Down2, IO_VALUE.HIGH);
} // }
} }
else else
{ {
...@@ -678,5 +695,42 @@ namespace OnlineStore.DeviceLibrary ...@@ -678,5 +695,42 @@ namespace OnlineStore.DeviceLibrary
runStatus = LineRunStatus.Runing; runStatus = LineRunStatus.Runing;
MoveInfo.EndMove(); MoveInfo.EndMove();
} }
public string GetColorDes()
{
return
"橘色:复位中\r\n" +
"蓝色:正常待机中\r\n" +
"绿色:忙碌中\r\n" +
"珊瑚色:信号超时报警\r\n" +
"红色:严重报警\r\n";
}
public Color GetShowColor()
{
if (runStatus.Equals(LineRunStatus.Wait))
{
return Color.White;
}
else if (alarmType.Equals(LineAlarmType.IoSingleTimeOut))
{
return Color.LightCoral;
}
else if (alarmType.Equals(LineAlarmType.None).Equals(false))
{
return Color.Red;
}
else if (runStatus.Equals(LineRunStatus.HomeMoving) || runStatus.Equals(LineRunStatus.Reset))
{
return Color.Orange;
}
else if (runStatus.Equals(LineRunStatus.Busy))
{
return Color.LimeGreen;
}
else if (runStatus.Equals(LineRunStatus.Runing))
{
return Color.LightBlue;
}
return Color.White;
}
} }
} }
...@@ -124,19 +124,23 @@ namespace OnlineStore.DeviceLibrary ...@@ -124,19 +124,23 @@ namespace OnlineStore.DeviceLibrary
IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW); IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW);
IOMove(IO_Type.SL_Out_StopDown, IO_VALUE.LOW); IOMove(IO_Type.SL_Out_StopDown, IO_VALUE.LOW);
//夹紧气缸放松 //夹紧气缸放松
CylinderMove(null, IO_Type.SL_MoveCylinder_Tighten, IO_Type.SL_MoveCylinder_Slack); CylinderMove(null, IO_Type.SL_MoveCylinder_Relax, IO_Type.SL_MoveCylinder_Work);
if (Config.SidesWayNum <= 0) if (Config.DOList.ContainsKey(IO_Type.SL_RollerLine_Run))
{ {
CheckAndMove(IO_Type.FL_StopCylinder_Down1, IO_VALUE.LOW); IOMove(IO_Type.SL_RollerLine_Run, IO_VALUE.LOW);
CheckAndMove(IO_Type.FL_StopCylinder_Down2, IO_VALUE.LOW); }
//顶升气缸下降 //if (Config.SidesWayNum <= 0)
CylinderMove(null, IO_Type.FL_TopCylinder_Up, IO_Type.FL_TopCylinder_Down); //{
} // CheckAndMove(IO_Type.FL_StopCylinder_Down1, IO_VALUE.LOW);
else if (LineManager.Line.runStatus <= LineRunStatus.Wait) // CheckAndMove(IO_Type.FL_StopCylinder_Down2, IO_VALUE.LOW);
{ // //顶升气缸下降
CylinderMove(null, IO_Type.SW_LocationCylinder_Up, IO_Type.SW_LocationCylinder_Down); // CylinderMove(null, IO_Type.FL_TopCylinder_Up, IO_Type.FL_TopCylinder_Down);
CylinderMove(null, IO_Type.SW_TopCylinder_Up, IO_Type.SW_TopCylinder_Down); //}
} //else if (LineManager.Line.runStatus <= LineRunStatus.Wait)
//{
// CylinderMove(null, IO_Type.SW_LocationCylinder_Up, IO_Type.SW_LocationCylinder_Down);
// CylinderMove(null, IO_Type.SW_TopCylinder_Up, IO_Type.SW_TopCylinder_Down);
//}
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_Entry_StopDown, IO_VALUE.LOW)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_Entry_StopDown, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_Out_StopDown, IO_VALUE.LOW)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_Out_StopDown, IO_VALUE.LOW));
...@@ -185,18 +189,18 @@ namespace OnlineStore.DeviceLibrary ...@@ -185,18 +189,18 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_Line_Run, IO_VALUE.LOW)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_Line_Run, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_LocationSideWay_Run, IO_VALUE.LOW)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_LocationSideWay_Run, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_OutSideWay_Run, IO_VALUE.LOW)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_OutSideWay_Run, IO_VALUE.LOW));
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
CylinderMove(MoveInfo, IO_Type.SL_OutTopCylinder_Up, IO_Type.SL_OutTopCylinder_Down); CylinderMove(MoveInfo, IO_Type.SL_OutTopCylinder_Up, IO_Type.SL_OutTopCylinder_Down);
if (Config.SidesWayNum <= 0) //CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
{ //if (Config.SidesWayNum <= 0)
//顶升气缸下降 //{
CylinderMove(MoveInfo, IO_Type.FL_TopCylinder_Up, IO_Type.FL_TopCylinder_Down); // //顶升气缸下降
} // CylinderMove(MoveInfo, IO_Type.FL_TopCylinder_Up, IO_Type.FL_TopCylinder_Down);
else if (LineManager.Line.runStatus <= LineRunStatus.Wait) //}
{ //else if (LineManager.Line.runStatus <= LineRunStatus.Wait)
CylinderMove(MoveInfo, IO_Type.SW_LocationCylinder_Up, IO_Type.SW_LocationCylinder_Down); //{
CylinderMove(MoveInfo, IO_Type.SW_TopCylinder_Up, IO_Type.SW_TopCylinder_Down); // CylinderMove(MoveInfo, IO_Type.SW_LocationCylinder_Up, IO_Type.SW_LocationCylinder_Down);
} // CylinderMove(MoveInfo, IO_Type.SW_TopCylinder_Up, IO_Type.SW_TopCylinder_Down);
//}
break; break;
case LineMoveStep.FR_03_CylinderUp: case LineMoveStep.FR_03_CylinderUp:
MoveInfo.NextMoveStep(LineMoveStep.FR_04_UpdownAxisHome); MoveInfo.NextMoveStep(LineMoveStep.FR_04_UpdownAxisHome);
...@@ -230,7 +234,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -230,7 +234,7 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(LineMoveStep.FR_05_UpdownAxis_P1); MoveInfo.NextMoveStep(LineMoveStep.FR_05_UpdownAxis_P1);
LogInfo(MoveInfo.MoveType + ":" + MoveInfo.SLog + ":上料横移机构上升SOL"); LogInfo(MoveInfo.MoveType + ":" + MoveInfo.SLog + ":上料横移机构上升SOL");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up); //CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
} }
break; break;
case LineMoveStep.FR_06_CylinderGive: case LineMoveStep.FR_06_CylinderGive:
...@@ -259,7 +263,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -259,7 +263,7 @@ namespace OnlineStore.DeviceLibrary
LogInfo(MoveInfo.MoveType + ":" + MoveInfo.SLog + ":SL1定位气缸下降SOL,出口顶升气缸下降,夹紧气缸放松"); LogInfo(MoveInfo.MoveType + ":" + MoveInfo.SLog + ":SL1定位气缸下降SOL,出口顶升气缸下降,夹紧气缸放松");
CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Up, IO_Type.SL_LocationCylinder_Down); CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Up, IO_Type.SL_LocationCylinder_Down);
CylinderMove(MoveInfo, IO_Type.SL_OutTopCylinder_Up, IO_Type.SL_OutTopCylinder_Down); CylinderMove(MoveInfo, IO_Type.SL_OutTopCylinder_Up, IO_Type.SL_OutTopCylinder_Down);
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Tighten, IO_Type.SL_MoveCylinder_Slack); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Work, IO_Type.SL_MoveCylinder_Relax );
break; break;
case LineMoveStep.FR_14_TopDown: case LineMoveStep.FR_14_TopDown:
...@@ -311,13 +315,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -311,13 +315,13 @@ namespace OnlineStore.DeviceLibrary
CloseAxis(BatchAxis); CloseAxis(BatchAxis);
CloseAxis(UpdownAxis); CloseAxis(UpdownAxis);
if (Config.SidesWayNum <= 0) //if (Config.SidesWayNum <= 0)
{ //{
CheckAndMove(IO_Type.FL_StopCylinder_Down1, IO_VALUE.LOW); // CheckAndMove(IO_Type.FL_StopCylinder_Down1, IO_VALUE.LOW);
CheckAndMove(IO_Type.FL_StopCylinder_Down2, IO_VALUE.LOW); // CheckAndMove(IO_Type.FL_StopCylinder_Down2, IO_VALUE.LOW);
CheckAndMove(IO_Type.FL_TopCylinder_Down, IO_VALUE.LOW); // CheckAndMove(IO_Type.FL_TopCylinder_Down, IO_VALUE.LOW);
CheckAndMove(IO_Type.FL_TopCylinder_Up, IO_VALUE.LOW); // CheckAndMove(IO_Type.FL_TopCylinder_Up, IO_VALUE.LOW);
} //}
CheckAndMove(IO_Type.SL_Line_Run, IO_VALUE.LOW); CheckAndMove(IO_Type.SL_Line_Run, IO_VALUE.LOW);
CheckAndMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.LOW); CheckAndMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.LOW);
CheckAndMove(IO_Type.SL_OutLine_Run, IO_VALUE.LOW); CheckAndMove(IO_Type.SL_OutLine_Run, IO_VALUE.LOW);
...@@ -473,38 +477,38 @@ namespace OnlineStore.DeviceLibrary ...@@ -473,38 +477,38 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
internal override void OpenStopCylinder() internal override void OpenStopCylinder()
{ {
if (Config.SidesWayNum <= 0) //if (Config.SidesWayNum <= 0)
{ //{
LogInfo("下降放料阻挡12 ,下降FL顶升气缸,上升横移机构 "); // LogInfo("下降放料阻挡12 ,下降FL顶升气缸,上升横移机构 ");
CheckAndMove(IO_Type.FL_StopCylinder_Down1, IO_VALUE.HIGH); // CheckAndMove(IO_Type.FL_StopCylinder_Down1, IO_VALUE.HIGH);
CheckAndMove(IO_Type.FL_StopCylinder_Down2, IO_VALUE.HIGH); // CheckAndMove(IO_Type.FL_StopCylinder_Down2, IO_VALUE.HIGH);
//顶升气缸下降 // //顶升气缸下降
CylinderMove(null, IO_Type.FL_TopCylinder_Up, IO_Type.FL_TopCylinder_Down); // CylinderMove(null, IO_Type.FL_TopCylinder_Up, IO_Type.FL_TopCylinder_Down);
} //}
else //else
{ //{
LogInfo(" 上升横移机构 "); // LogInfo(" 上升横移机构 ");
} //}
CylinderMove(null, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up); //CylinderMove(null, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
} }
internal override void CloseCylinderStop() internal override void CloseCylinderStop()
{ {
if (Config.SidesWayNum <= 0) //if (Config.SidesWayNum <= 0)
{ //{
LogInfo("上升放料阻挡12,关闭顶升气缸,关闭横移上下气缸"); // LogInfo("上升放料阻挡12,关闭顶升气缸,关闭横移上下气缸");
CheckAndMove(IO_Type.FL_StopCylinder_Down1, IO_VALUE.LOW); // CheckAndMove(IO_Type.FL_StopCylinder_Down1, IO_VALUE.LOW);
CheckAndMove(IO_Type.FL_StopCylinder_Down2, IO_VALUE.LOW); // CheckAndMove(IO_Type.FL_StopCylinder_Down2, IO_VALUE.LOW);
//顶升气缸下降 // //顶升气缸下降
CheckAndMove(IO_Type.FL_TopCylinder_Up, IO_VALUE.LOW); // CheckAndMove(IO_Type.FL_TopCylinder_Up, IO_VALUE.LOW);
CheckAndMove(IO_Type.FL_TopCylinder_Down, IO_VALUE.LOW); // CheckAndMove(IO_Type.FL_TopCylinder_Down, IO_VALUE.LOW);
} //}
else //else
{ //{
LogInfo(" 关闭横移上下气缸"); // LogInfo(" 关闭横移上下气缸");
} //}
CheckAndMove(IO_Type.SL_MoveCylinder_Down, IO_VALUE.LOW); //CheckAndMove(IO_Type.SL_MoveCylinder_Down, IO_VALUE.LOW);
CheckAndMove(IO_Type.SL_MoveCylinder_Up, IO_VALUE.LOW); //CheckAndMove(IO_Type.SL_MoveCylinder_Up, IO_VALUE.LOW);
} }
/// <summary> /// <summary>
...@@ -589,7 +593,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -589,7 +593,7 @@ namespace OnlineStore.DeviceLibrary
/// <returns></returns> /// <returns></returns>
public bool MoveCylineIsUp() public bool MoveCylineIsUp()
{ {
if(CylinderIsOk(IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up)) //if(CylinderIsOk(IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up))
// if (IOValue(IO_Type.SL_MoveCylinder_Down).Equals(IO_VALUE.LOW) && IOValue(IO_Type.SL_MoveCylinder_Up).Equals(IO_VALUE.HIGH)) // if (IOValue(IO_Type.SL_MoveCylinder_Down).Equals(IO_VALUE.LOW) && IOValue(IO_Type.SL_MoveCylinder_Up).Equals(IO_VALUE.HIGH))
{ {
return true; return true;
......
...@@ -19,17 +19,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -19,17 +19,17 @@ namespace OnlineStore.DeviceLibrary
internal bool CanStartCheckOut(int trayNum) internal bool CanStartCheckOut(int trayNum)
{ {
preTrayNum = currTrayNum; //preTrayNum = currTrayNum;
currTrayNum = trayNum; //currTrayNum = trayNum;
if (CurrTrayIsNeed(currTrayNum, true)) //if (CurrTrayIsNeed(currTrayNum, true))
{ //{
SecondMoveInfo.NewMove(LineMoveType.CheckFixture, CheckParam); // SecondMoveInfo.NewMove(LineMoveType.CheckFixture, CheckParam);
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_06_TopUp); // SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_06_TopUp);
CheckLog("检测到SW_TrayCheck:" + SecondMoveInfo.SLog + "横移顶升气缸上升 )"); // CheckLog("检测到SW_TrayCheck:" + SecondMoveInfo.SLog + "横移顶升气缸上升 )");
CylinderMove(SecondMoveInfo, IO_Type.SW_TopCylinder_Down, IO_Type.SW_TopCylinder_Up); // CylinderMove(SecondMoveInfo, IO_Type.SW_TopCylinder_Down, IO_Type.SW_TopCylinder_Up);
return true; // return true;
} //}
else //else
{ {
// currTrayNum = num; // currTrayNum = num;
return false; return false;
...@@ -118,7 +118,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -118,7 +118,7 @@ namespace OnlineStore.DeviceLibrary
if (MoveInfo.MoveParam.PlateW.Equals(7)) if (MoveInfo.MoveParam.PlateW.Equals(7))
{ {
//升降先下降 //升降先下降
CylinderMove(null, IO_Type.SL_MoveCylinder_Up, IO_Type.SL_MoveCylinder_Down); //CylinderMove(null, IO_Type.SL_MoveCylinder_Up, IO_Type.SL_MoveCylinder_Down);
} }
int targetP = Config.GetUpdownP2Detial(MoveInfo.MoveParam.PlateH, MoveInfo.MoveParam.PlateW); int targetP = Config.GetUpdownP2Detial(MoveInfo.MoveParam.PlateH, MoveInfo.MoveParam.PlateW);
UpdownAxis.AbsMove(MoveInfo, targetP, Config.UpdownAxis_P2Speed); UpdownAxis.AbsMove(MoveInfo, targetP, Config.UpdownAxis_P2Speed);
...@@ -130,12 +130,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -130,12 +130,12 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up); //CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
} }
} }
else else
{ {
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up); //CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
} }
BatchAxis.AbsMove(MoveInfo, targetPosition, Config.BatchAxis_P2Speed); BatchAxis.AbsMove(MoveInfo, targetPosition, Config.BatchAxis_P2Speed);
return true; return true;
...@@ -553,7 +553,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -553,7 +553,7 @@ namespace OnlineStore.DeviceLibrary
if (MoveInfo.MoveParam.PlateW.Equals(7)) if (MoveInfo.MoveParam.PlateW.Equals(7))
{ {
//升降先下降 //升降先下降
CylinderMove(null, IO_Type.SL_MoveCylinder_Up, IO_Type.SL_MoveCylinder_Down); //CylinderMove(null, IO_Type.SL_MoveCylinder_Up, IO_Type.SL_MoveCylinder_Down);
} }
UpdownAxis.AbsMove(MoveInfo, targetP, Config.UpdownAxis_P2Speed); UpdownAxis.AbsMove(MoveInfo, targetP, Config.UpdownAxis_P2Speed);
...@@ -571,7 +571,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -571,7 +571,7 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_211_AxisDownMove); MoveInfo.NextMoveStep(LineMoveStep.FO_211_AxisDownMove);
OutLog(outType + MoveInfo.SLog + ":上料横移机构取料端 前先上升横移气缸"); OutLog(outType + MoveInfo.SLog + ":上料横移机构取料端 前先上升横移气缸");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up); //CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
} }
} }
} }
...@@ -600,22 +600,23 @@ namespace OnlineStore.DeviceLibrary ...@@ -600,22 +600,23 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_215_CylinderTighten); MoveInfo.NextMoveStep(LineMoveStep.FO_215_CylinderTighten);
OutLog(outType + MoveInfo.SLog + ":上料气缸夹紧"); OutLog(outType + MoveInfo.SLog + ":上料气缸夹紧");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Slack, IO_Type.SL_MoveCylinder_Tighten); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Relax, IO_Type.SL_MoveCylinder_Work);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_215_CylinderTighten)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_215_CylinderTighten))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_216_CylinderUp); MoveInfo.NextMoveStep(LineMoveStep.FO_216_CylinderUp);
OutLog(outType + MoveInfo.SLog + ":上料横移机构上升"); OutLog(outType + MoveInfo.SLog + ":上料横移机构上升");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up); // TODO
if (Config.SidesWayNum.Equals(3) && MoveInfo.MoveParam.PlateW.Equals(7)) //CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
{ //if (Config.SidesWayNum.Equals(3) && MoveInfo.MoveParam.PlateW.Equals(7))
InLog(MoveInfo.SLog + " 提前下降顶升气缸 ,环形线定位气缸先下降,顶升气缸同时下降"); //{
CylinderMove(null, IO_Type.SW_LocationCylinder_Up, IO_Type.SW_LocationCylinder_Down); // InLog(MoveInfo.SLog + " 提前下降顶升气缸 ,环形线定位气缸先下降,顶升气缸同时下降");
CylinderMove(SecondMoveInfo, IO_Type.SW_TopCylinder_Up, IO_Type.SW_TopCylinder_Down); // CylinderMove(null, IO_Type.SW_LocationCylinder_Up, IO_Type.SW_LocationCylinder_Down);
// CylinderMove(SecondMoveInfo, IO_Type.SW_TopCylinder_Up, IO_Type.SW_TopCylinder_Down);
//七寸时伺服可以先动作
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed); // //七寸时伺服可以先动作
} // UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
//}
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_216_CylinderUp)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_216_CylinderUp))
{ {
...@@ -644,7 +645,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -644,7 +645,7 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_217_UpdownAxisToP1); MoveInfo.NextMoveStep(LineMoveStep.FO_217_UpdownAxisToP1);
OutLog(outType + MoveInfo.SLog + ":上料横移机构到放料端前,先上升横移气缸"); OutLog(outType + MoveInfo.SLog + ":上料横移机构到放料端前,先上升横移气缸");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up); //CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
} }
} }
...@@ -660,7 +661,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -660,7 +661,7 @@ namespace OnlineStore.DeviceLibrary
OutStoreCount++; OutStoreCount++;
MoveInfo.NextMoveStep(LineMoveStep.FO_220_CylinderSlack); MoveInfo.NextMoveStep(LineMoveStep.FO_220_CylinderSlack);
OutLog(outType + MoveInfo.SLog + ":出料横移机构放松,累积出库【" + OutStoreCount + "】盘【" + OutStoreHeight + "】mm"); OutLog(outType + MoveInfo.SLog + ":出料横移机构放松,累积出库【" + OutStoreCount + "】盘【" + OutStoreHeight + "】mm");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Tighten, IO_Type.SL_MoveCylinder_Slack); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Work, IO_Type.SL_MoveCylinder_Relax);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_220_CylinderSlack)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_220_CylinderSlack))
...@@ -700,7 +701,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -700,7 +701,7 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_221_UpdownAxisToP1); MoveInfo.NextMoveStep(LineMoveStep.FO_221_UpdownAxisToP1);
OutLog(outType + MoveInfo.SLog + ":上料横移机构取料端 前先上升横移气缸"); OutLog(outType + MoveInfo.SLog + ":上料横移机构取料端 前先上升横移气缸");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up); //CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
} }
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_222_CylinderTake)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_222_CylinderTake))
...@@ -753,18 +754,18 @@ namespace OnlineStore.DeviceLibrary ...@@ -753,18 +754,18 @@ namespace OnlineStore.DeviceLibrary
private bool afterPutOk = false; private bool afterPutOk = false;
private void FO_214_CylinderDown(string outType) private void FO_214_CylinderDown(string outType)
{ {
if (CylinderIsOk(IO_Type.SL_MoveCylinder_Up, IO_Type.SL_MoveCylinder_Down)) //if (CylinderIsOk(IO_Type.SL_MoveCylinder_Up, IO_Type.SL_MoveCylinder_Down))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_215_CylinderTighten); MoveInfo.NextMoveStep(LineMoveStep.FO_215_CylinderTighten);
OutLog(outType + MoveInfo.SLog + ":上料气缸夹紧"); OutLog(outType + MoveInfo.SLog + ":上料气缸夹紧");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Slack, IO_Type.SL_MoveCylinder_Tighten); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Relax, IO_Type.SL_MoveCylinder_Work);
} }
else //else
{ //{
MoveInfo.NextMoveStep(LineMoveStep.FO_214_CylinderDown); // MoveInfo.NextMoveStep(LineMoveStep.FO_214_CylinderDown);
OutLog(outType + MoveInfo.SLog + ":上料横移机构下降"); // OutLog(outType + MoveInfo.SLog + ":上料横移机构下降");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Up, IO_Type.SL_MoveCylinder_Down); // CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Up, IO_Type.SL_MoveCylinder_Down);
} //}
} }
private void SendOutShelfOut(string msg="") private void SendOutShelfOut(string msg="")
{ {
......
...@@ -7,16 +7,22 @@ using System.Threading.Tasks; ...@@ -7,16 +7,22 @@ using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary namespace OnlineStore.DeviceLibrary
{ {
public class HYEquipBase : EquipBase public class HYEquipBase : EquipBase
{ {
public HYEquip_Config Config; public HYEquip_Config Config;
public static HYEquipBase GetHY(string cid, HYEquip_Config config) public static HYEquipBase GetHY(string cid, HYEquip_Config config)
{ {
int hynum = (config.Id % 100); int hynum = (config.Id % 100);
List<int> workList = new List<int>() { 1, 2, 20,21 };
List<int> jNumList = new List<int>() { 10,12,17}; List<int> jNumList = new List<int>() { 10,12,17};
List<int> oNumList = new List<int>() { 5, 7, 14 }; List<int> oNumList = new List<int>() { 5, 7, 14 };
//List<int> cNumList = new List<int>() { 10, 12, 17 }; //List<int> cNumList = new List<int>() { 10, 12, 17 };
if (workList.Contains(hynum))
{
return new HY_C1_SLStation(cid, config);
}
if (jNumList.Contains(hynum)) if (jNumList.Contains(hynum))
{ {
return new HY_Coveryor(cid, config); return new HY_Coveryor(cid, config);
...@@ -46,34 +52,31 @@ namespace OnlineStore.DeviceLibrary ...@@ -46,34 +52,31 @@ namespace OnlineStore.DeviceLibrary
SecondMoveInfo = new LineMoveInfo(DeviceID, "[" + Name.Trim() + "-SMove]"); SecondMoveInfo = new LineMoveInfo(DeviceID, "[" + Name.Trim() + "-SMove]");
UseAxis = config.UpDownUseAxis.Equals(1); UseAxis = config.UpDownUseAxis.Equals(1);
if (UseAxis) //if (UseAxis)
{ //{
Config.UpDown_Axis.ServerOnDO = IO_Type.UpDownAxis_ServoOn; // Config.UpDown_Axis.ServerOnDO = IO_Type.UpDownAxis_ServoOn;
Config.UpDown_Axis.BreakOnDO = IO_Type.UpDownAxis_BreakOn; // Config.UpDown_Axis.BreakOnDO = IO_Type.UpDownAxis_BreakOn;
} //}
UpdownAxis = new AxisBean(config.UpDown_Axis, Name); UpdownAxis = new AxisBean(config.UpDown_Axis, Name);
} }
public override bool Reset()
public override bool StartRun(bool isDebug = false)
{ {
return false; return false;
} }
public override bool Reset()
public override bool StartInStoreMove(InOutParam param)
{ {
return false; return false;
} }
protected override void ResetProcess()
public override bool StartOutStoreMove(InOutParam param)
{ {
return false;
} }
public override bool StartRun(bool isDebug = false) internal override void StopMove()
{ {
return false;
} }
public override void StopRun() public override void StopRun()
{ {
} }
...@@ -81,7 +84,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -81,7 +84,17 @@ namespace OnlineStore.DeviceLibrary
protected override void BaseTimerProcess() protected override void BaseTimerProcess()
{ {
} }
public override bool StartInStoreMove(InOutParam param)
{
return false;
}
public override bool StartOutStoreMove(InOutParam param)
{
return false;
}
protected override void CheckFixtureProcess() protected override void CheckFixtureProcess()
{ {
} }
...@@ -94,12 +107,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -94,12 +107,6 @@ namespace OnlineStore.DeviceLibrary
{ {
} }
protected override void ResetProcess()
{
}
internal override void StopMove()
{
}
} }
} }
...@@ -13,5 +13,217 @@ namespace OnlineStore.DeviceLibrary ...@@ -13,5 +13,217 @@ namespace OnlineStore.DeviceLibrary
{ {
Name = ("_C1线HY" + (DeviceID % 100).ToString().PadLeft(2, '0') + "_").ToUpper(); Name = ("_C1线HY" + (DeviceID % 100).ToString().PadLeft(2, '0') + "_").ToUpper();
} }
public override bool StartRun(bool isDebug = false)
{
if (CanStartRun().Equals(false))
{
return false;
}
if (!RunAxis(true, UpdownAxis))
{
return false;
}
mainTimer.Enabled = false;
MoveInfo.EndMove();
SecondMoveInfo.EndMove();
runStatus = LineRunStatus.HomeMoving;
LogInfo("开始 原点返回 ");
MoveInfo.NewMove(LineMoveType.ReturnHome);
StartReset();
if (isDebug)
{
mainTimer.Enabled = true;
}
return true;
}
public override bool Reset()
{
StopMove();
if (!RunAxis(true, UpdownAxis))
{
return false;
}
LogInfo("开始重置: 升降轴回原点,阻挡气缸上升 ");
runStatus = LineRunStatus.Reset;
SecondMoveInfo.EndMove();
MoveInfo.NewMove(LineMoveType.Reset);
StartReset();
return true;
}
private void StartReset()
{
ResetClearData();
lineStatus = LineStatus.ResetMove;
MoveInfo.NextMoveStep(LineMoveStep.HY_R_01StopMove);
if (IsDebug)
{
IOMove(IO_Type.StopDown1, IO_VALUE.HIGH);
IOMove(IO_Type.StopDown2, IO_VALUE.HIGH);
}
else
{
IOMove(IO_Type.StopDown1, IO_VALUE.LOW);
IOMove(IO_Type.StopDown2, IO_VALUE.LOW);
}
if (IsDebug)
{
IOMove(IO_Type.HY_FrontStopDown, IO_VALUE.HIGH);
IOMove(IO_Type.HY_SideStopDown, IO_VALUE.HIGH);
IOMove(IO_Type.HY_StopDown, IO_VALUE.HIGH);
}
else
{
IOMove(IO_Type.HY_FrontStopDown, IO_VALUE.LOW);
IOMove(IO_Type.HY_SideStopDown, IO_VALUE.LOW);
IOMove(IO_Type.HY_StopDown, IO_VALUE.LOW);
}
IOMove(IO_Type.HY_LineRun, IO_VALUE.LOW);
CylinderMove(MoveInfo, IO_Type.HY_TopCylinder_UP, IO_Type.HY_TopCylinder_Down);
CylinderMove(MoveInfo, IO_Type.HY_LocationCylinder_UP, IO_Type.HY_LocationCylinder_Down);
CylinderMove(MoveInfo, IO_Type.HY_StopCylinder_Down, IO_Type.HY_StopCylinder_Up);
isInPro = false;
}
protected override void ResetProcess()
{
if (MoveInfo.IsInWait)
{
CheckWait(MoveInfo);
}
else if (SecondMoveInfo.IsInWait)
{
CheckWait(SecondMoveInfo);
}
if (!MoveInfo.IsInWait && !SecondMoveInfo.IsInWait)
{
//流水线各装置复原位,夹料气缸状态不变
//阻挡气缸全部=0
//上下气缸上升,、
//上升到位,顶升气缸下降,前后气缸回退
//复位时夹紧气缸需要发送,不然后面出入库会有问题
switch (MoveInfo.MoveStep)
{
case LineMoveStep.HY_R_01StopMove:
LogInfo(MoveInfo.MoveType + " 完成!");
runStatus = LineRunStatus.Runing;
MoveInfo.EndMove();
SecondMoveInfo.EndMove();
if (IsDebug)
{
lineStatus = LineStatus.Debugging;
}
else
{
lineStatus = LineStatus.StoreOnline;
}
break;
default: break;
}
}
}
/// <summary>
/// 停止运动
/// </summary>
internal override void StopMove()
{
//trayCheck2LowWait.Stop();
//trayCheckWait.Stop();
//如果正在出库中,需要减去托盘号
if (MoveInfo.MoveType.Equals(LineMoveType.OutStore))
{
DebugInfo("停止运动时出库执行中,减去托盘数;");
//减去需要的盘数
// TrayManager.DelNeedEmptyTrayNum();
MoveInfo.EndMove();
}
runStatus = LineRunStatus.Busy;
SecondMoveInfo.EndMove();
LogInfo("停止运动:上下气缸上升端,阻挡气缸上升 ");
//UpdownUpMove();
CylinderMove(MoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
IOMove(IO_Type.StopDown1, IO_VALUE.LOW);
IOMove(IO_Type.StopDown2, IO_VALUE.LOW);
}
public override void StopRun()
{
if (mainTimer != null)
{
mainTimer.Enabled = false;
}
StopMove();
//停止运行时,把所有IO 置零
CheckAndMove(IO_Type.StopDown1, IO_VALUE.LOW);
CheckAndMove(IO_Type.StopDown2, IO_VALUE.LOW);
CheckAndMove(IO_Type.TopCylinder_UP, IO_VALUE.LOW);
CheckAndMove(IO_Type.TopCylinder_Down, IO_VALUE.LOW);
CheckAndMove(IO_Type.BeforeAfterCylinder_Before, IO_VALUE.LOW);
CheckAndMove(IO_Type.BeforeAfterCylinder_After, IO_VALUE.LOW);
if (UseAxis.Equals(false))
{
CheckAndMove(IO_Type.UpDownCylinder_Up, IO_VALUE.LOW);
CheckAndMove(IO_Type.UpDownCylinder_Down, IO_VALUE.LOW);
}
CheckAndMove(IO_Type.ClampCylinder_Work, IO_VALUE.LOW);
CheckAndMove(IO_Type.ClampCylinder_Relax, IO_VALUE.LOW);
runStatus = LineRunStatus.Wait;
}
protected override void BaseTimerProcess()
{
if (isInSuddenDown || isNoAirCheck)
{
return;
}
BusyMoveProcess();
IOTimeOutProcess();
//判断流水线打开了才可以运行
if (SecondMoveInfo.MoveType.Equals(LineMoveType.None))
{
if (LineManager.Line.CanProcessLine())
{
// LogUtil.info("StartCheckFixture");
//StartCheckFixture();
}
}
//OutStoreListPro();
}
public override bool StartInStoreMove(InOutParam param)
{
return false;
}
public override bool StartOutStoreMove(InOutParam param)
{
return false;
}
protected override void CheckFixtureProcess()
{
}
protected override void InStoreProcess()
{
}
protected override void OutStoreProcess()
{
}
} }
} }
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary
{
public class HY_C1_SLStation : HYEquipBase
{
public HY_C1_SLStation(string cid, HYEquip_Config config) : base(cid, config)
{
Name = ("_C1线THY" + (DeviceID % 100).ToString().PadLeft(2, '0') + "_").ToUpper();
}
public override bool StartRun(bool isDebug = false)
{
if (CanStartRun().Equals(false))
{
return false;
}
if (!RunAxis(true, UpdownAxis))
{
return false;
}
mainTimer.Enabled = false;
MoveInfo.EndMove();
SecondMoveInfo.EndMove();
runStatus = LineRunStatus.HomeMoving;
LogInfo("开始 原点返回 ");
MoveInfo.NewMove(LineMoveType.ReturnHome);
StartReset();
if (isDebug)
{
mainTimer.Enabled = true;
}
return true;
}
public override bool Reset()
{
StopMove();
if (!RunAxis(true, UpdownAxis))
{
return false;
}
LogInfo("开始重置: 升降轴回原点,阻挡气缸上升 ");
runStatus = LineRunStatus.Reset;
SecondMoveInfo.EndMove();
MoveInfo.NewMove(LineMoveType.Reset);
StartReset();
return true;
}
private void StartReset()
{
ResetClearData();
lineStatus = LineStatus.ResetMove;
MoveInfo.NextMoveStep(LineMoveStep.HY_R_01StopMove);
if (IsDebug)
{
IOMove(IO_Type.StopDown1, IO_VALUE.HIGH);
IOMove(IO_Type.StopDown2, IO_VALUE.HIGH);
}
else
{
IOMove(IO_Type.StopDown1, IO_VALUE.LOW);
IOMove(IO_Type.StopDown2, IO_VALUE.LOW);
}
if (IsDebug)
{
IOMove(IO_Type.HY_FrontStopDown, IO_VALUE.HIGH);
IOMove(IO_Type.HY_SideStopDown, IO_VALUE.HIGH);
IOMove(IO_Type.HY_StopDown, IO_VALUE.HIGH);
}
else
{
IOMove(IO_Type.HY_FrontStopDown, IO_VALUE.LOW);
IOMove(IO_Type.HY_SideStopDown, IO_VALUE.LOW);
IOMove(IO_Type.HY_StopDown, IO_VALUE.LOW);
}
IOMove(IO_Type.HY_LineRun, IO_VALUE.LOW);
CylinderMove(MoveInfo, IO_Type.HY_TopCylinder_UP, IO_Type.HY_TopCylinder_Down);
CylinderMove(MoveInfo, IO_Type.HY_LocationCylinder_UP, IO_Type.HY_LocationCylinder_Down);
CylinderMove(MoveInfo, IO_Type.HY_StopCylinder_Down, IO_Type.HY_StopCylinder_Up);
isInPro = false;
}
protected override void ResetProcess()
{
if (MoveInfo.IsInWait)
{
CheckWait(MoveInfo);
}
else if (SecondMoveInfo.IsInWait)
{
CheckWait(SecondMoveInfo);
}
if (!MoveInfo.IsInWait && !SecondMoveInfo.IsInWait)
{
//流水线各装置复原位,夹料气缸状态不变
//阻挡气缸全部=0
//上下气缸上升,、
//上升到位,顶升气缸下降,前后气缸回退
//复位时夹紧气缸需要发送,不然后面出入库会有问题
switch (MoveInfo.MoveStep)
{
case LineMoveStep.HY_R_01StopMove:
LogInfo(MoveInfo.MoveType + " 完成!");
runStatus = LineRunStatus.Runing;
MoveInfo.EndMove();
SecondMoveInfo.EndMove();
if (IsDebug)
{
lineStatus = LineStatus.Debugging;
}
else
{
lineStatus = LineStatus.StoreOnline;
}
break;
default: break;
}
}
}
/// <summary>
/// 停止运动
/// </summary>
internal override void StopMove()
{
//trayCheck2LowWait.Stop();
//trayCheckWait.Stop();
//如果正在出库中,需要减去托盘号
if (MoveInfo.MoveType.Equals(LineMoveType.OutStore))
{
DebugInfo("停止运动时出库执行中,减去托盘数;");
//减去需要的盘数
// TrayManager.DelNeedEmptyTrayNum();
MoveInfo.EndMove();
}
runStatus = LineRunStatus.Busy;
SecondMoveInfo.EndMove();
LogInfo("停止运动:上下气缸上升端,阻挡气缸上升 ");
//UpdownUpMove();
CylinderMove(MoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
IOMove(IO_Type.StopDown1, IO_VALUE.LOW);
IOMove(IO_Type.StopDown2, IO_VALUE.LOW);
}
public override void StopRun()
{
if (mainTimer != null)
{
mainTimer.Enabled = false;
}
StopMove();
//停止运行时,把所有IO 置零
CheckAndMove(IO_Type.StopDown1, IO_VALUE.LOW);
CheckAndMove(IO_Type.StopDown2, IO_VALUE.LOW);
CheckAndMove(IO_Type.TopCylinder_UP, IO_VALUE.LOW);
CheckAndMove(IO_Type.TopCylinder_Down, IO_VALUE.LOW);
CheckAndMove(IO_Type.BeforeAfterCylinder_Before, IO_VALUE.LOW);
CheckAndMove(IO_Type.BeforeAfterCylinder_After, IO_VALUE.LOW);
if (UseAxis.Equals(false))
{
CheckAndMove(IO_Type.UpDownCylinder_Up, IO_VALUE.LOW);
CheckAndMove(IO_Type.UpDownCylinder_Down, IO_VALUE.LOW);
}
CheckAndMove(IO_Type.ClampCylinder_Work, IO_VALUE.LOW);
CheckAndMove(IO_Type.ClampCylinder_Relax, IO_VALUE.LOW);
runStatus = LineRunStatus.Wait;
}
protected override void BaseTimerProcess()
{
if (isInSuddenDown || isNoAirCheck)
{
return;
}
BusyMoveProcess();
IOTimeOutProcess();
//判断流水线打开了才可以运行
if (SecondMoveInfo.MoveType.Equals(LineMoveType.None))
{
if (LineManager.Line.CanProcessLine())
{
// LogUtil.info("StartCheckFixture");
//StartCheckFixture();
}
}
//OutStoreListPro();
}
public override bool StartInStoreMove(InOutParam param)
{
return false;
}
public override bool StartOutStoreMove(InOutParam param)
{
return false;
}
protected override void CheckFixtureProcess()
{
}
protected override void InStoreProcess()
{
}
protected override void OutStoreProcess()
{
}
}
}
...@@ -13,5 +13,51 @@ namespace OnlineStore.DeviceLibrary ...@@ -13,5 +13,51 @@ namespace OnlineStore.DeviceLibrary
{ {
Name = ("_接驳台HY" + (DeviceID % 100).ToString().PadLeft(2, '0') + "_").ToUpper(); Name = ("_接驳台HY" + (DeviceID % 100).ToString().PadLeft(2, '0') + "_").ToUpper();
} }
public override bool StartRun(bool isDebug = false)
{
return false;
}
public override bool Reset()
{
return false;
}
protected override void ResetProcess()
{
}
internal override void StopMove()
{
}
public override void StopRun()
{
}
protected override void BaseTimerProcess()
{
}
public override bool StartInStoreMove(InOutParam param)
{
return false;
}
public override bool StartOutStoreMove(InOutParam param)
{
return false;
}
protected override void CheckFixtureProcess()
{
}
protected override void InStoreProcess()
{
}
protected override void OutStoreProcess()
{
}
} }
} }
...@@ -11,7 +11,53 @@ namespace OnlineStore.DeviceLibrary ...@@ -11,7 +11,53 @@ namespace OnlineStore.DeviceLibrary
{ {
public HY_OutLine(string cid, HYEquip_Config config) : base(cid, config) public HY_OutLine(string cid, HYEquip_Config config) : base(cid, config)
{ {
Name = ("_出料线HY" + (DeviceID % 100).ToString().PadLeft(2, '0') + "_").ToUpper(); Name = ("_"+config.LineName+"线HY" + (DeviceID % 100).ToString().PadLeft(2, '0') + "_").ToUpper();
} }
public override bool StartRun(bool isDebug = false)
{
return false;
}
public override bool Reset()
{
return false;
}
protected override void ResetProcess()
{
}
internal override void StopMove()
{
}
public override void StopRun()
{
}
protected override void BaseTimerProcess()
{
}
public override bool StartInStoreMove(InOutParam param)
{
return false;
}
public override bool StartOutStoreMove(InOutParam param)
{
return false;
}
protected override void CheckFixtureProcess()
{
}
protected override void InStoreProcess()
{
}
protected override void OutStoreProcess()
{
}
} }
} }
...@@ -32,12 +32,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -32,12 +32,12 @@ namespace OnlineStore.DeviceLibrary
SecondMoveInfo = new LineMoveInfo(DeviceID, "[" + Name.Trim() + "-SMove]"); SecondMoveInfo = new LineMoveInfo(DeviceID, "[" + Name.Trim() + "-SMove]");
UseAxis = config.UpDownUseAxis.Equals(1); UseAxis = config.UpDownUseAxis.Equals(1);
if (UseAxis) //if (UseAxis)
{ //{
Config.UpDown_Axis.ServerOnDO = IO_Type.UpDownAxis_ServoOn; // Config.UpDown_Axis.ServerOnDO = IO_Type.UpDownAxis_ServoOn;
Config.UpDown_Axis.BreakOnDO = IO_Type.UpDownAxis_BreakOn; // Config.UpDown_Axis.BreakOnDO = IO_Type.UpDownAxis_BreakOn;
} //}
UpdownAxis = new AxisBean(config.UpDown_Axis, Name); UpdownAxis = new AxisBean(config.UpDown_Axis, Name);
} }
private string GetNByID() private string GetNByID()
......
...@@ -24,7 +24,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -24,7 +24,7 @@ namespace OnlineStore.DeviceLibrary
public LineManager() public LineManager()
{ {
} }
public static void CheckEnum(Type type) public static bool CheckEnum(Type type)
{ {
if (type.IsEnum) if (type.IsEnum)
{ {
...@@ -36,11 +36,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -36,11 +36,13 @@ namespace OnlineStore.DeviceLibrary
{ {
LogUtil.error( type.Name + "枚举值:" + item + "重复存在,请检查代码!程序退出。"); LogUtil.error( type.Name + "枚举值:" + item + "重复存在,请检查代码!程序退出。");
Application.Exit(); Application.Exit();
return false;
break; break;
} }
valueList.Add(item); valueList.Add(item);
} }
} }
return true;
} }
public static bool Init() public static bool Init()
{ {
...@@ -72,13 +74,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -72,13 +74,19 @@ namespace OnlineStore.DeviceLibrary
{ {
IsConnectServer = true; IsConnectServer = true;
} }
CheckEnum(typeof(LineMoveStep)); if (!CheckEnum(typeof(LineMoveStep))){
CheckEnum(typeof(LineStatus)); return false; }
CheckEnum(typeof(LineRunStatus)); if (!CheckEnum(typeof(LineStatus)))
{
return false;
}
if (!CheckEnum(typeof(LineRunStatus))){
return false;
}
isInit = true; isInit = true;
string lineType = ConfigAppSettings.GetValue(Setting_Init.Line_Type); string lineType = ConfigAppSettings.GetValue(Setting_Init.Line_Type);
LogUtil.info( " 类型=" + lineType + ",开始加载 配置"); LogUtil.info(" 类型=" + lineType + ",开始加载 配置");
if (lineType == DeviceType.Line) if (lineType == DeviceType.Line)
{ {
string appPath = Application.StartupPath; string appPath = Application.StartupPath;
...@@ -93,16 +101,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -93,16 +101,16 @@ namespace OnlineStore.DeviceLibrary
{ {
string nameStr = i.ToString().PadLeft(2, '0'); string nameStr = i.ToString().PadLeft(2, '0');
string config = appPath + moveEquipConfig.Replace(".csv", "_" + nameStr + ".csv"); string config = appPath + moveEquipConfig.Replace(".csv", "_" + nameStr + ".csv");
MoveEquip_Config moveConfig = CSVConfigReader.LoadMoveConfig(i,DeviceType.MoveEquip, config); MoveEquip_Config moveConfig = CSVConfigReader.LoadMoveConfig(i, DeviceType.MoveEquip, config);
int subType = i; int subType = i;
// moveConfig.SetIO(subType); // moveConfig.SetIO(subType);
moveECMap.Add(i, moveConfig); moveECMap.Add(i, moveConfig);
// allConfigMap.Add(subType, moveConfig); // allConfigMap.Add(subType, moveConfig);
} }
foreach (int i in moveECMap.Keys) foreach (int i in moveECMap.Keys)
{ {
int subType = i; int subType = i;
moveECMap[i].SetIO(subType); moveECMap[i].SetIO(subType);
allConfigMap.Add(subType, moveECMap[i]); allConfigMap.Add(subType, moveECMap[i]);
} }
int feedingEquipCount = ConfigAppSettings.GetIntValue(Setting_Init.Line_feedingEquip_count); int feedingEquipCount = ConfigAppSettings.GetIntValue(Setting_Init.Line_feedingEquip_count);
...@@ -111,7 +119,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -111,7 +119,7 @@ namespace OnlineStore.DeviceLibrary
{ {
int subType = 100 + i; int subType = 100 + i;
string config = appPath + feedingEquipConfig.Replace(".csv", "_" + i + ".csv"); string config = appPath + feedingEquipConfig.Replace(".csv", "_" + i + ".csv");
FeedingEquip_Config moveConfig = CSVConfigReader.LoadFeedingConfig(subType,DeviceType.FeedingEquip, config); FeedingEquip_Config moveConfig = CSVConfigReader.LoadFeedingConfig(subType, DeviceType.FeedingEquip, config);
moveConfig.SetIO(subType); moveConfig.SetIO(subType);
feedingECMap.Add(subType, moveConfig); feedingECMap.Add(subType, moveConfig);
allConfigMap.Add(subType, moveConfig); allConfigMap.Add(subType, moveConfig);
...@@ -123,8 +131,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -123,8 +131,8 @@ namespace OnlineStore.DeviceLibrary
{ {
int subType = 200 + i; int subType = 200 + i;
string nameStr = i.ToString().PadLeft(2, '0'); string nameStr = i.ToString().PadLeft(2, '0');
string config = appPath + hyEquipConfig.Replace(".csv", "_" +nameStr + ".csv"); string config = appPath + hyEquipConfig.Replace(".csv", "_" + nameStr + ".csv");
HYEquip_Config moveConfig = CSVConfigReader.LoadHYConfig(subType,DeviceType.HYEquip, config); HYEquip_Config moveConfig = CSVConfigReader.LoadHYConfig(subType, DeviceType.HYEquip, config);
moveConfig.SetIO(subType); moveConfig.SetIO(subType);
HYECMap.Add(subType, moveConfig); HYECMap.Add(subType, moveConfig);
allConfigMap.Add(subType, moveConfig); allConfigMap.Add(subType, moveConfig);
...@@ -141,9 +149,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -141,9 +149,9 @@ namespace OnlineStore.DeviceLibrary
// disChargeLineMap.Add(subType, moveConfig); // disChargeLineMap.Add(subType, moveConfig);
// allConfigMap.Add(subType, moveConfig); // allConfigMap.Add(subType, moveConfig);
//} //}
Config.SetIO(1000); Config.SetIO(1000);
Line = new LineBean(Config, moveECMap, feedingECMap, HYECMap); Line = new LineBean(Config, moveECMap, feedingECMap, HYECMap);
LogUtil.info( "加载 完成!"); LogUtil.info("加载 完成!");
return true; return true;
} }
} }
...@@ -154,7 +162,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -154,7 +162,7 @@ namespace OnlineStore.DeviceLibrary
} }
catch (Exception ex) catch (Exception ex)
{ {
LogUtil.error("出错:",ex); LogUtil.error("出错:", ex);
MessageBox.Show(ex.ToString(), "加载配置错误(请检查配置)"); MessageBox.Show(ex.ToString(), "加载配置错误(请检查配置)");
Application.Exit(); Application.Exit();
} }
......
...@@ -46,14 +46,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -46,14 +46,14 @@ namespace OnlineStore.DeviceLibrary
{ {
return DefaultTrayNum; return DefaultTrayNum;
} }
if (subType.Equals(104)) //if (subType.Equals(104))
{ //{
return LineManager.Line.Sw23TrayNum; // return LineManager.Line.Sw23TrayNum;
} //}
else if (subType.Equals(101)) //else if (subType.Equals(101))
{ //{
return LineManager.Line.Sw41TrayNum; // return LineManager.Line.Sw41TrayNum;
} //}
string ip = GetRFIP(subType); string ip = GetRFIP(subType);
//获取盘号 //获取盘号
......
...@@ -465,7 +465,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -465,7 +465,10 @@ namespace OnlineStore.DeviceLibrary
{ {
try try
{ {
if (baseConfig.DType.Equals(DeviceType.HYEquip))
{
//需要判断是否包含此DO
}
if (baseConfig.DType.Equals(DeviceType.FeedingEquip)) if (baseConfig.DType.Equals(DeviceType.FeedingEquip))
{ {
if (!baseConfig.DOList.ContainsKey(IoLowType)) if (!baseConfig.DOList.ContainsKey(IoLowType))
...@@ -531,6 +534,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -531,6 +534,10 @@ namespace OnlineStore.DeviceLibrary
} }
public void IOMove(string IoType, IO_VALUE value, int msTime = 0) public void IOMove(string IoType, IO_VALUE value, int msTime = 0)
{ {
if (baseConfig.DType.Equals(DeviceType.HYEquip))
{
//需要判断是否包含此DO
}
if (msTime <= 0) if (msTime <= 0)
{ {
IOManager.IOMove(IoType, value, baseConfig.Id); IOManager.IOMove(IoType, value, baseConfig.Id);
...@@ -544,8 +551,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -544,8 +551,9 @@ namespace OnlineStore.DeviceLibrary
IO_VALUE tValue = value.Equals(IO_VALUE.HIGH) ? IO_VALUE.LOW : IO_VALUE.HIGH; IO_VALUE tValue = value.Equals(IO_VALUE.HIGH) ? IO_VALUE.LOW : IO_VALUE.HIGH;
if (IOValue(IoType).Equals(tValue).Equals(false)) if (IOValue(IoType).Equals(tValue).Equals(false))
{ {
if (IoType.Equals(IO_Type.StopDown1).Equals(false)&&IoType.Equals(IO_Type.SW_StopDown).Equals(false)) if (IoType.Equals(IO_Type.StopDown1).Equals(false) )
{ //if (IoType.Equals(IO_Type.StopDown1).Equals(false)&&IoType.Equals(IO_Type.SW_StopDown).Equals(false))
{
LogUtil.info(Name + "定时回写IO: [" + IoType + "]=[" + value + "],[" + baseConfig.Id + "],msTime=" + msTime); LogUtil.info(Name + "定时回写IO: [" + IoType + "]=[" + value + "],[" + baseConfig.Id + "],msTime=" + msTime);
} }
} }
......
...@@ -161,8 +161,8 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -161,8 +161,8 @@ namespace OnlineStore.LoadCSVLibrary
{ {
if (!titleIndex.ContainsKey(str)) if (!titleIndex.ContainsKey(str))
{ {
LogUtil.error("【“+lineValue+”】未找到必须列:" + str + ",加载数据失败!"); LogUtil.error("【"+lineValue+"】未找到必须列:" + str + ",加载数据失败!");
throw new CVSFieldNotMatchingExection("未找到必须列:" + str + ",加载数据失败!"); throw new CVSFieldNotMatchingExection("【" + lineValue + "】未找到必须列:" + str + ",加载数据失败!");
} }
} }
} }
......
...@@ -81,7 +81,11 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -81,7 +81,11 @@ namespace OnlineStore.LoadCSVLibrary
} }
private int LineSubType = 1000; private int LineSubType = 1000;
public virtual void LoadConfig(List<ConfigBase> configList) public virtual void LoadConfig(List<ConfigBase> configList)
{ {
List<string> ioTypeList = IO_Type.GetTypeList();
//ioTypeList = new List<string>();
StringBuilder builder = 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>>(); // SubDIList = new Dictionary<int, Dictionary<string, ConfigIO>>();
...@@ -130,6 +134,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -130,6 +134,7 @@ namespace OnlineStore.LoadCSVLibrary
} }
else else
{ {
AddProBuffer(con, proBuilder);
LogUtil.error("配置文件:" + this.ConfigFilePath + ",属性名=" + con.ProName + "的属性未找到匹配字段!"); LogUtil.error("配置文件:" + this.ConfigFilePath + ",属性名=" + con.ProName + "的属性未找到匹配字段!");
} }
} }
...@@ -184,6 +189,12 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -184,6 +189,12 @@ namespace OnlineStore.LoadCSVLibrary
SubDIList[io.SubType].Add(io.ProName, io); SubDIList[io.SubType].Add(io.ProName, io);
} }
} }
if (!ioTypeList.Contains(con.ProName))
{
ioTypeList.Add(con.ProName);
AddBuffer(con, builder);
}
} }
else if (con.ProType == ConfigItemType.DO) else if (con.ProType == ConfigItemType.DO)
{ {
...@@ -234,8 +245,22 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -234,8 +245,22 @@ namespace OnlineStore.LoadCSVLibrary
SubDOList[io.SubType].Add(io.ProName, io); SubDOList[io.SubType].Add(io.ProName, io);
} }
} }
if (!ioTypeList.Contains(con.ProName))
{
ioTypeList.Add(con.ProName);
AddBuffer(con, builder);
}
} }
} }
if (String.IsNullOrEmpty(proBuilder.ToString()).Equals(false) && proBuilder.ToString().Equals("\r\n").Equals(false))
{
LogUtil.error(proBuilder.ToString());
}
if (String.IsNullOrEmpty(builder.ToString()).Equals(false) && builder.ToString().Equals("\r\n").Equals(false))
{
LogUtil.error(builder.ToString());
}
if (checkProList.Count >= 0) if (checkProList.Count >= 0)
{ {
//常规属性检测 //常规属性检测
...@@ -287,8 +312,22 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -287,8 +312,22 @@ namespace OnlineStore.LoadCSVLibrary
} }
} }
} }
private void AddProBuffer(ConfigBase con, StringBuilder builder)
{
builder.Append(" /// <summary>\r\n");
builder.Append(" /// " + con.ConfigStr + "\r\n");
builder.Append(" /// </summary>\r\n");
builder.Append(" [ConfigProAttribute(\"" + con.ProName + "\")]\r\n");
builder.Append(" public int " + con.ProName + " { get; set; }\r\n");
}
private void AddBuffer(ConfigBase con, StringBuilder builder)
{
builder.Append(" /// <summary>\r\n");
builder.Append(" /// " + con.ConfigStr + "\r\n");
builder.Append(" /// </summary>\r\n");
builder.Append(" public static string " + con.ProName + "=\"" + con.ProName + "\";\r\n");
}
public void SetIO( int subType) public void SetIO( int subType)
{ {
//if (subType < 1000) //if (subType < 1000)
......
...@@ -18,6 +18,10 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -18,6 +18,10 @@ namespace OnlineStore.LoadCSVLibrary
public HYEquip_Config(int id, string cid, string type, string filepath) public HYEquip_Config(int id, string cid, string type, string filepath)
: base(id, cid, LoadCSVLibrary.DeviceType.HYEquip, filepath) : base(id, cid, LoadCSVLibrary.DeviceType.HYEquip, filepath)
{ {
IsOutLineOut = 0;
IsOutLineIn = 0;
IsSideWayIn = 0;
IsOutLineOut = 0;
} }
public int SidesWayNum = 0; public int SidesWayNum = 0;
...@@ -27,18 +31,38 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -27,18 +31,38 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary> /// </summary>
[ConfigProAttribute("IsDebug")] [ConfigProAttribute("IsDebug")]
public int IsDebug { get; set; } public int IsDebug { get; set; }
/// <summary> /// <summary>
/// PRO,0,设备对应的出料流水线的编号,DLineEquipNum,1,,,,, /// PRO,0,HY所在流水线,LineName,C1,,
/// </summary> /// </summary>
[ConfigProAttribute("DLineEquipNum", false)] [ConfigProAttribute("LineName")]
public int DLineEquipNum { get; set; } public string LineName { get; set; }
/// <summary>
/// PRO,0,HY工位对应的取放料设备,WorkDevice,105,,
/// </summary>
[ConfigProAttribute("WorkDevice")]
public string WorkDevice { get; set; }
/// <summary>
/// PRO,0,HY是否是托盘横移入口,IsSideWayIn,0,,
/// </summary>
[ConfigProAttribute("IsSideWayIn")]
public int IsSideWayIn { get; set; }
/// <summary> /// <summary>
/// PRO,0,设备对应的出料流水线的第几条流水线,DLineLineNum,1,,,,, /// PRO,0,HY是否是托盘横移出口,IsSideWayOut,1,,
/// </summary> /// </summary>
[ConfigProAttribute("DLineLineNum", false)] [ConfigProAttribute("IsSideWayOut")]
public int DLineLineNum { get; set; } public int IsSideWayOut { get; set; }
/// <summary>
/// PRO,0,HY是否是托盘进入出料线入口,IsOutLineIn,0,,
/// </summary>
[ConfigProAttribute("IsOutLineIn")]
public int IsOutLineIn { get; set; }
/// <summary>
/// PRO,0,HY是否是托盘离开出料线出口,IsOutLineOut,0,,
/// </summary>
[ConfigProAttribute("IsOutLineOut")]
public int IsOutLineOut { get; set; }
/// <summary> /// <summary>
/// PRO 0 移栽上下运动是否使用伺服 UpDownUseAxis 1 /// PRO 0 移栽上下运动是否使用伺服 UpDownUseAxis 1
......
...@@ -138,8 +138,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -138,8 +138,7 @@ namespace OnlineStore.LoadCSVLibrary
MustHaveDOList = new List<string>(); MustHaveDOList = new List<string>();
MustHaveDIList.Add(IO_Type.SuddenStop_BTN); MustHaveDIList.Add(IO_Type.SuddenStop_BTN);
MustHaveDIList.Add(IO_Type.Reset_BTN); MustHaveDIList.Add(IO_Type.Reset_BTN);
MustHaveDIList.Add(IO_Type.Start_BTN);
MustHaveDIList.Add(IO_Type.Airpressure_Check); MustHaveDIList.Add(IO_Type.Airpressure_Check);
//MustHaveDIList.Add(IO_Type.NGCylinder_Before); //MustHaveDIList.Add(IO_Type.NGCylinder_Before);
//MustHaveDIList.Add(IO_Type.NGCylinder_After); //MustHaveDIList.Add(IO_Type.NGCylinder_After);
...@@ -151,11 +150,11 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -151,11 +150,11 @@ namespace OnlineStore.LoadCSVLibrary
MustHaveDOList.Add(IO_Type.RunSign_HddLed); MustHaveDOList.Add(IO_Type.RunSign_HddLed);
MustHaveDOList.Add(IO_Type.Alarm_HddLed); MustHaveDOList.Add(IO_Type.Alarm_HddLed);
MustHaveDOList.Add(IO_Type.Alarm_Buzzer); MustHaveDOList.Add(IO_Type.Alarm_Buzzer);
MustHaveDOList.Add(IO_Type.DriveMotor_Run1); //MustHaveDOList.Add(IO_Type.DriveMotor_Run1);
MustHaveDOList.Add(IO_Type.DriveMotor_Run2); //MustHaveDOList.Add(IO_Type.DriveMotor_Run2);
MustHaveDOList.Add(IO_Type.DriveMotor_Run3); //MustHaveDOList.Add(IO_Type.DriveMotor_Run3);
MustHaveDOList.Add(IO_Type.DriveMotor_Run4); //MustHaveDOList.Add(IO_Type.DriveMotor_Run4);
MustHaveDOList.Add(IO_Type.SW4_MotorRun); //MustHaveDOList.Add(IO_Type.SW4_MotorRun);
//MustHaveDOList.Add(IO_Type.NGCylinder_Before); //MustHaveDOList.Add(IO_Type.NGCylinder_Before);
//MustHaveDOList.Add(IO_Type.NGCylinder_After); //MustHaveDOList.Add(IO_Type.NGCylinder_After);
MustHaveDOList.Add(IO_Type.TopCylinder_UP); MustHaveDOList.Add(IO_Type.TopCylinder_UP);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!