Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
AutoCountMachine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 8c2f9388
由
LN
编写于
2020-07-14 14:26:55 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
日志修改
1 个父辈
0248b4f6
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
30 行增加
和
23 行删除
RC1266-AutoCountMachine/dll/label/Asa.PrintLabel.dll
RC1266-AutoCountMachine/source/AutoCountClient/FrmOutputEquip.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/EquipBase.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/InputEquip.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/InputEquip_InStore.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/OutputEquip.cs
RC1266-AutoCountMachine/source/DeviceLibrary/manager/RobotManager.cs
RC1266-AutoCountMachine/dll/label/Asa.PrintLabel.dll
查看文件 @
8c2f938
此文件类型无法预览
RC1266-AutoCountMachine/source/AutoCountClient/FrmOutputEquip.cs
查看文件 @
8c2f938
...
@@ -747,7 +747,7 @@ namespace OnlineStore.AutoCountClient
...
@@ -747,7 +747,7 @@ namespace OnlineStore.AutoCountClient
return
;
return
;
}
}
LogUtil
.
error
(
"点击:打印标签"
);
LogUtil
.
error
(
"点击:打印标签
StartPrintLabel
"
);
string
code
=
txtPrintCode
.
Text
;
string
code
=
txtPrintCode
.
Text
;
string
num
=
txtPringNum
.
Text
;
string
num
=
txtPringNum
.
Text
;
equipBean
.
StartPrintLabel
(
code
,
num
);
equipBean
.
StartPrintLabel
(
code
,
num
);
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/EquipBase.cs
查看文件 @
8c2f938
...
@@ -442,10 +442,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -442,10 +442,14 @@ namespace OnlineStore.DeviceLibrary
#
endregion
#
endregion
#
region
日志打印
#
region
日志打印
private
int
WorkLogLevel
=
1
;
internal
int
WorkLogLevel
=
1
;
private
int
SecWorkLogLevel
=
1
;
private
int
SecWorkLogLevel
=
1
;
protected
void
WorkLog
(
string
msg
)
protected
void
WorkLog
(
string
msg
,
int
level
=-
1
)
{
{
if
(
level
<
0
)
{
level
=
WorkLogLevel
;
}
string
code
=
""
;
string
code
=
""
;
if
(
MoveInfo
.
MoveParam
!=
null
&&
MoveInfo
.
MoveParam
.
WareCode
!=
null
)
if
(
MoveInfo
.
MoveParam
!=
null
&&
MoveInfo
.
MoveParam
.
WareCode
!=
null
)
{
{
...
@@ -454,7 +458,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -454,7 +458,7 @@ namespace OnlineStore.DeviceLibrary
code
=
"["
+
MoveInfo
.
MoveParam
.
WareCode
+
"]"
;
code
=
"["
+
MoveInfo
.
MoveParam
.
WareCode
+
"]"
;
}
}
}
}
if
(
WorkLogL
evel
.
Equals
(
1
))
if
(
l
evel
.
Equals
(
1
))
{
{
LogUtil
.
info
(
MoveInfo
.
Name
+
"["
+
MoveInfo
.
MoveStep
+
"] "
+
msg
);
LogUtil
.
info
(
MoveInfo
.
Name
+
"["
+
MoveInfo
.
MoveStep
+
"] "
+
msg
);
}
}
...
@@ -466,13 +470,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -466,13 +470,14 @@ namespace OnlineStore.DeviceLibrary
protected
void
SecWorkLog
(
string
msg
)
protected
void
SecWorkLog
(
string
msg
)
{
{
string
code
=
SecMoveInfo
.
MoveParam
!=
null
?
SecMoveInfo
.
MoveParam
.
WareCode
:
""
;
if
(
SecWorkLogLevel
.
Equals
(
1
))
if
(
SecWorkLogLevel
.
Equals
(
1
))
{
{
LogUtil
.
info
(
SecMoveInfo
.
Name
+
"["
+
SecMoveInfo
.
MoveStep
+
"] "
+
msg
);
LogUtil
.
info
(
SecMoveInfo
.
Name
+
" "
+
code
+
" "
+
"["
+
SecMoveInfo
.
MoveStep
+
"] "
+
msg
);
}
}
else
else
{
{
LogUtil
.
debug
(
SecMoveInfo
.
Name
+
"["
+
SecMoveInfo
.
MoveStep
+
"] "
+
msg
);
LogUtil
.
debug
(
SecMoveInfo
.
Name
+
"
"
+
code
+
" "
+
"
["
+
SecMoveInfo
.
MoveStep
+
"] "
+
msg
);
}
}
}
}
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/InputEquip.cs
查看文件 @
8c2f938
...
@@ -103,7 +103,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -103,7 +103,8 @@ namespace OnlineStore.DeviceLibrary
}
}
private
void
StartReset
()
private
void
StartReset
()
{
{
WorkLogLevel
=
1
;
//复位时设置状态为none
//复位时设置状态为none
AgvClient
.
SetStatus
(
Config
.
LeftAgvName
);
AgvClient
.
SetStatus
(
Config
.
LeftAgvName
);
AgvClient
.
SetStatus
(
Config
.
RightAgvName
);
AgvClient
.
SetStatus
(
Config
.
RightAgvName
);
...
@@ -186,6 +187,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -186,6 +187,7 @@ namespace OnlineStore.DeviceLibrary
WorkLog
(
"复位完成"
);
WorkLog
(
"复位完成"
);
runStatus
=
RobotRunStatus
.
Runing
;
runStatus
=
RobotRunStatus
.
Runing
;
MoveInfo
.
EndMove
();
MoveInfo
.
EndMove
();
WorkLogLevel
=
0
;
}
}
else
if
(
MoveInfo
.
IsTimeOut
(
180
))
else
if
(
MoveInfo
.
IsTimeOut
(
180
))
{
{
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/InputEquip_InStore.cs
查看文件 @
8c2f938
...
@@ -32,7 +32,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -32,7 +32,7 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(!
NoAlarm
())
if
(!
NoAlarm
())
{
{
WorkLog
(
"报警中,无法开始取放料:"
+
param
.
ToStr
());
WorkLog
(
"报警中,无法开始取放料:"
+
param
.
ToStr
()
,
1
);
return
false
;
return
false
;
}
}
...
@@ -63,7 +63,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -63,7 +63,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
else
{
{
WorkLog
(
"开始取料:"
+
param
.
ToStr
()
+
",进出轴返回待机点"
);
WorkLog
(
"开始取料:"
+
param
.
ToStr
()
+
",进出轴返回待机点"
,
1
);
InOutAxis
.
AbsMove
(
MoveInfo
,
Config
.
InoutAxis_P1
,
Config
.
InoutAxis_P1Speed
);
InOutAxis
.
AbsMove
(
MoveInfo
,
Config
.
InoutAxis_P1
,
Config
.
InoutAxis_P1Speed
);
}
}
return
true
;
return
true
;
...
@@ -176,8 +176,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -176,8 +176,8 @@ namespace OnlineStore.DeviceLibrary
{
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IW10_SaveSize
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
IW10_SaveSize
);
MoveInfo
.
MoveParam
.
PlateH
=
moveBean
.
LastHeight
;
MoveInfo
.
MoveParam
.
PlateH
=
moveBean
.
LastHeight
;
MoveInfo
.
MoveParam
.
PlateW
=
GetWidth
();
MoveInfo
.
MoveParam
.
PlateW
=
GetWidth
();
WorkLog
(
"测高结束, 记录尺寸【"
+
MoveInfo
.
MoveParam
.
PlateW
+
"X"
+
MoveInfo
.
MoveParam
.
PlateH
+
"】,开始下一盘预扫码"
);
WorkLog
(
"测高结束, 记录尺寸【"
+
MoveInfo
.
MoveParam
.
PlateW
+
"X"
+
MoveInfo
.
MoveParam
.
PlateH
+
"】,开始下一盘预扫码"
,
1
);
}
}
else
if
(
MoveInfo
.
IsTimeOut
(
60
))
else
if
(
MoveInfo
.
IsTimeOut
(
60
))
...
@@ -196,7 +196,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -196,7 +196,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
MoveParam
.
IsNgReel
=
true
;
MoveInfo
.
MoveParam
.
IsNgReel
=
true
;
MoveInfo
.
MoveParam
.
NgMsg
=
"无有效条码"
;
MoveInfo
.
MoveParam
.
NgMsg
=
"无有效条码"
;
MoveInfo
.
MoveParam
.
TargetPosType
=
1
;
MoveInfo
.
MoveParam
.
TargetPosType
=
1
;
WorkLog
(
" 无有效条码,从XRay放到NG箱:"
+
MoveInfo
.
MoveParam
.
ToStr
());
WorkLog
(
" 无有效条码,从XRay放到NG箱:"
+
MoveInfo
.
MoveParam
.
ToStr
()
,
1
);
}
}
//else if (MoveInfo.MoveParam.InPosType.Equals(2))
//else if (MoveInfo.MoveParam.InPosType.Equals(2))
//{
//{
...
@@ -214,12 +214,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -214,12 +214,12 @@ namespace OnlineStore.DeviceLibrary
if
(
needPosition
>=
1
&&
needPosition
<=
3
)
if
(
needPosition
>=
1
&&
needPosition
<=
3
)
{
{
MoveInfo
.
MoveParam
.
TargetPosType
=
needPosition
;
MoveInfo
.
MoveParam
.
TargetPosType
=
needPosition
;
WorkLog
(
" 【"
+
MoveInfo
.
MoveParam
.
WareCode
+
"】通过接口获取目标位置:"
+
needPosition
);
WorkLog
(
" 【"
+
MoveInfo
.
MoveParam
.
WareCode
+
"】通过接口获取目标位置:"
+
needPosition
,
1
);
}
}
// else if (!msg.Equals("") || needPosition.Equals(0))
// else if (!msg.Equals("") || needPosition.Equals(0))
else
else
{
{
WorkLog
(
" 【"
+
MoveInfo
.
MoveParam
.
WareCode
+
"】获取是否测值失败:"
+
msg
);
WorkLog
(
" 【"
+
MoveInfo
.
MoveParam
.
WareCode
+
"】获取是否测值失败:"
+
msg
,
1
);
MoveInfo
.
MoveParam
.
TargetPosType
=
1
;
MoveInfo
.
MoveParam
.
TargetPosType
=
1
;
MoveInfo
.
MoveParam
.
IsNgReel
=
true
;
MoveInfo
.
MoveParam
.
IsNgReel
=
true
;
MoveInfo
.
MoveParam
.
NgMsg
=
msg
;
MoveInfo
.
MoveParam
.
NgMsg
=
msg
;
...
@@ -235,7 +235,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -235,7 +235,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
MoveParam
.
TargetPosType
=
DefautTargetP
;
MoveInfo
.
MoveParam
.
TargetPosType
=
DefautTargetP
;
}
}
}
}
WorkLog
(
" 根据条码获取目标位置:"
+
MoveInfo
.
MoveParam
.
ToStr
());
WorkLog
(
" 根据条码获取目标位置:"
+
MoveInfo
.
MoveParam
.
ToStr
()
,
1
);
}
}
}
}
#
endregion
#
endregion
...
@@ -259,19 +259,19 @@ namespace OnlineStore.DeviceLibrary
...
@@ -259,19 +259,19 @@ namespace OnlineStore.DeviceLibrary
//Random r = new Random();
//Random r = new Random();
//int targetP = r.Next(1, 100) % 3 + 1;
//int targetP = r.Next(1, 100) % 3 + 1;
MoveInfo
.
MoveParam
.
TargetPosType
=
1
;
MoveInfo
.
MoveParam
.
TargetPosType
=
1
;
WorkLog
(
" 随机放料目标:"
+
1
);
WorkLog
(
" 随机放料目标:"
+
1
,
1
);
}
}
}
}
if
(
MoveInfo
.
MoveParam
.
TargetPosType
.
Equals
(
1
))
if
(
MoveInfo
.
MoveParam
.
TargetPosType
.
Equals
(
1
))
{
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IW21_MiddleToP3
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
IW21_MiddleToP3
);
WorkLog
(
" 开始放料到XRay入口,旋转轴到P3"
);
WorkLog
(
" 开始放料到XRay入口,旋转轴到P3"
,
1
);
MiddleAxis
.
AbsMove
(
MoveInfo
,
Config
.
MiddleAxis_P3
,
Config
.
MiddleAxis_P3Speed
);
MiddleAxis
.
AbsMove
(
MoveInfo
,
Config
.
MiddleAxis_P3
,
Config
.
MiddleAxis_P3Speed
);
}
}
else
else
{
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IW31_MIddleToP4
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
IW31_MIddleToP4
);
WorkLog
(
" 开始放料到测值工位,旋转轴到P4"
);
WorkLog
(
" 开始放料到测值工位,旋转轴到P4"
,
1
);
MiddleAxis
.
AbsMove
(
MoveInfo
,
Config
.
MiddleAxis_P4
,
Config
.
MiddleAxis_P4Speed
);
MiddleAxis
.
AbsMove
(
MoveInfo
,
Config
.
MiddleAxis_P4
,
Config
.
MiddleAxis_P4Speed
);
}
}
}
}
...
@@ -302,7 +302,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -302,7 +302,7 @@ namespace OnlineStore.DeviceLibrary
{
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IW41_Clamping_Relax
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
IW41_Clamping_Relax
);
RobotManager
.
robot
.
XrayBean
.
In_ReelInfo
=
MoveInfo
.
MoveParam
.
GetReelInfo
();
RobotManager
.
robot
.
XrayBean
.
In_ReelInfo
=
MoveInfo
.
MoveParam
.
GetReelInfo
();
WorkLog
(
"->XRay:夹料气缸放松,更新XRay入口料盘:"
+
RobotManager
.
robot
.
XrayBean
.
In_ReelInfo
.
ToStr
());
WorkLog
(
"->XRay:夹料气缸放松,更新XRay入口料盘:"
+
RobotManager
.
robot
.
XrayBean
.
In_ReelInfo
.
ToStr
()
,
1
);
CylinderMove
(
MoveInfo
,
IO_Type
.
Clamping_Work
,
IO_Type
.
Clamping_Relax
);
CylinderMove
(
MoveInfo
,
IO_Type
.
Clamping_Work
,
IO_Type
.
Clamping_Relax
);
}
}
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/OutputEquip.cs
查看文件 @
8c2f938
...
@@ -41,9 +41,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -41,9 +41,9 @@ namespace OnlineStore.DeviceLibrary
Init
();
Init
();
ledProcessTimer
.
Elapsed
+=
LedProcess
;
ledProcessTimer
.
Elapsed
+=
LedProcess
;
IoCheckTimer
.
Elapsed
+=
IoCheckTimerProcess
;
IoCheckTimer
.
Elapsed
+=
IoCheckTimerProcess
;
MoveInfo
=
new
RobotMoveInfo
(
" 取放料 "
);
MoveInfo
=
new
RobotMoveInfo
(
"
出料-
取放料 "
);
SecMoveInfo
=
new
RobotMoveInfo
(
" 贴标 "
);
SecMoveInfo
=
new
RobotMoveInfo
(
"
出料-
贴标 "
);
ShelfMoveInfo
=
new
RobotMoveInfo
(
" ShelfMove "
);
ShelfMoveInfo
=
new
RobotMoveInfo
(
"
出料-
ShelfMove "
);
MoveZAxis
=
new
AxisBean
(
RobotManager
.
Config
.
Move_Z_Axis
,
Name
);
MoveZAxis
=
new
AxisBean
(
RobotManager
.
Config
.
Move_Z_Axis
,
Name
);
MoveXAxis
=
new
AxisBean
(
RobotManager
.
Config
.
Move_X_Axis
,
Name
);
MoveXAxis
=
new
AxisBean
(
RobotManager
.
Config
.
Move_X_Axis
,
Name
);
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/manager/RobotManager.cs
查看文件 @
8c2f938
...
@@ -231,7 +231,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -231,7 +231,7 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(
sta
.
Equals
(
LastPrintStatus
).
Equals
(
false
))
if
(
sta
.
Equals
(
LastPrintStatus
).
Equals
(
false
))
{
{
LogUtil
.
info
(
"收到打印机状态:"
+
sta
+
",之前状态【"
+
LastPrintStatus
+
"】更新并保存状态"
);
LogUtil
.
info
(
"收到打印机
新
状态:"
+
sta
+
",之前状态【"
+
LastPrintStatus
+
"】更新并保存状态"
);
}
}
LastPrintStatus
=
sta
;
LastPrintStatus
=
sta
;
// MessageBox.Show(sta.ToString());
// MessageBox.Show(sta.ToString());
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论