Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO827-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
图表
网络
创建新的问题
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 4098afb9
由
LN
编写于
2021-05-15 18:47:17 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
夹爪分开配置。
1 个父辈
0c67c918
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
100 行增加
和
46 行删除
source/AssemblyLineClient/记录.txt
source/DeviceLibrary/LineConfig/Config_Line.csv
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
source/DeviceLibrary/assemblymanager/ALineManager.cs
source/DeviceLibrary/baan/ClampJawBean.cs
source/LoadCVSLibrary/storeConfig/ConfigItemBase.cs
source/AssemblyLineClient/记录.txt
查看文件 @
4098afb
20200428
20210510
夹爪脆盘和普通料盘参数分开配置
20200428
1.脆盘料号配置增加界面,修改后实时生效。
2.预扫码扫码失败照片保存到文件夹。
3.紧急料直接放入NG箱
...
...
@@ -42,3 +45,6 @@ todesk 874075053 Acc123
线体转动方向
D7处无检测信号,如何判断出料口是否有料
source/DeviceLibrary/LineConfig/Config_Line.csv
查看文件 @
4098afb
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
查看文件 @
4098afb
...
...
@@ -249,7 +249,7 @@ namespace OnlineStore.DeviceLibrary
LogInfo
(
MoveInfo
.
MoveType
+
":"
+
MoveInfo
.
SLog
+
": 定位气缸下降 ,夹紧气缸放松"
);
LocationCylinderDown
(
MoveInfo
);
//CylinderMove(MoveInfo, IO_Type.SL_ClampCylinder_Work, IO_Type.SL_ClampCylinder_Relax);
ClampJwa
.
Relax
(
MoveInfo
);
ClampJwa
.
Relax
(
MoveInfo
,
LastCodeList
.
ToArray
()
);
break
;
case
LineMoveStep
.
FR_15_TopDown
:
RFIDData
data
=
RFIDManager
.
GetShelfId
(
DeviceID
);
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
查看文件 @
4098afb
...
...
@@ -506,7 +506,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_34_CylinderRelax
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":上料气缸放松"
);
//CylinderMove(MoveInfo, IO_Type.SL_ClampCylinder_Work, IO_Type.SL_ClampCylinder_Relax);
ClampJwa
.
Relax
(
MoveInfo
);
ClampJwa
.
Relax
(
MoveInfo
,
LastCodeList
.
ToArray
()
);
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
FI_34_CylinderRelax
))
{
...
...
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
查看文件 @
4098afb
...
...
@@ -364,7 +364,7 @@ namespace OnlineStore.DeviceLibrary
ClampCount
=
1
;
OutLog
(
"出库 "
+
MoveInfo
.
SLog
+
": 第一次未抓到料,重新抓一次,夹爪先放松"
,
1
);
//CylinderMove(MoveInfo, IO_Type.ClampCylinder_Work, IO_Type.ClampCylinder_Relax);
ClampJwa
.
Relax
(
MoveInfo
);
ClampJwa
.
Relax
(
MoveInfo
,
MoveInfo
.
MoveParam
.
WareCode
);
}
else
{
...
...
@@ -447,7 +447,7 @@ namespace OnlineStore.DeviceLibrary
//出库全部完成
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_61_CylinderRelax
);
//CylinderMove(MoveInfo, IO_Type.ClampCylinder_Work, IO_Type.ClampCylinder_Relax);
ClampJwa
.
Relax
(
MoveInfo
);
ClampJwa
.
Relax
(
MoveInfo
,
MoveInfo
.
MoveParam
.
WareCode
);
EDataManager
.
UpdateParam
(
DeviceID
);
}
...
...
@@ -640,7 +640,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MI_12_CylinderRelax
);
InLog
(
"入库 "
+
MoveInfo
.
SLog
+
",夹料气缸放松"
);
//CylinderMove(MoveInfo, IO_Type.ClampCylinder_Work, IO_Type.ClampCylinder_Relax);
ClampJwa
.
Relax
(
MoveInfo
);
ClampJwa
.
Relax
(
MoveInfo
,
MoveInfo
.
MoveParam
.
WareCode
);
EDataManager
.
UpdateParam
(
DeviceID
);
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
MI_12_CylinderRelax
))
...
...
source/DeviceLibrary/assemblymanager/ALineManager.cs
查看文件 @
4098afb
...
...
@@ -24,24 +24,24 @@ namespace OnlineStore.DeviceLibrary
public
static
bool
IsConnectServer
=
!
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
).
Equals
(
""
);
public
static
LineBean
Line
=
null
;
public
static
Line_Config
Config
=
null
;
public
static
Line_Config
Config
=
null
;
public
static
Dictionary
<
int
,
DeviceConfig
>
allConfigMap
=
null
;
public
LineManager
()
{
}
public
static
bool
CheckEnum
(
Type
type
)
public
static
bool
CheckEnum
(
Type
type
)
{
if
(
type
.
IsEnum
)
{
{
List
<
int
>
valueList
=
new
List
<
int
>();
Array
array
=
Enum
.
GetValues
(
type
);
foreach
(
int
item
in
array
)
{
if
(
valueList
.
Contains
(
item
))
{
LogUtil
.
error
(
type
.
Name
+
"枚举值:"
+
item
+
"重复存在,请检查代码!程序退出。"
);
LogUtil
.
error
(
type
.
Name
+
"枚举值:"
+
item
+
"重复存在,请检查代码!程序退出。"
);
Application
.
Exit
();
return
false
;
return
false
;
}
valueList
.
Add
(
item
);
}
...
...
@@ -77,7 +77,7 @@ namespace OnlineStore.DeviceLibrary
}
Dictionary
<
int
,
MoveEquip_Config
>
moveECMap
=
null
;
Dictionary
<
int
,
FeedingEquip_Config
>
feedingECMap
=
null
;
Dictionary
<
int
,
HYEquip_Config
>
HYECMap
=
null
;
Dictionary
<
int
,
HYEquip_Config
>
HYECMap
=
null
;
DeviceConfig
.
SubDIList
=
new
Dictionary
<
int
,
Dictionary
<
string
,
ConfigIO
>>();
DeviceConfig
.
SubDOList
=
new
Dictionary
<
int
,
Dictionary
<
string
,
ConfigIO
>>();
...
...
@@ -86,9 +86,9 @@ namespace OnlineStore.DeviceLibrary
moveECMap
=
new
Dictionary
<
int
,
MoveEquip_Config
>();
feedingECMap
=
new
Dictionary
<
int
,
FeedingEquip_Config
>();
HYECMap
=
new
Dictionary
<
int
,
HYEquip_Config
>();
HYECMap
=
new
Dictionary
<
int
,
HYEquip_Config
>();
allConfigMap
=
new
Dictionary
<
int
,
DeviceConfig
>();
isInit
=
true
;
string
lineType
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
Line_Type
);
...
...
@@ -113,8 +113,8 @@ namespace OnlineStore.DeviceLibrary
}
MoveEquip_Config
moveConfig
=
CSVConfigReader
.
LoadMoveConfig
(
i
,
DeviceType
.
MoveEquip
,
config
);
moveConfig
.
ConfigSpeed
(
Config
);
int
subType
=
i
;
moveECMap
.
Add
(
i
,
moveConfig
);
int
subType
=
i
;
moveECMap
.
Add
(
i
,
moveConfig
);
}
foreach
(
int
i
in
moveECMap
.
Keys
)
{
...
...
@@ -126,7 +126,7 @@ namespace OnlineStore.DeviceLibrary
string
feedingEquipConfig
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
ConfigPath_FeedingEquip
);
for
(
int
i
=
1
;
i
<=
feedingEquipCount
;
i
++)
{
int
subType
=
100
+
i
;
int
subType
=
100
+
i
;
string
config
=
appPath
+
feedingEquipConfig
.
Replace
(
".csv"
,
"_"
+
i
+
".csv"
);
FeedingEquip_Config
moveConfig
=
CSVConfigReader
.
LoadFeedingConfig
(
subType
,
DeviceType
.
FeedingEquip
,
config
);
moveConfig
.
ConfigSpeed
(
Config
);
...
...
@@ -154,7 +154,7 @@ namespace OnlineStore.DeviceLibrary
HYECMap
.
Add
(
subType
,
moveConfig
);
allConfigMap
.
Add
(
subType
,
moveConfig
);
}
Config
.
SetIO
(
1000
);
Line
=
new
LineBean
(
Config
,
moveECMap
,
feedingECMap
,
HYECMap
);
LogUtil
.
info
(
"加载 完成!"
);
...
...
@@ -174,8 +174,8 @@ namespace OnlineStore.DeviceLibrary
}
return
false
;
}
public
static
void
SaveMoveEquipConfig
(
MoveEquip_Config
config
)
{
try
...
...
@@ -185,14 +185,14 @@ namespace OnlineStore.DeviceLibrary
string
moveEquipConfig
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
ConfigPath_MoveEquip
);
string
configBase
=
appPath
+
moveEquipConfig
;
string
configStr
=
appPath
+
moveEquipConfig
.
Replace
(
".csv"
,
"_"
+
config
.
Id
.
ToString
().
PadLeft
(
2
,
'0'
)
+
".csv"
);
string
configStr
=
appPath
+
moveEquipConfig
.
Replace
(
".csv"
,
"_"
+
config
.
Id
.
ToString
().
PadLeft
(
2
,
'0'
)
+
".csv"
);
allConfigMap
[
config
.
Id
]
=
config
;
if
(!
File
.
Exists
(
configStr
))
{
LogUtil
.
info
(
"复制配置文件【"
+
configBase
+
"】->【"
+
configStr
+
"】"
);
File
.
Copy
(
configBase
,
configStr
);
}
bool
result
=
CSVConfigReader
.
SaveConfig
(
configStr
,
config
,
typeof
(
MoveEquip_Config
));
bool
result
=
CSVConfigReader
.
SaveConfig
(
configStr
,
config
,
typeof
(
MoveEquip_Config
));
if
(!
result
)
{
LogUtil
.
error
(
"保存配置文件失败:"
+
configStr
);
...
...
@@ -200,7 +200,7 @@ namespace OnlineStore.DeviceLibrary
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"出错:"
,
ex
);
LogUtil
.
error
(
"出错:"
,
ex
);
}
}
public
static
void
SaveFeedingEquipConfig
(
FeedingEquip_Config
config
)
...
...
@@ -212,9 +212,9 @@ namespace OnlineStore.DeviceLibrary
string
moveEquipConfig
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
ConfigPath_FeedingEquip
);
int
id
=
config
.
Id
-
100
;
string
configStr
=
appPath
+
moveEquipConfig
.
Replace
(
".csv"
,
"_"
+
id
+
".csv"
);
string
configStr
=
appPath
+
moveEquipConfig
.
Replace
(
".csv"
,
"_"
+
id
+
".csv"
);
allConfigMap
[
config
.
Id
]
=
config
;
bool
result
=
CSVConfigReader
.
SaveConfig
(
configStr
,
config
,
typeof
(
FeedingEquip_Config
));
bool
result
=
CSVConfigReader
.
SaveConfig
(
configStr
,
config
,
typeof
(
FeedingEquip_Config
));
if
(!
result
)
{
LogUtil
.
error
(
"保存配置文件失败:"
+
configStr
);
...
...
@@ -222,7 +222,7 @@ namespace OnlineStore.DeviceLibrary
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"出错:"
,
ex
);
LogUtil
.
error
(
"出错:"
,
ex
);
}
}
public
static
void
SaveHYEquipConfig
(
HYEquip_Config
config
)
...
...
@@ -241,7 +241,7 @@ namespace OnlineStore.DeviceLibrary
File
.
Copy
(
configBase
,
configStr
);
}
allConfigMap
[
config
.
Id
]
=
config
;
bool
result
=
CSVConfigReader
.
SaveConfig
(
configStr
,
config
,
typeof
(
HYEquip_Config
));
bool
result
=
CSVConfigReader
.
SaveConfig
(
configStr
,
config
,
typeof
(
HYEquip_Config
));
if
(!
result
)
{
LogUtil
.
error
(
"保存配置文件失败:"
+
configStr
);
...
...
@@ -249,7 +249,7 @@ namespace OnlineStore.DeviceLibrary
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"出错:"
,
ex
);
LogUtil
.
error
(
"出错:"
,
ex
);
}
}
...
...
@@ -298,25 +298,25 @@ namespace OnlineStore.DeviceLibrary
{
PnList
.
Add
(
s
);
}
}
}
}
return
PnList
;
}
public
static
void
UpdatePnList
()
public
static
void
UpdatePnList
()
{
if
(
PnList
==
null
)
{
return
;
}
string
str
=
""
;
foreach
(
string
obj
in
PnList
)
foreach
(
string
obj
in
PnList
)
{
str
+=
obj
+
"#"
;
}
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
PNList
,
str
);
LogUtil
.
info
(
"更改脆盘料号集合:"
+
str
);
}
public
static
void
RemovePN
(
string
pn
)
public
static
void
RemovePN
(
string
pn
)
{
if
(
PnList
.
Contains
(
pn
))
{
...
...
@@ -328,11 +328,12 @@ namespace OnlineStore.DeviceLibrary
{
if
(!
PnList
.
Contains
(
pn
))
{
PnList
.
Add
(
pn
);
PnList
.
Add
(
pn
);
UpdatePnList
();
}
}
public
static
bool
NeedWaitHassReel
(
params
string
[]
codes
)
public
static
bool
IsCrispReel
(
params
string
[]
codes
)
{
try
{
...
...
@@ -347,13 +348,13 @@ namespace OnlineStore.DeviceLibrary
{
if
(
codePn
.
Equals
(
pn
))
{
LogUtil
.
info
(
"
夹爪不检测是否有料:条码["
+
code
+
"]料号["
+
pn
+
"]是脆盘"
);
return
fals
e
;
LogUtil
.
info
(
"
IsCrispReel:条码["
+
code
+
"]料号["
+
pn
+
"]是脆盘"
);
return
tru
e
;
}
else
if
(
codePn
.
StartsWith
(
pn
))
{
LogUtil
.
info
(
"
夹爪不检测是否有料
:条码["
+
code
+
"]料号["
+
pn
+
"]认为是脆盘"
);
return
fals
e
;
LogUtil
.
info
(
"
IsCrispReel
:条码["
+
code
+
"]料号["
+
pn
+
"]认为是脆盘"
);
return
tru
e
;
}
}
}
...
...
@@ -361,9 +362,14 @@ namespace OnlineStore.DeviceLibrary
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"
NeedWaitHassReel
出错:"
+
ex
.
ToString
());
LogUtil
.
error
(
"
IsCrispReel
出错:"
+
ex
.
ToString
());
}
return
false
;
}
public
static
bool
NeedWaitHassReel
(
params
string
[]
codes
)
{
return
true
;
//return !IsCrispReel(codes);
}
}
}
source/DeviceLibrary/baan/ClampJawBean.cs
查看文件 @
4098afb
...
...
@@ -58,15 +58,27 @@ namespace OnlineStore.DeviceLibrary
}
public
void
ClampPush
(
LineMoveInfo
moveInfo
,
bool
checkHasReel
,
params
string
[]
code
)
{
bool
iscrisp
=
LineManager
.
IsCrispReel
(
code
);
float
distance
=
config
.
Distance
;
if
(
rmaxis
!=
null
&&
rmaxis
.
IsPortOpen
)
{
rmaxis
.
Push
(
config
.
Force
,
config
.
Distance
,
config
.
Velocity
);
if
(
iscrisp
)
{
distance
=
config
.
CrispDistance
;
rmaxis
.
Push
(
config
.
CrispForce
,
config
.
CrispDistance
,
config
.
CrispPushVelocity
);
}
else
{
distance
=
config
.
Distance
;
rmaxis
.
Push
(
config
.
Force
,
config
.
Distance
,
config
.
PushVelocity
);
}
}
if
(
moveInfo
!=
null
)
{
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitClampReached
((
int
)
config
.
Distance
));
if
(
checkHasReel
&&
LineManager
.
NeedWaitHassReel
(
code
))
{
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitClampReached
((
int
)
distance
));
if
(
checkHasReel
)
//if (checkHasReel && LineManager.NeedWaitHassReel(code))
{
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitClampHasReel
());
//有一个到位就算到位
moveInfo
.
OneWaitCanEndStep
=
true
;
...
...
@@ -121,12 +133,20 @@ namespace OnlineStore.DeviceLibrary
return
false
;
}
public
void
Relax
(
LineMoveInfo
moveInfo
=
null
)
public
void
Relax
(
LineMoveInfo
moveInfo
=
null
,
params
string
[]
code
)
{
bool
iscrisp
=
LineManager
.
IsCrispReel
(
code
);
int
p
=
0
;
if
(
rmaxis
!=
null
&&
rmaxis
.
IsPortOpen
)
{
rmaxis
.
MoveAbsolute
(
p
);
if
(
iscrisp
)
{
rmaxis
.
MoveAbsolute
(
p
,
config
.
CrispVelocity
,
config
.
CrispAddSpeed
,
config
.
CrispDelSpeed
);
}
else
{
rmaxis
.
MoveAbsolute
(
p
,
config
.
Velocity
,
config
.
AddSpeed
,
config
.
DelSpeed
);
}
}
if
(
moveInfo
!=
null
)
{
...
...
@@ -196,7 +216,7 @@ namespace OnlineStore.DeviceLibrary
{
if
(
rmaxis
!=
null
&&
rmaxis
.
IsPortOpen
)
{
rmaxis
.
Push
(
force
,
distance
,
config
.
Velocity
);
rmaxis
.
Push
(
force
,
distance
,
config
.
Crisp
Velocity
);
}
}
...
...
source/LoadCVSLibrary/storeConfig/ConfigItemBase.cs
查看文件 @
4098afb
...
...
@@ -163,6 +163,28 @@ namespace OnlineStore.LoadCSVLibrary
public
float
Force
{
get
;
set
;
}
[
CSVAttribute
(
"距离"
)]
public
float
Distance
{
get
;
set
;
}
[
CSVAttribute
(
"推压速度"
)]
public
float
PushVelocity
{
get
;
set
;
}
[
CSVAttribute
(
"脆盘目标速度"
)]
public
float
CrispVelocity
{
get
;
set
;
}
[
CSVAttribute
(
"脆盘加速度"
)]
public
float
CrispAddSpeed
{
get
;
set
;
}
[
CSVAttribute
(
"脆盘减速度"
)]
public
float
CrispDelSpeed
{
get
;
set
;
}
[
CSVAttribute
(
"脆盘出力"
)]
public
float
CrispForce
{
get
;
set
;
}
[
CSVAttribute
(
"脆盘距离"
)]
public
float
CrispDistance
{
get
;
set
;
}
[
CSVAttribute
(
"脆盘推压速度"
)]
public
float
CrispPushVelocity
{
get
;
set
;
}
public
string
GetNameStr
()
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论