Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
1069_MIMO_PlUS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 8de4cb8c
由
LN
编写于
2024-12-27 17:02:04 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加工单号参数
1 个父辈
c6ab8b6a
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
45 行增加
和
15 行删除
Common/bean/Bean.cs
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
DeviceLibrary/theMachine/JobList.cs
DeviceLibrary/theMachine/LabelParam.cs
DeviceLibrary/theMachine/MainMachine.cs
DeviceLibrary/theMachine/MainMachine_Clamp.cs
DeviceLibrary/theMachine/MainMachine_Store.cs
DeviceLibrary/theMachine/MoveStep.cs
Common/bean/Bean.cs
查看文件 @
8de4cb8
...
@@ -214,6 +214,7 @@ namespace OnlineStore.Common
...
@@ -214,6 +214,7 @@ namespace OnlineStore.Common
/// </summary>
/// </summary>
public
static
string
plateH
=
"plateH"
;
public
static
string
plateH
=
"plateH"
;
public
static
string
singleOut
=
"singleOut"
;
public
static
string
singleOut
=
"singleOut"
;
public
static
string
hSerial
=
"hSerial"
;
/// <summary>
/// <summary>
/// 料仓ID
/// 料仓ID
/// </summary>
/// </summary>
...
...
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
查看文件 @
8de4cb8
...
@@ -638,7 +638,7 @@ namespace DeviceLibrary
...
@@ -638,7 +638,7 @@ namespace DeviceLibrary
WarnMsg
=
""
;
WarnMsg
=
""
;
if
(
plateH
>
56
)
if
(
plateH
>
56
)
plateH
=
56
;
plateH
=
56
;
JobInfo
inStoreJob
=
new
JobInfo
(
message
,
posId
,
plateW
,
plateH
);
JobInfo
inStoreJob
=
new
JobInfo
(
message
,
posId
,
plateW
,
plateH
,
""
);
RobotManage
.
mainMachine
.
StartInStore
(
inStoreJob
);
RobotManage
.
mainMachine
.
StartInStore
(
inStoreJob
);
//如果当前正在出入库中,需要记录下来,等待空闲时执行
//如果当前正在出入库中,需要记录下来,等待空闲时执行
LogUtil
.
info
(
StoreName
+
" 收到服务器入库命令:库位号【"
+
posId
+
"】二维码【"
+
message
+
"】 开始入库!"
);
LogUtil
.
info
(
StoreName
+
" 收到服务器入库命令:库位号【"
+
posId
+
"】二维码【"
+
message
+
"】 开始入库!"
);
...
@@ -707,19 +707,25 @@ namespace DeviceLibrary
...
@@ -707,19 +707,25 @@ namespace DeviceLibrary
string
plateWStr
=
data
[
ParamDefine
.
plateW
];
string
plateWStr
=
data
[
ParamDefine
.
plateW
];
string
plateHStr
=
data
[
ParamDefine
.
plateH
];
string
plateHStr
=
data
[
ParamDefine
.
plateH
];
string
singleOut
=
data
[
ParamDefine
.
singleOut
];
string
singleOut
=
data
[
ParamDefine
.
singleOut
];
string
hSerialStr
=
data
.
ContainsKey
(
ParamDefine
.
hSerial
)
?
data
[
ParamDefine
.
hSerial
]
:
""
;
LogUtil
.
info
(
"收到服务器出库消息:poaIs="
+
posIdStr
+
",platew="
+
plateWStr
+
",plateh="
+
plateHStr
+
",singleOut="
+
singleOut
);
LogUtil
.
info
(
"收到服务器出库消息:poaIs="
+
posIdStr
+
",platew="
+
plateWStr
+
",plateh="
+
plateHStr
+
",singleOut="
+
singleOut
+
",hSerial="
+
hSerialStr
);
char
splitChar
=
'|'
;
char
splitChar
=
'|'
;
string
[]
posIdArray
=
posIdStr
.
Split
(
splitChar
);
string
[]
posIdArray
=
posIdStr
.
Split
(
splitChar
);
string
[]
plateWArray
=
plateWStr
.
Split
(
splitChar
);
string
[]
plateWArray
=
plateWStr
.
Split
(
splitChar
);
string
[]
plateHArray
=
plateHStr
.
Split
(
splitChar
);
string
[]
plateHArray
=
plateHStr
.
Split
(
splitChar
);
string
[]
singleOutArray
=
singleOut
.
Split
(
splitChar
);
string
[]
singleOutArray
=
singleOut
.
Split
(
splitChar
);
string
[]
hSerialArray
=
hSerialStr
.
Split
(
splitChar
);
int
index
=
-
1
;
int
index
=
-
1
;
foreach
(
string
posId
in
posIdArray
)
foreach
(
string
posId
in
posIdArray
)
{
{
index
++;
index
++;
int
.
TryParse
(
plateWArray
[
index
],
out
int
plateW
);
int
.
TryParse
(
plateWArray
[
index
],
out
int
plateW
);
int
.
TryParse
(
plateHArray
[
index
],
out
int
plateH
);
int
.
TryParse
(
plateHArray
[
index
],
out
int
plateH
);
string
hSerial
=
hSerialStr
;
if
(
hSerialArray
.
Length
>=
index
)
{
hSerial
=
hSerialArray
[
index
];
}
bool
isSingleOut
=
singleOutArray
[
index
].
ToLower
().
Equals
(
"true"
);
bool
isSingleOut
=
singleOutArray
[
index
].
ToLower
().
Equals
(
"true"
);
//根据发送的posId获取位置列表
//根据发送的posId获取位置列表
...
@@ -734,7 +740,7 @@ namespace DeviceLibrary
...
@@ -734,7 +740,7 @@ namespace DeviceLibrary
else
else
{
{
if
(
isSingleOut
)
if
(
isSingleOut
)
RobotManage
.
mainMachine
.
AddSingleStoreTask
(
posId
,
plateW
,
plateH
);
RobotManage
.
mainMachine
.
AddSingleStoreTask
(
posId
,
plateW
,
plateH
,
hSerial
);
else
else
{
{
if
(
Setting_Init
.
SingleInOut_EnableSpecfiedSize
)
if
(
Setting_Init
.
SingleInOut_EnableSpecfiedSize
)
...
@@ -742,16 +748,16 @@ namespace DeviceLibrary
...
@@ -742,16 +748,16 @@ namespace DeviceLibrary
if
(
Setting_Init
.
SingleInOut_ReelHeight
==
plateH
if
(
Setting_Init
.
SingleInOut_ReelHeight
==
plateH
&&
Setting_Init
.
SingleInOut_ReelWidth
==
plateW
)
&&
Setting_Init
.
SingleInOut_ReelWidth
==
plateW
)
{
{
RobotManage
.
mainMachine
.
AddSingleStoreTask
(
posId
,
plateW
,
plateH
);
RobotManage
.
mainMachine
.
AddSingleStoreTask
(
posId
,
plateW
,
plateH
,
hSerial
);
}
}
else
else
{
{
RobotManage
.
mainMachine
.
AddOutStoreTask
(
posId
,
plateW
,
plateH
);
RobotManage
.
mainMachine
.
AddOutStoreTask
(
posId
,
plateW
,
plateH
,
hSerial
);
}
}
}
}
else
else
{
{
RobotManage
.
mainMachine
.
AddOutStoreTask
(
posId
,
plateW
,
plateH
);
RobotManage
.
mainMachine
.
AddOutStoreTask
(
posId
,
plateW
,
plateH
,
hSerial
);
}
}
}
}
...
...
DeviceLibrary/theMachine/JobList.cs
查看文件 @
8de4cb8
...
@@ -80,13 +80,15 @@ namespace DeviceLibrary
...
@@ -80,13 +80,15 @@ namespace DeviceLibrary
this
.
PosId
=
posId
;
this
.
PosId
=
posId
;
this
.
plateH
=
0
;
this
.
plateH
=
0
;
this
.
plateW
=
0
;
this
.
plateW
=
0
;
this
.
hSerial
=
""
;
}
}
public
JobInfo
(
string
wareNum
,
string
posId
,
int
platew
,
int
plateh
)
public
JobInfo
(
string
wareNum
,
string
posId
,
int
platew
,
int
plateh
,
string
hSerial
=
""
)
{
{
this
.
WareNum
=
wareNum
;
this
.
WareNum
=
wareNum
;
this
.
PosId
=
posId
;
this
.
PosId
=
posId
;
this
.
plateW
=
platew
;
this
.
plateW
=
platew
;
this
.
plateH
=
plateh
;
this
.
plateH
=
plateh
;
this
.
hSerial
=
hSerial
;
}
}
/// <summary>
/// <summary>
/// 夹具编码值(1-6)
/// 夹具编码值(1-6)
...
@@ -109,9 +111,14 @@ namespace DeviceLibrary
...
@@ -109,9 +111,14 @@ namespace DeviceLibrary
/// </summary>
/// </summary>
public
int
plateH
{
get
;
set
;
}
public
int
plateH
{
get
;
set
;
}
/// <summary>
/// 工单号
/// </summary>
public
string
hSerial
{
get
;
set
;
}
public
string
ToStr
()
public
string
ToStr
()
{
{
return
"TrayCode【"
+
TrayCode
+
"】,WareNum=【"
+
WareNum
+
"】,PosId=【"
+
PosId
+
"】,plateW=【"
+
plateW
+
"】,plateH=【"
+
plateH
+
"】"
;
return
"TrayCode【"
+
TrayCode
+
"】,WareNum=【"
+
WareNum
+
"】,PosId=【"
+
PosId
+
"】,plateW=【"
+
plateW
+
"】,plateH=【"
+
plateH
+
"】
,hSerial=【"
+
hSerial
+
"】
"
;
}
}
}
}
...
...
DeviceLibrary/theMachine/LabelParam.cs
查看文件 @
8de4cb8
...
@@ -82,6 +82,11 @@ namespace DeviceLibrary
...
@@ -82,6 +82,11 @@ namespace DeviceLibrary
/// </summary>
/// </summary>
public
string
Batch
{
get
;
set
;
}
public
string
Batch
{
get
;
set
;
}
/// <summary>
/// 工单号
/// </summary>
public
string
hSerial
{
get
;
set
;
}
public
int
HeightPos
=
0
;
public
int
HeightPos
=
0
;
public
ReelParam
clone
()
public
ReelParam
clone
()
{
{
...
...
DeviceLibrary/theMachine/MainMachine.cs
查看文件 @
8de4cb8
...
@@ -787,7 +787,7 @@ namespace DeviceLibrary
...
@@ -787,7 +787,7 @@ namespace DeviceLibrary
if
(
pos
!=
null
)
if
(
pos
!=
null
)
{
{
LogUtil
.
info
(
$
"复位完成,校准库位出库:{pos.posid}"
);
LogUtil
.
info
(
$
"复位完成,校准库位出库:{pos.posid}"
);
RobotManage
.
mainMachine
.
AddSingleStoreTask
(
pos
.
posid
,
reelParam
.
PlateW
,
reelParam
.
PlateH
);
RobotManage
.
mainMachine
.
AddSingleStoreTask
(
pos
.
posid
,
reelParam
.
PlateW
,
reelParam
.
PlateH
,
reelParam
.
hSerial
);
RobotManage
.
ClearReelInFixPos
();
RobotManage
.
ClearReelInFixPos
();
CloseFlipDoor
(
StoreMoveInfo
);
CloseFlipDoor
(
StoreMoveInfo
);
}
}
...
...
DeviceLibrary/theMachine/MainMachine_Clamp.cs
查看文件 @
8de4cb8
...
@@ -54,6 +54,7 @@ namespace DeviceLibrary
...
@@ -54,6 +54,7 @@ namespace DeviceLibrary
ClampMoveInfo
.
MoveParam
.
PosID
=
jobInfo
.
PosId
;
ClampMoveInfo
.
MoveParam
.
PosID
=
jobInfo
.
PosId
;
ClampMoveInfo
.
MoveParam
.
PlateH
=
jobInfo
.
plateH
;
ClampMoveInfo
.
MoveParam
.
PlateH
=
jobInfo
.
plateH
;
ClampMoveInfo
.
MoveParam
.
PlateW
=
jobInfo
.
plateW
;
ClampMoveInfo
.
MoveParam
.
PlateW
=
jobInfo
.
plateW
;
ClampMoveInfo
.
MoveParam
.
hSerial
=
jobInfo
.
hSerial
;
ClampMoveInfo
.
NextMoveStep
(
MoveStep
.
WaitInStore
);
ClampMoveInfo
.
NextMoveStep
(
MoveStep
.
WaitInStore
);
ClampMoveInfo
.
log
(
$
"料盘等待入库:{ClampMoveInfo.MoveParam.ToStr()}"
);
ClampMoveInfo
.
log
(
$
"料盘等待入库:{ClampMoveInfo.MoveParam.ToStr()}"
);
return
true
;
return
true
;
...
@@ -136,12 +137,19 @@ namespace DeviceLibrary
...
@@ -136,12 +137,19 @@ namespace DeviceLibrary
break
;
break
;
case
MoveStep
.
ReelClamp_GetHeight
:
case
MoveStep
.
ReelClamp_GetHeight
:
ClampMoveInfo
.
NextMoveStep
(
MoveStep
.
ReelClamp_07
);
ClampMoveInfo
.
NextMoveStep
(
MoveStep
.
ReelClamp_07
);
ClampMoveInfo
.
log
(
$
"取料夹爪下降到翻板门"
);
//if (ClampMoveInfo.MoveParam.IsNg)
var
cappos
=
Config
.
Clamp_P3
-
(
ClampMoveInfo
.
MoveParam
.
PlateH
-
8
)
*
Config
.
Clamp_PoToMM
;
var
cappos
=
Config
.
Clamp_P3
-
(
ClampMoveInfo
.
MoveParam
.
PlateH
-
8
)
*
Config
.
Clamp_PoToMM
;
ClampMoveInfo
.
log
(
$
"取料夹爪下降到翻板门, 位置:{cappos}"
);
ClampMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
//if (ClampMoveInfo.MoveParam.IsNg)
Clamp_Axis
.
AbsMove
(
ClampMoveInfo
,
cappos
,
Config
.
Clamp_P3_speed
);
Clamp_Axis
.
AbsMove
(
ClampMoveInfo
,
cappos
,
Config
.
Clamp_P3_speed
);
break
;
break
;
case
MoveStep
.
ReelClamp_07
:
case
MoveStep
.
ReelClamp_07
:
// ClampMoveInfo.NextMoveStep(MoveStep.ReelClamp_071);
// int p=Clamp_Axis.GetAclPosition();
// ClampMoveInfo.log($"取料机构已到达,当前位置:{p}, 等待1秒后夹爪释放");
// ClampMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
// break;
//case MoveStep.ReelClamp_071:
ClampMoveInfo
.
NextMoveStep
(
MoveStep
.
ReelClamp_08
);
ClampMoveInfo
.
NextMoveStep
(
MoveStep
.
ReelClamp_08
);
ClampMoveInfo
.
log
(
$
"取料夹爪释放"
);
ClampMoveInfo
.
log
(
$
"取料夹爪释放"
);
CylinderMove
(
ClampMoveInfo
,
IO_Type
.
Clamping_Relax
,
IO_Type
.
Clamping_Work
,
IO_VALUE
.
LOW
);
CylinderMove
(
ClampMoveInfo
,
IO_Type
.
Clamping_Relax
,
IO_Type
.
Clamping_Work
,
IO_VALUE
.
LOW
);
...
...
DeviceLibrary/theMachine/MainMachine_Store.cs
查看文件 @
8de4cb8
...
@@ -20,9 +20,9 @@ namespace DeviceLibrary
...
@@ -20,9 +20,9 @@ namespace DeviceLibrary
{
{
}
}
public
void
AddOutStoreTask
(
string
posId
,
int
plateW
,
int
plateH
)
public
void
AddOutStoreTask
(
string
posId
,
int
plateW
,
int
plateH
,
string
hSerial
=
""
)
{
{
JobInfo
jobInfo
=
new
JobInfo
(
""
,
posId
,
plateW
,
plateH
);
JobInfo
jobInfo
=
new
JobInfo
(
""
,
posId
,
plateW
,
plateH
,
hSerial
);
OutStoreJobList
.
Enqueue
(
jobInfo
);
OutStoreJobList
.
Enqueue
(
jobInfo
);
LogUtil
.
info
(
$
"添加出库任务队列: {posId},当前任务数量: {OutStoreJobList.Count}"
);
LogUtil
.
info
(
$
"添加出库任务队列: {posId},当前任务数量: {OutStoreJobList.Count}"
);
}
}
...
@@ -32,9 +32,9 @@ namespace DeviceLibrary
...
@@ -32,9 +32,9 @@ namespace DeviceLibrary
/// <param name="posId"></param>
/// <param name="posId"></param>
/// <param name="plateW"></param>
/// <param name="plateW"></param>
/// <param name="plateH"></param>
/// <param name="plateH"></param>
public
void
AddSingleStoreTask
(
string
posId
,
int
plateW
,
int
plateH
)
public
void
AddSingleStoreTask
(
string
posId
,
int
plateW
,
int
plateH
,
string
hSerial
=
""
)
{
{
JobInfo
jobInfo
=
new
JobInfo
(
""
,
posId
,
plateW
,
plateH
);
JobInfo
jobInfo
=
new
JobInfo
(
""
,
posId
,
plateW
,
plateH
,
hSerial
);
OutSingleJobList
.
Enqueue
(
jobInfo
);
OutSingleJobList
.
Enqueue
(
jobInfo
);
LogUtil
.
info
(
$
"添加单盘出库任务队列: {posId},当前任务数量: {OutSingleJobList.Count}"
);
LogUtil
.
info
(
$
"添加单盘出库任务队列: {posId},当前任务数量: {OutSingleJobList.Count}"
);
}
}
...
@@ -92,6 +92,7 @@ namespace DeviceLibrary
...
@@ -92,6 +92,7 @@ namespace DeviceLibrary
StoreMoveInfo
.
MoveParam
.
PosID
=
jobInfo
.
PosId
;
StoreMoveInfo
.
MoveParam
.
PosID
=
jobInfo
.
PosId
;
StoreMoveInfo
.
MoveParam
.
PlateH
=
jobInfo
.
plateH
;
StoreMoveInfo
.
MoveParam
.
PlateH
=
jobInfo
.
plateH
;
StoreMoveInfo
.
MoveParam
.
PlateW
=
jobInfo
.
plateW
;
StoreMoveInfo
.
MoveParam
.
PlateW
=
jobInfo
.
plateW
;
StoreMoveInfo
.
MoveParam
.
hSerial
=
jobInfo
.
hSerial
;
StoreMoveInfo
.
MoveParam
.
IsNg
=
true
;
StoreMoveInfo
.
MoveParam
.
IsNg
=
true
;
StoreMoveInfo
.
MoveParam
.
NgMsg
=
crc
.
GetString
(
L
.
ngdoor_reel_out
,
"单盘出库"
);
StoreMoveInfo
.
MoveParam
.
NgMsg
=
crc
.
GetString
(
L
.
ngdoor_reel_out
,
"单盘出库"
);
StoreMoveInfo
.
log
(
$
"开始单盘出库任务:"
+
jobInfo
.
ToStr
());
StoreMoveInfo
.
log
(
$
"开始单盘出库任务:"
+
jobInfo
.
ToStr
());
...
@@ -124,6 +125,7 @@ namespace DeviceLibrary
...
@@ -124,6 +125,7 @@ namespace DeviceLibrary
StoreMoveInfo
.
MoveParam
.
PosID
=
jobInfo
.
PosId
;
StoreMoveInfo
.
MoveParam
.
PosID
=
jobInfo
.
PosId
;
StoreMoveInfo
.
MoveParam
.
PlateH
=
jobInfo
.
plateH
;
StoreMoveInfo
.
MoveParam
.
PlateH
=
jobInfo
.
plateH
;
StoreMoveInfo
.
MoveParam
.
PlateW
=
jobInfo
.
plateW
;
StoreMoveInfo
.
MoveParam
.
PlateW
=
jobInfo
.
plateW
;
StoreMoveInfo
.
MoveParam
.
hSerial
=
jobInfo
.
hSerial
;
StoreMoveInfo
.
log
(
$
"开始出库任务:"
+
jobInfo
.
ToStr
());
StoreMoveInfo
.
log
(
$
"开始出库任务:"
+
jobInfo
.
ToStr
());
ServerCM
.
storeStatus
=
StoreStatus
.
OutStoreExecute
;
ServerCM
.
storeStatus
=
StoreStatus
.
OutStoreExecute
;
}
}
...
...
DeviceLibrary/theMachine/MoveStep.cs
查看文件 @
8de4cb8
...
@@ -97,6 +97,7 @@ namespace DeviceLibrary
...
@@ -97,6 +97,7 @@ namespace DeviceLibrary
ReelClamp_WaitGaugeHeight
,
ReelClamp_WaitGaugeHeight
,
ReelClamp_GetHeight
,
ReelClamp_GetHeight
,
ReelClamp_07
,
ReelClamp_07
,
ReelClamp_071
,
ReelClamp_08
,
ReelClamp_08
,
ReelClamp_09
,
ReelClamp_09
,
ReelClamp_10
,
ReelClamp_10
,
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论