Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit a8dda7d4
由
几米阳光
编写于
2019-03-06 15:27:47 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加清料功能。出库时若门口无料盘需要报警
1 个父辈
a667c512
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
144 行增加
和
18 行删除
source/ACSingleStore/FrmStoreBox.cs
source/ACSingleStore/记录.txt
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/DeviceLibrary/store/StoreStep.cs
source/DeviceLibrary/store/model/StoreMoveInfo.cs
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
a8dda7d
...
@@ -244,7 +244,7 @@ namespace OnlineStore.ACSingleStore
...
@@ -244,7 +244,7 @@ namespace OnlineStore.ACSingleStore
//如果不在出入库中,且叉子上有信号,需要提示检查叉子
//如果不在出入库中,且叉子上有信号,需要提示检查叉子
if
(
store
.
storeRunStatus
.
Equals
(
StoreRunStatus
.
Runing
)
&&
store
.
KNDIOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
store
.
storeRunStatus
.
Equals
(
StoreRunStatus
.
Runing
)
&&
store
.
KNDIOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
lblWarnMsg
.
Text
=
lblWarnMsg
.
Text
+
" 叉子料盘检测有料,请检查"
;
lblWarnMsg
.
Text
=
lblWarnMsg
.
Text
+
" 叉子料盘检测有料,请检查
或复位
"
;
}
}
if
(
store
.
autoNext
)
if
(
store
.
autoNext
)
{
{
...
...
source/ACSingleStore/记录.txt
查看文件 @
a8dda7d
...
@@ -53,7 +53,9 @@
...
@@ -53,7 +53,9 @@
3.扫码不需要每次都关闭相机。
3.扫码不需要每次都关闭相机。
增加功能:
1,复位时增加料盘感应功能,感应到料盘时给提示且增加出库功能
2,出库完成时,通过料仓窗口高度感应检测出料有无料盘,无料盘提示报警。
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
a8dda7d
...
@@ -320,22 +320,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -320,22 +320,10 @@ namespace OnlineStore.DeviceLibrary
{
{
string
portName
=
Config
.
InOut_Axis
.
DeviceName
;
string
portName
=
Config
.
InOut_Axis
.
DeviceName
;
int
slvAddr
=
Config
.
InOut_Axis
.
GetAxisValue
();
int
slvAddr
=
Config
.
InOut_Axis
.
GetAxisValue
();
//if (ACServerManager.GetHomeEndStatus(portName, slvAddr).Equals(1)
// && ACServerManager.GetHomeSingle(portName, slvAddr).Equals(1))
//{
// StoreMove.NextMoveStep(StoreMoveStep.BOX_H_InOutMove);
// LogUtil.info(LOGGER, StoreName + "复位中,进出轴原点亮且已经原点返回过,先相对走-5000");
// int currPos = ACServerManager.GetActualtPosition(portName, slvAddr);
// int targetPos = currPos - 5000;
// ACAxisMove(Config.InOut_Axis, targetPos, Config.InoutAxis_HomeLowSpeed);
//}
//else
//{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
BOX_H_InOutBack
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
BOX_H_InOutBack
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位中,进出轴开始原点返回"
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位中,进出轴开始原点返回"
);
ACAxisHomeMove
(
Config
.
InOut_Axis
);
ACAxisHomeMove
(
Config
.
InOut_Axis
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
//}
}
}
/// <summary>
/// <summary>
/// 复位处理
/// 复位处理
...
@@ -404,6 +392,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -404,6 +392,11 @@ namespace OnlineStore.DeviceLibrary
ComMoveToPosition
(
Config
.
CompressAxis_P1_Position
);
ComMoveToPosition
(
Config
.
CompressAxis_P1_Position
);
break
;
break
;
case
StoreMoveStep
.
BOX_H_MiddleAxisToP1
:
case
StoreMoveStep
.
BOX_H_MiddleAxisToP1
:
if
(
StartResetOut
())
{
}
else
{
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位完成"
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位完成"
);
storeRunStatus
=
StoreRunStatus
.
Runing
;
storeRunStatus
=
StoreRunStatus
.
Runing
;
StoreMove
.
EndMove
();
StoreMove
.
EndMove
();
...
@@ -412,6 +405,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -412,6 +405,7 @@ namespace OnlineStore.DeviceLibrary
{
{
WarnMsg
=
""
;
WarnMsg
=
""
;
}
}
}
break
;
break
;
case
StoreMoveStep
.
BOX_M_H_TOP1_InOutToP1
:
case
StoreMoveStep
.
BOX_M_H_TOP1_InOutToP1
:
...
@@ -433,6 +427,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -433,6 +427,12 @@ namespace OnlineStore.DeviceLibrary
ComMoveToPosition
(
Config
.
CompressAxis_P1_Position
);
ComMoveToPosition
(
Config
.
CompressAxis_P1_Position
);
break
;
break
;
case
StoreMoveStep
.
BOX_M_H_TOP1_OtherAxisToP1
:
case
StoreMoveStep
.
BOX_M_H_TOP1_OtherAxisToP1
:
if
(
StartResetOut
())
{
}
else
{
LogUtil
.
info
(
LOGGER
,
StoreName
+
"到待机状态完成"
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"到待机状态完成"
);
StoreMove
.
EndMove
();
StoreMove
.
EndMove
();
storeStatus
=
StoreStatus
.
StoreOnline
;
storeStatus
=
StoreStatus
.
StoreOnline
;
...
@@ -441,11 +441,88 @@ namespace OnlineStore.DeviceLibrary
...
@@ -441,11 +441,88 @@ namespace OnlineStore.DeviceLibrary
{
{
WarnMsg
=
""
;
WarnMsg
=
""
;
}
}
}
break
;
case
StoreMoveStep
.
BOX_R41_UpdownMove
:
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位中清料:打开仓门,等待门口无料盘 "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
BOX_R42_OpenDoor
);
OpenDoorAndWait
();
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitHeight
(
0
));
break
;
case
StoreMoveStep
.
BOX_R42_OpenDoor
:
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
BOX_R43_InoutToP2
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位中清料: 叉子进出料口,进出轴至P2(进料口取料点) "
);
ACAxisMove
(
Config
.
InOut_Axis
,
StoreMove
.
MoveParam
.
MoveP
.
InOut_P2
,
Config
.
InOutAxis_P2_Speed
);
break
;
case
StoreMoveStep
.
BOX_R43_InoutToP2
:
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位中清料: 放下物品,升降轴至P8(进料口出料缓冲点) "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
BOX_R44_DevicePutWare
);
ACAxisMove
(
Config
.
UpDown_Axis
,
StoreMove
.
MoveParam
.
MoveP
.
UpDown_P8
,
Config
.
UpDownAxis_P8_Speed
);
break
;
case
StoreMoveStep
.
BOX_R44_DevicePutWare
:
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
BOX_R45_DeviceOutFromDoor
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位中清料: 叉子从出料口返回,,进出轴动作至P1(待机点) "
);
InOutBackToP1
(
StoreMove
.
MoveParam
.
MoveP
.
InOut_P1
);
break
;
case
StoreMoveStep
.
BOX_R45_DeviceOutFromDoor
:
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
BOX_R46_GoBack
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位中清料: 升降轴返回,轴2至P1(待机点) ,关闭舱门"
);
ACAxisMove
(
Config
.
UpDown_Axis
,
StoreMove
.
MoveParam
.
MoveP
.
UpDown_P1
,
Config
.
UpDownAxis_P1_Speed
);
CloseDoorAndWait
();
break
;
case
StoreMoveStep
.
BOX_R46_GoBack
:
int
OutStoreWaitSeconds
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
OutStoreWaitSeconds
);
if
(
OutStoreWaitSeconds
<=
0
)
{
OutStoreWaitSeconds
=
600
;
}
int
ms
=
OutStoreWaitSeconds
*
1000
;
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
BOX_R47_WaitTake
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位中清料: 等待拿走物品,最多等待"
+
OutStoreWaitSeconds
+
"秒"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
ms
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitHeight
(
0
));
StoreMove
.
OneWaitCanEndStep
=
true
;
break
;
case
StoreMoveStep
.
BOX_R47_WaitTake
:
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位 并清料完成"
);
StoreMove
.
EndMove
();
storeStatus
=
StoreStatus
.
StoreOnline
;
storeRunStatus
=
StoreRunStatus
.
Runing
;
if
(
alarmType
.
Equals
(
StoreAlarmType
.
None
))
{
WarnMsg
=
""
;
}
break
;
break
;
default
:
break
;
default
:
break
;
}
}
}
}
private
bool
StartResetOut
()
{
if
(
KNDIOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
HIGH
))
{
if
(
PositionNumList
.
Count
>
0
)
{
InOutStoreParam
param
=
new
InOutStoreParam
(
""
,
PositionNumList
[
0
]);
if
(
LoadParamPosition
(
param
))
{
StoreMove
.
MoveParam
=
param
;
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
BOX_R41_UpdownMove
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位完成检测到叉子有料,启动清料: 升降轴走到P2"
);
ACAxisMove
(
Config
.
UpDown_Axis
,
StoreMove
.
MoveParam
.
MoveP
.
UpDown_P2
,
Config
.
UpDownAxis_P2_Speed
);
return
true
;
}
else
{
LogUtil
.
error
(
LOGGER
,
StoreName
+
" 启动清料失败:【"
+
PositionNumList
[
0
]
+
"】加载参数失败"
);
}
}
else
{
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位完成检测到叉子有料,启动清料失败:无可用库位"
);
}
}
return
false
;
}
private
void
ComBeforeHomeMove
()
private
void
ComBeforeHomeMove
()
{
{
if
(
IsHasCompress_Axis
)
if
(
IsHasCompress_Axis
)
...
@@ -1003,7 +1080,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1003,7 +1080,7 @@ namespace OnlineStore.DeviceLibrary
else
else
{
{
//判断已经在复位中并且没有报警,不需要重新复位
//判断已经在复位中并且没有报警,不需要重新复位
if
(
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
StoreReset
)
&&
alarmType
.
Equals
(
StoreAlarmType
.
None
))
if
(
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
StoreReset
)
&&
alarmType
.
Equals
(
StoreAlarmType
.
None
)
&&
KNDIOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
LOW
)
)
{
{
LogUtil
.
error
(
LOGGER
,
"收到复位信号:已经在复位中且没有报警,不需要重新复位!"
);
LogUtil
.
error
(
LOGGER
,
"收到复位信号:已经在复位中且没有报警,不需要重新复位!"
);
}
}
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
a8dda7d
...
@@ -171,7 +171,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -171,7 +171,14 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
wait
.
WaitType
==
7
)
else
if
(
wait
.
WaitType
==
7
)
{
{
if
(
wait
.
HeightValue
>
0
)
{
wait
.
IsEnd
=
(
GetHeight
()
>
0
);
}
else
{
wait
.
IsEnd
=
(
wait
.
HeightValue
.
Equals
(
GetHeight
()));
wait
.
IsEnd
=
(
wait
.
HeightValue
.
Equals
(
GetHeight
()));
}
if
(
wait
.
IsEnd
)
if
(
wait
.
IsEnd
)
{
{
LogUtil
.
debug
(
"等待height="
+
wait
.
HeightValue
+
"完成"
);
LogUtil
.
debug
(
"等待height="
+
wait
.
HeightValue
+
"完成"
);
...
@@ -711,10 +718,17 @@ namespace OnlineStore.DeviceLibrary
...
@@ -711,10 +718,17 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_12_DeviceOutFromDoor
)
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_12_DeviceOutFromDoor
)
{
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_121_CheckHasTray
);
OutStoreLog
(
"出库:SO_121等待门口有料盘高度"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitHeight
(
8
));
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_121_CheckHasTray
)
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_13_GoBack
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_13_GoBack
);
OutStoreLog
(
"出库:SO_13 升降轴返回,轴2至P1(待机点) ,关闭舱门"
);
OutStoreLog
(
"出库:SO_13 升降轴返回,轴2至P1(待机点) ,关闭舱门"
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P1
,
Config
.
UpDownAxis_P1_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P1
,
Config
.
UpDownAxis_P1_Speed
);
CloseDoorAndWait
();
CloseDoorAndWait
();
}
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_13_GoBack
)
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_13_GoBack
)
{
{
...
...
source/DeviceLibrary/store/StoreStep.cs
查看文件 @
a8dda7d
...
@@ -172,6 +172,36 @@ namespace OnlineStore.DeviceLibrary
...
@@ -172,6 +172,36 @@ namespace OnlineStore.DeviceLibrary
/// 关闭门,旋转轴到P1,升降轴到P1
/// 关闭门,旋转轴到P1,升降轴到P1
/// </summary>
/// </summary>
BOX_M_H_TOP1_OtherAxisToP1
=
032
,
BOX_M_H_TOP1_OtherAxisToP1
=
032
,
/// <summary>
/// 复位时检测到叉子有料, ,轴2( 上下) 至P2( 进料口出料前点)
/// </summary>
BOX_R41_UpdownMove
=
041
,
/// <summary>
/// 复位时清料:打开仓门并等待
/// </summary>
BOX_R42_OpenDoor
=
042
,
/// <summary>
/// 复位时清料:叉子前进到P2点
/// </summary>
BOX_R43_InoutToP2
=
043
,
/// <summary>
/// 复位时清料:轴2( 上下) 至P8( 进料口出料缓冲点)
/// </summary>
BOX_R44_DevicePutWare
=
044
,
/// <summary>
/// 复位时清料:叉子返回
/// </summary>
BOX_R45_DeviceOutFromDoor
=
045
,
/// <summary>
/// 复位时清料:关闭仓门
/// </summary>
BOX_R46_GoBack
=
046
,
/// <summary>
/// 复位时清料:等待拿走物品
/// </summary>
BOX_R47_WaitTake
=
047
,
#
endregion
#
endregion
...
@@ -179,7 +209,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -179,7 +209,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// <summary>
///料仓出库,,定位气缸下降
///料仓出库,,定位气缸下降
/// </summary>
/// </summary>
SO_01_LocationCylinderDown
=
101
,
SO_01_LocationCylinderDown
=
101
,
/// <summary>
/// <summary>
///料仓出库:叉子先运动到P1
///料仓出库:叉子先运动到P1
/// </summary>
/// </summary>
...
@@ -238,7 +268,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -238,7 +268,10 @@ namespace OnlineStore.DeviceLibrary
/// 料仓出库,,叉子从出料口返回,,轴3( 叉子) 动作至P1( 待机点)
/// 料仓出库,,叉子从出料口返回,,轴3( 叉子) 动作至P1( 待机点)
/// </summary>
/// </summary>
SO_12_DeviceOutFromDoor
=
112
,
SO_12_DeviceOutFromDoor
=
112
,
/// <summary>
/// 需要检测到门口有料盘高度
/// </summary>
SO_121_CheckHasTray
=
116
,
/// <summary>
/// <summary>
/// 料仓出库,,升降轴返回,, 轴2至P1( 待机点)
/// 料仓出库,,升降轴返回,, 轴2至P1( 待机点)
/// </summary>
/// </summary>
...
...
source/DeviceLibrary/store/model/StoreMoveInfo.cs
查看文件 @
a8dda7d
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论