Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
AutoCountMachine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 0248b4f6
由
LN
编写于
2020-07-14 11:40:08 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
从接口获取是否需要测值
1 个父辈
b54bda76
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
44 行增加
和
29 行删除
RC1266-AutoCountMachine/source/DeviceLibrary/bean/InputEquip_InStore.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/OutputEquip_Partial.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/InputEquip_InStore.cs
查看文件 @
0248b4f
...
...
@@ -204,28 +204,28 @@ namespace OnlineStore.DeviceLibrary
// WorkLog(" 右侧入口入料,直接放到XRay:" + MoveInfo.MoveParam.ToStr());
//}
//
else if (SServerManager.CanConnect())
//
{
//
Task task = Task.Factory.StartNew(delegate
//
{
//
int needPosition = 0;
//
string msg = SServerManager.Get_VMICheckRLC(Name, MoveInfo.MoveParam.WareCode, out needPosition);
else
if
(
SServerManager
.
CanConnect
())
{
Task
task
=
Task
.
Factory
.
StartNew
(
delegate
{
int
needPosition
=
0
;
string
msg
=
SServerManager
.
Get_VMICheckRLC
(
Name
,
MoveInfo
.
MoveParam
.
WareCode
,
out
needPosition
);
//
if (needPosition >= 1 && needPosition <= 3)
//
{
//
MoveInfo.MoveParam.TargetPosType = needPosition;
//
WorkLog(" 【" + MoveInfo.MoveParam.WareCode + "】通过接口获取目标位置:" + needPosition);
//
}
//
// else if (!msg.Equals("") || needPosition.Equals(0))
//
else
//
{
//
WorkLog(" 【" + MoveInfo.MoveParam.WareCode + "】获取是否测值失败:" + msg);
//
MoveInfo.MoveParam.TargetPosType = 1;
//
MoveInfo.MoveParam.IsNgReel = true;
//
MoveInfo.MoveParam.NgMsg = msg;
//
}
//
});
//
}
if
(
needPosition
>=
1
&&
needPosition
<=
3
)
{
MoveInfo
.
MoveParam
.
TargetPosType
=
needPosition
;
WorkLog
(
" 【"
+
MoveInfo
.
MoveParam
.
WareCode
+
"】通过接口获取目标位置:"
+
needPosition
);
}
// else if (!msg.Equals("") || needPosition.Equals(0))
else
{
WorkLog
(
" 【"
+
MoveInfo
.
MoveParam
.
WareCode
+
"】获取是否测值失败:"
+
msg
);
MoveInfo
.
MoveParam
.
TargetPosType
=
1
;
MoveInfo
.
MoveParam
.
IsNgReel
=
true
;
MoveInfo
.
MoveParam
.
NgMsg
=
msg
;
}
});
}
else
{
if
(
MoveInfo
.
MoveParam
.
TargetPosType
.
Equals
(
0
))
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/OutputEquip_Partial.cs
查看文件 @
0248b4f
...
...
@@ -339,6 +339,7 @@ namespace OnlineStore.DeviceLibrary
return
true
;
}
private
Task
printTask
=
null
;
private
bool
NeedPrint
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
NeedPrintLabel
).
Equals
(
1
);
protected
override
void
LabellingProcess
()
{
...
...
@@ -359,11 +360,15 @@ namespace OnlineStore.DeviceLibrary
SecMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
if
(
NeedPrint
)
{
Task
.
Factory
.
StartNew
(
delegate
printTask
=
Task
.
Factory
.
StartNew
(
delegate
{
StartPrintLabel
(
SecMoveInfo
.
MoveParam
.
WareCode
,
SecMoveInfo
.
MoveParam
.
WareCount
.
ToString
());
});
}
else
{
printTask
=
null
;
}
LabelXAxis
.
AbsMove
(
SecMoveInfo
,
Config
.
LabelX_P2
,
Config
.
LabelX_P2Speed
);
LabelYAxis
.
AbsMove
(
SecMoveInfo
,
Config
.
LabelY_P2
,
Config
.
LabelY_P2Speed
);
LabelRAxis
.
AbsMove
(
SecMoveInfo
,
Config
.
LabelR_P2
,
Config
.
LabelR_P2Speed
);
...
...
@@ -372,17 +377,26 @@ namespace OnlineStore.DeviceLibrary
else
if
(
SecMoveInfo
.
IsStep
(
StepEnum
.
OL03_PrintLabel
))
{
bool
isPrintOk
=
RobotManager
.
LastPrintStatus
.
Equals
(
Asa
.
PrintLabel
.
PrinterStatus
.
Idle
);
bool
isTimeOut
=
SecMoveInfo
.
IsTimeOut
(
60
);
if
(
isPrintOk
||
isTimeOut
||
(!
NeedPrint
))
bool
isTimeOut
=
SecMoveInfo
.
IsTimeOut
(
120
);
if
(
printTask
==
null
||
printTask
.
IsCompleted
)
{
if
(
isPrintOk
||
isTimeOut
||
(!
NeedPrint
))
{
SecMoveInfo
.
NextMoveStep
(
StepEnum
.
OL05_TakeBack
);
SecWorkLog
(
"贴标: 打印结束["
+
RobotManager
.
LastPrintStatus
+
"]["
+
(
isTimeOut
?
"超时120秒"
:
""
)
+
"],取码气缸后退"
);
CylinderMove
(
SecMoveInfo
,
IO_Type
.
TakeCode_Forward
,
IO_Type
.
TakeCode_Back
);
}
}
else
if
(
MoveInfo
.
IsTimeOut
(
120
))
{
SecMoveInfo
.
NextMoveStep
(
StepEnum
.
OL05_TakeBack
)
;
SecWorkLog
(
"贴标: 打印结束["
+
RobotManager
.
LastPrintStatus
+
"]["
+
(
isTimeOut
?
"超时60秒"
:
""
)
+
"],取码气缸后退"
);
CylinderMove
(
SecMoveInfo
,
IO_Type
.
TakeCode_Forward
,
IO_Type
.
TakeCode_Back
);
WarnMsg
=
SecMoveInfo
.
Name
+
"["
+
SecMoveInfo
.
MoveStep
+
"]"
+
"等待 打印标签完成(OL03_PrintLabel) 超时["
+
FormUtil
.
GetSpanStr
(
SecMoveInfo
.
StepSpan
())
+
"]"
;
LogUtil
.
error
(
WarnMsg
,
SecMoveInfo
.
ErrorLogType
);
Alarm
(
AlarmType
.
IoSingleTimeOut
);
}
}
else
if
(
SecMoveInfo
.
IsStep
(
StepEnum
.
OL05_TakeBack
))
{
{
printTask
=
null
;
SecMoveInfo
.
NextMoveStep
(
StepEnum
.
OL07_ZToP2
);
SecWorkLog
(
"贴标: Z轴到取标签点P2"
);
LabelZAxis
.
AbsMove
(
SecMoveInfo
,
Config
.
LabelZ_P2
,
Config
.
LabelZ_P2Speed
);
...
...
@@ -512,6 +526,7 @@ namespace OnlineStore.DeviceLibrary
{
try
{
LogUtil
.
info
(
"调用 打印标签 StartPrintLabel ,["
+
wareCode
+
"] ["
+
wareCount
+
"] "
);
Dictionary
<
string
,
string
>
text
=
new
Dictionary
<
string
,
string
>();
text
.
Add
(
"aa"
,
wareCode
);
text
.
Add
(
"bb"
,
wareCount
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论