Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
MIMO
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 28ae4782
由
张东亮
编写于
2023-01-12 10:27:00 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
添加校准库位缓存,以在复位时处理校准库位的料。出入库状态在料串动作时就开始变化
1 个父辈
52856290
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
50 行增加
和
35 行删除
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
DeviceLibrary/theMachine/BoxTransport.cs
DeviceLibrary/theMachine/MainMachine.cs
DeviceLibrary/theMachine/MainMachine_Store.cs
DeviceLibrary/theMachine/MainMachine_String.cs
DeviceLibrary/theMachine/RobotManage.cs
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
查看文件 @
28ae478
此文件的差异被折叠,
点击展开。
DeviceLibrary/theMachine/BoxTransport.cs
查看文件 @
28ae478
此文件的差异被折叠,
点击展开。
DeviceLibrary/theMachine/MainMachine.cs
查看文件 @
28ae478
...
...
@@ -459,16 +459,15 @@ namespace DeviceLibrary
boxTransport
.
Reset
();
ResetMoveInfo
.
log
(
"回原完成"
);
ResetMoveInfo
.
EndMove
();
if
((
RobotManage
.
HasReelInFixPos
(
out
ReelParam
reelParam
))
&&
boxTransport
.
IsComplateOrFree
&&
ClampMoveInfo
.
MoveStep
==
MoveStep
.
Wait
&&
ConfigHelper
.
Config
.
Get
(
"Device_Use_Fixpos"
,
false
))
if
((
RobotManage
.
HasReelInFixPos
(
out
ReelParam
reelParam
))
&&
boxTransport
.
IsComplateOrFree
&&
ClampMoveInfo
.
MoveStep
==
MoveStep
.
Wait
&&
ConfigHelper
.
Config
.
Get
(
"Device_Use_Fixpos"
,
false
)
&&
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
LOW
))
{
StoreMoveInfo
.
NewMove
(
MoveStep
.
StoreOut_NGPre
);
StoreMoveInfo
.
MoveParam
=
reelParam
.
clone
();
StoreMoveInfo
.
MoveParam
.
PosID
=
"NG"
;
StoreMoveInfo
.
MoveParam
.
IsNg
=
true
;
StoreMoveInfo
.
MoveParam
.
NgMsg
=
"检测到校准库位有料盘信息,请人工确认"
;
StoreMoveInfo
.
log
(
$
"开始校准库位料盘出库"
);
ServerCM
.
storeStatus
=
StoreStatus
.
OutStoreExecute
;
//CloseFlipDoor(StoreMoveInfo);
var
pos
=
BoxStorePosition
.
GetFixPos
(
Config
,
reelParam
);
LogUtil
.
info
(
$
"复位完成,校准库位出库:{pos.posid}"
);
RobotManage
.
mainMachine
.
AddSingleStoreTask
(
""
,
pos
.
posid
,
reelParam
.
PlateW
,
reelParam
.
PlateH
);
RobotManage
.
ClearReelInFixPos
();
}
runStatus
=
RunStatus
.
Running
;
ServerCM
.
storeStatus
=
StoreStatus
.
StoreOnline
;
...
...
DeviceLibrary/theMachine/MainMachine_Store.cs
查看文件 @
28ae478
...
...
@@ -15,13 +15,14 @@ namespace DeviceLibrary
{
StoreJobList
OutStoreJobList
=
new
StoreJobList
(
"批量"
);
StoreJobList
OutSingleJobList
=
new
StoreJobList
(
"单盘"
);
public
bool
HasJob
{
get
=>
OutStoreJobList
.
Count
>
0
||
OutSingleJobList
.
Count
>
0
;
}
public
void
AddOutStoreTask
(
string
warecode
,
string
posId
,
int
plateW
,
int
plateH
)
{
JobInfo
jobInfo
=
new
JobInfo
(
warecode
,
posId
,
plateW
,
plateH
);
public
bool
HasJob
{
get
=>
OutStoreJobList
.
Count
>
0
||
OutSingleJobList
.
Count
>
0
;
}
public
void
AddOutStoreTask
(
string
warecode
,
string
posId
,
int
plateW
,
int
plateH
)
{
JobInfo
jobInfo
=
new
JobInfo
(
warecode
,
posId
,
plateW
,
plateH
);
OutStoreJobList
.
Enqueue
(
jobInfo
);
LogUtil
.
info
(
$
"添加出库任务队列: {posId},当前任务数量: {OutStoreJobList.Count}"
);
}
public
void
AddSingleStoreTask
(
string
warecode
,
string
posId
,
int
plateW
,
int
plateH
)
public
void
AddSingleStoreTask
(
string
warecode
,
string
posId
,
int
plateW
,
int
plateH
)
{
JobInfo
jobInfo
=
new
JobInfo
(
warecode
,
posId
,
plateW
,
plateH
);
OutSingleJobList
.
Enqueue
(
jobInfo
);
...
...
@@ -85,7 +86,8 @@ namespace DeviceLibrary
ServerCM
.
storeStatus
=
StoreStatus
.
OutStoreExecute
;
}
}
else
if
(
OutStoreJobList
.
Count
>
0
&&
!
IsBatchDoorClosed
)
{
else
if
(
OutStoreJobList
.
Count
>
0
&&
!
IsBatchDoorClosed
)
{
Msg
.
add
(
"出库任务等待关闭批量舱门"
,
MsgLevel
.
warning
);
}
//判断有没有出库任务, 需要入库空闲, 出口空闲
...
...
@@ -96,7 +98,7 @@ namespace DeviceLibrary
if
(!
boxTransport
.
IgnoreX09
&&
IOMonitor
.
IODebound
(
IO_Type
.
TrayCheck_Fixture
,
Config
,
IO_VALUE
.
HIGH
,
5000
))
{
Msg
.
add
(
"收到出库任务,但料叉上有料,无法启动,请检查"
,
MsgLevel
.
alarm
,
ErrInfo
.
X09_BoxNotDetect
);
}
else
Msg
.
add
(
"收到出库任务,但料叉上有料,无法启动,请检查"
,
MsgLevel
.
warning
);
...
...
@@ -120,9 +122,10 @@ namespace DeviceLibrary
case
MoveStep
.
StoreIn01
:
if
(!
StoreMoveInfo
.
MoveParam
.
IsNg
&&
!
ServerCM
.
SendStoreState
(
StoreMoveInfo
.
MoveParam
.
PosID
,
StoreStatus
.
InStoreExecute
))
{
Msg
.
add
(
"服务器连接异常"
,
MsgLevel
.
warning
);
Msg
.
add
(
"服务器连接异常"
,
MsgLevel
.
warning
);
return
;
}
ServerCM
.
storeStatus
=
StoreStatus
.
InStoreExecute
;
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn03
);
if
(
StoreMoveInfo
.
MoveParam
.
IsNg
)
...
...
@@ -131,9 +134,9 @@ namespace DeviceLibrary
{
var
ac
=
CSVPositionReader
<
ACStorePosition
>.
GetPositon
(
StoreMoveInfo
.
MoveParam
.
PosID
);
boxTransport
.
Start
(
new
BoxStorePosition
(
Config
,
StoreMoveInfo
.
MoveParam
.
ReelOnFixture
?
StoreSide
.
NGDoor
:
StoreSide
.
Clamp
,
StoreMoveInfo
.
MoveParam
),
new
BoxStorePosition
(
Config
,
ac
,
StoreMoveInfo
.
MoveParam
),
StoreMoveType
.
InStore
,
true
);
boxTransport
.
Start
(
new
BoxStorePosition
(
Config
,
StoreMoveInfo
.
MoveParam
.
ReelOnFixture
?
StoreSide
.
NGDoor
:
StoreSide
.
Clamp
,
StoreMoveInfo
.
MoveParam
),
new
BoxStorePosition
(
Config
,
ac
,
StoreMoveInfo
.
MoveParam
),
StoreMoveType
.
InStore
,
true
);
}
StoreMoveInfo
.
log
(
$
"开始转运料盘"
);
StoreMoveInfo
.
log
(
$
"开始转运料盘"
);
break
;
case
MoveStep
.
StoreIn02
:
break
;
...
...
@@ -160,7 +163,7 @@ namespace DeviceLibrary
StoreMoveInfo
.
log
(
$
"料盘已到达目的地"
);
if
(
StoreMoveInfo
.
MoveParam
.
IsNg
)
{
NGPuted
(
StoreMoveInfo
.
MoveParam
.
NgMsg
);
NGPuted
(
StoreMoveInfo
.
MoveParam
.
NgMsg
);
}
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn05
);
}
...
...
@@ -185,15 +188,16 @@ namespace DeviceLibrary
Msg
.
add
(
"服务器连接异常"
,
MsgLevel
.
warning
);
return
;
}
ServerCM
.
storeStatus
=
StoreStatus
.
OutStoreExecute
;
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreOut11
);
var
outFrom
=
CSVPositionReader
<
ACStorePosition
>.
GetPositon
(
StoreMoveInfo
.
MoveParam
.
PosID
);
BoxStorePosition
outTo
;
if
(
StoreMoveInfo
.
MoveParam
.
IsNg
)
outTo
=
new
BoxStorePosition
(
Config
,
StoreSide
.
NGDoor
,
StoreMoveInfo
.
MoveParam
);
else
outTo
=
new
BoxStorePosition
(
Config
,
StoreSide
.
String
,
StoreMoveInfo
.
MoveParam
);
boxTransport
.
Start
(
outFrom
==
null
?
null
:
new
BoxStorePosition
(
Config
,
outFrom
,
StoreMoveInfo
.
MoveParam
),
outTo
,
StoreMoveType
.
OutStore
);
StoreMoveInfo
.
log
(
$
"开始转运料盘{(StoreMoveInfo.MoveParam.IsNg ? "
单料口
" : "
料串
")}"
);
var
outFrom
=
CSVPositionReader
<
ACStorePosition
>.
GetPositon
(
StoreMoveInfo
.
MoveParam
.
PosID
);
BoxStorePosition
outTo
;
if
(
StoreMoveInfo
.
MoveParam
.
IsNg
)
outTo
=
new
BoxStorePosition
(
Config
,
StoreSide
.
NGDoor
,
StoreMoveInfo
.
MoveParam
);
else
outTo
=
new
BoxStorePosition
(
Config
,
StoreSide
.
String
,
StoreMoveInfo
.
MoveParam
);
boxTransport
.
Start
(
outFrom
==
null
?
null
:
new
BoxStorePosition
(
Config
,
outFrom
,
StoreMoveInfo
.
MoveParam
),
outTo
,
StoreMoveType
.
OutStore
);
StoreMoveInfo
.
log
(
$
"开始转运料盘{(StoreMoveInfo.MoveParam.IsNg ? "
单料口
" : "
料串
")}"
);
break
;
case
MoveStep
.
StoreOut11
:
...
...
@@ -220,10 +224,10 @@ namespace DeviceLibrary
Msg
.
add
(
"服务器连接异常"
,
MsgLevel
.
warning
);
return
;
}
StoreMoveInfo
.
log
(
$
"料盘已到达目的地"
);
StoreMoveInfo
.
log
(
$
"料盘已到达目的地"
);
if
(
StoreMoveInfo
.
MoveParam
.
IsNg
)
{
NGPuted
(
StoreMoveInfo
.
MoveParam
.
NgMsg
);
OutSingleJobList
.
ClearLastPosid
(
StoreMoveInfo
.
MoveParam
.
PosID
);
}
...
...
@@ -232,7 +236,7 @@ namespace DeviceLibrary
ReelPutted
(
StoreMoveInfo
.
MoveParam
.
PlateH
);
OutStoreJobList
.
ClearLastPosid
(
StoreMoveInfo
.
MoveParam
.
PosID
);
}
StoreMoveInfo
.
EndMove
();
}
break
;
...
...
@@ -241,8 +245,9 @@ namespace DeviceLibrary
break
;
}
}
string
StoreState
()
{
string
state
=
crc
.
GetString
(
L
.
free
,
"空闲中"
);
string
StoreState
()
{
string
state
=
crc
.
GetString
(
L
.
free
,
"空闲中"
);
if
(
StoreMoveInfo
.
MoveStep
>=
MoveStep
.
StoreOut10
)
{
state
=
$
"{crc.GetString(L.reel_outting, "
出库中
")},{crc.GetString(L.posnum, "
出库中
")}:{StoreMoveInfo.MoveParam.PosID}"
;
...
...
DeviceLibrary/theMachine/MainMachine_String.cs
查看文件 @
28ae478
...
...
@@ -141,6 +141,14 @@ namespace DeviceLibrary
Batch_Axis
.
AbsMove
(
StringMoveInfo
,
Config
.
Batch_P1
,
Config
.
Batch_P1_speed
);
break
;
case
MoveStep
.
StringLoad_01
:
if
(
StringState
==
StringStateE
.
OutStore
)
{
ServerCM
.
storeStatus
=
StoreStatus
.
OutStoreExecute
;
}
else
if
(
StringState
==
StringStateE
.
InStore
)
{
ServerCM
.
storeStatus
=
StoreStatus
.
InStoreExecute
;
}
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_01a
);
StringMoveInfo
.
log
(
$
"批量轴到待机点"
);
Batch_Axis
.
AbsMove
(
StringMoveInfo
,
Config
.
Batch_P1
,
Config
.
Batch_P1_speed
);
...
...
@@ -408,6 +416,7 @@ namespace DeviceLibrary
case
MoveStep
.
StringOut_Released
:
StringMoveInfo
.
log
(
$
"料串已回到待机点"
);
ServerCM
.
storeStatus
=
StoreStatus
.
StoreOnline
;
StringMoveInfo
.
NewMove
(
MoveStep
.
Wait
);
break
;
case
MoveStep
.
StringOut_07
:
...
...
DeviceLibrary/theMachine/RobotManage.cs
查看文件 @
28ae478
...
...
@@ -186,7 +186,7 @@ namespace DeviceLibrary
reelParam
=
null
;
try
{
string
fix
=
ConfigHelper
.
Config
.
Get
(
Setting_Init
.
FixBuffInfo
,
""
)
;
string
fix
=
Setting_Init
.
FixBuffInfo
;
if
(!
string
.
IsNullOrEmpty
(
fix
))
{
reelParam
=
JsonHelper
.
DeserializeJsonToObject
<
ReelParam
>(
fix
);
...
...
@@ -201,11 +201,13 @@ namespace DeviceLibrary
}
public
static
void
PutReelInFixPos
(
ReelParam
reelParam
)
{
ConfigHelper
.
Config
.
Set
(
Setting_Init
.
FixBuffInfo
,
JsonHelper
.
SerializeObject
(
reelParam
));
string
buff
=
JsonHelper
.
SerializeObject
(
reelParam
);
Setting_Init
.
FixBuffInfo
=
buff
;
LogUtil
.
info
(
buff
);
}
public
static
void
ClearReelInFixPos
()
{
ConfigHelper
.
Config
.
Set
(
Setting_Init
.
FixBuffInfo
,
""
)
;
Setting_Init
.
FixBuffInfo
=
""
;
}
#
endregion
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论