Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
AutoCountMachine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit f17ebf35
由
LN
编写于
2020-09-09 18:04:08 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
bug修改,超时报警自动清除
1 个父辈
6811af88
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
48 行增加
和
16 行删除
RC1266-AutoCountMachine/source/AutoCountClient/FrmInputEquip.cs
RC1266-AutoCountMachine/source/AutoCountClient/FrmRobotMain.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/BatchMoveBean.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/BatchMoveBean_Partial.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/EquipBase.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/InputEquip_InStore.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/OutputEquip_Partial.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/OutputEquip_Shelf.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/X_RAY_Equip_Partial.cs
RC1266-AutoCountMachine/source/DeviceLibrary/model/RobotMoveInfo.cs
RC1266-AutoCountMachine/source/AutoCountClient/FrmInputEquip.cs
查看文件 @
f17ebf3
...
...
@@ -509,7 +509,7 @@ namespace OnlineStore.AutoCountClient
private
void
btnScan_Click
(
object
sender
,
EventArgs
e
)
{
equipBean
.
IOMove
(
IO_Type
.
Camera_Led
,
IO_VALUE
.
HIGH
);
List
<
string
>
LastCodeList
=
CodeManager
.
CameraScan
(
equipBean
.
Name
,
equipBean
.
Config
.
LeftCamera
);
List
<
string
>
LastCodeList
=
CodeManager
.
CameraScan
(
equipBean
.
Name
+
"测试"
,
equipBean
.
Config
.
LeftCamera
);
string
msg
=
CodeManager
.
GetValidCode
(
LastCodeList
);
equipBean
.
IOMove
(
IO_Type
.
Camera_Led
,
IO_VALUE
.
LOW
);
LogUtil
.
info
(
equipBean
.
Name
+
"["
+
equipBean
.
Config
.
LeftCamera
+
"]扫码测试结果:\r\n"
+
msg
);
...
...
@@ -644,7 +644,7 @@ namespace OnlineStore.AutoCountClient
private
void
btnRScan_Click
(
object
sender
,
EventArgs
e
)
{
equipBean
.
IOMove
(
IO_Type
.
Camera_Led
,
IO_VALUE
.
HIGH
);
List
<
string
>
LastCodeList
=
CodeManager
.
CameraScan
(
equipBean
.
Name
,
equipBean
.
Config
.
RightCamera
);
List
<
string
>
LastCodeList
=
CodeManager
.
CameraScan
(
equipBean
.
Name
+
"测试"
,
equipBean
.
Config
.
RightCamera
);
string
msg
=
CodeManager
.
GetValidCode
(
LastCodeList
);
equipBean
.
IOMove
(
IO_Type
.
Camera_Led
,
IO_VALUE
.
LOW
);
LogUtil
.
info
(
equipBean
.
Name
+
"["
+
equipBean
.
Config
.
RightCamera
+
"]扫码测试结果:\r\n"
+
msg
);
...
...
RC1266-AutoCountMachine/source/AutoCountClient/FrmRobotMain.cs
查看文件 @
f17ebf3
...
...
@@ -354,6 +354,7 @@ namespace OnlineStore.AutoCountClient
MessageBox
.
Show
(
robot
.
Name
+
"设备未启动,无法复位"
);
return
;
}
LogUtil
.
info
(
robot
.
Name
+
" 点击:复位"
);
robot
.
Reset
();
}
private
void
FrmLineStore_FormClosed
(
object
sender
,
FormClosedEventArgs
e
)
...
...
@@ -363,6 +364,7 @@ namespace OnlineStore.AutoCountClient
停止
TToolStripMenuItem_Click
(
null
,
null
);
}
LogUtil
.
info
(
robot
.
Name
+
" 点击:停止"
);
AgvClient
.
Dispose
();
if
(
IOManager
.
instance
!=
null
)
{
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/BatchMoveBean.cs
查看文件 @
f17ebf3
...
...
@@ -483,7 +483,7 @@ namespace OnlineStore.DeviceLibrary
WarnMsg
=
moveInfo
.
Name
+
"["
+
moveInfo
.
MoveType
+
"]["
+
moveInfo
.
MoveStep
+
"]等待"
+
NotOkMsg
+
"超时["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]秒"
;
int
second
=
10
;
second
=
(
int
)(
moveInfo
.
TimeOutSeconds
/
span
.
Total
Seconds
)
*
10
;
second
=
(
int
)(
span
.
TotalSeconds
/
moveInfo
.
TimeOut
Seconds
)
*
10
;
if
(
second
>
120
)
{
second
=
120
;
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/BatchMoveBean_Partial.cs
查看文件 @
f17ebf3
...
...
@@ -278,11 +278,11 @@ namespace OnlineStore.DeviceLibrary
Task
<
List
<
string
>>
scanTask
=
Task
.
Factory
.
StartNew
(
delegate
{
Robot
.
IOMove
(
IO_Type
.
Camera_Led
,
IO_VALUE
.
HIGH
);
NextCodeList
=
CodeManager
.
CameraScan
(
Name
,
CameraName
);
if
(
NextCodeList
.
Count
<=
0
)
{
NextCodeList
=
CodeManager
.
CameraScan
(
Name
,
CameraName
);
}
NextCodeList
=
CodeManager
.
CameraScan
(
Name
+
"预扫码"
,
CameraName
);
//
if (NextCodeList.Count <= 0)
//
{
//
NextCodeList = CodeManager.CameraScan(Name, CameraName);
//
}
Robot
.
IOMove
(
IO_Type
.
Camera_Led
,
IO_VALUE
.
LOW
);
return
NextCodeList
;
});
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/EquipBase.cs
查看文件 @
f17ebf3
...
...
@@ -415,7 +415,7 @@ namespace OnlineStore.DeviceLibrary
+
"超时["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]秒"
;
int
second
=
10
;
second
=
(
int
)(
moveInfo
.
TimeOutSeconds
/
span
.
TotalSeconds
)
*
10
;
second
=
(
int
)(
span
.
TotalSeconds
/
moveInfo
.
TimeOutSeconds
)
*
10
;
if
(
second
>
120
)
{
second
=
120
;
...
...
@@ -455,7 +455,7 @@ namespace OnlineStore.DeviceLibrary
{
if
(!
MoveInfo
.
MoveParam
.
WareCode
.
Equals
(
""
))
{
code
=
"["
+
MoveInfo
.
MoveParam
.
WareCode
+
"]"
;
code
=
MoveInfo
.
MoveParam
.
WareCode
;
}
}
if
(
level
.
Equals
(
1
))
...
...
@@ -734,5 +734,18 @@ namespace OnlineStore.DeviceLibrary
}
return
false
;
}
protected
void
ClearTimeoutAlarm
(
string
msg
)
{
if
(
isInSuddenDown
||
isNoAirCheck
)
{
return
;
}
if
(
WarnMsg
.
Contains
(
msg
)
&&
alarmType
.
Equals
(
AlarmType
.
IoSingleTimeOut
))
{
LogUtil
.
info
(
Name
+
"清理信号超时报警【"
+
WarnMsg
+
"】 "
);
alarmType
=
AlarmType
.
None
;
SetWarnMsg
(
""
);
}
}
}
}
RC1266-AutoCountMachine/source/DeviceLibrary/bean/InputEquip_InStore.cs
查看文件 @
f17ebf3
...
...
@@ -174,6 +174,7 @@ namespace OnlineStore.DeviceLibrary
BatchMoveBean
moveBean
=
MoveInfo
.
MoveParam
.
InPosType
.
Equals
(
1
)
?
LeftBatchMove
:
RightBatchMove
;
if
(
moveBean
.
LastHeight
>
0
||
isOk
)
{
ClearTimeoutAlarm
(
"测高结束超时"
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
IW10_SaveSize
);
MoveInfo
.
MoveParam
.
PlateH
=
moveBean
.
LastHeight
;
MoveInfo
.
MoveParam
.
PlateW
=
GetWidth
();
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/OutputEquip_Partial.cs
查看文件 @
f17ebf3
...
...
@@ -106,6 +106,10 @@ namespace OnlineStore.DeviceLibrary
private
bool
CheckStartLabel
(
bool
needAlarm
=
false
)
{
if
(
MoveInfo
.
MoveParam
==
null
)
{
return
false
;
}
if
(
MoveInfo
.
MoveParam
.
IsNgReel
)
{
return
false
;
...
...
@@ -117,6 +121,7 @@ namespace OnlineStore.DeviceLibrary
//TODO 记录信息,判断贴标模块当前空闲,此时可以打印标签(取码气缸前进,打印标签,取码气缸后退)
if
(
SecMoveInfo
.
MoveType
.
Equals
(
RobotMoveType
.
None
))
{
ClearTimeoutAlarm
(
"等待贴标模块空闲"
);
WorkLog
(
"取料: 贴标模块开始打印标签"
);
//TODO
bool
result
=
StartLabelling
(
MoveInfo
.
MoveParam
);
...
...
@@ -250,6 +255,7 @@ namespace OnlineStore.DeviceLibrary
WorkLog
(
"放料:料串可放料,取料X轴移动到P3 "
);
MoveXAxis
.
AbsMove
(
MoveInfo
,
Config
.
MoveX_P3
,
Config
.
MoveX_P3Speed
);
ClearTimeoutAlarm
(
"等待出料料串准备完成"
);
if
(
shelfOk
)
{
ShelfMoveInfo
.
NextMoveStep
(
StepEnum
.
OS_21_BatchDownH
);
...
...
@@ -277,6 +283,7 @@ namespace OnlineStore.DeviceLibrary
bool
debugOk
=
ShelfMoveInfo
.
MoveType
.
Equals
(
RobotMoveType
.
None
)
&&
MoveInfo
.
MoveParam
.
IsTest
;
if
(
shelfOk
||
debugOk
)
{
ClearTimeoutAlarm
(
"等待出料料串可放料"
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
OT13_MoveZToP3
);
WorkLog
(
"放料:取料Z轴下降到P3 "
);
MoveZAxis
.
AbsMove
(
MoveInfo
,
Config
.
GetMoveZP3
(
MoveInfo
.
MoveParam
.
PlateH
),
Config
.
MoveZ_P3Speed
);
...
...
@@ -319,17 +326,20 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
OT16_MoveXToP2
))
{
TimeSpan
span
=
DateTime
.
Now
-
MoveInfo
.
MoveStartTime
;
TimeSpan
span
=
DateTime
.
Now
-
MoveInfo
.
MoveStartTime
;
if
(
IsStartLabel
)
{
MoveInfo
.
EndMove
();
WorkLog
(
"放料完成,耗时("
+
FormUtil
.
GetSpanStr
(
span
)
+
")"
);
}
bool
startOk
=
CheckStartLabel
(
true
);
if
(
startOk
)
else
{
MoveInfo
.
EndMove
();
WorkLog
(
"放料完成,耗时("
+
FormUtil
.
GetSpanStr
(
span
)
+
")"
);
bool
startOk
=
CheckStartLabel
(
true
);
if
(
startOk
)
{
MoveInfo
.
EndMove
();
WorkLog
(
"放料完成,耗时("
+
FormUtil
.
GetSpanStr
(
span
)
+
")"
);
}
}
}
...
...
@@ -440,6 +450,7 @@ namespace OnlineStore.DeviceLibrary
{
if
(
isPrintOk
||
isTimeOut
||
(!
NeedPrint
))
{
ClearTimeoutAlarm
(
"打印标签完成"
);
SecMoveInfo
.
NextMoveStep
(
StepEnum
.
OL05_TakeBack
);
SecWorkLog
(
"贴标: 打印结束["
+
RobotManager
.
LastPrintStatus
+
"]["
+
(
isTimeOut
?
"超时120秒"
:
""
)
+
"], "
);
//CylinderMove(SecMoveInfo, IO_Type.TakeCode_Forward, IO_Type.TakeCode_Back);
...
...
@@ -495,6 +506,7 @@ namespace OnlineStore.DeviceLibrary
if
(
canLabel
&&
ShelfMoveInfo
.
IsStep
(
StepEnum
.
OS_25_WaitLabel
))
{
ClearTimeoutAlarm
(
"料盘可贴标"
);
SecMoveInfo
.
NextMoveStep
(
StepEnum
.
OL11_XYToP3
);
SecWorkLog
(
"贴标: XY轴移动到P3点"
,
0
);
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/OutputEquip_Shelf.cs
查看文件 @
f17ebf3
...
...
@@ -252,6 +252,7 @@ namespace OnlineStore.DeviceLibrary
//TODO 此处需要验证贴标完成
if
(
SecMoveInfo
.
MoveType
.
Equals
(
RobotMoveType
.
None
))
{
ClearTimeoutAlarm
(
"贴标结束"
);
ShelfMoveInfo
.
NextMoveStep
(
StepEnum
.
OS_26_LabelOk
);
ShelfWorkLog
(
"贴标完成"
);
}
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/X_RAY_Equip_Partial.cs
查看文件 @
f17ebf3
...
...
@@ -186,6 +186,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
IOValue
(
IO_Type
.
X_Lock_On
).
Equals
(
IO_VALUE
.
HIGH
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
XW11_StartCount
);
WorkLog
(
"点料:启用X射线点料,等待X射线可以启动"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
...
...
@@ -204,6 +205,8 @@ namespace OnlineStore.DeviceLibrary
{
if
(
xRayCanStart
&&
(
IOValue
(
IO_Type
.
X_Lock_On
).
Equals
(
IO_VALUE
.
HIGH
))
)
{
ClearTimeoutAlarm
(
"可以打开X射线"
);
ClearTimeoutAlarm
(
"X互锁信号打开"
);
XW12_XRayStart
();
}
else
if
(
MoveInfo
.
IsTimeOut
(
120
))
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/model/RobotMoveInfo.cs
查看文件 @
f17ebf3
...
...
@@ -87,7 +87,7 @@ namespace OnlineStore.DeviceLibrary
{
TimeSpan
span
=
DateTime
.
Now
-
LastSetpTime
;
int
second
=
10
;
second
=
(
int
)(
TimeOutSeconds
/
span
.
Total
Seconds
)
*
10
;
second
=
(
int
)(
span
.
TotalSeconds
/
TimeOut
Seconds
)
*
10
;
if
(
second
>
120
)
{
second
=
120
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论