Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
MIMO
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit a41ebcbe
由
刘韬
编写于
2022-11-03 13:54:19 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
4b497d99
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
17 行增加
和
1 行删除
DeviceLibrary/theMachine/MainMachine_Clamp.cs
DeviceLibrary/theMachine/MainMachine_String.cs
DeviceLibrary/theMachine/MainMachine_Clamp.cs
查看文件 @
a41ebcb
...
@@ -410,11 +410,13 @@ namespace DeviceLibrary
...
@@ -410,11 +410,13 @@ namespace DeviceLibrary
/// 扫码线程
/// 扫码线程
/// </summary>
/// </summary>
Task
<
List
<
CodeInfo
>>
ScanTask
;
Task
<
List
<
CodeInfo
>>
ScanTask
;
string
lastcode
=
""
;
public
void
ScanCode
()
{
public
void
ScanCode
()
{
StringMoveInfo
.
log
(
"开始扫码"
);
StringMoveInfo
.
log
(
"开始扫码"
);
//RightMoveInfo.OneWaitCanEndStep = true;
//RightMoveInfo.OneWaitCanEndStep = true;
//RightMoveInfo.WaitList.Add(WaitResultInfo.WaitScanCode());
//RightMoveInfo.WaitList.Add(WaitResultInfo.WaitScanCode());
//RightMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
//RightMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
int
retry
=
0
;
try
try
{
{
ScanTask
=
Task
.
Run
(
new
Func
<
List
<
CodeInfo
>>(()=>
ScanTask
=
Task
.
Run
(
new
Func
<
List
<
CodeInfo
>>(()=>
...
@@ -425,11 +427,24 @@ namespace DeviceLibrary
...
@@ -425,11 +427,24 @@ namespace DeviceLibrary
List
<
CodeInfo
>
LastCodeList
;
List
<
CodeInfo
>
LastCodeList
;
if
(
Setting_Init
.
SocketScanner_enable
)
{
if
(
Setting_Init
.
SocketScanner_enable
)
{
retry
:
LastCodeList
=
new
List
<
CodeInfo
>();
LastCodeList
=
new
List
<
CodeInfo
>();
if
(
RobotManage
.
socketScanner
.
Scan
(
Setting_Init
.
SocketScanner_trigger_code
,
Setting_Init
.
SocketScanner_pattern_code
,
out
string
code
))
{
if
(
RobotManage
.
socketScanner
.
Scan
(
Setting_Init
.
SocketScanner_trigger_code
,
Setting_Init
.
SocketScanner_pattern_code
,
out
string
code
))
{
if
(
lastcode
!=
code
)
{
lastcode
=
code
;
LastCodeList
.
Add
(
new
CodeInfo
(
code
,
0
,
0
));
LastCodeList
.
Add
(
new
CodeInfo
(
code
,
0
,
0
));
}
}
else
{
LogUtil
.
info
(
$
"前后2次条码相同:{code}"
);
if
(
retry
<
2
)
{
retry
++;
LogUtil
.
info
(
$
"重试,第{retry}次"
);
goto
retry
;
}
}
}
}
}
else
else
{
{
...
...
DeviceLibrary/theMachine/MainMachine_String.cs
查看文件 @
a41ebcb
...
@@ -143,6 +143,7 @@ namespace DeviceLibrary
...
@@ -143,6 +143,7 @@ namespace DeviceLibrary
break
;
break
;
case
MoveStep
.
StringLoad_02
:
case
MoveStep
.
StringLoad_02
:
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_02a
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_02a
);
lastcode
=
""
;
newreel
=
true
;
newreel
=
true
;
downCheck1
=
false
;
downCheck1
=
false
;
downCheck2
=
false
;
downCheck2
=
false
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论