Commit b905d7d3 贾鹏旭

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

1 个父辈 bb6daf72
......@@ -38,6 +38,9 @@
<Reference Include="Asa.IOModule.AIOBOX">
<HintPath>..\dll\Asa.IOModule.AIOBOX.dll</HintPath>
</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">
<HintPath>..\dll\halcondotnet.dll</HintPath>
</Reference>
......@@ -62,6 +65,8 @@
<HintPath>..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\lib\net46\System.Data.SQLite.dll</HintPath>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Net.Http" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.ServiceModel.Web" />
<Reference Include="System.Windows.Forms" />
......@@ -100,6 +105,7 @@
<Compile Include="manager\LedManager.cs" />
<Compile Include="manager\LineWidthManager.cs" />
<Compile Include="manager\ResourceControl.cs" />
<Compile Include="manager\ScanRequestLabel.cs" />
<Compile Include="manager\StockInfo.cs" />
<Compile Include="manager\TSAVBean.cs" />
<Compile Include="manager\TSAVBean_Partial.cs" />
......@@ -138,6 +144,7 @@
<Content Include="config\元器件信息模板.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="app.config" />
<None Include="config\AOIConfig\aaaaa.data" />
<None Include="config\calibration.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
......@@ -24,48 +24,48 @@ namespace TSA_V.LoadCSVLibrary
/// <summary>
///位号/编号
/// </summary>
[CSVAttribute("Num", true,"位号", "编号")]
[CSVAttribute("Num", true,"位号", "编号", "Part Number")]
public string TagNo { get; set; }
/// <summary>
/// 物料编码/元器件名称
/// </summary>
[CSVAttribute("Code", true, "物料编码", "元器件名称", "Name")]
[CSVAttribute("Code", true, "物料编码", "元器件名称", "Name", "Material Code")]
public string PN { get; set; }
/// <summary>
///元器件描述
/// </summary>
[CSVAttribute("Describe", "元器件描述", false )]
[CSVAttribute("Describe", false, "元器件描述", "Description")]
public string ComponentDes { get; set; }
/// <summary>
///数量
/// </summary>
[CSVAttribute("Count", "数量", true)]
[CSVAttribute("Count", true,"数量", "Quantity")]
public int ComCount { get; set; }
/// <summary>
///位置
/// </summary>
[CSVAttribute("PNum", true, "料盘位置", "位置", "PositionNum")]
[CSVAttribute("PNum", true, "料盘位置", "位置", "PositionNum", "Lot")]
public string PositionNum { get; set; }
/// <summary>
///X坐标
/// </summary>
[CSVAttribute("PositionX", "X坐标", false)]
[CSVAttribute("PositionX", false,"X坐标", "X")]
public double PositionX { get; set; }
/// <summary>
///Y坐标
/// </summary>
[CSVAttribute("PositionY", "Y坐标", false)]
[CSVAttribute("PositionY", false,"Y坐标", "Y")]
public double PositionY { get; set; }
/// <summary>
///注意事项
/// </summary>
[CSVAttribute("Notes", "注意事项", false)]
[CSVAttribute("Notes",false, "注意事项", "Note")]
public string Notes { get; set; }
/// <summary>
///投影文字
......
using PUSICANLibrary;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using TSA_V.Common;
using TSA_V.DeviceLibrary.manager;
using TSA_V.LoadCSVLibrary;
namespace TSA_V.DeviceLibrary
......@@ -35,7 +32,7 @@ namespace TSA_V.DeviceLibrary
public DateTime LastSetpTime = DateTime.Now;
public uint PreNodeId = 0;
public List<SMTPointInfo> needWorkSmtList = new List<SMTPointInfo>();
//开始工作后共工作了几块电路板
//开始工作后共工作了几块电路板``````
public int BoardCount = 0;
public DateTime beginWorkTime = DateTime.Now;
public bool IsShowAOI = false;
......@@ -131,8 +128,7 @@ namespace TSA_V.DeviceLibrary
endWorkTime = DateTime.Now;
IsWaitMove = false;
waitList = new List<WaitResultInfo>();
}
}
public bool MoveToNextPoint(bool isNext)
{
return MoveToNextPoint(isNext, false);
......@@ -276,6 +272,14 @@ namespace TSA_V.DeviceLibrary
}
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();
if (position.PositionType.Equals(1))
{
......@@ -288,7 +292,7 @@ namespace TSA_V.DeviceLibrary
//上一个节点返回原点
PUSICANControl.AbsMove(PreNodeId, TSAVBean.RotateNode_DefaultPosition);
Thread.Sleep(50);
}
}
PUSICANControl.AbsMove(moveNode.NodeId, position.RotatePosition);
waitList.Add(WaitResultInfo.WaitNode(moveNode, position.RotatePosition));
PreNodeId = moveNode.NodeId;
......@@ -298,6 +302,24 @@ namespace TSA_V.DeviceLibrary
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
{
if (PreNodeId > 0)
......@@ -305,12 +327,11 @@ namespace TSA_V.DeviceLibrary
PUSICANControl.AbsMove(PreNodeId, TSAVBean.RotateNode_DefaultPosition);
}
PreNodeId = 0;
LEDModule module = LedManager.GetLEDModule(position.DeviceIP);
LEDModule module = LedManager.GetLEDModule(position.DeviceIP);
LedManager.LightOn(position.DeviceIP, position.getLedList());
waitList.Add(WaitResultInfo.WaitTime(500));
}
}
public bool IsLastP()
{
if (IsWorking)
......
<?xml version="1.0" encoding="utf-8"?>
<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="System.Data.SQLite.Core" version="1.0.113.7" 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>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
......@@ -121,7 +121,7 @@
<add key="PointDisplayType" value="1" />
<!--禁用底部气缸-->
<add key ="DisableBottomCylinder" value="1"/>
<add key="DisableBottomCylinder" value="1" />
</appSettings>
<log4net>
<appender name="defaultAppender" type="log4net.Appender.RollingFileAppender">
......
......@@ -90,7 +90,6 @@
this.chbISDebug.TabIndex = 19;
this.chbISDebug.Text = "是否调试模式,会自动下一步";
this.chbISDebug.UseVisualStyleBackColor = true;
this.chbISDebug.CheckedChanged += new System.EventHandler(this.chbISDebug_CheckedChanged);
//
// groupBox4
//
......
......@@ -128,13 +128,9 @@ namespace TSA_V
LogUtil.info($"保存配置成功: 调试{ isDebug },禁用底部气缸{disBottom},禁用侧挡气缸{disSide},地址{server} ");
MessageBox.Show(ResourceCulture.GetString(ResourceCulture.SaveOk, "保存成功"));
}
private void chbISDebug_CheckedChanged(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
BoardInfo board = new BoardInfo();
......
......@@ -9,6 +9,7 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using TSA_V.Common;
using TSA_V.DeviceLibrary.manager;
namespace TSA_V
{
......@@ -45,7 +46,8 @@ namespace TSA_V
{
string str = ConfigAppSettings.GetValue(Setting_Init.Default_Language);
if (rbtnEnglish.Checked)
{
{
//ScanRequestLabel.Switchlanguage(1);
str = ResourceCulture.English;
}
else if (rbtnRussian.Checked)
......@@ -54,6 +56,7 @@ namespace TSA_V
}
else
{
//ScanRequestLabel.Switchlanguage(0);
str = ResourceCulture.China;
}
ResourceCulture.SetCurrentCulture(str);
......
......@@ -102,6 +102,7 @@
<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>
</Reference>
<Reference Include="System.Net.Http" />
<Reference Include="System.Speech" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Windows.Forms.DataVisualization" />
......
......@@ -15,6 +15,8 @@ using PUSICANLibrary;
using System.Runtime.InteropServices;
using AOI;
using System.Threading.Tasks;
using System.Net.Http;
using TSA_V.DeviceLibrary.manager;
namespace TSA_V
{
......@@ -813,6 +815,19 @@ namespace TSA_V
}
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;
}
int leftCount = workSmtList.Count - 1 - preIndex;
......@@ -837,7 +852,7 @@ namespace TSA_V
lblBoardPoint.Text = ResourceCulture.GetString(ResourceCulture.PointInfoMsg, "当前:第{0}步,剩余{1}步", (preIndex + 1).ToString(), leftCount);
}
else
{
{
lblBoardPoint.Text = ResourceCulture.GetString(ResourceCulture.PointInfoMsg2, "当前:第{0}步", (preIndex + 1).ToString());
}
Crop(Brushes.Red);
......@@ -861,7 +876,6 @@ namespace TSA_V
}
}
private void btnUpateCount_Click(object sender, EventArgs e)
{
ShowUpdateCount(true);
......
......@@ -117,6 +117,7 @@
</Content>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
......
文件属性发生变化
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!