Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 020e8c88
由
LN
编写于
2021-06-15 09:12:03 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
料叉检测信号和仓门口检测信号功能改为可配置
1 个父辈
53b5febe
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
284 行增加
和
158 行删除
dll/camera/Asa.Camera.VisionLib.dll
source/ACSingleStore/FrmStoreBox.Designer.cs
source/ACSingleStore/FrmStoreBox.cs
source/ACSingleStore/记录.txt
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/DeviceLibrary/store/StoreStep.cs
source/LoadCVSLibrary/storeConfig/config/AC_SA_Config.cs
dll/camera/Asa.Camera.VisionLib.dll
查看文件 @
020e8c8
此文件类型无法预览
source/ACSingleStore/FrmStoreBox.Designer.cs
查看文件 @
020e8c8
...
...
@@ -105,14 +105,10 @@
this
.
cmbAxisList
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
label49
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
axis_4_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
txt4Target
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
lblTargetP4
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
lblActual4
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label7
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
axis_1_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
axis_3_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
axis_2_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
label38
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtMiddleTarget
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtInoutTarget
=
new
System
.
Windows
.
Forms
.
TextBox
();
...
...
@@ -190,6 +186,11 @@
this
.
btnUpDownP6
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnUpDownP3
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnUpDownP4
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
lblConfigInfo
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
axis_4_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
axis_1_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
axis_3_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
axis_2_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
contextMenuStrip1
.
SuspendLayout
();
this
.
tabControl2
.
SuspendLayout
();
this
.
tabPage4
.
SuspendLayout
();
...
...
@@ -266,9 +267,9 @@
//
// tabPage4
//
this
.
tabPage4
.
Controls
.
Add
(
this
.
lblConfigInfo
);
this
.
tabPage4
.
Controls
.
Add
(
this
.
btnStoreExit
);
this
.
tabPage4
.
Controls
.
Add
(
this
.
chbDebug
);
this
.
tabPage4
.
Controls
.
Add
(
this
.
btnStoreHome
);
this
.
tabPage4
.
Controls
.
Add
(
this
.
chbAuto
);
this
.
tabPage4
.
Controls
.
Add
(
this
.
btnSotreReset
);
this
.
tabPage4
.
Controls
.
Add
(
this
.
btnStoreStop
);
...
...
@@ -284,7 +285,7 @@
// btnStoreExit
//
this
.
btnStoreExit
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnStoreExit
.
Location
=
new
System
.
Drawing
.
Point
(
539
,
4
);
this
.
btnStoreExit
.
Location
=
new
System
.
Drawing
.
Point
(
406
,
4
);
this
.
btnStoreExit
.
Name
=
"btnStoreExit"
;
this
.
btnStoreExit
.
Size
=
new
System
.
Drawing
.
Size
(
132
,
39
);
this
.
btnStoreExit
.
TabIndex
=
4
;
...
...
@@ -308,12 +309,13 @@
// btnStoreHome
//
this
.
btnStoreHome
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnStoreHome
.
Location
=
new
System
.
Drawing
.
Point
(
406
,
4
);
this
.
btnStoreHome
.
Location
=
new
System
.
Drawing
.
Point
(
352
,
48
);
this
.
btnStoreHome
.
Name
=
"btnStoreHome"
;
this
.
btnStoreHome
.
Size
=
new
System
.
Drawing
.
Size
(
132
,
39
);
this
.
btnStoreHome
.
TabIndex
=
3
;
this
.
btnStoreHome
.
Text
=
"回待机位"
;
this
.
btnStoreHome
.
UseVisualStyleBackColor
=
true
;
this
.
btnStoreHome
.
Visible
=
false
;
this
.
btnStoreHome
.
Click
+=
new
System
.
EventHandler
(
this
.
回待机点
ToolStripMenuItem_Click
);
//
// chbAuto
...
...
@@ -520,6 +522,7 @@
this
.
tabPage3
.
Controls
.
Add
(
this
.
btnImgSave
);
this
.
tabPage3
.
Controls
.
Add
(
this
.
btnFcomp
);
this
.
tabPage3
.
Controls
.
Add
(
this
.
btnForig
);
this
.
tabPage3
.
Controls
.
Add
(
this
.
btnStoreHome
);
this
.
tabPage3
.
Controls
.
Add
(
this
.
btnClearLog
);
this
.
tabPage3
.
Controls
.
Add
(
this
.
btnCloseDoor
);
this
.
tabPage3
.
Controls
.
Add
(
this
.
btnOpenDoor
);
...
...
@@ -612,7 +615,7 @@
this
.
richTextBox1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
richTextBox1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
96
);
this
.
richTextBox1
.
Name
=
"richTextBox1"
;
this
.
richTextBox1
.
Size
=
new
System
.
Drawing
.
Size
(
558
,
404
);
this
.
richTextBox1
.
Size
=
new
System
.
Drawing
.
Size
(
558
,
397
);
this
.
richTextBox1
.
TabIndex
=
256
;
this
.
richTextBox1
.
Text
=
""
;
this
.
richTextBox1
.
VisibleChanged
+=
new
System
.
EventHandler
(
this
.
richTextBox1_VisibleChanged
);
...
...
@@ -1199,17 +1202,6 @@
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"伺服状态"
;
//
// axis_4_Alarm
//
this
.
axis_4_Alarm
.
IOName
=
""
;
this
.
axis_4_Alarm
.
IOValue
=
0
;
this
.
axis_4_Alarm
.
isCanClick
=
false
;
this
.
axis_4_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
432
,
39
);
this
.
axis_4_Alarm
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
);
this
.
axis_4_Alarm
.
Name
=
"axis_4_Alarm"
;
this
.
axis_4_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_4_Alarm
.
TabIndex
=
271
;
//
// txt4Target
//
this
.
txt4Target
.
Location
=
new
System
.
Drawing
.
Point
(
409
,
143
);
...
...
@@ -1244,39 +1236,6 @@
this
.
label7
.
TabIndex
=
267
;
this
.
label7
.
Text
=
"轴四:压紧轴"
;
//
// axis_1_Alarm
//
this
.
axis_1_Alarm
.
IOName
=
""
;
this
.
axis_1_Alarm
.
IOValue
=
0
;
this
.
axis_1_Alarm
.
isCanClick
=
false
;
this
.
axis_1_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
127
,
40
);
this
.
axis_1_Alarm
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
);
this
.
axis_1_Alarm
.
Name
=
"axis_1_Alarm"
;
this
.
axis_1_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_1_Alarm
.
TabIndex
=
264
;
//
// axis_3_Alarm
//
this
.
axis_3_Alarm
.
IOName
=
""
;
this
.
axis_3_Alarm
.
IOValue
=
0
;
this
.
axis_3_Alarm
.
isCanClick
=
false
;
this
.
axis_3_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
329
,
40
);
this
.
axis_3_Alarm
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
);
this
.
axis_3_Alarm
.
Name
=
"axis_3_Alarm"
;
this
.
axis_3_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_3_Alarm
.
TabIndex
=
266
;
//
// axis_2_Alarm
//
this
.
axis_2_Alarm
.
IOName
=
""
;
this
.
axis_2_Alarm
.
IOValue
=
0
;
this
.
axis_2_Alarm
.
isCanClick
=
false
;
this
.
axis_2_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
224
,
40
);
this
.
axis_2_Alarm
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
);
this
.
axis_2_Alarm
.
Name
=
"axis_2_Alarm"
;
this
.
axis_2_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_2_Alarm
.
TabIndex
=
265
;
//
// label38
//
this
.
label38
.
AutoSize
=
true
;
...
...
@@ -2342,6 +2301,61 @@
this
.
btnUpDownP4
.
UseVisualStyleBackColor
=
false
;
this
.
btnUpDownP4
.
Click
+=
new
System
.
EventHandler
(
this
.
btnUpDownP4_Click
);
//
// lblConfigInfo
//
this
.
lblConfigInfo
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblConfigInfo
.
ForeColor
=
System
.
Drawing
.
Color
.
Blue
;
this
.
lblConfigInfo
.
Location
=
new
System
.
Drawing
.
Point
(
543
,
4
);
this
.
lblConfigInfo
.
Name
=
"lblConfigInfo"
;
this
.
lblConfigInfo
.
Size
=
new
System
.
Drawing
.
Size
(
260
,
36
);
this
.
lblConfigInfo
.
TabIndex
=
273
;
this
.
lblConfigInfo
.
Text
=
"移栽状态"
;
this
.
lblConfigInfo
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
//
// axis_4_Alarm
//
this
.
axis_4_Alarm
.
IOName
=
""
;
this
.
axis_4_Alarm
.
IOValue
=
0
;
this
.
axis_4_Alarm
.
isCanClick
=
false
;
this
.
axis_4_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
432
,
39
);
this
.
axis_4_Alarm
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
);
this
.
axis_4_Alarm
.
Name
=
"axis_4_Alarm"
;
this
.
axis_4_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_4_Alarm
.
TabIndex
=
271
;
//
// axis_1_Alarm
//
this
.
axis_1_Alarm
.
IOName
=
""
;
this
.
axis_1_Alarm
.
IOValue
=
0
;
this
.
axis_1_Alarm
.
isCanClick
=
false
;
this
.
axis_1_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
127
,
40
);
this
.
axis_1_Alarm
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
);
this
.
axis_1_Alarm
.
Name
=
"axis_1_Alarm"
;
this
.
axis_1_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_1_Alarm
.
TabIndex
=
264
;
//
// axis_3_Alarm
//
this
.
axis_3_Alarm
.
IOName
=
""
;
this
.
axis_3_Alarm
.
IOValue
=
0
;
this
.
axis_3_Alarm
.
isCanClick
=
false
;
this
.
axis_3_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
329
,
40
);
this
.
axis_3_Alarm
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
);
this
.
axis_3_Alarm
.
Name
=
"axis_3_Alarm"
;
this
.
axis_3_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_3_Alarm
.
TabIndex
=
266
;
//
// axis_2_Alarm
//
this
.
axis_2_Alarm
.
IOName
=
""
;
this
.
axis_2_Alarm
.
IOValue
=
0
;
this
.
axis_2_Alarm
.
isCanClick
=
false
;
this
.
axis_2_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
224
,
40
);
this
.
axis_2_Alarm
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
);
this
.
axis_2_Alarm
.
Name
=
"axis_2_Alarm"
;
this
.
axis_2_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_2_Alarm
.
TabIndex
=
265
;
//
// FrmStoreBox
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
96F
,
96F
);
...
...
@@ -2555,6 +2569,7 @@
private
System
.
Windows
.
Forms
.
Button
btnFcomp
;
private
System
.
Windows
.
Forms
.
Button
btnForig
;
private
System
.
Windows
.
Forms
.
Button
btnImgSave
;
private
System
.
Windows
.
Forms
.
Label
lblConfigInfo
;
}
}
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
020e8c8
...
...
@@ -58,6 +58,16 @@ namespace OnlineStore.ACSingleStore
btnFcomp
.
Visible
=
canCom
;
btnForig
.
Visible
=
canCom
;
btnImgSave
.
Visible
=
!
String
.
IsNullOrEmpty
(
store
.
Config
.
PhotoCamera_Name
);
string
text
=
""
;
if
(
store
.
Config
.
IsUse_Tray_Check
.
Equals
(
1
))
{
text
+=
"启用料叉料盘检测\r"
;
}
if
(
store
.
Config
.
IsUse_Door_Check
.
Equals
(
1
))
{
text
+=
"启用仓门口料盘检测"
;
}
lblConfigInfo
.
Text
=
text
;
LoadOk
=
true
;
}
private
void
LoadStore
()
...
...
@@ -211,6 +221,7 @@ namespace OnlineStore.ACSingleStore
chbDebug
.
Checked
=
store
.
IsDebug
;
LoadOk
=
true
;
}
lblTemp
.
Text
=
store
.
currTempStr
;
lblMoveEquipInfo
.
Text
=
"移栽状态:"
+(
LineConnect
.
CanStartOut
()
?
"可出库"
:
"不可出库"
)+
" "
+
LineConnect
.
LastUpdateTime
.
ToLongTimeString
()+
""
;
//忙碌状态不读取状态
...
...
source/ACSingleStore/记录.txt
查看文件 @
020e8c8
...
...
@@ -58,3 +58,13 @@
StoreConfig.csv增加配置:
PRO,,仓门口相机IP,Camera_IP,192.168.1.123,,,,,,,,,,,,
PRO,,拍照相机名称,PhotoCamera_Name,,,,,,,,,,,,,
20210611更新说明:
修改内容:
启用料叉检测信号为1时,出入库取料之后会若料叉料盘检测信号没亮会报警。
启用仓门口料盘检测为1时,出库到仓门口,入库开始时,若仓门检测信号没亮会报警。
StoreConfig.csv需要增加一行配置:
PRO,是否启用仓门口料盘检测信号,IsUse_Door_Check,1,,,,,,,,,,,
\ No newline at end of file
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
查看文件 @
020e8c8
...
...
@@ -88,7 +88,8 @@ PRO,(轴三)进出轴停止时可误差的脉冲数的最大值,InoutAxis_ErrorCountMax,1000,,,,,
PRO,出入库多少次,会自动重置旋转轴,Box_ResetMCount,1000,,,,,,,,,,,
PRO,出入库多少次,会自动重置所有轴操作,Box_ResetACount,100,,,,,,,,,,,
PRO,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,,,,,,
PRO,是否使用料盘检测信号,IsUse_Tray_Check,0,,,,,, ,,,,,
PRO,是否使用料叉料盘检测信号,IsUse_Tray_Check,1,,,,,,,,,,,
PRO,是否启用仓门口料盘检测信号,IsUse_Door_Check,1,,,,,,,,,,,
PRO,(轴一)旋转轴最小限位,MiddleAxis_PositionMin,0,,,,,,,,,,,
PRO,(轴二)升降轴最小限位,UpdownAxis_PositionMin,0,,,,,,,,,,,
PRO,(轴三)进出轴最小限位,InoutAxis_PositionMin,0,,,,,,,,,,,
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
020e8c8
...
...
@@ -172,11 +172,13 @@ namespace OnlineStore.DeviceLibrary
{
wait
.
IsEnd
=
IOManager
.
IOValue
(
wait
.
IoType
).
Equals
(
wait
.
IoValue
);
int
timeOutMs
=
Config
.
IOSingle_TimerOut
;
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_
29
_WaitTake
))
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_
31
_WaitTake
))
{
timeOutMs
=
650000
;
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_27_CheckTray
))
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_29_CheckTray
)
||
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_22_WaitTray
)
||
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_27_WaitDoorTray
))
{
timeOutMs
=
5000
;
}
...
...
@@ -199,7 +201,7 @@ namespace OnlineStore.DeviceLibrary
isOk
=
false
;
break
;
}
else
if
((!
wait
.
IsEnd
)
&&
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_
29
_WaitTake
)
&&
LineConnect
.
CanReSend
())
else
if
((!
wait
.
IsEnd
)
&&
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_
31
_WaitTake
)
&&
LineConnect
.
CanReSend
())
{
//判断是否需要重发入库结束命令
SendOutStoreEnd
(
StoreMove
);
...
...
@@ -295,12 +297,12 @@ namespace OnlineStore.DeviceLibrary
{
if
(!
LoadParamPosition
(
param
))
{
LogUtil
.
error
(
StoreName
+
" 启动入库【"
+
posId
+
"】出错,找不到库位信息"
);
LogUtil
.
error
(
StoreName
+
" 启动入库【"
+
posId
+
"】出错,找不到库位信息"
);
return
;
}
if
(
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
HIGH
))
{
LogUtil
.
error
(
StoreName
+
" 启动入库【"
+
posId
+
"】出错,叉子料盘检测有料"
);
LogUtil
.
error
(
StoreName
+
" 启动入库【"
+
posId
+
"】出错,叉子料盘检测有料"
);
return
;
}
LogUtil
.
info
(
LOGGER
,
StoreName
+
" 启动入库【"
+
posId
+
"】"
,
storeMoveColor
);
...
...
@@ -323,21 +325,31 @@ namespace OnlineStore.DeviceLibrary
{
doorCheckWatch
.
Stop
();
}
if
(
Config
.
IsUse_Door_Check
.
Equals
(
1
)
&&
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Door
).
Equals
(
IO_VALUE
.
LOW
))
{
//料盘检测
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_00_TrayCheck
);
InStoreLog
(
"入库:等待仓门口有料"
);
StoreMove
.
TimeOutSeconds
=
5
;
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
100
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
TrayCheck_Door
,
IO_VALUE
.
HIGH
));
}
else
{
SI_02_Move
(
param
.
MoveP
);
}
}
else
{
LogUtil
.
error
(
StoreName
+
" 启动【"
+
posId
+
"】入库出错,当前状态,storeStatus="
+
storeRunStatus
);
LogUtil
.
error
(
StoreName
+
" 启动【"
+
posId
+
"】入库出错,当前状态,storeStatus="
+
storeRunStatus
);
}
}
private
void
SI_02_Move
(
LineMoveP
moveP
)
{
InStoreLog
(
"入库:SI_02_ 进出轴(叉子)动作至P1,打开舱门"
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_02_InOutAxisHome
);
InStoreLog
(
"入库: 进出轴(叉子)动作至P1,打开舱门"
);
OpenDoor
();
InOutBackToP1
(
moveP
.
InOut_P1
);
}
...
...
@@ -400,14 +412,14 @@ namespace OnlineStore.DeviceLibrary
if
(
VisionComp
(
out
Dictionary
<
string
,
bool
>
exist
))
{
string
fileName
=
SaveComName
();
InStoreLog
(
"入库:门口检测信号不亮,但视觉识别有料盘,认为有料:"
+
fileName
);
InStoreLog
(
"入库:门口检测信号不亮,但视觉识别有料盘,认为有料:"
+
fileName
);
SI_02_Move
(
moveP
);
return
;
}
}
WarnMsg
=
StoreName
+
"入库 等待料仓门口检测到料盘 ["
+
StoreMove
.
MoveParam
.
PosInfo
.
barcode
+
"] ["
+
StoreMove
.
MoveParam
.
PosInfo
.
PosId
+
"] 超时 ["
+
Math
.
Round
(
StoreMove
.
StepSpan
().
TotalSeconds
,
1
)
+
"]秒 "
;
LogUtil
.
error
(
WarnMsg
,
100
);
LogUtil
.
error
(
WarnMsg
,
100
);
Alarm
(
StoreAlarmType
.
IoSingleTimeOut
,
""
,
WarnMsg
,
StoreMove
.
MoveType
);
}
}
...
...
@@ -416,11 +428,11 @@ namespace OnlineStore.DeviceLibrary
if
(
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Door
).
Equals
(
IO_VALUE
.
LOW
))
{
string
posId
=
StoreMove
.
MoveParam
!=
null
?
StoreMove
.
MoveParam
.
PosInfo
.
PosId
:
""
;
CodeMsg
=
""
+
posId
+
"_"
+
StoreMove
.
MoveParam
.
PosInfo
.
barcode
+
"_空入"
;
CodeMsg
=
""
+
posId
+
"_"
+
StoreMove
.
MoveParam
.
PosInfo
.
barcode
+
"_空入"
;
LogUtil
.
error
(
CodeMsg
);
}
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_03_ReturnHome
);
InStoreLog
(
"入库
:SI_03
所有轴回到待机点,升降轴到P1 ["
+
moveP
.
UpDown_P1
+
"],旋转轴到P1 ["
+
moveP
.
Middle_P1
+
"],,压紧轴到P3 ["
+
moveP
.
ComPress_P3
+
"],打开仓门"
);
InStoreLog
(
"入库
:
所有轴回到待机点,升降轴到P1 ["
+
moveP
.
UpDown_P1
+
"],旋转轴到P1 ["
+
moveP
.
Middle_P1
+
"],,压紧轴到P3 ["
+
moveP
.
ComPress_P3
+
"],打开仓门"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
ComMoveToPosition
(
moveP
.
ComPress_P3
,
Config
.
CompAxis_P3_Speed
);
...
...
@@ -430,7 +442,7 @@ namespace OnlineStore.DeviceLibrary
}
else
{
InStoreLog
(
"入库:
SI_03
升降轴已在P1["
+
moveP
.
UpDown_P1
+
"]"
);
InStoreLog
(
"入库: 升降轴已在P1["
+
moveP
.
UpDown_P1
+
"]"
);
}
if
(!
ACServerManager
.
isInPosition
(
Config
.
Middle_Axis
,
moveP
.
Middle_P1
))
{
...
...
@@ -438,7 +450,7 @@ namespace OnlineStore.DeviceLibrary
}
else
{
InStoreLog
(
"入库:
SI_03
旋转轴已在P1 ["
+
moveP
.
Middle_P1
+
"]"
);
InStoreLog
(
"入库:旋转轴已在P1 ["
+
moveP
.
Middle_P1
+
"]"
);
}
OpenDoor
();
}
...
...
@@ -453,19 +465,28 @@ namespace OnlineStore.DeviceLibrary
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_05_DeviceToDoor
)
{
//NeedCheckSafetyLight = 0;
InStoreLog
(
"入库:SI_06 拿物品,压紧轴至P2(压紧点))["
+
moveP
.
ComPress_P2
+
"] 升降轴至P7(进料口取料缓冲点) ["
+
moveP
.
UpDown_P7
+
"]"
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_06_DoorWarToDevice
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_06_GetWare
);
InStoreLog
(
"入库: 拿物品,压紧轴至P2(压紧点))["
+
moveP
.
ComPress_P2
+
"] 升降轴至P7(进料口取料缓冲点) ["
+
moveP
.
UpDown_P7
+
"]"
);
ComMoveToPosition
(
moveP
.
ComPress_P2
,
Config
.
CompAxis_P2_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P7
,
Config
.
UpDownAxis_P7_Speed
);
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_06_
DoorWarToDevic
e
)
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_06_
GetWar
e
)
{
InStoreLog
(
"入库:SI_07 叉子 从入料口抽出,进出轴至P1(待机点)["
+
moveP
.
InOut_P1
+
"] "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_07_DeviceBackFromDoor
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_07_InoutToP1
);
InStoreLog
(
"入库:进出轴至P1(待机点)["
+
moveP
.
InOut_P1
+
"] "
);
//ACAxisMove(Config.InOut_Axis, moveP.InOut_P1, Config.InOutAxis_P1_Speed);
InOutBackToP1
(
moveP
.
InOut_P1
);
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_07_DeviceBackFromDoor
)
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_07_InoutToP1
)
{
if
(
Config
.
IsUse_Tray_Check
.
Equals
(
1
)
&&
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
LOW
))
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_07_InoutToP1
);
InStoreLog
(
"入库:等待料叉有料 "
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
TrayCheck_Fixture
,
IO_VALUE
.
HIGH
));
StoreMove
.
TimeOutSeconds
=
5
;
}
else
{
if
(
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
LOW
))
{
...
...
@@ -473,56 +494,47 @@ namespace OnlineStore.DeviceLibrary
CodeMsg
=
"入库["
+
posId
+
"]叉子取料后退后,未检测到料叉有料"
;
LogUtil
.
error
(
CodeMsg
);
}
if
(
IsHasCompress_Axis
||
Config
.
IsHasLocationCylinder
.
Equals
(
0
))
{
InStoreLog
(
"入库:SI_09 移动到库位点,旋转轴至P2(库位点)["
+
moveP
.
Middle_P2
+
"], 升降轴至P3(库位入库前点)["
+
moveP
.
UpDown_P3
+
"] "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_09_MoveToBag
);
ACAxisMove
(
Config
.
Middle_Axis
,
moveP
.
Middle_P2
,
Config
.
MiddleAxis_P2_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P3
,
Config
.
UpDownAxis_P3_Speed
);
SI_11_MoveToBag
();
CloseDoor
(
false
);
}
else
{
InStoreLog
(
"入库:SI_08 定位气缸伸出 "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_08_LocationCylinder_Up
);
LocationUpAndWait
();
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_08_WaitTray
)
{
SI_11_MoveToBag
();
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_0
8_LocationCylinder_
Up
)
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_0
9_Location
Up
)
{
InStoreLog
(
"入库:SI_09 移动到库位点,旋转轴至P2(库位点)["
+
moveP
.
Middle_P2
+
"],升降轴至P3(库位入库前点))["
+
moveP
.
UpDown_P3
+
"],关闭舱门 "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_09_MoveToBag
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_11_MoveToBag
);
InStoreLog
(
"入库: 移动到库位点,旋转轴至P2(库位点)["
+
moveP
.
Middle_P2
+
"],升降轴至P3(库位入库前点))["
+
moveP
.
UpDown_P3
+
"],关闭舱门 "
);
ACAxisMove
(
Config
.
Middle_Axis
,
moveP
.
Middle_P2
,
Config
.
MiddleAxis_P1_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P3
,
Config
.
UpDownAxis_P3_Speed
);
CloseDoor
(
false
);
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_
09
_MoveToBag
)
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_
11
_MoveToBag
)
{
if
(
IsHasCompress_Axis
||
Config
.
IsHasLocationCylinder
.
Equals
(
0
))
{
InStoreLog
(
"入库:SI_11 叉子进入库位中,进出轴至P3(库位取放料点) ["
+
moveP
.
InOut_P3
+
"]"
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_11_DeviceToBag
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_13_InoutToP3
);
InStoreLog
(
"入库: 叉子进入库位中,进出轴至P3(库位取放料点) ["
+
moveP
.
InOut_P3
+
"]"
);
ACAxisMove
(
Config
.
InOut_Axis
,
moveP
.
InOut_P3
,
Config
.
InOutAxis_P3_Speed
);
}
else
{
InStoreLog
(
"入库:SI_10 定位气缸退回 "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_10_LocationCylinder_Down
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_12_LocationDown
);
InStoreLog
(
"入库: 定位气缸退回 "
);
LocationDownAndWait
();
}
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_1
0_LocationCylinder_
Down
)
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_1
2_Location
Down
)
{
//IOManager.IOMove(IO_Type.LocationCylinder_Down, IO_VALUE.LOW);
InStoreLog
(
"入库:SI_11 叉子进入库位中,进出轴至P3(库位取放料点) ["
+
moveP
.
InOut_P3
+
"] "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_11_DeviceToBag
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_13_InoutToP3
);
InStoreLog
(
"入库:叉子进入库位中,进出轴至P3(库位取放料点) ["
+
moveP
.
InOut_P3
+
"] "
);
ACAxisMove
(
Config
.
InOut_Axis
,
moveP
.
InOut_P3
,
Config
.
InOutAxis_P3_Speed
);
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_1
1_DeviceToBag
)
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_1
3_InoutToP3
)
{
InStoreLog
(
"入库:SI_12 放下物品,升降轴至P4(库位入料缓冲点)["
+
moveP
.
UpDown_P4
+
"] ,压紧轴至P3(压紧前点) ["
+
moveP
.
ComPress_P3
+
"]"
);
// 5= 入仓位完成(料仓Box把料盘放入对应的库位中,装置还未恢复原始状态)
string
posId
=
StoreMove
.
MoveParam
!=
null
?
StoreMove
.
MoveParam
.
PosInfo
.
PosId
:
""
;
lastPosId
=
posId
;
...
...
@@ -531,33 +543,34 @@ namespace OnlineStore.DeviceLibrary
//手动发给服务器状态,防止没有手动
//SendLineStatus(StoreID, posId, StoreStatus.InStoreEnd);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_12_PutWareToBag
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_14_PutWareToBag
);
InStoreLog
(
"入库: 放下物品,升降轴至P4(库位入料缓冲点)["
+
moveP
.
UpDown_P4
+
"] ,压紧轴至P3(压紧前点) ["
+
moveP
.
ComPress_P3
+
"]"
);
ComMoveToPosition
(
moveP
.
ComPress_P3
,
Config
.
CompAxis_P3_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P4
,
Config
.
UpDownAxis_P4_Speed
);
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_1
2
_PutWareToBag
)
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_1
4
_PutWareToBag
)
{
InStoreLog
(
"入库:SI_13 叉子从库位中返回,进出轴动作至P1(待机点) "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_13_InoutBack
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_15_InoutBack
);
InStoreLog
(
"入库: 叉子从库位中返回,进出轴动作至P1(待机点) "
);
InOutBackToP1
(
moveP
.
InOut_P1
);
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_1
3
_InoutBack
)
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_1
5
_InoutBack
)
{
InStoreLog
(
"入库:SI_14_GoBack 返回待机点,轴2/轴1/轴4动作至P1(待机点)),检测门关闭"
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_14_GoBack
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_16_GoBack
);
InStoreLog
(
"入库: 返回待机点,轴2/轴1/轴4动作至P1(待机点)),检测门关闭"
);
ComMoveToPosition
(
moveP
.
ComPress_P1
,
Config
.
CompAxis_P1_Speed
);
ACAxisMove
(
Config
.
Middle_Axis
,
moveP
.
Middle_P1
,
Config
.
MiddleAxis_P1_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P1
,
Config
.
UpDownAxis_P1_Speed
);
CloseDoor
();
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_1
5
_WaitNoReel
)
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_1
7
_WaitNoReel
)
{
InStoreLog
(
"入库:SI_15_WaitNoReel 等待料叉无信号 "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_15_WaitNoReel
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_17_WaitNoReel
);
InStoreLog
(
"入库: 等待料叉无信号 "
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
TrayCheck_Fixture
,
IO_VALUE
.
LOW
));
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_1
4
_GoBack
)
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_1
6
_GoBack
)
{
TimeSpan
span
=
DateTime
.
Now
-
startInStoreTime
;
string
posId
=
StoreMove
.
MoveParam
!=
null
?
StoreMove
.
MoveParam
.
PosInfo
.
PosId
:
""
;
...
...
@@ -574,6 +587,25 @@ namespace OnlineStore.DeviceLibrary
}
}
private
void
SI_11_MoveToBag
()
{
LineMoveP
moveP
=
StoreMove
.
MoveParam
.
MoveP
;
if
(
IsHasCompress_Axis
||
Config
.
IsHasLocationCylinder
.
Equals
(
0
))
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_11_MoveToBag
);
InStoreLog
(
"入库:移动到库位点,旋转轴至P2(库位点)["
+
moveP
.
Middle_P2
+
"], 升降轴至P3(库位入库前点)["
+
moveP
.
UpDown_P3
+
"] "
);
ACAxisMove
(
Config
.
Middle_Axis
,
moveP
.
Middle_P2
,
Config
.
MiddleAxis_P2_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P3
,
Config
.
UpDownAxis_P3_Speed
);
CloseDoor
(
false
);
}
else
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_09_LocationUp
);
InStoreLog
(
"入库: 定位气缸伸出 "
);
LocationUpAndWait
();
}
}
#
endregion
...
...
@@ -769,54 +801,90 @@ namespace OnlineStore.DeviceLibrary
#
endregion
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_21_ToDoorP
)
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_22_WaitNoTray
);
OutStoreLog
(
"出库定位:打开仓门,等待门口无料盘信号 "
);
//判断叉子是否有料
if
(
Config
.
IsUse_Tray_Check
.
Equals
(
1
)
&&
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
LOW
))
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_22_WaitTray
);
OutStoreLog
(
"出库:打开仓门,等待料叉有料 "
);
StoreMove
.
TimeOutSeconds
=
5
;
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
TrayCheck_Fixture
,
IO_VALUE
.
HIGH
));
OpenDoor
(
false
);
}
else
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_23_WaitNoTray
);
OutStoreLog
(
"出库:打开仓门,等待门口无料盘信号 "
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
TrayCheck_Door
,
IO_VALUE
.
LOW
));
OpenDoor
();
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_22_WaitNoTray
)
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_22_WaitTray
)
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_23_WaitNoTray
);
OutStoreLog
(
"出库:打开仓门,等待门口无料盘信号 "
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
TrayCheck_Door
,
IO_VALUE
.
LOW
));
OpenDoor
();
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_23_WaitNoTray
)
{
if
(
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Door
).
Equals
(
IO_VALUE
.
LOW
)
&&
VisionComp
(
out
Dictionary
<
string
,
bool
>
exist
))
{
string
fileName
=
SaveComName
();
LogUtil
.
error
(
StoreName
+
"_"
+
StoreMove
.
MoveStep
+
"_"
+
StoreMove
.
MoveParam
.
PosInfo
.
PosId
+
"出库:门口检测信号无料,但视觉识别有料盘:"
+
fileName
);
LogUtil
.
error
(
StoreName
+
"_"
+
StoreMove
.
MoveStep
+
"_"
+
StoreMove
.
MoveParam
.
PosInfo
.
PosId
+
"出库:门口检测信号无料,但视觉识别有料盘:"
+
fileName
);
}
SO_53_InoutToP2
();
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_2
3
_InoutToP2
)
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_2
4
_InoutToP2
)
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_2
4
_PutWare
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_2
5
_PutWare
);
OutStoreLog
(
"出库:升降轴至P8(进料口出料缓冲点) "
);
//NeedCheckSafetyLight = 0;
ComMoveToPosition
(
moveP
.
ComPress_P1
,
Config
.
CompAxis_P1_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P8
,
Config
.
UpDownAxis_P8_Speed
);
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_2
4
_PutWare
)
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_2
5
_PutWare
)
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_2
5
_InoutToP1
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_2
6
_InoutToP1
);
OutStoreLog
(
"出库:进出轴动作至P1(待机点) "
);
InOutBackToP1
(
moveP
.
InOut_P1
);
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_25_InoutToP1
)
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_26_InoutToP1
)
{
if
(
Config
.
IsUse_Door_Check
.
Equals
(
1
)
&&
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Door
).
Equals
(
IO_VALUE
.
LOW
))
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_26_CloseDoor
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_27_WaitDoorTray
);
OutStoreLog
(
"出库:等待仓门口有料"
);
StoreMove
.
TimeOutSeconds
=
5
;
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
TrayCheck_Door
,
IO_VALUE
.
HIGH
));
}
else
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_28_CloseDoor
);
OutStoreLog
(
"出库:轴2至P1(待机点) ,关闭舱门"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
ACAxisMove
(
Config
.
UpDown_Axis
,
StoreMove
.
MoveParam
.
MoveP
.
UpDown_P1
,
Config
.
UpDownAxis_P1_Speed
);
CloseDoor
();
}
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_27_WaitDoorTray
)
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_28_CloseDoor
);
OutStoreLog
(
"出库:轴2至P1(待机点) ,关闭舱门"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
ACAxisMove
(
Config
.
UpDown_Axis
,
StoreMove
.
MoveParam
.
MoveP
.
UpDown_P1
,
Config
.
UpDownAxis_P1_Speed
);
CloseDoor
();
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_2
6
_CloseDoor
)
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_2
8
_CloseDoor
)
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_2
7
_CheckTray
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_2
9
_CheckTray
);
OutStoreLog
(
"出库:检测料仓门口料盘信号 ,最多1000"
);
StoreMove
.
OneWaitCanEndStep
=
true
;
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
TrayCheck_Door
,
IO_VALUE
.
HIGH
));
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_2
7
_CheckTray
))
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_2
9
_CheckTray
))
{
if
(
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Door
).
Equals
(
IO_VALUE
.
LOW
))
{
...
...
@@ -827,7 +895,7 @@ namespace OnlineStore.DeviceLibrary
if
(
hasReel
)
{
string
fileName
=
SaveComName
();
LogUtil
.
error
(
StoreName
+
""
+
posId
+
"_"
+
barcode
+
"_料盘到仓门口未检测到信号,但视觉识别有料盘:"
+
fileName
);
LogUtil
.
error
(
StoreName
+
""
+
posId
+
"_"
+
barcode
+
"_料盘到仓门口未检测到信号,但视觉识别有料盘:"
+
fileName
);
}
else
{
...
...
@@ -845,7 +913,7 @@ namespace OnlineStore.DeviceLibrary
}
SO_28_GoBack
();
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_
28
_GoBack
)
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_
30
_GoBack
)
{
int
OutStoreWaitSeconds
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
OutStoreWaitSeconds
);
if
(
OutStoreWaitSeconds
<=
0
)
...
...
@@ -853,14 +921,14 @@ namespace OnlineStore.DeviceLibrary
OutStoreWaitSeconds
=
600
;
}
int
ms
=
OutStoreWaitSeconds
*
1000
;
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_
29
_WaitTake
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_
31
_WaitTake
);
OutStoreLog
(
"出库: 等待拿走物品,最多等待"
+
OutStoreWaitSeconds
+
"秒"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
ms
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
TrayCheck_Door
,
IO_VALUE
.
LOW
));
// StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0));
StoreMove
.
OneWaitCanEndStep
=
true
;
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_
29
_WaitTake
)
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_
31
_WaitTake
)
{
TimeSpan
span
=
DateTime
.
Now
-
startOutStoreTime
;
string
posId
=
StoreMove
.
MoveParam
!=
null
?
StoreMove
.
MoveParam
.
PosInfo
.
PosId
:
""
;
...
...
@@ -873,13 +941,13 @@ namespace OnlineStore.DeviceLibrary
}
else
{
LogUtil
.
error
(
StoreName
+
" 出库处理,moveStatus="
+
StoreMove
.
MoveStep
+
",没有对应的处理!"
);
LogUtil
.
error
(
StoreName
+
" 出库处理,moveStatus="
+
StoreMove
.
MoveStep
+
",没有对应的处理!"
);
}
}
public
bool
OutCheckAlarm
()
{
if
(
alarmType
.
Equals
(
StoreAlarmType
.
IoSingleTimeOut
)
&&
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
OutStore
)
&&
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_2
7
_CheckTray
))
if
(
alarmType
.
Equals
(
StoreAlarmType
.
IoSingleTimeOut
)
&&
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
OutStore
)
&&
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_2
9
_CheckTray
))
{
return
true
;
}
...
...
@@ -896,7 +964,7 @@ namespace OnlineStore.DeviceLibrary
}
private
void
SO_28_GoBack
()
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_
28
_GoBack
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_
30
_GoBack
);
OutStoreLog
(
"出库:发送出库完成消息给流水线"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
//ACAxisMove(Config.UpDown_Axis, StoreMove.MoveParam.MoveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
...
...
@@ -946,7 +1014,7 @@ namespace OnlineStore.DeviceLibrary
{
//判断仓门是否打开
LineMoveP
moveP
=
StoreMove
.
MoveParam
.
MoveP
;
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_2
3
_InoutToP2
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_2
4
_InoutToP2
);
OutStoreLog
(
"出库:进出轴至P2(进料口取料点) "
);
ACAxisMove
(
Config
.
InOut_Axis
,
moveP
.
InOut_P2
,
Config
.
InOutAxis_P2_Speed
);
//NeedCheckSafetyLight = 1;
...
...
@@ -954,7 +1022,7 @@ namespace OnlineStore.DeviceLibrary
else
{
InStoreLog
(
"出库:SO_09 叉子即将取料,发现门未上升到位,重新打开门 "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_2
2
_WaitNoTray
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_2
3
_WaitNoTray
);
OpenDoor
();
}
...
...
@@ -1121,13 +1189,13 @@ namespace OnlineStore.DeviceLibrary
private
void
InStoreLog
(
string
msg
)
{
string
posId
=
StoreMove
.
MoveParam
!=
null
?
StoreMove
.
MoveParam
.
PosInfo
.
PosId
:
"
"
;
LogUtil
.
info
(
LOGGER
,
"【"
+
posId
+
"】"
+
msg
,
storeMoveColor
);
string
posId
=
StoreMove
.
MoveParam
!=
null
?
"【"
+
StoreMove
.
MoveParam
.
PosInfo
.
PosId
+
"】"
:
"
"
;
LogUtil
.
info
(
LOGGER
,
posId
+
StoreMove
.
MoveStep
.
ToString
().
Substring
(
0
,
6
)
+
msg
,
storeMoveColor
);
}
private
void
OutStoreLog
(
string
msg
)
{
string
posId
=
StoreMove
.
MoveParam
!=
null
?
"【"
+
StoreMove
.
MoveParam
.
PosInfo
.
PosId
+
"】"
:
" "
;
LogUtil
.
info
(
LOGGER
,
posId
+
StoreMove
.
MoveStep
+
" "
+
msg
,
storeMoveColor
);
LogUtil
.
info
(
LOGGER
,
posId
+
StoreMove
.
MoveStep
.
ToString
().
Substring
(
0
,
6
)
+
" "
+
msg
,
storeMoveColor
);
}
}
}
source/DeviceLibrary/store/StoreStep.cs
查看文件 @
020e8c8
...
...
@@ -262,38 +262,48 @@ namespace OnlineStore.DeviceLibrary
/// 料仓出库,,所有设备运行到门,,旋转轴到P1( 待机点)升降轴到P2( 进料口出料前点)
/// </summary>
SO_21_ToDoorP
=
121
,
/// <summary>
/// 料仓出库:等待夹爪有料
/// </summary>
SO_22_WaitTray
,
/// <summary>
/// 等待门口无料盘
/// </summary>
SO_2
2
_WaitNoTray
,
SO_2
3
_WaitNoTray
,
/// <summary>
/// 料仓出库,,叉子进出料口,,进出轴到P2( 进料口取料点)
/// /// </summary>
SO_2
3
_InoutToP2
,
SO_2
4
_InoutToP2
,
/// <summary>
/// 料仓出库,,把物品放下,,升降轴到P8( 进料口出料缓冲点)压紧轴到P1( 待机点)
/// </summary>
SO_2
4
_PutWare
,
SO_2
5
_PutWare
,
/// <summary>
/// 料仓出库,,叉子从出料口返回,,轴3( 叉子) 动作至P1( 待机点)
/// </summary>
SO_25_InoutToP1
,
SO_26_InoutToP1
,
/// <summary>
/// 料仓出库:等待仓门口有料
/// </summary>
SO_27_WaitDoorTray
,
/// <summary>
/// 料仓出库,,升降轴返回,, 轴2至P1( 待机点),关闭仓门
/// </summary>
SO_2
6
_CloseDoor
,
SO_2
8
_CloseDoor
,
/// <summary>
/// 料仓出库,检测料仓门口信号
/// </summary>
SO_2
7
_CheckTray
,
SO_2
9
_CheckTray
,
/// <summary>
/// 料仓出库,,升降轴返回,, 轴2至P1( 待机点)
/// </summary>
SO_
28
_GoBack
,
SO_
30
_GoBack
,
/// <summary>
/// 等待拿走物品
/// </summary>
SO_
29
_WaitTake
,
SO_
31
_WaitTake
,
#
endregion
...
...
@@ -309,60 +319,65 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 入库。。进出轴(叉子)先返回P1
/// </summary>
SI_02_InOutAxisHome
=
202
,
SI_02_InOutAxisHome
,
/// <summary>
/// 入库。。所有轴先回到待机点,轴2、轴1 动作到P1,,轴4动作至P3
/// </summary>
SI_03_ReturnHome
=
203
,
SI_03_ReturnHome
,
/// <summary>
/// 入库。。压紧物品(有压紧轴的才需要此步骤),压紧轴到P3(压紧前点)
/// </summary>
SI_04_CompressWare
=
204
,
SI_04_CompressWare
,
/// <summary>
/// 入库。。叉子进入入料口,进出轴到P2( 进料口取料点)
/// </summary>
SI_05_DeviceToDoor
=
205
,
SI_05_DeviceToDoor
,
/// <summary>
/// 入库。。把物品放入叉子上,升降轴到P7( 进料口取料缓冲点),压紧物品(有压紧轴的才需要此步骤),压紧轴到P2(压紧点)
/// </summary>
SI_06_
DoorWarToDevice
=
206
,
SI_06_
GetWare
,
/// <summary>
/// 入库。。叉子 从入料口抽出,进出轴到P1( 待机点)
/// </summary>
SI_07_DeviceBackFromDoor
=
207
,
SI_07_InoutToP1
,
/// <summary>
/// 入库:等待叉子有料
/// </summary>
SI_08_WaitTray
,
/// <summary>
/// 入库。。,定位气缸伸出 (有压紧轴的不需要此步骤)
/// </summary>
SI_0
8_LocationCylinder_Up
=
208
,
SI_0
9_LocationUp
,
/// <summary>
/// 入库。。移动到库位点,旋转轴到P2( 库位点)升降轴到P3(库位入库前点)
/// </summary>
SI_
09_MoveToBag
=
209
,
SI_
11_MoveToBag
,
/// <summary>
/// 入库。。定位气缸退回 (有压紧轴的不需要此步骤)
/// </summary>
SI_1
0_LocationCylinder_Down
=
210
,
SI_1
2_LocationDown
,
/// <summary>
/// 入库。。叉子进入库位中,进出轴到P3(库位取放料点)
/// </summary>
SI_1
1_DeviceToBag
=
211
,
SI_1
3_InoutToP3
,
/// <summary>
/// 入库。。放下物品,升降轴到P4( 库位入料缓冲点)压紧轴到P3( 压紧前点)
/// </summary>
SI_1
2_PutWareToBag
=
212
,
SI_1
4_PutWareToBag
,
/// <summary>
/// 入库。。叉子从库位中返回,轴3( 叉子) 动作至P1( 待机点)
/// </summary>
SI_1
3
_InoutBack
,
SI_1
5
_InoutBack
,
/// <summary>
/// 入库。。返回待机点,轴2/轴1/轴4动作至P1( 待机点))开始
/// </summary>
SI_1
4
_GoBack
,
SI_1
6
_GoBack
,
/// <summary>
/// 入库。等待叉子无信号
/// </summary>
SI_1
5
_WaitNoReel
,
SI_1
7
_WaitNoReel
,
#
endregion
...
...
source/LoadCVSLibrary/storeConfig/config/AC_SA_Config.cs
查看文件 @
020e8c8
...
...
@@ -332,6 +332,12 @@ namespace OnlineStore.LoadCSVLibrary
[
ConfigProAttribute
(
"IsUse_Tray_Check"
)]
public
int
IsUse_Tray_Check
{
get
;
set
;
}
/// <summary>
/// PRO,是否使用仓门料盘检测信号,IsUse_Door_Check,0,,,,,, ,,,,,
/// </summary>
[
ConfigProAttribute
(
"IsUse_Door_Check"
)]
public
int
IsUse_Door_Check
{
get
;
set
;
}
/// <summary>
///轴2升降轴 运动上下轴
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论