Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
1069_MIMO_PlUS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 7f886fa7
由
刘韬
编写于
2023-01-16 16:51:31 +0800
浏览文件
选项
浏览文件
标签
下载
差异文件
Merge branch 'master' of
http://106.15.194.121:8083/liutao/1069_MIMO_PlUS
2 个父辈
cb0174dd
0a82a1e2
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
87 行增加
和
18 行删除
Common/Setting_Init.cs
Common/bean/Bean.cs
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
Common/Setting_Init.cs
查看文件 @
7f886fa
...
...
@@ -31,5 +31,9 @@ namespace OnlineStore.Common
public
static
string
QRCodeCount
=
"QRCodeCount"
;
public
static
string
CodeTimeOut
=
"CodeTimeOut"
;
/// <summary>
/// 校准库位的料盘信息
/// </summary>
public
static
string
FixBuffInfo
=
"FixBuffInfo"
;
}
}
Common/bean/Bean.cs
查看文件 @
7f886fa
...
...
@@ -72,6 +72,7 @@ namespace OnlineStore.Common
get
{
return
_data
;
}
set
{
_data
=
value
;
}
}
public
Dictionary
<
String
,
Dictionary
<
String
,
String
>>
mimoOpMap
=
new
Dictionary
<
string
,
Dictionary
<
string
,
string
>>();
/// <summary>
/// 整体料仓状态
/// 1=正常运行中
...
...
@@ -291,5 +292,22 @@ namespace OnlineStore.Common
public
static
string
disable
=
"disable"
;
public
static
string
queueTaskCount
=
"queueTaskCount"
;
/// <summary>
/// 贴标机交互按钮,出口 满料串取出
/// </summary>
public
static
string
SendFullShelf
=
"SendFullShelf"
;
/// <summary>
/// 贴标机交互按钮,出口 空料串送入
/// </summary>
public
static
string
NeedEmptySHelf
=
"NeedEmptySHelf"
;
/// <summary>
/// 贴标机交互按钮,入口 满料串送入
/// </summary>
public
static
string
NeedFullShelf
=
"NeedFullShelf"
;
/// <summary>
/// 贴标机交互按钮,入口 空料串取出
/// </summary>
public
static
string
SendEmptyShelf
=
"SendEmptyShelf"
;
}
}
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
查看文件 @
7f886fa
此文件的差异被折叠,
点击展开。
DeviceLibrary/theMachine/BoxTransport.cs
查看文件 @
7f886fa
...
...
@@ -190,6 +190,7 @@ namespace DeviceLibrary
break
;
case
MoveStep
.
StoreFIX01
:
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreFIX02
);
RobotManage
.
PutReelInFixPos
(
MoveInfo
.
MoveParam
);
Middle_Axis
.
AbsMove
(
MoveInfo
,
Fix
.
Middle_P2
,
Config
.
Middle_P2_speed
);
MoveInfo
.
log
(
$
"{storeMoveType}:行走机构到达目的地:{Fix.Middle_P2}"
);
UpDown_Axis
.
AbsMove
(
MoveInfo
,
Fix
.
UpDown_PH
,
Config
.
UpDown_P1_speed
);
...
...
@@ -226,6 +227,7 @@ namespace DeviceLibrary
break
;
case
MoveStep
.
StoreTS10
:
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreTS11
);
RobotManage
.
ClearReelInFixPos
();
Middle_Axis
.
AbsMove
(
MoveInfo
,
To
.
Middle_P2
,
Config
.
Middle_P2_speed
);
MoveInfo
.
log
(
$
"{storeMoveType}:行走机构到达目的地:{To.Middle_P2}"
);
UpDown_Axis
.
AbsMove
(
MoveInfo
,
To
.
UpDown_PH
,
Config
.
UpDown_P1_speed
);
...
...
DeviceLibrary/theMachine/MainMachine.cs
查看文件 @
7f886fa
...
...
@@ -535,6 +535,17 @@ namespace DeviceLibrary
ServerCM
.
storeStatus
=
StoreStatus
.
OutStoreExecute
;
CloseFlipDoor
(
StoreMoveInfo
);
}
else
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
))
{
var
pos
=
BoxStorePosition
.
GetFixPos
(
Config
,
reelParam
);
LogUtil
.
info
(
$
"复位完成,校准库位出库:{pos.posid}"
);
RobotManage
.
mainMachine
.
AddSingleStoreTask
(
pos
.
posid
,
reelParam
.
PlateW
,
reelParam
.
PlateH
);
RobotManage
.
ClearReelInFixPos
();
CloseFlipDoor
(
StoreMoveInfo
);
}
runStatus
=
RunStatus
.
Running
;
ServerCM
.
storeStatus
=
StoreStatus
.
StoreOnline
;
break
;
...
...
DeviceLibrary/theMachine/MainMachine_Store.cs
查看文件 @
7f886fa
此文件的差异被折叠,
点击展开。
DeviceLibrary/theMachine/MainMachine_String.cs
查看文件 @
7f886fa
...
...
@@ -59,9 +59,10 @@ namespace DeviceLibrary
/// <summary>
/// 强制转换料串为出库模式
/// </summary>
public
bool
TurnToOut
()
{
public
bool
TurnToOut
()
{
if
(
StringState
==
StringStateE
.
OutStore
&&
StringMoveInfo
.
MoveStep
==
MoveStep
.
StringOut_Released
)
if
(
StringState
==
StringStateE
.
OutStore
&&
StringMoveInfo
.
MoveStep
==
MoveStep
.
StringOut_Released
)
{
StringMoveInfo
.
log
(
$
"升起待机料串"
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_03
);
...
...
@@ -173,7 +174,7 @@ namespace DeviceLibrary
StringMoveInfo
.
log
(
$
"批量轴到顶部检测点"
);
//CylinderMove(StringMoveInfo, IO_Type.StringDoor_Close, IO_Type.StringDoor_Open, IO_VALUE.LOW);
BatchAxisToP2
(
StringMoveInfo
,
StringState
==
StringStateE
.
OutStore
);
StringMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitMsg
(
crc
.
GetString
(
"Res0009"
,
"料串正在上升"
),
MsgLevel
.
warning
));
StringMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitMsg
(
crc
.
GetString
(
"Res0009"
,
"料串正在上升"
),
MsgLevel
.
warning
));
}
else
if
(
StringMoveInfo
.
IsTimeOut
(
10
))
{
...
...
@@ -197,11 +198,11 @@ namespace DeviceLibrary
if
(
ConfigHelper
.
Config
.
Get
(
"Device_String_StandbyAtBottom"
,
true
)
&&
OutStoreJobList
.
Count
==
0
)
{
SetReelHeight
(
GetHeight
(
StringMoveInfo
));
StringMoveInfo
.
log
(
$
"当
钱
空料串, 并且没有出库任务, 料串下降待机"
);
StringMoveInfo
.
log
(
$
"当
前
空料串, 并且没有出库任务, 料串下降待机"
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringOut_01
);
}
}
else
if
(
StringState
!=
StringStateE
.
OutStore
)
else
if
(
StringState
!=
StringStateE
.
OutStore
)
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_04a
);
StringState
=
StringStateE
.
InStore
;
...
...
@@ -244,7 +245,7 @@ namespace DeviceLibrary
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringReadyGet
);
StringMoveInfo
.
log
(
$
"料串有盘上升5mm"
);
var
tpos4
=
Batch_Axis
.
GetAclPosition
()
+
Config
.
Batch_PoToMM
*
(
Config
.
Batch_DetectDownMM
+
2
);
var
tpos4
=
Batch_Axis
.
GetAclPosition
()
+
Config
.
Batch_PoToMM
*
(
Config
.
Batch_DetectDownMM
+
2
);
Batch_Axis
.
AbsMove
(
StringMoveInfo
,
tpos4
,
Config
.
Batch_P1_speed
);
CylinderMove
(
StringMoveInfo
,
IO_Type
.
Clamping_Relax
,
IO_Type
.
Clamping_Work
,
IO_VALUE
.
LOW
);
//OpenFlipDoor(StringMoveInfo);
...
...
@@ -291,7 +292,7 @@ namespace DeviceLibrary
break
;
case
MoveStep
.
StringReelPut
:
LastStringState
=
StringStateE
.
OutStore
;
if
(
ConfigHelper
.
Config
.
Get
(
"Device_OutStoreStringReelCheck"
,
false
))
if
(
ConfigHelper
.
Config
.
Get
(
"Device_OutStoreStringReelCheck"
,
false
))
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringReelPut_03
);
StringMoveInfo
.
log
(
$
"检测阻挡工作"
);
...
...
@@ -340,12 +341,12 @@ namespace DeviceLibrary
case
MoveStep
.
StringReelPut_02
:
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_04b
);
StringMoveInfo
.
log
(
$
"批量轴到顶部检测点"
);
BatchAxisToP2
(
StringMoveInfo
,
true
);
BatchAxisToP2
(
StringMoveInfo
,
true
);
break
;
case
MoveStep
.
StringReelPut_03
:
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringReelPut_04
);
StringMoveInfo
.
log
(
$
"批量轴到顶部检测点"
);
BatchAxisToP2
(
StringMoveInfo
,
true
);
BatchAxisToP2
(
StringMoveInfo
,
true
);
break
;
case
MoveStep
.
StringReelPut_04
:
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringReelPut_05
);
...
...
@@ -379,7 +380,7 @@ namespace DeviceLibrary
StringMoveInfo
.
log
(
$
"料串下降到P1点"
);
Batch_Axis
.
AbsMove
(
StringMoveInfo
,
Config
.
Batch_P1
,
Config
.
Batch_P1_speed
);
CylinderMove
(
StringMoveInfo
,
IO_Type
.
StringPosChecker_Home
,
IO_Type
.
StringPosChecker_Work
,
IO_VALUE
.
LOW
);
StringMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitMsg
(
crc
.
GetString
(
"Res0010"
,
"料串正在下降"
),
MsgLevel
.
warning
));
StringMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitMsg
(
crc
.
GetString
(
"Res0010"
,
"料串正在下降"
),
MsgLevel
.
warning
));
break
;
case
MoveStep
.
StringOut_02
:
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringOut_03
);
...
...
@@ -392,6 +393,7 @@ namespace DeviceLibrary
CylinderMove
(
StringMoveInfo
,
IO_Type
.
StringFix_Bottom
,
IO_Type
.
StringFix_Top
,
IO_VALUE
.
LOW
);
break
;
case
MoveStep
.
StringOut_Released
:
ServerCM
.
storeStatus
=
StoreStatus
.
StoreOnline
;
if
(
StringState
==
StringStateE
.
Full
)
Msg
.
add
(
crc
.
GetString
(
L
.
string_full_takeout
,
"料串已满请取出"
),
MsgLevel
.
warning
);
//0427
else
...
...
@@ -445,14 +447,15 @@ namespace DeviceLibrary
}
}
string
StringProcessState
()
{
string
StringProcessState
()
{
string
state
=
""
;
if
(
StringState
==
StringStateE
.
OutStore
)
state
=
crc
.
GetString
(
L
.
empty_reel
,
"空料串"
);
else
if
(
StringState
==
StringStateE
.
Full
)
{
state
=
crc
.
GetString
(
L
.
full_reel
,
"满料串"
);
}
else
if
(
StringState
==
StringStateE
.
InStore
)
...
...
@@ -488,14 +491,14 @@ namespace DeviceLibrary
int
targetSpeed
=
Config
.
Batch_P2_speed
;
if
(
isFirstMove
)
{
targetSpeed
=
Config
.
Batch_P1_speed
;
targetSpeed
=
Config
.
Batch_P1_speed
;
}
moveInfo
.
log
(
"BatchAxisToP2 目标P2: "
+
targetP2
);
moveInfo
.
TimeOutSeconds
=
200
;
moveInfo
.
CanWhileCount
=
0
;
Batch_Axis
.
SuddenStop
();
// 需要增加定时器,获取验证信号并停止伺服
StartMovePosition
=
Batch_Axis
.
GetAclPosition
()-
(
Config
.
Batch_PoToMM
*
2
);
StartMovePosition
=
Batch_Axis
.
GetAclPosition
()
-
(
Config
.
Batch_PoToMM
*
2
);
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBatchAxisMove
(
Config
.
Batch_Axis
,
targetP2
,
targetSpeed
));
Config
.
Batch_Axis
.
TargetPosition
=
targetP2
;
Batch_Axis
.
AbsMove
(
null
,
targetP2
,
targetSpeed
);
...
...
@@ -507,7 +510,7 @@ namespace DeviceLibrary
{
int
targetP1
=
Config
.
Batch_P1
;
int
targetSpeed
=
Config
.
Batch_P2_speed
;
moveInfo
.
log
(
"BatchAxisToLow 目标P1: "
+
targetP1
);
moveInfo
.
TimeOutSeconds
=
200
;
moveInfo
.
CanWhileCount
=
0
;
...
...
@@ -568,7 +571,8 @@ namespace DeviceLibrary
return
LastHeight
;
}
public
void
StringDoorOpen
(
MoveInfo
moveInfo
)
{
public
void
StringDoorOpen
(
MoveInfo
moveInfo
)
{
if
(
StringDoor
!=
null
)
{
StringDoor
.
LiftUp
(
moveInfo
);
...
...
@@ -580,10 +584,12 @@ namespace DeviceLibrary
}
public
void
StringDoorClose
(
MoveInfo
moveInfo
)
{
if
(
StringDoor
!=
null
)
{
if
(
StringDoor
!=
null
)
{
StringDoor
.
LiftDown
(
moveInfo
);
}
else
{
else
{
CylinderMove
(
moveInfo
,
IO_Type
.
StringDoor_Close
,
IO_Type
.
StringDoor_Open
,
IO_VALUE
.
LOW
);
}
...
...
DeviceLibrary/theMachine/RobotManage.cs
查看文件 @
7f886fa
...
...
@@ -183,6 +183,34 @@ namespace DeviceLibrary
else
LogUtil
.
info
(
"用户取消忽略安全光栅"
);
}
#
region
校准库位缓存
public
static
bool
HasReelInFixPos
(
out
ReelParam
reelParam
)
{
reelParam
=
null
;
try
{
string
fix
=
ConfigHelper
.
Config
.
Get
(
Setting_Init
.
FixBuffInfo
,
""
);
if
(!
string
.
IsNullOrEmpty
(
fix
))
{
reelParam
=
JsonHelper
.
DeserializeJsonToObject
<
ReelParam
>(
fix
);
return
true
;
}
}
catch
(
Exception
e
)
{
LogUtil
.
error
(
"解析校准库位缓存异常"
,
e
);
}
return
false
;
}
public
static
void
PutReelInFixPos
(
ReelParam
reelParam
)
{
ConfigHelper
.
Config
.
Set
(
Setting_Init
.
FixBuffInfo
,
JsonHelper
.
SerializeObject
(
reelParam
));
}
public
static
void
ClearReelInFixPos
()
{
ConfigHelper
.
Config
.
Set
(
Setting_Init
.
FixBuffInfo
,
""
);
}
#
endregion
}
public
enum
StoreType
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论