Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC30-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit d03fe7e8
由
几米阳光
编写于
2018-12-11 20:13:13 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
7daf9d25
全部展开
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
75 行增加
和
77 行删除
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
source/DeviceLibrary/store/StoreMoveStep.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
d03fe7e
...
...
@@ -369,7 +369,7 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove
(
Config
.
Middle_Axis
,
Config
.
MiddleAxis_P1_Position
,
Config
.
MiddleAxis_P1_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
Config
.
UpDownAxis_Door_P7
,
Config
.
UpDownAxis_P7_Speed
);
ComMoveToPosition
(
Config
.
CompressAxis_P1_Position
);
ResetCloseDoor
();
CloseDoorAndWait
();
break
;
case
StoreMoveStep
.
BOX_H_MiddleAxisToP1
:
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位完成"
);
...
...
@@ -397,6 +397,7 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove
(
Config
.
Middle_Axis
,
Config
.
MiddleAxis_P1_Position
,
Config
.
MiddleAxis_P1_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
Config
.
UpDownAxis_Door_P7
,
Config
.
UpDownAxis_P7_Speed
);
ComMoveToPosition
(
Config
.
CompressAxis_P1_Position
);
CloseDoorAndWait
();
break
;
case
StoreMoveStep
.
BOX_M_H_TOP1_OtherAxisToP1
:
LogUtil
.
info
(
LOGGER
,
StoreName
+
"到待机状态完成"
);
...
...
@@ -537,7 +538,7 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove
(
Config
.
Middle_Axis
,
Config
.
MiddleAxis_P1_Position
,
Config
.
MiddleAxis_P1_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
Config
.
UpDownAxis_Door_P7
,
Config
.
UpDownAxis_P7_Speed
);
ComMoveToPosition
(
Config
.
CompressAxis_P1_Position
);
ResetCloseDoor
();
CloseDoorAndWait
();
break
;
case
StoreMoveStep
.
BOX_H_MiddleAxisToP1
:
LogUtil
.
info
(
LOGGER
,
StoreName
+
"回原点完成"
);
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
d03fe7e
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
查看文件 @
d03fe7e
...
...
@@ -213,16 +213,8 @@ namespace OnlineStore.DeviceLibrary
{
AutoBaitingStatus
=
StoreRunStatus
.
Busy
;
StoreMove
.
NewMove
(
StoreMoveType
.
InStore
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I00_MoveToUp
);
if
(
KND
.
IOValue
(
IO_Type
.
TrayCheck_LoadMaterial
).
Equals
(
IO_VALUE
.
HIGH
))
{
LogUtil
.
error
(
Name
+
" 启动入料 ,已检测到料盘,轴不需要上升"
);
}
else
{
LogUtil
.
error
(
Name
+
" 启动入料 ,轴上升到检测到料盘"
);
ACAxisSpeedMove
(
StoreManager
.
Config
.
Batch_Axis
,
StoreManager
.
Config
.
Batch_Axis
.
TargetSpeed
);
}
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I01_Wait
);
LogUtil
.
info
(
Name
+
"启动入料"
);
return
true
;
}
else
...
...
@@ -243,33 +235,46 @@ namespace OnlineStore.DeviceLibrary
{
return
;
}
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_I00_MoveToUp
))
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_I01_Wait
))
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I02_MoveToUp
);
if
(
KND
.
IOValue
(
IO_Type
.
TrayCheck_LoadMaterial
).
Equals
(
IO_VALUE
.
HIGH
))
{
LogUtil
.
info
(
Name
+
" 入料 ,已检测到料盘,轴不需要上升"
);
}
else
{
LogUtil
.
info
(
Name
+
" 入料 ,轴上升到检测到料盘"
);
ACAxisSpeedMove
(
StoreManager
.
Config
.
Batch_Axis
,
StoreManager
.
Config
.
Batch_Axis
.
TargetSpeed
);
}
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_I02_MoveToUp
))
{
IsNeedScanCode
();
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_I0
1
_ScanCode
))
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_I0
3
_ScanCode
))
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I0
2
_SuckingDisc_Down
);
LogUtil
.
info
(
Name
+
"入料:
检测到料盘,
吸盘开始下降"
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I0
4
_SuckingDisc_Down
);
LogUtil
.
info
(
Name
+
"入料:
扫码结束,二维码【"
+
LastCode
+
"】
吸盘开始下降"
);
CylinderMove
(
IO_Type
.
SuckingDisc_Down
,
IO_Type
.
SuckingDisc_Up
,
true
);
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_I0
2
_SuckingDisc_Down
))
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_I0
4
_SuckingDisc_Down
))
{
SuckingDiscWork
();
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_I0
3
_SuckingDisc_Work
))
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_I0
5
_SuckingDisc_Work
))
{
if
(
KND
.
IOValue
(
IO_Type
.
SuckingDisc_Air
).
Equals
(
IO_VALUE
.
HIGH
))
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I0
4
_SuckingDisc_Up
);
LogUtil
.
info
(
Name
+
"入料: 吸盘上升,等待宽度到达"
+
StoreManager
.
Config
.
Default_TrayWidth
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I0
6
_SuckingDisc_Up
);
LogUtil
.
info
(
Name
+
"入料: 吸盘上升,等待宽度到达"
+
StoreManager
.
Config
.
Default_TrayWidth
);
CylinderMove
(
IO_Type
.
SuckingDisc_Up
,
IO_Type
.
SuckingDisc_Down
,
true
);
if
(
StoreManager
.
Config
.
Default_TrayWidth
.
Equals
(
7
))
{
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
WidthCheck1
,
IO_VALUE
.
HIGH
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
WidthCheck2
,
IO_VALUE
.
LOW
));
}
else
if
(
StoreManager
.
Config
.
Default_TrayWidth
.
Equals
(
13
))
}
else
if
(
StoreManager
.
Config
.
Default_TrayWidth
.
Equals
(
13
))
{
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
WidthCheck1
,
IO_VALUE
.
HIGH
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
WidthCheck2
,
IO_VALUE
.
HIGH
));
...
...
@@ -285,13 +290,14 @@ namespace OnlineStore.DeviceLibrary
WarnMsg
=
"吸盘已经尝试三次,仍然吸不到物料!"
;
StoreManager
.
Store
.
Alarm
(
StoreAlarmType
.
BatchAlarm
,
"吸盘吸料失败"
,
WarnMsg
,
StoreMoveType
.
InStore
);
}
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_I04_SuckingDisc_Up
))
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_I06_SuckingDisc_Up
))
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I0
5
_BatchAxisUp
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I0
7
_BatchAxisUp
);
LogUtil
.
info
(
Name
+
"入料: 批量上下料轴上升"
);
ACAxisSpeedMove
(
StoreManager
.
Config
.
Batch_Axis
,
StoreManager
.
Config
.
Batch_Axis
.
TargetSpeed
);
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_I0
5
_BatchAxisUp
))
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_I0
7
_BatchAxisUp
))
{
if
(
StoreManager
.
Store
.
CanStarInOut
())
{
...
...
@@ -304,7 +310,7 @@ namespace OnlineStore.DeviceLibrary
}
else
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I0
6
_GetPosId
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I0
8
_GetPosId
);
//计算高度
EndMovePosition
=
ACServerManager
.
GetActualtPosition
(
StoreManager
.
Config
.
Batch_Axis
.
DeviceName
,
StoreManager
.
Config
.
Batch_Axis
.
GetAxisValue
());
LastHeight
=
Math
.
Abs
(
EndMovePosition
-
StartMovePosition
)
/
AxisChangeValue
;
...
...
@@ -314,16 +320,15 @@ namespace OnlineStore.DeviceLibrary
GetInStorePosId
(
ProcessMsg
());
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
StoreMove
.
OneWaitCanEndStep
=
true
;
}
}
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_I0
6
_GetPosId
))
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_I0
8
_GetPosId
))
{
//判断是否开始入库
if
(
StoreManager
.
Store
.
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
InStore
)
||
(!
LastPosId
.
Equals
(
""
)))
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I0
7
_WaitTrayLeave
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I0
9
_WaitTrayLeave
);
LogUtil
.
info
(
Name
+
"入料: 开始入料【"
+
LastPosId
+
"】,等待料盘拿走"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SuckingDisc_Air
,
IO_VALUE
.
LOW
));
}
...
...
@@ -335,7 +340,7 @@ namespace OnlineStore.DeviceLibrary
StoreManager
.
Store
.
StartInStoreMove
(
new
InOutStoreParam
(
""
,
posId
),
true
,
false
);
}
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_I0
7
_WaitTrayLeave
))
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_I0
9
_WaitTrayLeave
))
{
if
(
StoreManager
.
Store
.
StoreMove
.
MoveStep
>=
StoreMoveStep
.
SI_07_DeviceBackFromDoor
)
{
...
...
@@ -349,6 +354,13 @@ namespace OnlineStore.DeviceLibrary
IsNeedScanCode
();
}
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_I11_BatchAxisHome
))
{
//TODO
LogUtil
.
info
(
Name
+
"入料:已经没有料盘,批量上料结束"
);
StoreMove
.
EndMove
();
AutoBaitingStatus
=
StoreRunStatus
.
Runing
;
}
else
{
LogUtil
.
error
(
Name
+
"未找到步骤:"
+
StoreMove
.
MoveType
);
...
...
@@ -357,7 +369,7 @@ namespace OnlineStore.DeviceLibrary
private
static
void
SuckingDiscWork
()
{
KND
.
IOMove
(
IO_Type
.
SuckingDisc_Work
,
IO_VALUE
.
LOW
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I0
3
_SuckingDisc_Work
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I0
5
_SuckingDisc_Work
);
SuckingDisc_WorkCount
++;
LogUtil
.
info
(
Name
+
"入料: 吸盘开始第"
+
SuckingDisc_WorkCount
+
"次工作"
);
KND
.
IOMove
(
IO_Type
.
SuckingDisc_Work
,
IO_VALUE
.
HIGH
);
...
...
@@ -375,19 +387,19 @@ namespace OnlineStore.DeviceLibrary
// if (ACServerManager.GetLimitPositiveSingle(StoreManager.Config.Batch_Axis).Equals(0))
if
(
KND
.
IOValue
(
IO_Type
.
TrayCheck_LoadMaterial
).
Equals
(
IO_VALUE
.
HIGH
))
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I01_ScanCode
);
LogUtil
.
info
(
Name
+
"入料: 开始扫码 "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I03_ScanCode
);
LogUtil
.
info
(
Name
+
"入料: 开始扫码,最多等待两秒钟 "
);
StoreMove
.
OneWaitCanEndStep
=
true
;
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitCodeOK
());
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
GetCameraCode
();
StoreMove
.
OneWaitCanEndStep
=
true
;
}
else
{
//TODO
LogUtil
.
info
(
Name
+
"入料:已经没有料盘,
入料结束
"
);
StoreMove
.
EndMove
()
;
A
utoBaitingStatus
=
StoreRunStatus
.
Runing
;
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I11_BatchAxisHome
);
LogUtil
.
info
(
Name
+
"入料:已经没有料盘,
批量上下轴回原点
"
);
StoreMove
.
TimeOutSeconds
=
120
;
A
CAxisHomeMove
(
StoreManager
.
Config
.
Batch_Axis
);
}
}
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
查看文件 @
d03fe7e
...
...
@@ -72,7 +72,8 @@ namespace OnlineStore.DeviceLibrary
StoreMove
.
EndStepWait
();
return
;
}
try
{
try
{
//当等待超过一分钟时,需要打印提示
TimeSpan
span
=
DateTime
.
Now
-
StoreMove
.
LastSetpTime
;
string
NotOkMsg
=
""
;
...
...
@@ -134,7 +135,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
wait
.
WaitType
==
(
int
)
Wait_Type
.
ScanCode_11
)
{
wait
.
IsEnd
=
!
String
.
IsNullOrEmpty
(
LastCode
);
wait
.
IsEnd
=
(
LastCode
.
Equals
(
""
).
Equals
(
false
)
);
}
if
(
wait
.
IsEnd
)
{
...
...
@@ -291,12 +292,11 @@ namespace OnlineStore.DeviceLibrary
if
(
LastCode
.
Equals
(
""
))
{
LastCode
=
"NoCode"
;
LogUtil
.
info
(
Name
+
"
未扫到二维码,默认为
NoCode"
);
LogUtil
.
info
(
Name
+
"
模拟二维码:
NoCode"
);
}
if
(
LastCode
.
Equals
(
""
))
{
LogUtil
.
error
(
"未扫到二维码,请拿走料盘"
);
WarnMsg
=
"未扫到二维码,请拿走料盘"
;
LogUtil
.
error
(
"未扫到二维码,需要将料盘送出"
);
}
else
{
...
...
@@ -353,7 +353,7 @@ namespace OnlineStore.DeviceLibrary
if
(
StoreManager
.
Store
.
IsDebug
)
{
string
posId
=
"1#AC1_1_1_4"
;
LogUtil
.
info
(
Name
+
"调试模式,
不需要连接服务器,直接
模拟库位号【"
+
posId
+
"】"
);
LogUtil
.
info
(
Name
+
"调试模式,模拟库位号【"
+
posId
+
"】"
);
string
plateH
=
"8"
;
string
plateW
=
"7"
;
if
(
StoreManager
.
Store
.
CanStarInOut
())
...
...
source/DeviceLibrary/store/StoreMoveStep.cs
查看文件 @
d03fe7e
...
...
@@ -407,73 +407,58 @@ namespace OnlineStore.DeviceLibrary
#
endregion
#
region
自动上下料上料功能
/// <summary>
/// 开始自动上料
/// </summary>
AUTO_I01_Wait
=
1201
,
/// <summary>
/// 先上升到料盘检测1(上料机构)信号亮
/// </summary>
AUTO_I0
0_MoveToUp
=
1200
,
AUTO_I0
2_MoveToUp
=
1202
,
/// <summary>
/// 扫码
/// </summary>
AUTO_I0
1_ScanCode
=
1201
,
AUTO_I0
3_ScanCode
=
1203
,
/// <summary>
/// 吸盘下降
/// </summary>
AUTO_I0
2_SuckingDisc_Down
=
1202
,
AUTO_I0
4_SuckingDisc_Down
=
1204
,
/// <summary>
/// 吸盘吸料盘
/// </summary>
AUTO_I0
3_SuckingDisc_Work
=
1203
,
AUTO_I0
5_SuckingDisc_Work
=
1205
,
/// <summary>
/// 吸盘上升 ,
/// </summary>
AUTO_I0
4_SuckingDisc_Up
=
1204
,
AUTO_I0
6_SuckingDisc_Up
=
1206
,
/// <summary>
/// 批量上下料料轴上升
/// </summary>
AUTO_I0
5_BatchAxisUp
=
1205
,
AUTO_I0
7_BatchAxisUp
=
1207
,
/// <summary>
/// 从服务器获取PosID
/// </summary>
AUTO_I0
6_GetPosId
=
1206
,
AUTO_I0
8_GetPosId
=
1208
,
/// <summary>
/// 等待料盘被叉子拿走
/// </summary>
AUTO_I0
7_WaitTrayLeave
=
1207
,
AUTO_I0
9_WaitTrayLeave
=
1209
,
/// <summary>
/// 未扫到码:等待操作人员拿走料盘
/// </summary>
AUTO_I10_WaitTrayGo
=
1210
,
///// <summary>
/////未扫到码: 把料盘放到叉子上
///// </summary>
//AUTO_I11_PutTrayToInout,
///// <summary>
///// 未扫到码:叉子进入门槛
///// </summary>
//AUTO_I12_InoutToDoor,
///// <summary>
///// 未扫到码:把料盘放到门口
///// </summary>
//AUTO_I13_PutTrayToDoor,
///// <summary>
///// 未扫到码:等待拿走料盘
///// </summary>
//AUTO_I14_WaitTakeTray,
///// <summary>
///// 未扫到码:料盘已手动拿走,需要等一秒钟后关闭仓门
///// </summary>
//AUTO_I15_TrayLeaveWaitTime,
/// <summary>
/// 批量上下轴开始回原点
/// </summary>
AUTO_I11_BatchAxisHome
=
1211
,
///// <summary>
///// 未扫到码:关闭仓门
///// </summary>
//AUTO_I16_CloseDoor,
#
endregion
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论