Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
SO1131-XLRStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit b7aece47
由
张东亮
编写于
2022-12-12 13:46:57 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
扫码数量和超时以配置形式
1 个父辈
35d87eae
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
67 行增加
和
53 行删除
source/Common/Setting_Init.cs
source/DeviceLibrary/deviceLibrary/halcon/CodeManager.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_InExecute.cs
source/DeviceLibrary/storeBean/inputBean/BatchMoveBean_Partial.cs
source/DeviceLibrary/storeBean/inputBean/InputEquip_OutStore.cs
source/DeviceLibrary/storeBean/inputBean/PrintLabelBean.cs
source/Common/Setting_Init.cs
查看文件 @
b7aece4
...
@@ -79,6 +79,7 @@ namespace OnlineStore.Common
...
@@ -79,6 +79,7 @@ namespace OnlineStore.Common
public
static
string
NeedScanCode
=
"NeedScanCode"
;
public
static
string
NeedScanCode
=
"NeedScanCode"
;
public
static
string
CodeCount
=
"CodeCount"
;
public
static
string
CodeCount
=
"CodeCount"
;
public
static
string
ScanCodeTimeout
=
"ScanCodeTimeout"
;
public
static
string
DefaultTrayNum
=
"DefaultTrayNum"
;
public
static
string
DefaultTrayNum
=
"DefaultTrayNum"
;
public
static
string
MaxTrayNum
=
"MaxTrayNum"
;
public
static
string
MaxTrayNum
=
"MaxTrayNum"
;
...
...
source/DeviceLibrary/deviceLibrary/halcon/CodeManager.cs
查看文件 @
b7aece4
...
@@ -107,7 +107,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -107,7 +107,8 @@ namespace OnlineStore.DeviceLibrary
return
CameraScan
(
nameList
,
deviceName
,
findRightCodeBreak
,
timeOut
);
return
CameraScan
(
nameList
,
deviceName
,
findRightCodeBreak
,
timeOut
);
}
}
private
static
int
ScanCount
=
0
;
private
static
int
ScanCount
=
0
;
private
static
int
codeCount
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
CodeCount
,
4
);
private
static
int
codeCount
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
CodeCount
,
3
);
private
static
int
codeTimeout
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
ScanCodeTimeout
,
3000
);
[
HandleProcessCorruptedStateExceptions
]
[
HandleProcessCorruptedStateExceptions
]
static
List
<
string
>
CameraScan
(
List
<
string
>
cameraList
,
string
deviceName
,
bool
findRightCodeBreak
=
false
,
int
timeOut
=
1500
)
static
List
<
string
>
CameraScan
(
List
<
string
>
cameraList
,
string
deviceName
,
bool
findRightCodeBreak
=
false
,
int
timeOut
=
1500
)
{
{
...
@@ -142,6 +143,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -142,6 +143,7 @@ namespace OnlineStore.DeviceLibrary
{
{
LogUtil
.
error
(
deviceName
+
" 【"
+
cameraName
+
"】取图片失败["
+
Camera
.
_cam
.
ErrInfo
+
"],关闭相机"
);
LogUtil
.
error
(
deviceName
+
" 【"
+
cameraName
+
"】取图片失败["
+
Camera
.
_cam
.
ErrInfo
+
"],关闭相机"
);
CloseCamera
(
cameraName
);
CloseCamera
(
cameraName
);
LoadCamera
(
true
);
continue
;
continue
;
}
}
...
@@ -186,8 +188,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -186,8 +188,8 @@ namespace OnlineStore.DeviceLibrary
RemoteDecodeHelper
.
RemoteDecodeParam
remoteDecodeParam
=
new
RemoteDecodeHelper
.
RemoteDecodeParam
RemoteDecodeHelper
.
RemoteDecodeParam
remoteDecodeParam
=
new
RemoteDecodeHelper
.
RemoteDecodeParam
{
{
codeTypeList
=
codeTypeList
.
ToArray
(),
codeTypeList
=
codeTypeList
.
ToArray
(),
codeCount
=
3
,
codeCount
=
codeCount
,
timeout
=
3000
timeout
=
codeTimeout
};
};
cc
=
RemoteDecodeHelper
.
DecodeRequest
(
ho_Image
,
remoteDecodeParam
);
cc
=
RemoteDecodeHelper
.
DecodeRequest
(
ho_Image
,
remoteDecodeParam
);
if
(
cc
!=
null
)
if
(
cc
!=
null
)
...
@@ -272,6 +274,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -272,6 +274,7 @@ namespace OnlineStore.DeviceLibrary
{
{
LogUtil
.
error
(
deviceName
+
" 扫码出现AccessViolationException异常,关闭相机【"
+
cameraName
+
"】:"
+
e
.
ToString
());
LogUtil
.
error
(
deviceName
+
" 扫码出现AccessViolationException异常,关闭相机【"
+
cameraName
+
"】:"
+
e
.
ToString
());
Camera
.
_cam
.
Close
(
cameraName
);
Camera
.
_cam
.
Close
(
cameraName
);
LoadCamera
(
true
);
// GC.Collect();
// GC.Collect();
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
...
@@ -342,6 +345,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -342,6 +345,7 @@ namespace OnlineStore.DeviceLibrary
{
{
LogUtil
.
error
(
" 【"
+
cameraName
+
"】取图片失败["
+
Camera
.
_cam
.
ErrInfo
+
"],关闭相机"
);
LogUtil
.
error
(
" 【"
+
cameraName
+
"】取图片失败["
+
Camera
.
_cam
.
ErrInfo
+
"],关闭相机"
);
CloseCamera
(
cameraName
);
CloseCamera
(
cameraName
);
LoadCamera
(
true
);
continue
;
continue
;
}
}
LogUtil
.
info
(
" 【"
+
cameraName
+
"】取图片完成,开始扫码"
);
LogUtil
.
info
(
" 【"
+
cameraName
+
"】取图片完成,开始扫码"
);
...
@@ -368,8 +372,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -368,8 +372,8 @@ namespace OnlineStore.DeviceLibrary
RemoteDecodeHelper
.
RemoteDecodeParam
remoteDecodeParam
=
new
RemoteDecodeHelper
.
RemoteDecodeParam
RemoteDecodeHelper
.
RemoteDecodeParam
remoteDecodeParam
=
new
RemoteDecodeHelper
.
RemoteDecodeParam
{
{
codeTypeList
=
codeTypeList
.
ToArray
(),
codeTypeList
=
codeTypeList
.
ToArray
(),
codeCount
=
3
,
codeCount
=
codeCount
,
timeout
=
3000
timeout
=
codeTimeout
};
};
cc
=
RemoteDecodeHelper
.
DecodeRequest
(
ho_Image
,
remoteDecodeParam
);
cc
=
RemoteDecodeHelper
.
DecodeRequest
(
ho_Image
,
remoteDecodeParam
);
if
(
cc
!=
null
)
if
(
cc
!=
null
)
...
@@ -428,6 +432,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -428,6 +432,7 @@ namespace OnlineStore.DeviceLibrary
{
{
LogUtil
.
error
(
" 扫码出现AccessViolationException异常,关闭相机【"
+
cameraName
+
"】:"
+
e
.
ToString
());
LogUtil
.
error
(
" 扫码出现AccessViolationException异常,关闭相机【"
+
cameraName
+
"】:"
+
e
.
ToString
());
Camera
.
_cam
.
Close
(
cameraName
);
Camera
.
_cam
.
Close
(
cameraName
);
LoadCamera
(
true
);
// GC.Collect();
// GC.Collect();
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_InExecute.cs
查看文件 @
b7aece4
...
@@ -225,8 +225,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -225,8 +225,8 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
MoveParam
.
PosInfoBack
!=
null
)
//料叉有料,忽略当前入料口,直接入库
else
if
(
MoveInfo
.
MoveParam
.
PosInfoBack
!=
null
)
//料叉有料,忽略当前入料口,直接入库
{
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_07_MiddleToP3
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_07_MiddleToP3
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:入口料盘无入库信息,另一面料叉有料
。先将当前移栽旋转轴到抽屉库位垂直取放料点P3,然后
对另一面入库[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:入口料盘无入库信息,另一面料叉有料
,
对另一面入库[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
MiddleAxis_To_P3
();
//
MiddleAxis_To_P3();
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
MoveInfo
.
MoveParam
.
PosInfo
=
MoveInfo
.
MoveParam
.
PosInfoBack
.
ToCopy
();
MoveInfo
.
MoveParam
.
PosInfo
=
MoveInfo
.
MoveParam
.
PosInfoBack
.
ToCopy
();
MoveInfo
.
MoveParam
.
MoveP
=
new
LineMoveP
(
Config
,
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
);
MoveInfo
.
MoveParam
.
MoveP
=
new
LineMoveP
(
Config
,
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
);
...
@@ -237,7 +237,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -237,7 +237,7 @@ namespace OnlineStore.DeviceLibrary
{
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_03_VerifyBufferState
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_03_VerifyBufferState
);
BuffAreaInstoreDoor
(
true
);
BuffAreaInstoreDoor
(
true
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:入料口入库信息确认
,入料防护门打开
[barcode={MoveInfo.MoveParam.PosInfo.barcode}][posId={MoveInfo.MoveParam.PosInfo.PosId}][{MoveInfo.MoveParam.PosInfo.GetPosSide()}面],开始取料"
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:入料口入库信息确认[barcode={MoveInfo.MoveParam.PosInfo.barcode}][posId={MoveInfo.MoveParam.PosInfo.PosId}][{MoveInfo.MoveParam.PosInfo.GetPosSide()}面],开始取料"
);
}
}
break
;
break
;
case
StepEnum
.
SI_03_VerifyBufferState
:
case
StepEnum
.
SI_03_VerifyBufferState
:
...
@@ -296,7 +296,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -296,7 +296,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_07_MiddleToP3
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_07_MiddleToP3
);
//MiddleAxis_To_P3();
//MiddleAxis_To_P3();
BuffAreaInstoreDoor
(
false
);
BuffAreaInstoreDoor
(
false
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:另一面无料
,关闭入料防护门
,直接入库[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
//移栽旋转轴到料屉库位垂直取放料点P3
LogInfo
(
$
"入库 {MoveInfo.SLog}:另一面无料,直接入库[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
//移栽旋转轴到料屉库位垂直取放料点P3
}
}
}
}
else
//另一个料叉已有料,进行入库
else
//另一个料叉已有料,进行入库
...
@@ -304,7 +304,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -304,7 +304,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_07_MiddleToP3
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_07_MiddleToP3
);
//MiddleAxis_To_P3();
//MiddleAxis_To_P3();
BuffAreaInstoreDoor
(
false
);
BuffAreaInstoreDoor
(
false
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:另一个料叉已有料
,关闭入料防护门
,进行入库[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
//移栽旋转轴到料屉库位垂直取放料点P3
LogInfo
(
$
"入库 {MoveInfo.SLog}:另一个料叉已有料,进行入库[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
//移栽旋转轴到料屉库位垂直取放料点P3
}
}
break
;
break
;
...
@@ -421,7 +421,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -421,7 +421,7 @@ namespace OnlineStore.DeviceLibrary
break
;
break
;
case
StepEnum
.
SI_18_PutTrayDown
:
case
StepEnum
.
SI_18_PutTrayDown
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_19_InoutBack
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_19_InoutBack
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:抽屉拉取进出轴到拍照点,同时检测{trayAColumns[GetPosColumn()]}=1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:抽屉拉取进出轴到拍照点,
移栽X轴去待机点,
同时检测{trayAColumns[GetPosColumn()]}=1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
if
(
CheckASide
())
if
(
CheckASide
())
{
{
if
(!
GetShieldState
(
sheidAColmns
[
GetPosColumn
()]))
if
(!
GetShieldState
(
sheidAColmns
[
GetPosColumn
()]))
...
@@ -432,6 +432,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -432,6 +432,7 @@ namespace OnlineStore.DeviceLibrary
if
(!
GetShieldState
(
sheidBColmns
[
GetPosColumn
()]))
if
(!
GetShieldState
(
sheidBColmns
[
GetPosColumn
()]))
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
trayBColumns
[
GetPosColumn
()],
IO_VALUE
.
HIGH
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
trayBColumns
[
GetPosColumn
()],
IO_VALUE
.
HIGH
));
}
}
BothXAxis_To_P1
();
PullAxis_Inout_To_Cam
();
PullAxis_Inout_To_Cam
();
break
;
break
;
case
StepEnum
.
SI_19_InoutBack
:
case
StepEnum
.
SI_19_InoutBack
:
...
@@ -440,12 +441,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -440,12 +441,12 @@ namespace OnlineStore.DeviceLibrary
if
(
InDoorSigCheck
()||
InputInstoreCheck
())
if
(
InDoorSigCheck
()||
InputInstoreCheck
())
{
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_20_ToStandby
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_20_ToStandby
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:入料口有料,行走机构去待机点,料斗升降轴去待机点,移栽升降轴到上暂存区入库取料低点P3
,移栽X轴去待机点
[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:入料口有料,行走机构去待机点,料斗升降轴去待机点,移栽升降轴到上暂存区入库取料低点P3[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
MoveAxisToP1
();
MoveAxisToP1
();
PullAxis_UpdownToP1
();
PullAxis_UpdownToP1
();
UpdownAxisTo_P3_P9
();
UpdownAxisTo_P3_P9
();
//XAxis_To_P1();
//XAxis_To_P1();
BothXAxis_To_P1
();
//
BothXAxis_To_P1();
}
}
else
else
{
{
...
...
source/DeviceLibrary/storeBean/inputBean/BatchMoveBean_Partial.cs
查看文件 @
b7aece4
...
@@ -48,16 +48,16 @@ namespace OnlineStore.DeviceLibrary
...
@@ -48,16 +48,16 @@ namespace OnlineStore.DeviceLibrary
UpdateShelf
(
1
);
UpdateShelf
(
1
);
if
(
CurrShelf
.
ShelfState
.
Equals
(
3
))
if
(
CurrShelf
.
ShelfState
.
Equals
(
3
))
{
{
// bool agvcallresult = AgvClient.NeedLeave(Config.AgvName, CurrShelf.ShelfRfid, ClientLevel.High);
// bool agvcallresult = AgvClient.NeedLeave(Config.AgvName, CurrShelf.ShelfRfid, ClientLevel.High);
LogUtil
.
info
(
Name
+
"StartInstore 失败,料串"
+
CurrShelf
.
ToStr
()
+
"需要离开,NeedLeave:"
+
Config
.
AgvName
+
","
+
CurrShelf
.
ShelfRfid
);
LogUtil
.
info
(
Name
+
"StartInstore 失败,料串"
+
CurrShelf
.
ToStr
()
+
"需要离开,NeedLeave:"
+
Config
.
AgvName
+
","
+
CurrShelf
.
ShelfRfid
);
return
false
;
return
false
;
}
}
else
if
(
Robot
.
IOValue
(
Config
.
IO_Shelf_FrontCheck
).
Equals
(
IO_VALUE
.
HIGH
)
)
else
if
(
Robot
.
IOValue
(
Config
.
IO_Shelf_FrontCheck
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
MoveInfo
.
NewMove
(
MoveType
.
InStore
,
new
InOutParam
());
MoveInfo
.
NewMove
(
MoveType
.
InStore
,
new
InOutParam
());
IB03_LineStart
();
IB03_LineStart
();
}
}
else
if
(
Robot
.
IOValue
(
Config
.
IO_Shelf_InPlaceCheck
).
Equals
(
IO_VALUE
.
HIGH
))
else
if
(
Robot
.
IOValue
(
Config
.
IO_Shelf_InPlaceCheck
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
MoveInfo
.
NewMove
(
MoveType
.
InStore
,
new
InOutParam
());
MoveInfo
.
NewMove
(
MoveType
.
InStore
,
new
InOutParam
());
IB04_LineWait
();
IB04_LineWait
();
...
@@ -89,7 +89,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -89,7 +89,7 @@ namespace OnlineStore.DeviceLibrary
WorkLog
(
"定位工位检测到料串: 链条停止,阻挡气缸上升"
);
WorkLog
(
"定位工位检测到料串: 链条停止,阻挡气缸上升"
);
LineStop
();
LineStop
();
StopUp
(
MoveInfo
);
StopUp
(
MoveInfo
);
// MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
// MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
}
}
private
void
IB02_BatchAxisToP1
()
private
void
IB02_BatchAxisToP1
()
{
{
...
@@ -102,7 +102,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -102,7 +102,7 @@ namespace OnlineStore.DeviceLibrary
{
{
WorkLog
(
"料串入料 :入口有料串,转动料串到位"
);
WorkLog
(
"料串入料 :入口有料串,转动料串到位"
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB03_LineStart
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB03_LineStart
);
LineRun
(
MoveInfo
);
LineRun
(
MoveInfo
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
Config
.
IO_Shelf_FrontCheck
,
IO_VALUE
.
LOW
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
Config
.
IO_Shelf_FrontCheck
,
IO_VALUE
.
LOW
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
Config
.
IO_Shelf_InPlaceCheck
,
IO_VALUE
.
HIGH
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
Config
.
IO_Shelf_InPlaceCheck
,
IO_VALUE
.
HIGH
));
}
}
...
@@ -215,7 +215,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -215,7 +215,8 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB07_AxisUpMove
))
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB07_AxisUpMove
))
{
{
CheckHasTray
();
CheckHasTray
();
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB08_BatchAxisToP4
))
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB08_BatchAxisToP4
))
{
{
if
(
Robot
.
AxisIsInShelfUp
(
ShelfType
))
if
(
Robot
.
AxisIsInShelfUp
(
ShelfType
))
{
{
...
@@ -237,7 +238,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -237,7 +238,7 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
IsTimeOut
(
10
))
else
if
(
MoveInfo
.
IsTimeOut
(
10
))
{
{
WarnMsg
=
Name
+
"["
+
MoveInfo
.
MoveStep
+
"] "
+
"等待旋转轴离开料串超时"
+
"["
+
FormUtil
.
GetSpanStr
(
MoveInfo
.
StepSpan
())
+
"]"
;
WarnMsg
=
Name
+
"["
+
MoveInfo
.
MoveStep
+
"] "
+
"等待旋转轴离开料串超时"
+
"["
+
FormUtil
.
GetSpanStr
(
MoveInfo
.
StepSpan
())
+
"]"
;
}
}
}
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB11_ScanCode
))
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB11_ScanCode
))
{
{
...
@@ -268,8 +269,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -268,8 +269,9 @@ namespace OnlineStore.DeviceLibrary
var
span
=
DateTime
.
Now
-
MoveInfo
.
LastSetpTime
;
var
span
=
DateTime
.
Now
-
MoveInfo
.
LastSetpTime
;
WorkLog
(
"料串入料 :扫码结束【"
+
code
+
"】,等待取料机构来取料,"
+
MoveInfo
.
MoveParam
.
PosInfo
.
ToStr
());
WorkLog
(
"料串入料 :扫码结束【"
+
code
+
"】,等待取料机构来取料,"
+
MoveInfo
.
MoveParam
.
PosInfo
.
ToStr
());
}
}
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB12_BatchAxisToReelPosition
))
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB12_BatchAxisToReelPosition
))
{
{
string
code
=
CodeManager
.
ProcessCode
(
LastCodeList
);
string
code
=
CodeManager
.
ProcessCode
(
LastCodeList
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB13_ScanOK
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB13_ScanOK
);
...
@@ -289,6 +291,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -289,6 +291,12 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
LastHeight
=
GetHeight
();
LastHeight
=
GetHeight
();
}
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB16_SaveHight
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB17_WaitReelLeave
);
WorkLog
(
"当前料盘已离开,开始判断是否有下一盘,开始扫码"
);
LastHeight
=
0
;
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB17_WaitReelLeave
))
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB17_WaitReelLeave
))
{
{
CheckHasTray
();
CheckHasTray
();
...
@@ -313,7 +321,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -313,7 +321,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
OneWaitCanEndStep
=
true
;
MoveInfo
.
OneWaitCanEndStep
=
true
;
EmptyShelf
=
true
;
EmptyShelf
=
true
;
//bool agvcallresult = AgvClient.NeedLeave(Config.AgvName, CurrShelf.ShelfRfid, ClientLevel.High);
//bool agvcallresult = AgvClient.NeedLeave(Config.AgvName, CurrShelf.ShelfRfid, ClientLevel.High);
// WorkLog("上料完成 :通知agv来取料串,等待料串离开Config.AgvName:" + Config.AgvName + ",CurrShelfId:" + CurrShelf.ShelfRfid + ",agvcallresult:" + agvcallresult.ToString());
// WorkLog("上料完成 :通知agv来取料串,等待料串离开Config.AgvName:" + Config.AgvName + ",CurrShelfId:" + CurrShelf.ShelfRfid + ",agvcallresult:" + agvcallresult.ToString());
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
60000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
60000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
Config
.
IO_Shelf_FrontCheck
,
IO_VALUE
.
LOW
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
Config
.
IO_Shelf_FrontCheck
,
IO_VALUE
.
LOW
));
}
}
...
@@ -413,22 +421,22 @@ namespace OnlineStore.DeviceLibrary
...
@@ -413,22 +421,22 @@ namespace OnlineStore.DeviceLibrary
{
{
toBatchP4
=
false
;
toBatchP4
=
false
;
//判断扫码点是否可用,可用,运动到扫码点
//判断扫码点是否可用,可用,运动到扫码点
int
currP
=
BatchAxis
.
GetAclPosition
();
int
currP
=
BatchAxis
.
GetAclPosition
();
int
targetPosition
=
currP
+
Config
.
BatchAxisP4
;
int
targetPosition
=
currP
+
Config
.
BatchAxisP4
;
if
(
Config
.
BatchAxisP4
>
0
&&
(
targetPosition
<
Config
.
BatchAxisP2
))
if
(
Config
.
BatchAxisP4
>
0
&&
(
targetPosition
<
Config
.
BatchAxisP2
))
{
{
batchAxisReelPosition
=
currP
;
batchAxisReelPosition
=
currP
;
toBatchP4
=
true
;
toBatchP4
=
true
;
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB08_BatchAxisToP4
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB08_BatchAxisToP4
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
BatchAxis
.
AbsMove
(
MoveInfo
,
targetPosition
,
Robot
.
Config
.
BatchAxis_P4Speed
);
BatchAxis
.
AbsMove
(
MoveInfo
,
targetPosition
,
Robot
.
Config
.
BatchAxis_P4Speed
);
WorkLog
(
"料盘已到位,批量轴当前位置【"
+
currP
+
"】,扫码上升高度P4【"
+
Config
.
BatchAxisP4
+
"】可用,批量轴走到扫码点【"
+
targetPosition
+
"】"
);
WorkLog
(
"料盘已到位,批量轴当前位置【"
+
currP
+
"】,扫码上升高度P4【"
+
Config
.
BatchAxisP4
+
"】可用,批量轴走到扫码点【"
+
targetPosition
+
"】"
);
}
}
else
else
{
{
LogUtil
.
info
(
Name
+
"料盘已到位,批量轴当前位置【"
+
currP
+
"】扫码上升高度P4【"
+
Config
.
BatchAxisP4
+
"】扫码点【"
+
targetPosition
+
"】P2【"
+
Config
.
BatchAxisP2
+
"】,可直接扫码"
);
LogUtil
.
info
(
Name
+
"料盘已到位,批量轴当前位置【"
+
currP
+
"】扫码上升高度P4【"
+
Config
.
BatchAxisP4
+
"】扫码点【"
+
targetPosition
+
"】P2【"
+
Config
.
BatchAxisP2
+
"】,可直接扫码"
);
if
(
Robot
.
AxisIsInShelfUp
(
ShelfType
))
if
(
Robot
.
AxisIsInShelfUp
(
ShelfType
))
{
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB09_WaitCanScan
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB09_WaitCanScan
);
...
@@ -439,7 +447,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -439,7 +447,7 @@ namespace OnlineStore.DeviceLibrary
{
{
IB11_ScanCode
();
IB11_ScanCode
();
}
}
}
}
}
}
else
else
{
{
...
@@ -464,7 +472,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -464,7 +472,7 @@ namespace OnlineStore.DeviceLibrary
}
}
private
void
SendInShelfLeave
(
string
msg
=
""
)
private
void
SendInShelfLeave
(
string
msg
=
""
)
{
{
WorkLog
(
" SendInShelfLeave :"
+
msg
+
",清空条码"
);
WorkLog
(
" SendInShelfLeave :"
+
msg
+
",清空条码"
);
LastCodeList
=
new
List
<
string
>();
LastCodeList
=
new
List
<
string
>();
preCodeList
=
new
List
<
string
>();
preCodeList
=
new
List
<
string
>();
bool
needLeave
=
true
;
bool
needLeave
=
true
;
...
@@ -638,8 +646,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -638,8 +646,8 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
TimeOutSeconds
=
40
;
MoveInfo
.
TimeOutSeconds
=
40
;
MoveInfo
.
OneWaitCanEndStep
=
true
;
MoveInfo
.
OneWaitCanEndStep
=
true
;
// bool agvcallresult = AgvClient.NeedLeave(Config.AgvName, CurrShelf.ShelfRfid, ClientLevel.High);
// bool agvcallresult = AgvClient.NeedLeave(Config.AgvName, CurrShelf.ShelfRfid, ClientLevel.High);
// WorkLog("送出出库料串 :通知agv来取料串,等待料串离开Config.AgvName:" + Config.AgvName + ",CurrShelfId:" + CurrShelf.ShelfRfid + ",agvcallresult:" + agvcallresult.ToString());
// WorkLog("送出出库料串 :通知agv来取料串,等待料串离开Config.AgvName:" + Config.AgvName + ",CurrShelfId:" + CurrShelf.ShelfRfid + ",agvcallresult:" + agvcallresult.ToString());
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
60000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
60000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
Config
.
IO_Shelf_FrontCheck
,
IO_VALUE
.
LOW
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
Config
.
IO_Shelf_FrontCheck
,
IO_VALUE
.
LOW
));
}
}
...
@@ -687,9 +695,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -687,9 +695,9 @@ namespace OnlineStore.DeviceLibrary
}
}
internal
void
ReelPutOk
()
internal
void
ReelPutOk
()
{
{
if
(
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
OutStore
)
&&
MoveInfo
.
IsStep
(
StepEnum
.
IS13_WaitReel
))
if
(
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
OutStore
)
&&
MoveInfo
.
IsStep
(
StepEnum
.
IS13_WaitReel
))
{
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IS14_ReelOK
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
IS14_ReelOK
);
WorkLog
(
$
"出库{MoveInfo.SLog} 放料完成"
);
WorkLog
(
$
"出库{MoveInfo.SLog} 放料完成"
);
CheckShelfIsFull
();
CheckShelfIsFull
();
...
@@ -701,7 +709,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -701,7 +709,7 @@ namespace OnlineStore.DeviceLibrary
}
}
private
void
CheckShelfIsFull
()
private
void
CheckShelfIsFull
()
{
{
int
currPositon
=
BatchAxis
.
GetAclPosition
();
int
currPositon
=
BatchAxis
.
GetAclPosition
();
int
nextP
=
currPositon
-
Robot
.
Config
.
Height_ChangeValue
*
(
8
+
20
);
int
nextP
=
currPositon
-
Robot
.
Config
.
Height_ChangeValue
*
(
8
+
20
);
if
(
nextP
<=
Config
.
BatchAxisP1
)
if
(
nextP
<=
Config
.
BatchAxisP1
)
...
@@ -718,7 +726,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -718,7 +726,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
else
{
{
SendOutShelfLeave
(
"料串出满需离开(信号到位)"
);
SendOutShelfLeave
(
"料串出满需离开(信号到位)"
);
}
}
}
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB07_AxisUpMove
))
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB07_AxisUpMove
))
...
@@ -787,7 +795,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -787,7 +795,7 @@ namespace OnlineStore.DeviceLibrary
// LineRun();
// LineRun();
// //等待进料检测信号
// //等待进料检测信号
// bool result = Robot.WaitIo(Config.IO_Shelf_FrontCheck, IO_VALUE.HIGH, 60000);
// bool result = Robot.WaitIo(Config.IO_Shelf_FrontCheck, IO_VALUE.HIGH, 60000);
//
//
// if (!result)
// if (!result)
// {
// {
...
@@ -932,7 +940,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -932,7 +940,7 @@ namespace OnlineStore.DeviceLibrary
if
(
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
InStore
))
if
(
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
InStore
))
{
{
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB16_SaveHight
))
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB16_SaveHight
))
{
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB17_WaitReelLeave
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB17_WaitReelLeave
);
WorkLog
(
"当前料盘已离开,开始判断是否有下一盘,开始扫码"
);
WorkLog
(
"当前料盘已离开,开始判断是否有下一盘,开始扫码"
);
LastHeight
=
0
;
LastHeight
=
0
;
...
@@ -942,7 +950,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -942,7 +950,7 @@ namespace OnlineStore.DeviceLibrary
{
{
LogUtil
.
error
(
Name
+
"当前状态:"
+
MoveInfo
.
MoveType
+
",GetTrayLeave暂不处理"
);
LogUtil
.
error
(
Name
+
"当前状态:"
+
MoveInfo
.
MoveType
+
",GetTrayLeave暂不处理"
);
}
}
}
}
private
bool
isFastLoad
=
true
;
private
bool
isFastLoad
=
true
;
public
bool
UpdateShelf
(
int
state
=
0
,
string
xnRfid
=
""
)
public
bool
UpdateShelf
(
int
state
=
0
,
string
xnRfid
=
""
)
...
@@ -962,7 +970,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -962,7 +970,7 @@ namespace OnlineStore.DeviceLibrary
{
{
CurrShelf
=
new
ShelfInfo
();
CurrShelf
=
new
ShelfInfo
();
EmptyShelf
=
false
;
EmptyShelf
=
false
;
// AgvClient.SetStatus(Config.AgvName);
// AgvClient.SetStatus(Config.AgvName);
}
}
else
else
{
{
...
...
source/DeviceLibrary/storeBean/inputBean/InputEquip_OutStore.cs
查看文件 @
b7aece4
...
@@ -284,9 +284,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -284,9 +284,9 @@ namespace OnlineStore.DeviceLibrary
{
{
// int shelf = MoveInfo.MoveParam.ShelfType;
// int shelf = MoveInfo.MoveParam.ShelfType;
// if (shelf.Equals(1))
// if (shelf.Equals(1))
{
//
{
BatchMove
.
GetTrayStartLeave
();
//
BatchMove.GetTrayStartLeave();
}
//
}
}
}
string
getSideName
(
int
shelf
)
string
getSideName
(
int
shelf
)
{
{
...
...
source/DeviceLibrary/storeBean/inputBean/PrintLabelBean.cs
查看文件 @
b7aece4
...
@@ -239,11 +239,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -239,11 +239,11 @@ namespace OnlineStore.DeviceLibrary
if
(!
CheckLabel
())
if
(!
CheckLabel
())
{
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
Label03_HasLabelAtDoor
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
Label03_HasLabelAtDoor
);
MoveLog
(
$
"打标:
剥纸器上
无标签"
);
MoveLog
(
$
"打标:
出口
无标签"
);
}
}
else
else
{
{
SetWarnMsg
(
$
"
剥纸器上
有标签,无法打印"
);
SetWarnMsg
(
$
"
出口
有标签,无法打印"
);
Thread
.
Sleep
(
2000
);
Thread
.
Sleep
(
2000
);
}
}
}
}
...
@@ -266,11 +266,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -266,11 +266,6 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StepEnum
.
Label05_WaitPrintOK
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
Label05_WaitPrintOK
);
MoveLog
(
$
"打标:5秒超时,认为出标完成"
);
MoveLog
(
$
"打标:5秒超时,认为出标完成"
);
}
}
//else if (MoveInfo.IsTimeOut(15))
//{
// MoveInfo.NextMoveStep(StepEnum.Label03_HasLabelAtDoor);
// MoveLog($"打标:出标超时15秒,重新发送打印任务");
//}
Thread
.
Sleep
(
1000
);
Thread
.
Sleep
(
1000
);
}
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
Label05_WaitPrintOK
))
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
Label05_WaitPrintOK
))
...
@@ -289,9 +284,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -289,9 +284,10 @@ namespace OnlineStore.DeviceLibrary
}
}
else
else
{
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
Label01_ConnectPrinter
);
SetWarnMsg
(
"标签未在平台上,请处理"
);
MoveLog
(
$
"打标:未检测到标签在平台上,标签平台后退,准备重新打印"
);
//MoveInfo.NextMoveStep(StepEnum.Label01_ConnectPrinter);
Label_CylinderBack
(
MoveInfo
);
//MoveLog($"打标:未检测到标签在平台上,标签平台后退,准备重新打印");
//Label_CylinderBack(MoveInfo);
}
}
}
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
Label07_CheckLabelInPos
))
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
Label07_CheckLabelInPos
))
...
@@ -379,6 +375,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -379,6 +375,9 @@ namespace OnlineStore.DeviceLibrary
/// <returns></returns>
/// <returns></returns>
bool
checkLabelInPos
()
bool
checkLabelInPos
()
{
{
bool
useLabelCheck
=
ConfigAppSettings
.
GetBoolValue
(
Setting_Init
.
UseLabelCheck
,
false
);
if
(
useLabelCheck
)
return
IOValue
(
IO_Type
.
Printer_LabelCheck
).
Equals
(
IO_VALUE
.
HIGH
);
return
true
;
return
true
;
}
}
public
void
SetWarnMsg
(
string
msg
=
""
)
public
void
SetWarnMsg
(
string
msg
=
""
)
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论