Commit 0817341e LN

板卡连接方式修改。bug修改

1 个父辈 c4988849
...@@ -55,9 +55,6 @@ ...@@ -55,9 +55,6 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup /> <PropertyGroup />
<ItemGroup> <ItemGroup>
<Reference Include="Asa.RFID">
<HintPath>..\..\dll\RFID\Asa.RFID.dll</HintPath>
</Reference>
<Reference Include="Client"> <Reference Include="Client">
<HintPath>..\..\dll\Client.dll</HintPath> <HintPath>..\..\dll\Client.dll</HintPath>
</Reference> </Reference>
...@@ -79,7 +76,6 @@ ...@@ -79,7 +76,6 @@
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
...@@ -88,6 +84,12 @@ ...@@ -88,6 +84,12 @@
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="FrmBase.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmBase.Designer.cs">
<DependentUpon>FrmBase.cs</DependentUpon>
</Compile>
<Compile Include="FrmHYEquip.cs"> <Compile Include="FrmHYEquip.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
...@@ -112,12 +114,6 @@ ...@@ -112,12 +114,6 @@
<Compile Include="useControl\AxisMoveControl.Designer.cs"> <Compile Include="useControl\AxisMoveControl.Designer.cs">
<DependentUpon>AxisMoveControl.cs</DependentUpon> <DependentUpon>AxisMoveControl.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="FrmBase.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmBase.Designer.cs">
<DependentUpon>FrmBase.cs</DependentUpon>
</Compile>
<Compile Include="FrmEquipBase.cs"> <Compile Include="FrmEquipBase.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
...@@ -169,6 +165,9 @@ ...@@ -169,6 +165,9 @@
<Compile Include="useControl\EquipControl.Designer.cs"> <Compile Include="useControl\EquipControl.Designer.cs">
<DependentUpon>EquipControl.cs</DependentUpon> <DependentUpon>EquipControl.cs</DependentUpon>
</Compile> </Compile>
<EmbeddedResource Include="FrmBase.resx">
<DependentUpon>FrmBase.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmHYEquip.resx"> <EmbeddedResource Include="FrmHYEquip.resx">
<DependentUpon>FrmHYEquip.cs</DependentUpon> <DependentUpon>FrmHYEquip.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
...@@ -181,9 +180,6 @@ ...@@ -181,9 +180,6 @@
<EmbeddedResource Include="useControl\AxisMoveControl.resx"> <EmbeddedResource Include="useControl\AxisMoveControl.resx">
<DependentUpon>AxisMoveControl.cs</DependentUpon> <DependentUpon>AxisMoveControl.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="FrmBase.resx">
<DependentUpon>FrmBase.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmEquipBase.resx"> <EmbeddedResource Include="FrmEquipBase.resx">
<DependentUpon>FrmEquipBase.cs</DependentUpon> <DependentUpon>FrmEquipBase.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.BackColor = System.Drawing.Color.White; this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(300, 300); this.ClientSize = new System.Drawing.Size(293, 273);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmBase"; this.Name = "FrmBase";
......
...@@ -120,19 +120,19 @@ namespace OnlineStore.AssemblyLine ...@@ -120,19 +120,19 @@ namespace OnlineStore.AssemblyLine
if (LineManager.Line.IOValue(IO_Type.HY_TopCylinder_Up).Equals(IO_VALUE.HIGH)) if (LineManager.Line.IOValue(IO_Type.HY_TopCylinder_Up).Equals(IO_VALUE.HIGH))
{ {
HY_TopCylinder_Up.ForeColor = Color.LawnGreen; HY_TopCylinder_Up.BackColor = Color.LawnGreen;
} }
else else
{ {
HY_TopCylinder_Up.ForeColor = Color.White ; HY_TopCylinder_Up.BackColor = Color.White ;
} }
if (LineManager.Line.IOValue(IO_Type.HY_TopCylinder_Down).Equals(IO_VALUE.HIGH)) if (LineManager.Line.IOValue(IO_Type.HY_TopCylinder_Down).Equals(IO_VALUE.HIGH))
{ {
HY_TopCylinder_Down.ForeColor = Color.LawnGreen; HY_TopCylinder_Down.BackColor = Color.LawnGreen;
} }
else else
{ {
HY_TopCylinder_Down.ForeColor = Color.White; HY_TopCylinder_Down.BackColor = Color.White;
} }
} }
} }
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
{ {
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
this.groupAxis = new System.Windows.Forms.GroupBox(); this.groupAxis = new System.Windows.Forms.GroupBox();
this.lblStatus = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.lblAlarmcode = new System.Windows.Forms.Label(); this.lblAlarmcode = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label();
...@@ -100,7 +101,7 @@ ...@@ -100,7 +101,7 @@
this.btnAxisVMove = new System.Windows.Forms.Button(); this.btnAxisVMove = new System.Windows.Forms.Button();
this.btnReadPosition = new System.Windows.Forms.Button(); this.btnReadPosition = new System.Windows.Forms.Button();
this.timer1 = new System.Windows.Forms.Timer(this.components); this.timer1 = new System.Windows.Forms.Timer(this.components);
this.lblStatus = new System.Windows.Forms.Label(); this.lblAxisType = new System.Windows.Forms.Label();
this.groupAxis.SuspendLayout(); this.groupAxis.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
...@@ -112,6 +113,7 @@ ...@@ -112,6 +113,7 @@
this.groupAxis.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.groupAxis.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.groupAxis.Controls.Add(this.lblAxisType);
this.groupAxis.Controls.Add(this.lblStatus); this.groupAxis.Controls.Add(this.lblStatus);
this.groupAxis.Controls.Add(this.groupBox2); this.groupAxis.Controls.Add(this.groupBox2);
this.groupAxis.Controls.Add(this.btnComAlarmClear); this.groupAxis.Controls.Add(this.btnComAlarmClear);
...@@ -128,6 +130,15 @@ ...@@ -128,6 +130,15 @@
this.groupAxis.TabStop = false; this.groupAxis.TabStop = false;
this.groupAxis.Text = "伺服运动"; this.groupAxis.Text = "伺服运动";
// //
// lblStatus
//
this.lblStatus.AutoSize = true;
this.lblStatus.Location = new System.Drawing.Point(8, 376);
this.lblStatus.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblStatus.Name = "lblStatus";
this.lblStatus.Size = new System.Drawing.Size(0, 17);
this.lblStatus.TabIndex = 305;
//
// groupBox2 // groupBox2
// //
this.groupBox2.Controls.Add(this.lblAlarmcode); this.groupBox2.Controls.Add(this.lblAlarmcode);
...@@ -953,14 +964,14 @@ ...@@ -953,14 +964,14 @@
// //
this.timer1.Tick += new System.EventHandler(this.timer1_Tick); this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
// //
// lblStatus // lblAxisType
// //
this.lblStatus.AutoSize = true; this.lblAxisType.AutoSize = true;
this.lblStatus.Location = new System.Drawing.Point(8, 380); this.lblAxisType.Location = new System.Drawing.Point(8, 398);
this.lblStatus.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.lblAxisType.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblStatus.Name = "lblStatus"; this.lblAxisType.Name = "lblAxisType";
this.lblStatus.Size = new System.Drawing.Size(0, 17); this.lblAxisType.Size = new System.Drawing.Size(0, 17);
this.lblStatus.TabIndex = 305; this.lblAxisType.TabIndex = 306;
// //
// AxisMoveControl // AxisMoveControl
// //
...@@ -1055,5 +1066,6 @@ ...@@ -1055,5 +1066,6 @@
private System.Windows.Forms.Label lblAlarmcode; private System.Windows.Forms.Label lblAlarmcode;
private System.Windows.Forms.LinkLabel linkLabel1; private System.Windows.Forms.LinkLabel linkLabel1;
private System.Windows.Forms.Label lblStatus; private System.Windows.Forms.Label lblStatus;
private System.Windows.Forms.Label lblAxisType;
} }
} }
...@@ -328,6 +328,7 @@ namespace OnlineStore.AssemblyLine ...@@ -328,6 +328,7 @@ namespace OnlineStore.AssemblyLine
short value = HCBoardManager.GetHomeStatus(axisNo); short value = HCBoardManager.GetHomeStatus(axisNo);
string homesstr = HCBoardManager.AxisHomeSts(value); string homesstr = HCBoardManager.AxisHomeSts(value);
lblhomeSts.Text = homesstr; lblhomeSts.Text = homesstr;
lblAxisType.Text = HCBoardManager.GetAxType(axisNo);
//lblCountPulse.Text = AxisManager.instance.GetActualtPosition(PortName, SlvAddr).ToString(); //lblCountPulse.Text = AxisManager.instance.GetActualtPosition(PortName, SlvAddr).ToString();
} }
......
...@@ -73,7 +73,7 @@ DI,217,HY17接驳台气缸取料端,HY_MoveCylinder_Take,11,HC,X11 ...@@ -73,7 +73,7 @@ DI,217,HY17接驳台气缸取料端,HY_MoveCylinder_Take,11,HC,X11
DI,217,HY17接驳台气缸放料端,HY_MoveCylinder_Give,12,HC,X12 DI,217,HY17接驳台气缸放料端,HY_MoveCylinder_Give,12,HC,X12
DI,217,HY17夹料气缸料盘检测,HY_ClampCylinder_Check,13,HC,X13 DI,217,HY17夹料气缸料盘检测,HY_ClampCylinder_Check,13,HC,X13
DI,217,HY17夹料气缸放松端,HY_ClampCylinder_Relax,14,HC,X14 DI,217,HY17夹料气缸放松端,HY_ClampCylinder_Relax,14,HC,X14
,0,,,15,HC,X15 DI,217,C9-HY14满料托盘检测,HY_OL_Full_Check,15,HC,X15
,,,,,, ,,,,,,
DO,0,待机状态(指示灯),AutoRun_HddLed,0,HC,Y00 DO,0,待机状态(指示灯),AutoRun_HddLed,0,HC,Y00
DO,0,运行状态(指示灯),RunSign_HddLed,1,HC,Y01 DO,0,运行状态(指示灯),RunSign_HddLed,1,HC,Y01
...@@ -136,7 +136,7 @@ DI,216,HY16横移顶升上升端,HY_TopCylinder_Up,54,HC,X54 ...@@ -136,7 +136,7 @@ DI,216,HY16横移顶升上升端,HY_TopCylinder_Up,54,HC,X54
DI,216,HY16横移顶升下降端,HY_TopCylinder_Down,55,HC,X55 DI,216,HY16横移顶升下降端,HY_TopCylinder_Down,55,HC,X55
DI,216,HY16-C7阻挡上升端,HY_OL_StopCylinder_Up,56,HC,X56 DI,216,HY16-C7阻挡上升端,HY_OL_StopCylinder_Up,56,HC,X56
DI,216,HY16-C7阻挡下降端,HY_OL_StopCylinder_Down,57,HC,X57 DI,216,HY16-C7阻挡下降端,HY_OL_StopCylinder_Down,57,HC,X57
DI,217,C7-HY17满料检测,HY_OL_Full_Check,58,HC,X58 DI,216,C7-HY17满料检测,HY_OL_Full_Check,58,HC,X58
,,,,59,HC,X59 ,,,,59,HC,X59
,,,,60,HC,X60 ,,,,60,HC,X60
,,,,61,HC,X61 ,,,,61,HC,X61
...@@ -1025,7 +1025,7 @@ DI,207,HY7横移顶升下降端,HY_TopCylinder_Down,487,HC,X487 ...@@ -1025,7 +1025,7 @@ DI,207,HY7横移顶升下降端,HY_TopCylinder_Down,487,HC,X487
DI,207,C3-HY7短线前阻挡托盘检测,HY_ShortL_StopCheck,488,HC,X488 DI,207,C3-HY7短线前阻挡托盘检测,HY_ShortL_StopCheck,488,HC,X488
DI,207,C8-HY7长线前阻挡托盘检测,HY_LongL_StopCheck,489,HC,X489 DI,207,C8-HY7长线前阻挡托盘检测,HY_LongL_StopCheck,489,HC,X489
DI,207,C8线体HY7侧满料检测,HY_OL_Full_Check,490,HC,X490 DI,207,C8线体HY7侧满料检测,HY_OL_Full_Check,490,HC,X490
DI,209,C4-HY9满料检测,HY_OL_Full_Check,491,HC,X491 DI,210,C4-HY9满料检测,HY_OL_Full_Check,491,HC,X491
DI,210,HY10前阻挡托盘检测,HY_FrontStopCheck,492,HC,X492 DI,210,HY10前阻挡托盘检测,HY_FrontStopCheck,492,HC,X492
DI,210,HY10横移托盘检测,HY_TrayCheck,493,HC,X493 DI,210,HY10横移托盘检测,HY_TrayCheck,493,HC,X493
DI,210,HY10横移顶升上升端,HY_TopCylinder_Up,494,HC,X494 DI,210,HY10横移顶升上升端,HY_TopCylinder_Up,494,HC,X494
...@@ -1192,7 +1192,7 @@ DI,214,HY14横移托盘检测,HY_TrayCheck,561,HC,X561 ...@@ -1192,7 +1192,7 @@ DI,214,HY14横移托盘检测,HY_TrayCheck,561,HC,X561
DI,214,C9-HY14长线前阻挡托盘检测,HY_LongL_StopCheck,562,HC,X562 DI,214,C9-HY14长线前阻挡托盘检测,HY_LongL_StopCheck,562,HC,X562
DI,214,HY14横移顶升上升端,HY_TopCylinder_Up,563,HC,X563 DI,214,HY14横移顶升上升端,HY_TopCylinder_Up,563,HC,X563
DI,214,HY14横移顶升下降端,HY_TopCylinder_Down,564,HC,X564 DI,214,HY14横移顶升下降端,HY_TopCylinder_Down,564,HC,X564
DI,211,C5-HY11满料检测,HY_OL_Full_Check,565,HC,X565 DI,212,C5-HY11满料检测,HY_OL_Full_Check,565,HC,X565
DI,212,C9-HY12前阻挡托盘检测,HY_FrontStopCheck,566,HC,X566 DI,212,C9-HY12前阻挡托盘检测,HY_FrontStopCheck,566,HC,X566
DI,212,HY12横移托盘检测,HY_TrayCheck,567,HC,X567 DI,212,HY12横移托盘检测,HY_TrayCheck,567,HC,X567
DI,212,HY12横移顶升上升端,HY_TopCylinder_Up,568,HC,X568 DI,212,HY12横移顶升上升端,HY_TopCylinder_Up,568,HC,X568
...@@ -1209,7 +1209,7 @@ DI,212,HY12接驳台料盘检测7寸,HY_TrayCheck1,578,HC,X578 ...@@ -1209,7 +1209,7 @@ DI,212,HY12接驳台料盘检测7寸,HY_TrayCheck1,578,HC,X578
DI,212,HY12接驳台料盘检测11寸,HY_TrayCheck2,579,HC,X579 DI,212,HY12接驳台料盘检测11寸,HY_TrayCheck2,579,HC,X579
DI,212,HY12接驳台料盘检测13寸,HY_TrayCheck3,580,HC,X580 DI,212,HY12接驳台料盘检测13寸,HY_TrayCheck3,580,HC,X580
DI,212,HY12接驳台料盘检测15寸,HY_TrayCheck4,581,HC,X581 DI,212,HY12接驳台料盘检测15寸,HY_TrayCheck4,581,HC,X581
,,,,582,HC,X582 DI,214,C9-HY12满料托盘检测,HY_OL_Full_Check,582,HC,X582
,,,,583,HC,X583 ,,,,583,HC,X583
,,,,584,HC,X584 ,,,,584,HC,X584
,,,,585,HC,X585 ,,,,585,HC,X585
......
...@@ -91,7 +91,7 @@ namespace HuichuanLibrary ...@@ -91,7 +91,7 @@ namespace HuichuanLibrary
} }
private void btnInitBoard_Click(object sender, EventArgs e) private void btnInitBoard_Click(object sender, EventArgs e)
{ {
bool result = HCBoardManager.OpenCard(); bool result = HCBoardManager.OpenCard(1);
if (result) if (result)
{ {
cmbAxisIndex.Items.Clear(); cmbAxisIndex.Items.Clear();
......
...@@ -435,8 +435,9 @@ namespace HuichuanLibrary ...@@ -435,8 +435,9 @@ namespace HuichuanLibrary
sts.ServoOn = ((axisState & 0x02) == 0x02) ? 1 : 0; //使能信号 sts.ServoOn = ((axisState & 0x02) == 0x02) ? 1 : 0; //使能信号
sts.BUSY = ((axisState & 0x04) == 0x04) ? 1 : 0; //轴忙信号 sts.BUSY = ((axisState & 0x04) == 0x04) ? 1 : 0; //轴忙信号
sts.INP = ((axisState & 0x08) == 0x08) ? 1 : 0; //轴到位信号 sts.INP = ((axisState & 0x08) == 0x08) ? 1 : 0; //轴到位信号
sts.WARN = ((axisState & 0x1000) == 0x1000) ? 1 : 0; //警告信号
sts.EMG = ((axisState & 0x200) == 0x200) ? 1 : 0; //急停信号 sts.EMG = ((axisState & 0x200) == 0x200) ? 1 : 0; //急停信号
sts.WARN = ((axisState & 0x1000) == 0x1000) ? 1 : 0; //警告信号
sts.ECAT = ((axisState & ImcApi.AX_ECAT_BIT) == ImcApi.AX_ECAT_BIT) ? 1 : 0;//总线轴标志
Int16 nTimerAxInput = 0; Int16 nTimerAxInput = 0;
ret = ImcApi.IMC_GetAxEcatDigitalInput(nCardHandle, axisNo, ref nTimerAxInput); ret = ImcApi.IMC_GetAxEcatDigitalInput(nCardHandle, axisNo, ref nTimerAxInput);
...@@ -591,6 +592,26 @@ namespace HuichuanLibrary ...@@ -591,6 +592,26 @@ namespace HuichuanLibrary
} }
return outV; return outV;
} }
public static string GetAxType(short axisNo )
{
string res = "";
if (!CardInitOk())
{
return res;
}
short pAxType = -1;
short pOutChn = -1;
UInt32 ret = ImcApi.IMC_GetAxType(nCardHandle, axisNo, ref pAxType,ref pOutChn);
res = "轴类型["+pAxType+ "],物理通道[" + pOutChn + "]";
if (ret != 0)
{
ShowErrorLog(" Axis[" + axisNo + "] GetAxType FAIL, ErrorCode=0x" + ret.ToString("x8"));
}
return res;
}
#endregion #endregion
#region 轴状态 #region 轴状态
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!