Commit 0f891719 刘韬

增加判断x光点亮电流判断

1 个父辈 eac2c556
......@@ -184,6 +184,7 @@ namespace DeviceLibrary
[HandleProcessCorruptedStateExceptions]
public static (List<CodeInfo>, string) CameraScan(List<string> cameraNameList)
{
Thread.CurrentThread.Priority = ThreadPriority.Highest;
HashSet<string> codestr = new HashSet<string>();
List<CodeInfo> codeList = new List<CodeInfo>();
string bitmapfilename = "";
......
......@@ -80,7 +80,7 @@ namespace DeviceLibrary
{
CountMoveInfo.NextMoveStep(MoveStep.Count_04);
CountMoveInfo.log($"打开X光");
CountMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(Setting_Init.XRay_Light_Delay));
return;
}
else {
......@@ -116,6 +116,18 @@ namespace DeviceLibrary
}
break;
case MoveStep.Count_04:
var runtimedata = RobotManage.XRay.GetRuntimeData();
if (runtimedata.HighVoltage > Setting_Init.XRay_Voltage * 0.8
&& runtimedata.BeamCurrent > Setting_Init.XRay_Current * 0.7)
{
CountMoveInfo.log("X光点亮成功:" + runtimedata);
}
else if (CountMoveInfo.IsTimeOut(5)) {
CountMoveInfo.NextMoveStep(MoveStep.Count_03);
RobotManage.XRay.Stop();
CountMoveInfo.log("X光超时未打到电压电流.重新打开:"+ runtimedata);
return;
}
if (ScanTask.IsCompleted)
{
var (x,s) = ScanTask.Result;
......@@ -133,6 +145,7 @@ namespace DeviceLibrary
CountMoveInfo.MoveParam.IsNg = false;
CountMoveInfo.MoveParam.codeInfos = x;
CountMoveInfo.MoveParam.bitmapfilename = s;
CountMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(Setting_Init.XRay_Light_Delay));
xrayimageretry = 0;
var cc = x.Select((a) => a.CodeType+":"+a.CodeStr);
LastCode = String.Join("##", cc);
......@@ -221,6 +234,7 @@ namespace DeviceLibrary
{
CountMoveInfo.log($"获取图像,开始点料 IsRayOpen:{RobotManage.XRay.IsRayOpen}");
GetResultTask = Task.Run(() => {
Thread.CurrentThread.Priority = ThreadPriority.BelowNormal;
string reelid = CountMoveInfo.MoveParam.ReeID;
int count = GetCountResult();
lock (CountList)
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!