Commit b905d7d3 贾鹏旭

1.添加电子屏查找元器件功能

1 个父辈 bb6daf72
...@@ -38,6 +38,9 @@ ...@@ -38,6 +38,9 @@
<Reference Include="Asa.IOModule.AIOBOX"> <Reference Include="Asa.IOModule.AIOBOX">
<HintPath>..\dll\Asa.IOModule.AIOBOX.dll</HintPath> <HintPath>..\dll\Asa.IOModule.AIOBOX.dll</HintPath>
</Reference> </Reference>
<Reference Include="ExcelDataReader, Version=3.6.0.0, Culture=neutral, PublicKeyToken=93517dbe6a4012fa, processorArchitecture=MSIL">
<HintPath>..\packages\ExcelDataReader.3.6.0\lib\net45\ExcelDataReader.dll</HintPath>
</Reference>
<Reference Include="halcondotnet"> <Reference Include="halcondotnet">
<HintPath>..\dll\halcondotnet.dll</HintPath> <HintPath>..\dll\halcondotnet.dll</HintPath>
</Reference> </Reference>
...@@ -62,6 +65,8 @@ ...@@ -62,6 +65,8 @@
<HintPath>..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\lib\net46\System.Data.SQLite.dll</HintPath> <HintPath>..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\lib\net46\System.Data.SQLite.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Net.Http" />
<Reference Include="System.ServiceModel" /> <Reference Include="System.ServiceModel" />
<Reference Include="System.ServiceModel.Web" /> <Reference Include="System.ServiceModel.Web" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
...@@ -100,6 +105,7 @@ ...@@ -100,6 +105,7 @@
<Compile Include="manager\LedManager.cs" /> <Compile Include="manager\LedManager.cs" />
<Compile Include="manager\LineWidthManager.cs" /> <Compile Include="manager\LineWidthManager.cs" />
<Compile Include="manager\ResourceControl.cs" /> <Compile Include="manager\ResourceControl.cs" />
<Compile Include="manager\ScanRequestLabel.cs" />
<Compile Include="manager\StockInfo.cs" /> <Compile Include="manager\StockInfo.cs" />
<Compile Include="manager\TSAVBean.cs" /> <Compile Include="manager\TSAVBean.cs" />
<Compile Include="manager\TSAVBean_Partial.cs" /> <Compile Include="manager\TSAVBean_Partial.cs" />
...@@ -138,6 +144,7 @@ ...@@ -138,6 +144,7 @@
<Content Include="config\元器件信息模板.csv"> <Content Include="config\元器件信息模板.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<None Include="app.config" />
<None Include="config\AOIConfig\aaaaa.data" /> <None Include="config\AOIConfig\aaaaa.data" />
<None Include="config\calibration.csv" /> <None Include="config\calibration.csv" />
<None Include="config\componet\43.csv" /> <None Include="config\componet\43.csv" />
......
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.12.0" newVersion="2.0.12.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
\ No newline at end of file \ No newline at end of file
...@@ -24,48 +24,48 @@ namespace TSA_V.LoadCSVLibrary ...@@ -24,48 +24,48 @@ namespace TSA_V.LoadCSVLibrary
/// <summary> /// <summary>
///位号/编号 ///位号/编号
/// </summary> /// </summary>
[CSVAttribute("Num", true,"位号", "编号")] [CSVAttribute("Num", true,"位号", "编号", "Part Number")]
public string TagNo { get; set; } public string TagNo { get; set; }
/// <summary> /// <summary>
/// 物料编码/元器件名称 /// 物料编码/元器件名称
/// </summary> /// </summary>
[CSVAttribute("Code", true, "物料编码", "元器件名称", "Name")] [CSVAttribute("Code", true, "物料编码", "元器件名称", "Name", "Material Code")]
public string PN { get; set; } public string PN { get; set; }
/// <summary> /// <summary>
///元器件描述 ///元器件描述
/// </summary> /// </summary>
[CSVAttribute("Describe", "元器件描述", false )] [CSVAttribute("Describe", false, "元器件描述", "Description")]
public string ComponentDes { get; set; } public string ComponentDes { get; set; }
/// <summary> /// <summary>
///数量 ///数量
/// </summary> /// </summary>
[CSVAttribute("Count", "数量", true)] [CSVAttribute("Count", true,"数量", "Quantity")]
public int ComCount { get; set; } public int ComCount { get; set; }
/// <summary> /// <summary>
///位置 ///位置
/// </summary> /// </summary>
[CSVAttribute("PNum", true, "料盘位置", "位置", "PositionNum")] [CSVAttribute("PNum", true, "料盘位置", "位置", "PositionNum", "Lot")]
public string PositionNum { get; set; } public string PositionNum { get; set; }
/// <summary> /// <summary>
///X坐标 ///X坐标
/// </summary> /// </summary>
[CSVAttribute("PositionX", "X坐标", false)] [CSVAttribute("PositionX", false,"X坐标", "X")]
public double PositionX { get; set; } public double PositionX { get; set; }
/// <summary> /// <summary>
///Y坐标 ///Y坐标
/// </summary> /// </summary>
[CSVAttribute("PositionY", "Y坐标", false)] [CSVAttribute("PositionY", false,"Y坐标", "Y")]
public double PositionY { get; set; } public double PositionY { get; set; }
/// <summary> /// <summary>
///注意事项 ///注意事项
/// </summary> /// </summary>
[CSVAttribute("Notes", "注意事项", false)] [CSVAttribute("Notes",false, "注意事项", "Note")]
public string Notes { get; set; } public string Notes { get; set; }
/// <summary> /// <summary>
///投影文字 ///投影文字
......
using PUSICANLibrary; using PUSICANLibrary;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks;
using TSA_V.Common; using TSA_V.Common;
using TSA_V.DeviceLibrary.manager;
using TSA_V.LoadCSVLibrary; using TSA_V.LoadCSVLibrary;
namespace TSA_V.DeviceLibrary namespace TSA_V.DeviceLibrary
...@@ -35,7 +32,7 @@ namespace TSA_V.DeviceLibrary ...@@ -35,7 +32,7 @@ namespace TSA_V.DeviceLibrary
public DateTime LastSetpTime = DateTime.Now; public DateTime LastSetpTime = DateTime.Now;
public uint PreNodeId = 0; public uint PreNodeId = 0;
public List<SMTPointInfo> needWorkSmtList = new List<SMTPointInfo>(); public List<SMTPointInfo> needWorkSmtList = new List<SMTPointInfo>();
//开始工作后共工作了几块电路板 //开始工作后共工作了几块电路板``````
public int BoardCount = 0; public int BoardCount = 0;
public DateTime beginWorkTime = DateTime.Now; public DateTime beginWorkTime = DateTime.Now;
public bool IsShowAOI = false; public bool IsShowAOI = false;
...@@ -132,7 +129,6 @@ namespace TSA_V.DeviceLibrary ...@@ -132,7 +129,6 @@ namespace TSA_V.DeviceLibrary
IsWaitMove = false; IsWaitMove = false;
waitList = new List<WaitResultInfo>(); waitList = new List<WaitResultInfo>();
} }
public bool MoveToNextPoint(bool isNext) public bool MoveToNextPoint(bool isNext)
{ {
return MoveToNextPoint(isNext, false); return MoveToNextPoint(isNext, false);
...@@ -276,6 +272,14 @@ namespace TSA_V.DeviceLibrary ...@@ -276,6 +272,14 @@ namespace TSA_V.DeviceLibrary
} }
public void MoveToBag(TSAVPosition position) public void MoveToBag(TSAVPosition position)
{ {
Dictionary<string,string> pairs = new Dictionary<string,string>();
if (pairs.Count!=0)
{
//关灯
LogUtil.info($"{pairs.ToString()}");
ScanRequestLabel.Turnoffthelights(pairs);
pairs.Clear();
}
//LedManager.LedOFFALL(); //LedManager.LedOFFALL();
if (position.PositionType.Equals(1)) if (position.PositionType.Equals(1))
{ {
...@@ -298,6 +302,24 @@ namespace TSA_V.DeviceLibrary ...@@ -298,6 +302,24 @@ namespace TSA_V.DeviceLibrary
LogUtil.error("positionNum=" + position.PositionNum + ",未找到对应的运动轴!"); LogUtil.error("positionNum=" + position.PositionNum + ",未找到对应的运动轴!");
} }
} }
#region 2023-09-22 添加 控制便签功能
else if (position.PositionType.Equals(2))
{
LogUtil.info("电子屏闪烁!");
var smtPoint=TSAVBean.Work.currPoint;
ComponetInfo com = CSVBomManager.GetCom(BoardManager.CurrBoard.bomName, smtPoint);
string count=null;
string pnname = null;
string ComponentDes=null;
if (com!=null)
{
count = com.ComCount.ToString();
pnname=com.PN.ToString();
ComponentDes=com.ComponentDes.ToString();
}
ScanRequestLabel.RequestPost(position, count, pnname, ComponentDes ,out pairs);
}
#endregion
else else
{ {
if (PreNodeId > 0) if (PreNodeId > 0)
...@@ -310,7 +332,6 @@ namespace TSA_V.DeviceLibrary ...@@ -310,7 +332,6 @@ namespace TSA_V.DeviceLibrary
waitList.Add(WaitResultInfo.WaitTime(500)); waitList.Add(WaitResultInfo.WaitTime(500));
} }
} }
public bool IsLastP() public bool IsLastP()
{ {
if (IsWorking) if (IsWorking)
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="ExcelDataReader" version="3.6.0" targetFramework="net48" />
<package id="Stub.System.Data.SQLite.Core.NetFramework" version="1.0.113.3" targetFramework="net461" /> <package id="Stub.System.Data.SQLite.Core.NetFramework" version="1.0.113.3" targetFramework="net461" />
<package id="System.Data.SQLite.Core" version="1.0.113.7" targetFramework="net461" /> <package id="System.Data.SQLite.Core" version="1.0.113.7" targetFramework="net461" />
<package id="System.Net.Http" version="4.3.4" targetFramework="net461" /> <package id="System.Net.Http" version="4.3.4" targetFramework="net461" />
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<configSections> <configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" /> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
<add key="PointDisplayType" value="1" /> <add key="PointDisplayType" value="1" />
<!--禁用底部气缸--> <!--禁用底部气缸-->
<add key ="DisableBottomCylinder" value="1"/> <add key="DisableBottomCylinder" value="1" />
</appSettings> </appSettings>
<log4net> <log4net>
<appender name="defaultAppender" type="log4net.Appender.RollingFileAppender"> <appender name="defaultAppender" type="log4net.Appender.RollingFileAppender">
......
...@@ -90,7 +90,6 @@ ...@@ -90,7 +90,6 @@
this.chbISDebug.TabIndex = 19; this.chbISDebug.TabIndex = 19;
this.chbISDebug.Text = "是否调试模式,会自动下一步"; this.chbISDebug.Text = "是否调试模式,会自动下一步";
this.chbISDebug.UseVisualStyleBackColor = true; this.chbISDebug.UseVisualStyleBackColor = true;
this.chbISDebug.CheckedChanged += new System.EventHandler(this.chbISDebug_CheckedChanged);
// //
// groupBox4 // groupBox4
// //
......
...@@ -130,10 +130,6 @@ namespace TSA_V ...@@ -130,10 +130,6 @@ namespace TSA_V
} }
private void chbISDebug_CheckedChanged(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e) private void button1_Click(object sender, EventArgs e)
{ {
......
...@@ -9,6 +9,7 @@ using System.Text; ...@@ -9,6 +9,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using TSA_V.Common; using TSA_V.Common;
using TSA_V.DeviceLibrary.manager;
namespace TSA_V namespace TSA_V
{ {
...@@ -46,6 +47,7 @@ namespace TSA_V ...@@ -46,6 +47,7 @@ namespace TSA_V
string str = ConfigAppSettings.GetValue(Setting_Init.Default_Language); string str = ConfigAppSettings.GetValue(Setting_Init.Default_Language);
if (rbtnEnglish.Checked) if (rbtnEnglish.Checked)
{ {
//ScanRequestLabel.Switchlanguage(1);
str = ResourceCulture.English; str = ResourceCulture.English;
} }
else if (rbtnRussian.Checked) else if (rbtnRussian.Checked)
...@@ -54,6 +56,7 @@ namespace TSA_V ...@@ -54,6 +56,7 @@ namespace TSA_V
} }
else else
{ {
//ScanRequestLabel.Switchlanguage(0);
str = ResourceCulture.China; str = ResourceCulture.China;
} }
ResourceCulture.SetCurrentCulture(str); ResourceCulture.SetCurrentCulture(str);
......
...@@ -102,6 +102,7 @@ ...@@ -102,6 +102,7 @@
<Reference Include="System.Data.SQLite, Version=1.0.113.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL"> <Reference Include="System.Data.SQLite, Version=1.0.113.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\lib\net46\System.Data.SQLite.dll</HintPath> <HintPath>..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\lib\net46\System.Data.SQLite.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Net.Http" />
<Reference Include="System.Speech" /> <Reference Include="System.Speech" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Windows.Forms.DataVisualization" /> <Reference Include="System.Windows.Forms.DataVisualization" />
......
...@@ -15,6 +15,8 @@ using PUSICANLibrary; ...@@ -15,6 +15,8 @@ using PUSICANLibrary;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using AOI; using AOI;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Net.Http;
using TSA_V.DeviceLibrary.manager;
namespace TSA_V namespace TSA_V
{ {
...@@ -813,6 +815,19 @@ namespace TSA_V ...@@ -813,6 +815,19 @@ namespace TSA_V
} }
else else
{ {
#region 2023-09-22 添加 控制便签功能
//string count = null;
//string pnname = null;
//string ComponentDes = null;
//if (com != null)
//{
// count = com.ComCount.ToString();
// pnname = com.PN.ToString();
// ComponentDes = com.ComponentDes;
//}
////调用指示灯显示
//ScanRequestLabel.RequestPost(position, count, pnname, ComponentDes);
#endregion
lblPositionNum.Text = position.PositionNum; lblPositionNum.Text = position.PositionNum;
} }
int leftCount = workSmtList.Count - 1 - preIndex; int leftCount = workSmtList.Count - 1 - preIndex;
...@@ -861,7 +876,6 @@ namespace TSA_V ...@@ -861,7 +876,6 @@ namespace TSA_V
} }
} }
private void btnUpateCount_Click(object sender, EventArgs e) private void btnUpateCount_Click(object sender, EventArgs e)
{ {
ShowUpdateCount(true); ShowUpdateCount(true);
......
...@@ -117,6 +117,7 @@ ...@@ -117,6 +117,7 @@
</Content> </Content>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="app.config" />
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
......
文件属性发生变化
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!