Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 14e6fd97
由
几米阳光
编写于
2018-08-21 12:35:06 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
出入库步骤优化
1 个父辈
fe2dd3b3
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
44 行增加
和
48 行删除
source/ACSingleStore/FrmStoreBox.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/DeviceLibrary/halcon/HDevelopCodeLearn.cs
source/DeviceLibrary/store/KTK_Store.cs
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
14e6fd9
...
...
@@ -988,7 +988,7 @@ namespace OnlineStore.ACSingleStore
return
true
;
}
}
else
if
(
errorCount
<
moveAxis
.
CanErrorCountMin
)
else
if
(
errorCount
<
=
moveAxis
.
CanErrorCountMin
)
{
LogUtil
.
info
(
LOGGER
,
" DeviceName="
+
deviceName
+
",AxisNo="
+
axisNo
+
",targetPosition="
+
targetPosition
+
",当前outCount="
+
outCount
+
",误差值小于最小误差【"
+
moveAxis
.
CanErrorCountMin
+
"】,默认轴已经停止运动"
);
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
14e6fd9
...
...
@@ -383,7 +383,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位时打开轴失败,需要再次复位,直接报警停止复位"
);
return
;
}
if
(
IsHasCompress_Axis
)
if
(
IsHasCompress_Axis
||
Config
.
IsHasLocationCylinder
.
Equals
(
0
)
)
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
BOX_H_InOutBack
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"开始复位,先把进出轴回原点"
);
...
...
@@ -977,11 +977,11 @@ namespace OnlineStore.DeviceLibrary
if
(
isWaitScan
)
{
TimeSpan
span
=
DateTime
.
Now
-
StartWaitScanTime
;
if
(
span
.
TotalSeconds
>
1
.5
)
if
(
span
.
TotalSeconds
>
0
.5
)
{
isWaitScan
=
false
;
IsScanCode
=
true
;
LogUtil
.
info
(
StoreName
+
"检测到料盘信号且等待
1
.5秒,开始扫码"
);
LogUtil
.
info
(
StoreName
+
"检测到料盘信号且等待
0
.5秒,开始扫码"
);
//BeginScannering();
GetCameraCode
();
}
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
14e6fd9
...
...
@@ -86,7 +86,17 @@ namespace OnlineStore.DeviceLibrary
#
region
出入库结果验证
private
void
InOutBackToP1
(
int
InOut_P1
)
{
ACAxisMove
(
Config
.
InOut_Axis
,
InOut_P1
,
Config
.
InOutAxis_P1_Speed
);
//判断是否在P1,如果是,不需要运行
int
outCount
=
ACServerManager
.
GetActualtPosition
(
Config
.
InOut_Axis
.
DeviceName
,
Config
.
InOut_Axis
.
GetAxisValue
());
int
errorCount
=
Math
.
Abs
(
outCount
-
InOut_P1
);
if
(
errorCount
<=
Config
.
InOut_Axis
.
CanErrorCountMin
)
{
LogUtil
.
info
(
"进出轴当前位置:"
+
outCount
+
",已经在P1,不需要再回P1"
);
}
else
{
ACAxisMove
(
Config
.
InOut_Axis
,
InOut_P1
,
Config
.
InOutAxis_P1_Speed
);
}
//StoreMove.WaitList.Add(WaitResultInfo.WaitAxisOrg(Config.InOut_Axis,IO_VALUE.HIGH));
}
...
...
@@ -268,21 +278,15 @@ namespace OnlineStore.DeviceLibrary
}
else
{
if
(
IsHasCompress_Axis
)
if
(
IsHasCompress_Axis
||
Config
.
IsHasLocationCylinder
.
Equals
(
0
)
)
{
InStoreLog
(
"入库:SI_02 进出轴(叉子)动作至P1, 打开舱门"
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_02_InOutAxisHome
);
//打开门 ,门上升
OpenDoorAndWait
();
InOutBackToP1
(
param
.
MoveP
.
InOut_P1
);
SI_02_Move
(
param
.
MoveP
);
}
else
{
InStoreLog
(
"入库:SI_01 定位气缸下降"
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_01_LocationCylinderDown
);
LocationDownAndWait
();
LocationDownAndWait
();
}
}
}
...
...
@@ -301,6 +305,13 @@ namespace OnlineStore.DeviceLibrary
{
StartInStoreMove
(
param
,
false
);
}
private
void
SI_02_Move
(
LineMoveP
moveP
)
{
InStoreLog
(
"入库:SI_02_ 进出轴(叉子)动作至P1,打开舱门"
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_02_InOutAxisHome
);
OpenDoorAndWait
();
InOutBackToP1
(
moveP
.
InOut_P1
);
}
protected
override
void
InStoreProcess
()
{
LineMoveP
moveP
=
StoreMove
.
MoveParam
.
MoveP
;
...
...
@@ -314,32 +325,20 @@ namespace OnlineStore.DeviceLibrary
}
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_00_TrayCheck
)
{
if
(
IsHasCompress_Axis
)
if
(
IsHasCompress_Axis
||
Config
.
IsHasLocationCylinder
.
Equals
(
0
)
)
{
InStoreLog
(
"入库:SI_02_ 进出轴(叉子)动作至P1,打开舱门"
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_02_InOutAxisHome
);
OpenDoorAndWait
();
//ACAxisMove(Config.InOut_Axis, moveP.InOut_P1, Config.InOutAxis_P1_Speed);
InOutBackToP1
(
moveP
.
InOut_P1
);
SI_02_Move
(
moveP
);
}
else
{
InStoreLog
(
"入库:SI_01 定位气缸下降"
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_01_LocationCylinderDown
);
LocationDownAndWait
();
LocationDownAndWait
();
}
}
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_01_LocationCylinderDown
)
{
InStoreLog
(
"入库:SI_02 进出轴(叉子)动作至P1,打开舱门"
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_02_InOutAxisHome
);
//ACAxisMove(Config.InOut_Axis, moveP.InOut_P1, Config.InOutAxis_P1_Speed);
InOutBackToP1
(
moveP
.
InOut_P1
);
//打开门 ,门上升
OpenDoorAndWait
();
//ACAxisMove(Config.InOut_Axis, moveP.InOut_P1, Config.InOutAxis_P1_Speed);
{
SI_02_Move
(
moveP
);
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_02_InOutAxisHome
)
{
...
...
@@ -397,7 +396,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_07_DeviceBackFromDoor
)
{
if
(
IsHasCompress_Axis
)
if
(
IsHasCompress_Axis
||
Config
.
IsHasLocationCylinder
.
Equals
(
0
)
)
{
InStoreLog
(
"入库:SI_09 移动到库位点,旋转轴至P2(库位点),升降轴至P3(库位入库前点) "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_09_MoveToBag
);
...
...
@@ -411,7 +410,7 @@ namespace OnlineStore.DeviceLibrary
{
InStoreLog
(
"入库:SI_08 定位气缸伸出 "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_08_LocationCylinder_Up
);
LocationUpAndWait
();
LocationUpAndWait
();
}
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_08_LocationCylinder_Up
)
...
...
@@ -422,13 +421,11 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P3
,
Config
.
UpDownAxis_P3_Speed
);
//关闭舱门
KNDIOMove
(
IO_Type
.
Door_Down
,
IO_VALUE
.
HIGH
);
KNDIOMove
(
IO_Type
.
Door_Up
,
IO_VALUE
.
LOW
);
//StoreMove.WaitList.Add(WaitResultInfo.WaitIO(Store_IO_Type.Door_Down, IO_VALUE.HIGH));
//StoreMove.WaitList.Add(WaitResultInfo.WaitIO(Store_IO_Type.Door_Up, IO_VALUE.LOW));
KNDIOMove
(
IO_Type
.
Door_Up
,
IO_VALUE
.
LOW
);
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_09_MoveToBag
)
{
if
(
IsHasCompress_Axis
)
if
(
IsHasCompress_Axis
||
Config
.
IsHasLocationCylinder
.
Equals
(
0
)
)
{
InStoreLog
(
"入库:SI_11 叉子进入库位中,进出轴至P3(库位取放料点) "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_11_DeviceToBag
);
...
...
@@ -529,7 +526,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
info
(
LOGGER
,
StoreName
+
"启动出库【"
+
posId
+
"】 "
,
storeMoveColor
);
storeRunStatus
=
StoreRunStatus
.
Busy
;
StoreMove
.
NewMove
(
StoreMoveType
.
OutStore
,
param
);
if
(
IsHasCompress_Axis
)
if
(
IsHasCompress_Axis
||
Config
.
IsHasLocationCylinder
.
Equals
(
0
)
)
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_02_DeviceBack
);
OutStoreLog
(
"出库:SO_02 叉子先运动到P1 ,打开舱门 开始"
);
...
...
@@ -612,7 +609,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_06_BagDeviceBack
)
{
if
(
IsHasCompress_Axis
)
if
(
IsHasCompress_Axis
||
Config
.
IsHasLocationCylinder
.
Equals
(
0
)
)
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_08_ToDoorPosition
);
OutStoreLog
(
"出库:SO_08 走到料门口,旋转轴至P1(待机点)升降轴至P2(进料口出料前点),打开舱门 "
);
...
...
@@ -643,7 +640,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_08_ToDoorPosition
)
{
if
(
IsHasCompress_Axis
)
if
(
IsHasCompress_Axis
||
Config
.
IsHasLocationCylinder
.
Equals
(
0
))
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_10_DeviceToDoor
);
OutStoreLog
(
"出库:SO_10 叉子进出料口,进出轴至P2(进料口取料点) "
);
...
...
@@ -653,8 +650,7 @@ namespace OnlineStore.DeviceLibrary
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_09_LocationCylinder_Down
);
OutStoreLog
(
"出库:SO_09 定位气缸退回,定位气缸退回 "
);
LocationDownAndWait
();
LocationDownAndWait
();
}
}
//此处需要等待移栽没有工作,才能把盘放入出料口
...
...
@@ -713,7 +709,7 @@ namespace OnlineStore.DeviceLibrary
}
}
private
void
LocationUpAndWait
()
{
if
(
Config
.
IsHasLocationCylinder
>=
1
)
...
...
source/DeviceLibrary/halcon/HDevelopCodeLearn.cs
查看文件 @
14e6fd9
...
...
@@ -38,10 +38,10 @@ namespace OnlineStore.DeviceLibrary
{
try
{
//[1] HD USB Camera
//
HOperatorSet.OpenFramegrabber("GigEVision", 0, 0, 0, 0, 0, 0, "default", -1,
//
"default", -1, "false", "default", cameraName, 0, -1, out hv_AcqHandle);
HOperatorSet
.
OpenFramegrabber
(
"DirectShow"
,
1
,
1
,
0
,
0
,
0
,
0
,
"default"
,
8
,
"rgb"
,
-
1
,
"false"
,
"default"
,
"[1] HD USB Camera"
,
0
,
-
1
,
out
hv_AcqHandle
);
HOperatorSet
.
OpenFramegrabber
(
"GigEVision"
,
0
,
0
,
0
,
0
,
0
,
0
,
"default"
,
-
1
,
"default"
,
-
1
,
"false"
,
"default"
,
cameraName
,
0
,
-
1
,
out
hv_AcqHandle
);
//
HOperatorSet.OpenFramegrabber("DirectShow", 1, 1, 0, 0, 0, 0, "default", 8, "rgb",
//
-1, "false", "default", "[1] HD USB Camera", 0, -1, out hv_AcqHandle);
return
true
;
}
catch
(
Exception
ex
)
...
...
source/DeviceLibrary/store/KTK_Store.cs
查看文件 @
14e6fd9
...
...
@@ -307,7 +307,7 @@ namespace OnlineStore.DeviceLibrary
return
true
;
}
}
else
if
(
errorCount
<
moveAxis
.
CanErrorCountMin
)
else
if
(
errorCount
<
=
moveAxis
.
CanErrorCountMin
)
{
LogUtil
.
info
(
LOGGER
,
" storeMoveStep="
+
StoreMove
.
MoveStep
+
moveAxis
.
DisplayStr
+
",targetPosition="
+
targetPosition
+
",当前outCount="
+
outCount
+
",误差值小于最小误差【"
+
moveAxis
.
CanErrorCountMin
+
"】,默认轴已经停止运动"
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论