Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
AutoCountMachine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit a3f88ef6
由
LN
编写于
2020-06-10 14:43:51 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
bug修改
1 个父辈
4be05867
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
35 行增加
和
48 行删除
RC1266-AutoCountMachine/source/DeviceLibrary/bean/InputEquip.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/X_RAY_Equip.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/X_RAY_Equip_Partial.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/InputEquip.cs
查看文件 @
a3f88ef
...
...
@@ -84,17 +84,20 @@ namespace OnlineStore.DeviceLibrary
public
override
bool
Reset
()
{
StopMove
();
SetAllTimer
(
false
);
StopMove
();
if
(!
OpenAllAxis
())
{
CloseAllAxis
();
SetAllTimer
(
true
);
return
false
;
}
}
LogInfo
(
"Reset 开始重置 "
);
runStatus
=
RobotRunStatus
.
Reset
;
MoveInfo
.
NewMove
(
RobotMoveType
.
Reset
);
StartReset
();
SetAllTimer
(
true
);
return
true
;
}
...
...
@@ -177,7 +180,8 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IR09_WaitBatchMove
))
{
if
(
LeftBatchMove
.
MoveInfo
.
MoveType
.
Equals
(
RobotMoveType
.
None
)
&&
RightBatchMove
.
MoveInfo
.
MoveType
.
Equals
(
RobotMoveType
.
None
))
if
((
LeftBatchMove
.
MoveInfo
.
MoveType
.
Equals
(
RobotMoveType
.
None
)
||
LeftBatchMove
.
MoveInfo
.
MoveType
.
Equals
(
RobotMoveType
.
Working
))
&&
(
RightBatchMove
.
MoveInfo
.
MoveType
.
Equals
(
RobotMoveType
.
None
)
||
RightBatchMove
.
MoveInfo
.
MoveType
.
Equals
(
RobotMoveType
.
Working
)))
{
WorkLog
(
"复位完成"
);
runStatus
=
RobotRunStatus
.
Runing
;
...
...
@@ -185,18 +189,18 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
MoveInfo
.
IsTimeOut
(
180
))
{
if
(!
LeftBatchMove
.
MoveInfo
.
MoveType
.
Equals
(
RobotMoveType
.
None
))
if
(!
LeftBatchMove
.
MoveInfo
.
MoveType
.
Equals
(
RobotMoveType
.
None
)
&&
(!
LeftBatchMove
.
MoveInfo
.
MoveType
.
Equals
(
RobotMoveType
.
Working
))
)
{
WarnMsg
=
Name
+
"等待"
+
LeftBatchMove
.
Name
+
"复位完成超时["
+
MoveInfo
.
TimeOutSeconds
+
"]秒"
;
LogUtil
.
error
(
WarnMsg
,
MoveInfo
.
ErrorLogType
);
WarnMsg
=
Name
+
"等待"
+
LeftBatchMove
.
Name
+
"复位完成超时["
+
MoveInfo
.
TimeOutSeconds
+
"]秒"
;
LogUtil
.
error
(
WarnMsg
,
MoveInfo
.
ErrorLogType
);
Alarm
(
AlarmType
.
IoSingleTimeOut
);
}
else
{
WarnMsg
=
Name
+
"等待"
+
LeftBatchMove
.
Name
+
"复位完成超时["
+
MoveInfo
.
TimeOutSeconds
+
"]秒"
;
LogUtil
.
error
(
WarnMsg
);
LogUtil
.
error
(
WarnMsg
);
Alarm
(
AlarmType
.
IoSingleTimeOut
);
}
}
}
}
}
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/X_RAY_Equip.cs
查看文件 @
a3f88ef
...
...
@@ -85,6 +85,18 @@ namespace OnlineStore.DeviceLibrary
LastXRayState
=
"xRay.Open("
+
Config
.
XRay_Port
+
","
+
lastData
+
")="
+
xresult
;
LogUtil
.
info
(
Name
+
"xRay.Open("
+
Config
.
XRay_Port
+
","
+
lastData
+
")="
+
xresult
);
if
(!
System
.
IO
.
Directory
.
Exists
(
path1_tif
))
{
System
.
IO
.
Directory
.
CreateDirectory
(
path1_tif
);
}
if
(!
System
.
IO
.
Directory
.
Exists
(
path2_png
))
{
System
.
IO
.
Directory
.
CreateDirectory
(
path2_png
);
}
if
(!
System
.
IO
.
Directory
.
Exists
(
path3_out
))
{
System
.
IO
.
Directory
.
CreateDirectory
(
path3_out
);
}
}
catch
(
Exception
ex
)
{
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/X_RAY_Equip_Partial.cs
查看文件 @
a3f88ef
...
...
@@ -154,10 +154,11 @@ namespace OnlineStore.DeviceLibrary
else
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
XW08_DoorClose
);
WorkLog
(
"料盘处理:左侧门关闭,右侧门关闭,挡停放行,准备开始点料"
);
WorkLog
(
"料盘处理:左侧门关闭,右侧门关闭,准备开始点料"
);
//WorkLog("料盘处理:左侧门关闭,右侧门关闭,挡停放行,准备开始点料");
CylinderMove
(
MoveInfo
,
IO_Type
.
X_InDoor_Down
,
IO_Type
.
X_InDoor_Up
);
CylinderMove
(
MoveInfo
,
IO_Type
.
X_OutDoor_Down
,
IO_Type
.
X_OutDoor_Up
);
CylinderMove
(
MoveInfo
,
IO_Type
.
X_StopCylinder_Down
,
IO_Type
.
X_StopCylinder_Up
);
//
CylinderMove(MoveInfo, IO_Type.X_StopCylinder_Down, IO_Type.X_StopCylinder_Up);
}
}
...
...
@@ -174,7 +175,7 @@ namespace OnlineStore.DeviceLibrary
InXWork
=
false
;
WorkLog
(
"点料:未启用X射线点料,模拟点料结果:"
+
count
+
""
);
if
(
Work_ReelInfo
.
WareCount
<=
0
)
{
{
Work_ReelInfo
.
WareCount
=
count
;
MoveInfo
.
MoveParam
.
SetReelInfo
(
Work_ReelInfo
);
}
...
...
@@ -315,39 +316,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StepEnum
.
XW13_GetXRayImage
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
8000
));
WorkLog
(
"点料:清理"
+
path1_tif
+
"内容,开始获取X射线图形 "
);
//string lastData = DateTime.Now.ToString("yyyy-MM-dd");
//ConfigAppSettings.SaveValue(Setting_Init.XRay_Data, lastData);
//ClearFilePath();
//carerayImage.GetImage();
//carerayImage.WindowWidth = Config.WindowWidth;
//carerayImage.WindowLevel = Config.WindowLevel;
//Bitmap bmp = carerayImage.Get48bImage();
//lastFileName =Work_ReelInfo.GetRealId()+"-"+ DateTime.Now.ToString("yyyyMMddHHmmss") + ".png";
//string fileP = path1_tif + @"\" + lastFileName;
//bmp.Save(fileP, System.Drawing.Imaging.ImageFormat.Png);
//string backFile = path_XRAY + lastFileName;
//try
//{
// bmp.Save(backFile, System.Drawing.Imaging.ImageFormat.Png);
//}
//catch (Exception ex)
//{
// LogUtil.error("X图片备份到【" + backFile + "】错误:" + ex.ToString());
//}
//WorkLog("点料:获取X射线图形,保存到: " + fileP + ",备份到:" + backFile + ",记录时间" + lastData + ",停止X射线");
//GetImageEvent?.Invoke(bmp);
//bool result = xRay.Stop();
//if (!result)
//{
// LogUtil.error(" xRay.Stop() 第一次失败,再次调用Stop");
// result = xRay.Stop();
// if (!result)
// {
// LogUtil.error(" xRay.Stop()失败:" + result);
// }
//}
CapImage
();
MoveInfo
.
EndStepWait
();
}
...
...
@@ -467,11 +436,13 @@ namespace OnlineStore.DeviceLibrary
}
private
void
ClearFilePath
()
{
{
try
{
System
.
IO
.
Directory
.
Delete
(
path1_tif
,
true
);
if
(
System
.
IO
.
Directory
.
Exists
(
path1_tif
))
{
System
.
IO
.
Directory
.
Delete
(
path1_tif
,
true
);
}
}
catch
(
Exception
ex
)
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论