Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
RC1271-DUOStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 4f262f65
由
LN
编写于
2020-07-13 11:19:13 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
料仓内部逻辑
1 个父辈
140cc20a
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
235 行增加
和
152 行删除
doc/马来西亚DUO料仓电器BOM.xlsx
source/DUOStore/FrmBox.Designer.cs
source/DUOStore/FrmBox.cs
source/DeviceLibrary/StoreConfig/StoreConfig.csv
source/DeviceLibrary/duoStore/BoxBean.cs
source/DeviceLibrary/duoStore/BoxBean_Partial.cs
source/DeviceLibrary/duoStore/BoxBean_Shelf.cs
source/DeviceLibrary/duoStore/StoreManager.cs
source/DeviceLibrary/store/InOutParam.cs
source/DeviceLibrary/store/KTK_Store.cs
source/DeviceLibrary/store/StoreStep.cs
source/DeviceLibrary/store/model/StoreMoveInfo.cs
source/LoadCVSLibrary/storeConfig/config/IO_Type.cs
doc/马来西亚DUO料仓电器BOM.xlsx
查看文件 @
4f262f6
此文件类型无法预览
source/DUOStore/FrmBox.Designer.cs
查看文件 @
4f262f6
此文件的差异被折叠,
点击展开。
source/DUOStore/FrmBox.cs
查看文件 @
4f262f6
...
...
@@ -211,11 +211,10 @@ namespace OnlineStore.DUOStore
{
if
(
BoxBean
.
storeRunStatus
>=
StoreRunStatus
.
HomeMoving
)
{
//string selectPositionNum = cmbPosition.Text;
//string sleShelfNum = cmbShelfPosition.Text;
//LineMoveP ktk = LoadPostion();
//InOutParam param = new InOutParam("", selectPositionNum, sleShelfNum, ktk);
//BoxBean.StartOutStoreMove(param);
string
selectPositionNum
=
cmbPosition
.
Text
;
LineMoveP
ktk
=
LoadPostion
();
InOutParam
param
=
new
InOutParam
(
""
,
selectPositionNum
,
ktk
);
BoxBean
.
StartOutStoreMove
(
param
);
}
else
{
...
...
@@ -227,10 +226,9 @@ namespace OnlineStore.DUOStore
{
if
(
BoxBean
.
storeRunStatus
>=
StoreRunStatus
.
HomeMoving
)
{
//string selectPositionNum = cmbPosition.Text;
//string sleShelfNum = cmbShelfPosition.Text;
//LineMoveP ktk = LoadPostion();
//BoxBean.StartInStoreMove(new InOutParam("", selectPositionNum, sleShelfNum, ktk));
string
selectPositionNum
=
cmbPosition
.
Text
;
LineMoveP
ktk
=
LoadPostion
();
BoxBean
.
StartInStoreMove
(
new
InOutParam
(
""
,
selectPositionNum
,
ktk
));
}
else
{
...
...
@@ -801,5 +799,34 @@ namespace OnlineStore.DUOStore
{
BoxBean
.
CylinderMove
(
null
,
IO_Type
.
OutDoor_Up
,
IO_Type
.
OutDoor_Down
);
}
private
void
btnNgPro_Click
(
object
sender
,
EventArgs
e
)
{
if
(
BoxBean
.
storeRunStatus
>=
StoreRunStatus
.
HomeMoving
)
{
string
selectPositionNum
=
cmbPosition
.
Text
;
LineMoveP
ktk
=
LoadPostion
();
BoxBean
.
StartInStoreMove
(
new
InOutParam
(
""
,
selectPositionNum
,
ktk
,
1
));
}
else
{
MessageBox
.
Show
(
"请先启动料仓!"
);
}
}
private
void
btnSingleOut_Click
(
object
sender
,
EventArgs
e
)
{
if
(
BoxBean
.
storeRunStatus
>=
StoreRunStatus
.
HomeMoving
)
{
string
selectPositionNum
=
cmbPosition
.
Text
;
LineMoveP
ktk
=
LoadPostion
();
InOutParam
param
=
new
InOutParam
(
""
,
selectPositionNum
,
ktk
,
1
);
BoxBean
.
StartOutStoreMove
(
param
);
}
else
{
MessageBox
.
Show
(
"请先启动料仓!"
);
}
}
}
}
source/DeviceLibrary/StoreConfig/StoreConfig.csv
查看文件 @
4f262f6
...
...
@@ -51,14 +51,14 @@ DI,0,取料气缸放松端,ClampCylinder_Relax,2,PRO_AIO_IP_2,X23,,,,,,,,,,
DI,0,取料气缸夹紧端,ClampCylinder_Clamp,3,PRO_AIO_IP_2,X24,,,,,,,,,,
DI,1,左侧出料口安全光栅,OutDoor_SafeSignal,4,PRO_AIO_IP_2,X25,,,,,,,,,,
DI,1,左侧暂存区料盘检测,InDoor_Check,5,PRO_AIO_IP_2,X26,,,,,,,,,,
DI,1,左侧出料口门上升端,OutDoor_Up,6,PRO_AIO_IP_2,X27,,,,,,,,,,
DI,1,左侧出料口门下降端,OutDoor_Down,7,PRO_AIO_IP_2,X28,,,,,,,,,,
DI,1,左侧出料口门上升
/打开
端,OutDoor_Up,6,PRO_AIO_IP_2,X27,,,,,,,,,,
DI,1,左侧出料口门下降
/关闭
端,OutDoor_Down,7,PRO_AIO_IP_2,X28,,,,,,,,,,
DI,1,左侧出料口料盘检测,OutDoor_Check,8,PRO_AIO_IP_2,X29,,,,,,,,,,
DI,1,左侧料叉料盘检测,Fixture_Check,9,PRO_AIO_IP_2,X30,,,,,,,,,,
DI,2,右侧出料口安全光栅,OutDoor_SafeSignal,10,PRO_AIO_IP_2,X31,,,,,,,,,,
DI,2,右侧暂存区料盘检测,InDoor_Check,11,PRO_AIO_IP_2,X32,,,,,,,,,,
DI,2,右侧出料口门上升端,OutDoor_Up,12,PRO_AIO_IP_2,X33,,,,,,,,,,
DI,2,右侧出料口门下降端,OutDoor_Down,13,PRO_AIO_IP_2,X34,,,,,,,,,,
DI,2,右侧出料口门上升
/打开
端,OutDoor_Up,12,PRO_AIO_IP_2,X33,,,,,,,,,,
DI,2,右侧出料口门下降
/关闭
端,OutDoor_Down,13,PRO_AIO_IP_2,X34,,,,,,,,,,
DI,2,右侧料叉料盘检测,OutDoor_Check,14,PRO_AIO_IP_2,X35,,,,,,,,,,
DI,2,右侧出料口料盘检测,Fixture_Check,15,PRO_AIO_IP_2,X36,,,,,,,,,,
,,,,,,,,,,,,,,,,
...
...
@@ -74,10 +74,10 @@ DO,0,线体顶升气缸上升SOL,TopCylinder_Up,8,PRO_AIO_IP_2,Y29,,,,,,,,,,
DO,0,线体顶升气缸下降SOL,TopCylinder_Down,9,PRO_AIO_IP_2,Y30,,,,,,,,,,
DO,0,取料气缸放松SOL,ClampCylinder_Relax,10,PRO_AIO_IP_2,Y31,,,,,,,,,,
DO,0,取料气缸夹紧SOL,ClampCylinder_Clamp,11,PRO_AIO_IP_2,Y32,,,,,,,,,,
DO,1,左侧出料口门上升SOL,OutDoor_Up,12,PRO_AIO_IP_2,Y33,,,,,,,,,,
DO,1,左侧出料口门下降SOL,OutDoor_Down,13,PRO_AIO_IP_2,Y34,,,,,,,,,,
DO,2,右侧出料口门上升SOL,OutDoor_Up,14,PRO_AIO_IP_2,Y35,,,,,,,,,,
DO,2,右侧出料口门下降SOL,OutDoor_Down,15,PRO_AIO_IP_2,Y36,,,,,,,,,,
DO,1,左侧出料口门上升
/打开
SOL,OutDoor_Up,12,PRO_AIO_IP_2,Y33,,,,,,,,,,
DO,1,左侧出料口门下降
/关闭
SOL,OutDoor_Down,13,PRO_AIO_IP_2,Y34,,,,,,,,,,
DO,2,右侧出料口门上升
/打开
SOL,OutDoor_Up,14,PRO_AIO_IP_2,Y35,,,,,,,,,,
DO,2,右侧出料口门下降
/关闭
SOL,OutDoor_Down,15,PRO_AIO_IP_2,Y36,,,,,,,,,,
,,,,,,,,,,,,,,,,
DI,0,取料气缸料盘检测,ClampCylinder_Check,0,PRO_AIO_IP_3,X41,,,,,,,,,,
DI,0,线体出口放行信号,LineOut_BTN,1,PRO_AIO_IP_3,X42,,,,,,,,,,
...
...
source/DeviceLibrary/duoStore/BoxBean.cs
查看文件 @
4f262f6
...
...
@@ -30,30 +30,27 @@ namespace OnlineStore.DeviceLibrary
public
List
<
string
>
PositionNumList
=
new
List
<
string
>();
public
HumitureBean
humBean
=
null
;
private
System
.
Timers
.
Timer
serverConnectTimer
=
new
System
.
Timers
.
Timer
();
private
System
.
Timers
.
Timer
IoCheckTimer
=
new
System
.
Timers
.
Timer
();
private
int
logType
=
1000
;
public
AxisBean
UpdownAxis
=
null
;
public
AxisBean
MiddleAxis
=
null
;
public
AxisBean
ComAxis
=
null
;
public
AxisBean
InoutAxis
=
null
;
/// <summary>
/// 出料口最后一盘料信息,0=暂无,1=单盘出库料亮绿灯,2=入库NG料亮红灯
/// </summary>
public
int
OutDoorReelType
=
0
;
public
BoxBean
(
BOX_Config
config
)
{
Init
();
baseConfig
=
config
;
CID
=
config
.
CID
;
serverConnectTimer
=
new
System
.
Timers
.
Timer
();
serverConnectTimer
.
Interval
=
1000
;
serverConnectTimer
.
AutoReset
=
true
;
serverConnectTimer
.
Enabled
=
false
;
serverConnectTimer
.
Elapsed
+=
server_connect_timer_Tick
;
IoCheckTimer
=
new
System
.
Timers
.
Timer
();
IoCheckTimer
.
Interval
=
200
;
IoCheckTimer
.
AutoReset
=
true
;
IoCheckTimer
.
Enabled
=
false
;
IoCheckTimer
.
Elapsed
+=
IoCheckTimer_Elapsed
;
serverConnectTimer
.
Elapsed
+=
server_connect_timer_Tick
;
logType
=
1000
*
config
.
Id
;
//添加调试
IsDebug
=
config
.
IsInDebug
.
Equals
(
1
);
...
...
@@ -111,7 +108,6 @@ namespace OnlineStore.DeviceLibrary
public
void
MoveAxisConfig
()
{
Config
.
UpDown_Axis
.
BreakOnDO
=
IO_Type
.
UpdownAxis_Break
;
moveAxisList
=
new
List
<
ConfigMoveAxis
>();
moveAxisList
.
Add
(
Config
.
Middle_Axis
);
moveAxisList
.
Add
(
Config
.
UpDown_Axis
);
...
...
@@ -242,7 +238,7 @@ namespace OnlineStore.DeviceLibrary
case
StoreMoveStep
.
BOX_H01_InOutBack
:
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BOX_H02_InoutToP1
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
LogInfo
(
MoveInfo
.
MoveType
+
": ,进出轴到待机点P1,关闭仓
们
"
);
LogInfo
(
MoveInfo
.
MoveType
+
": ,进出轴到待机点P1,关闭仓
门
"
);
InoutAxis
.
AbsMove
(
MoveInfo
,
Config
.
InOutAxis_P1
,
Config
.
InOutAxis_P1_Speed
);
CylinderMove
(
MoveInfo
,
IO_Type
.
OutDoor_Up
,
IO_Type
.
OutDoor_Down
);
break
;
...
...
@@ -354,8 +350,7 @@ namespace OnlineStore.DeviceLibrary
storeStatus
=
StoreStatus
.
SuddenStop
;
}
}
private
bool
InProcess
=
false
;
//private DateTime preProcessTime = DateTime.Now;
private
bool
InProcess
=
false
;
private
bool
IsChongfu
=
false
;
private
Stopwatch
stopwatch
=
new
Stopwatch
();
protected
override
void
timersTimer_Elapsed
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
...
...
source/DeviceLibrary/duoStore/BoxBean_Partial.cs
查看文件 @
4f262f6
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/duoStore/BoxBean_Shelf.cs
查看文件 @
4f262f6
...
...
@@ -42,6 +42,36 @@ namespace OnlineStore.DeviceLibrary
SendLineStatus
();
}
if
(
OutDoorReelType
.
Equals
(
1
))
{
IOMove
(
IO_Type
.
DoorLed_Red
,
IO_VALUE
.
LOW
,
true
);
if
(
IOValue
(
IO_Type
.
DoorLed_Green
).
Equals
(
IO_VALUE
.
LOW
))
{
IOMove
(
IO_Type
.
DoorLed_Green
,
IO_VALUE
.
HIGH
);
}
else
{
IOMove
(
IO_Type
.
DoorLed_Green
,
IO_VALUE
.
LOW
);
}
}
else
if
(
OutDoorReelType
.
Equals
(
2
))
{
IOMove
(
IO_Type
.
DoorLed_Green
,
IO_VALUE
.
LOW
,
true
);
if
(
IOValue
(
IO_Type
.
DoorLed_Red
).
Equals
(
IO_VALUE
.
LOW
))
{
IOMove
(
IO_Type
.
DoorLed_Red
,
IO_VALUE
.
HIGH
);
}
else
{
IOMove
(
IO_Type
.
DoorLed_Red
,
IO_VALUE
.
LOW
);
}
}
else
{
IOMove
(
IO_Type
.
DoorLed_Green
,
IO_VALUE
.
LOW
,
true
);
IOMove
(
IO_Type
.
DoorLed_Red
,
IO_VALUE
.
LOW
,
true
);
}
}
catch
(
Exception
ex
)
{
...
...
source/DeviceLibrary/duoStore/StoreManager.cs
查看文件 @
4f262f6
...
...
@@ -178,7 +178,7 @@ namespace OnlineStore.DeviceLibrary
#
region
位置加载
public
static
bool
LoadInoutParam
(
InOutParam
param
,
bool
needCheckShelf
,
BoxBean
box
)
public
static
bool
LoadInoutParam
(
InOutParam
param
,
MoveType
movetype
,
bool
needCheckShelf
,
BoxBean
box
)
{
if
(
param
==
null
)
{
...
...
@@ -188,13 +188,27 @@ namespace OnlineStore.DeviceLibrary
if
(
param
.
MoveP
==
null
)
{
LineMoveP
p
=
new
LineMoveP
();
p
.
ComPress_P1
=
box
.
Config
.
CompAxis_P1
;
p
.
InOut_P1
=
box
.
Config
.
InOutAxis_P1
;
p
.
Middle_P1
=
box
.
Config
.
MiddleAxis_P1
;
p
.
InOut_P2
=
box
.
Config
.
InOutAxis_P2
;
p
.
UpDown_P1
=
box
.
Config
.
UpDownAxis_P1
;
// p.UpDown_P8 = box.Config.UpDownAxis_DoorIBPosition_P8;
p
.
UpDown_P2
=
box
.
Config
.
UpDownAxis_P2
;
// p.UpDown_P7 = box.Config.UpDownAxis_DoorOBPosition_P7;
ACBoxPosition
position
=
CSVPositionReader
<
ACBoxPosition
>.
GetPositon
(
param
.
PosID
);
if
(
position
==
null
)
{
if
(
movetype
.
Equals
(
MoveType
.
InStore
)
&&
param
.
TargetPosition
.
Equals
(
1
))
{
return
true
;
}
LogUtil
.
error
(
box
.
Name
+
"GetPositon["
+
param
.
PosID
+
"]=null,没有库位不能执行出入库"
);
return
false
;
}
if
(
String
.
IsNullOrEmpty
(
param
.
PlateH
))
{
param
.
PlateH
=
position
.
BagHigh
.
ToString
();
...
...
@@ -203,23 +217,6 @@ namespace OnlineStore.DeviceLibrary
{
param
.
PlateW
=
position
.
BagWidth
.
ToString
();
}
p
.
ComPress_P1
=
box
.
Config
.
CompAxis_P1
;
p
.
InOut_P1
=
box
.
Config
.
InOutAxis_P1
;
p
.
Middle_P1
=
box
.
Config
.
MiddleAxis_P1
;
p
.
InOut_P2
=
box
.
Config
.
InOutAxis_P2
;
p
.
UpDown_P1
=
box
.
Config
.
UpDownAxis_P1
;
// p.UpDown_P8 = box.Config.UpDownAxis_DoorIBPosition_P8;
p
.
UpDown_P2
=
box
.
Config
.
UpDownAxis_P2
;
// p.UpDown_P7 = box.Config.UpDownAxis_DoorOBPosition_P7;
//p.InOut_P11 = box.Config.InOutAxis_P11 ;
//p.Middle_P11 = box.Config.MiddleAxis_P11;
//p.UpDown_P11 = box.Config.UpDownAxis_P11;
//p.UpDown_P12 = box.Config.UpDownAxis_P12;
p
.
ComPress_P2
=
box
.
Config
.
GetComP2
(
position
.
BagHigh
);
p
.
ComPress_P3
=
box
.
Config
.
CompAxis_P3
;
p
.
InOut_P3
=
position
.
InoutAxis_P3
;
...
...
source/DeviceLibrary/store/InOutParam.cs
查看文件 @
4f262f6
...
...
@@ -6,30 +6,32 @@ using System.Collections.Generic;
using
System.Linq
;
using
System.Reflection
;
using
System.Text
;
namespace
OnlineStore.DeviceLibrary
{
{
public
class
InOutParam
{
public
InOutParam
(
string
wareNo
=
""
,
string
posId
=
""
,
string
platew
=
""
,
string
plateh
=
""
)
{
public
InOutParam
(
string
wareNo
=
""
,
string
posId
=
""
,
string
platew
=
""
,
string
plateh
=
""
,
int
targetP
=
0
)
{
WareCode
=
wareNo
;
PosID
=
posId
;
MoveP
=
null
;
this
.
PlateW
=
platew
;
this
.
PlateH
=
plateh
;
}
public
InOutParam
(
string
wareNo
,
string
posId
,
string
ShelfPosID
,
LineMoveP
linePosition
)
{
WareCode
=
wareNo
;
this
.
PlateH
=
plateh
;
this
.
TargetPosition
=
targetP
;
}
public
InOutParam
(
string
wareNo
,
string
posId
,
LineMoveP
linePosition
,
int
targetP
=
0
)
{
WareCode
=
wareNo
;
PosID
=
posId
;
MoveP
=
linePosition
;
MoveP
=
linePosition
;
this
.
TargetPosition
=
targetP
;
}
}
public
InOutParam
NewParam
()
{
InOutParam
newp
=
new
InOutParam
(
WareCode
,
PosID
,
PlateW
,
PlateH
);
InOutParam
newp
=
new
InOutParam
(
WareCode
,
PosID
,
PlateW
,
PlateH
);
return
newp
;
}
/// <summary>
...
...
@@ -40,17 +42,23 @@ namespace OnlineStore.DeviceLibrary
/// 位置坐标名(对应配置表的位置)
/// </summary>
public
string
PosID
{
get
;
set
;
}
public
LineMoveP
MoveP
{
get
;
set
;
}
/// <summary>
/// 料盘高度
/// </summary>
public
string
PlateH
{
get
;
set
;
}
public
string
PlateH
{
get
;
set
;
}
/// <summary>
/// 料盘宽度
/// </summary>
public
string
PlateW
{
get
;
set
;
}
/// <summary>
/// 出入库目标位置,
/// 0=出库表示批量出料,入库表示目标库位
/// 1=紧急出料到NG口,入库NG送到NG口
/// </summary>
public
int
TargetPosition
=
0
;
/// <summary>
/// 根据PosId获取对应的料仓ID,若PosId=="",返回-1
/// </summary>
...
...
@@ -68,7 +76,7 @@ namespace OnlineStore.DeviceLibrary
string
[]
arr
=
posId
.
Split
(
'#'
);
if
(
arr
.
Length
>=
2
)
{
return
int
.
Parse
(
arr
[
0
]);
return
int
.
Parse
(
arr
[
0
]);
}
else
{
...
...
@@ -85,54 +93,8 @@ namespace OnlineStore.DeviceLibrary
public
string
ToStr
()
{
return
" 库位 ["
+
PosID
+
"] ["
+
WareCode
+
"], ["
+
PlateW
+
"x"
+
PlateH
+
"] "
;
}
internal
void
UpdatePosId
(
string
message
,
string
posId
,
string
plateW
,
string
plateH
,
int
comP2
,
int
comP3
)
{
this
.
WareCode
=
message
;
this
.
PosID
=
posId
;
this
.
PlateH
=
plateH
;
this
.
PlateW
=
plateW
;
ACBoxPosition
position
=
CSVPositionReader
<
ACBoxPosition
>.
GetPositon
(
posId
);
if
(
position
==
null
)
{
LogUtil
.
error
(
"GetPositon["
+
posId
+
"] =null,没有库位不能执行出入库"
);
}
MoveP
.
ComPress_P2
=
comP2
;
MoveP
.
ComPress_P3
=
comP3
;
MoveP
.
InOut_P3
=
position
.
InoutAxis_P3
;
MoveP
.
Middle_P2
=
position
.
MiddleAxis_P2
;
MoveP
.
UpDown_P3
=
position
.
UpdownAxis_IH_P3
;
MoveP
.
UpDown_P4
=
position
.
UpdownAxis_IL_P4
;
MoveP
.
UpDown_P5
=
position
.
UpdownAxis_OH_P5
;
MoveP
.
UpDown_P6
=
position
.
UpdownAxis_OL_P6
;
}
internal
void
UpdatePosIdAndShelfId
(
string
wareNo
,
string
rfid
,
string
posId
)
{
WareCode
=
wareNo
;
PosID
=
posId
;
ACBoxPosition
position
=
CSVPositionReader
<
ACBoxPosition
>.
GetPositon
(
posId
);
if
(
position
==
null
)
{
LogUtil
.
error
(
"GetPositon["
+
posId
+
"] =null,没有库位不能执行出入库"
);
}
//MoveP.ComPress_P2 = comP2;
//MoveP.ComPress_P3 = comP3;
MoveP
.
InOut_P3
=
position
.
InoutAxis_P3
;
MoveP
.
Middle_P2
=
position
.
MiddleAxis_P2
;
MoveP
.
UpDown_P3
=
position
.
UpdownAxis_IH_P3
;
MoveP
.
UpDown_P4
=
position
.
UpdownAxis_IL_P4
;
MoveP
.
UpDown_P5
=
position
.
UpdownAxis_OH_P5
;
MoveP
.
UpDown_P6
=
position
.
UpdownAxis_OL_P6
;
}
}
}
}
source/DeviceLibrary/store/KTK_Store.cs
查看文件 @
4f262f6
...
...
@@ -39,11 +39,10 @@ namespace OnlineStore.DeviceLibrary
/// 料仓状态
/// </summary>
private
StoreRunStatus
storerunstatus
=
StoreRunStatus
.
Wait
;
/// <summary>
/// 定时器
/// </summary>
protected
System
.
Timers
.
Timer
mainTimer
;
protected
System
.
Timers
.
Timer
serverConnectTimer
=
new
System
.
Timers
.
Timer
();
protected
System
.
Timers
.
Timer
IoCheckTimer
=
new
System
.
Timers
.
Timer
();
private
bool
isInit
=
false
;
public
bool
IsDebug
=
false
;
...
...
@@ -231,12 +230,22 @@ namespace OnlineStore.DeviceLibrary
{
if
(!
isInit
)
{
mainTimer
=
new
System
.
Timers
.
Timer
();
mainTimer
.
Enabled
=
false
;
mainTimer
.
Interval
=
300
;
mainTimer
.
Elapsed
+=
timersTimer_Elapsed
;
mainTimer
.
AutoReset
=
true
;
serverConnectTimer
=
new
System
.
Timers
.
Timer
();
serverConnectTimer
.
Interval
=
1000
;
serverConnectTimer
.
AutoReset
=
true
;
serverConnectTimer
.
Enabled
=
false
;
IoCheckTimer
=
new
System
.
Timers
.
Timer
();
IoCheckTimer
.
Interval
=
200
;
IoCheckTimer
.
AutoReset
=
true
;
IoCheckTimer
.
Enabled
=
false
;
isInit
=
true
;
}
}
...
...
@@ -361,10 +370,14 @@ namespace OnlineStore.DeviceLibrary
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IoHighType
,
IO_VALUE
.
HIGH
));
}
}
public
void
IOMove
(
string
IoType
,
IO_VALUE
value
)
public
void
IOMove
(
string
IoType
,
IO_VALUE
value
,
bool
isCheck
=
false
)
{
if
(
isCheck
&&
(
IOValue
(
IoType
).
Equals
(
value
)))
{
return
;
}
IOManager
.
IOMove
(
IoType
,
value
,
baseConfig
.
Id
);
}
}
public
IO_VALUE
IOValue
(
string
IoType
)
{
return
IOManager
.
IOValue
(
IoType
,
baseConfig
.
Id
);
...
...
@@ -381,8 +394,18 @@ namespace OnlineStore.DeviceLibrary
}
protected
void
InOutStoreLog
(
string
msg
)
{
string
type
=
""
;
if
(
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
OutStore
))
{
type
=
"出库"
;
}
else
if
(
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
InStore
))
{
type
=
"入库"
;
}
string
posId
=
MoveInfo
.
MoveParam
!=
null
?
"["
+
MoveInfo
.
MoveParam
.
PosID
+
"]"
:
""
;
LogInfo
(
" "
+
posId
+
" :"
+
msg
);
LogInfo
(
posId
+
" "
+
MoveInfo
.
SLog
+
":"
+
msg
);
}
protected
int
GetAlarmCodeByAxis
(
ConfigMoveAxis
axis
)
{
...
...
source/DeviceLibrary/store/StoreStep.cs
查看文件 @
4f262f6
...
...
@@ -449,49 +449,74 @@ namespace OnlineStore.DeviceLibrary
#
region
料仓内部入库步骤
200
开始
/// <summary>
/// 入库
,。
进出轴返回P1
/// 入库
:
进出轴返回P1
/// </summary>
SI_01_InoutToP1
=
201
,
SI_01_InoutToP1
=
201
,
/// <summary>
/// 入库
。
升降轴,旋转轴到P1,压紧轴到P3
/// 入库
:
升降轴,旋转轴到P1,压紧轴到P3
/// </summary>
SI_02_AxisBack
,
/// <summary>
/// 入库
。
进出轴到P2( 进料口取料点)
/// 入库
:
进出轴到P2( 进料口取料点)
/// </summary>
SI_03_InoutToP2
,
SI_03_InoutToP2
,
/// <summary>
/// 入库
。
升降轴到P7( 进料口取料缓冲点)压紧轴到P2(压紧点)
/// 入库
:
升降轴到P7( 进料口取料缓冲点)压紧轴到P2(压紧点)
/// </summary>
SI_04_Get
Ware
,
SI_04_Get
Reel
,
/// <summary>
/// 入库
。
进出轴返回P1
/// 入库
:
进出轴返回P1
/// </summary>
SI_05_InoutToP1
,
SI_05_InoutToP1
,
/// <summary>
/// 入库
。。
移动到库位点,旋转轴到P2( 库位点),升降轴到P3(库位入库前点)
/// 入库
:
移动到库位点,旋转轴到P2( 库位点),升降轴到P3(库位入库前点)
/// </summary>
SI_06_To
Bag
,
SI_06_To
Pos
,
/// <summary>
/// 入库
。。
进出轴到P3(库位取放料点)
/// 入库
:
进出轴到P3(库位取放料点)
/// </summary>
SI_07_InoutToP3
,
SI_07_InoutToP3
,
/// <summary>
/// 入库
。
升降轴到P4( 库位入料缓冲点)压紧轴到P3( 压紧前点)
/// 入库
:
升降轴到P4( 库位入料缓冲点)压紧轴到P3( 压紧前点)
/// </summary>
SI_08_Put
Ware
,
SI_08_Put
Reel
,
/// <summary>
/// 入库
。
进出轴返回P1
/// 入库
:
进出轴返回P1
/// </summary>
SI_09_InoutToP1
,
SI_09_InoutToP1
,
/// <summary>
/// 入库
。
旋转轴,升降轴,压紧轴到待机点P1
/// 入库
:
旋转轴,升降轴,压紧轴到待机点P1
/// </summary>
SI_10_GoBack
,
SI_10_GoBack
,
/// <summary>
/// 入库NG料:移动到出料口,旋转轴到P11,升降轴到P12高点
/// </summary>
SI_21_ToOutDoor
,
/// <summary>
/// 入库NG料:打开出料口门
/// </summary>
SI_22_OpenOutDoor
,
/// <summary>
/// 入库NG料:进出轴到_P11-出料口取放料点
/// </summary>
SI_23_InoutToP11
,
/// <summary>
/// 入库NG料:升降轴到_P11-出料口-低点,压紧轴到压紧前点P3
/// </summary>
SI_24_PurReel
,
/// <summary>
/// 入库NG料:进出轴返回待机点P1
/// </summary>
SI_25_InoutToP1
,
/// <summary>
/// 入库NG料:升降轴,旋转轴,压紧轴返回P1,关闭出料口门
/// </summary>
SI_26_GoBack
,
#
endregion
#
region
料仓内部出库
500
开始
...
...
@@ -543,7 +568,34 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 料仓出库:升降轴,旋转轴到待机点P1
/// </summary>
SO_10_GoBack
,
SO_10_GoBack
,
/// <summary>
/// 单盘出库:移动到出料口,旋转轴到P11,升降轴到P12高点
/// </summary>
SO_21_ToOutDoor
,
/// <summary>
/// 单盘出库:打开出料口门
/// </summary>
SO_22_OpenOutDoor
,
/// <summary>
/// 单盘出库:进出轴到_P11-出料口取放料点
/// </summary>
SO_23_InoutToP11
,
/// <summary>
/// 单盘出库:升降轴到_P11-出料口-低点,压紧轴到压紧前点P3
/// </summary>
SO_24_PurReel
,
/// <summary>
/// 单盘出库:进出轴返回待机点P1
/// </summary>
SO_25_InoutToP1
,
/// <summary>
/// 单盘出库:升降轴,旋转轴,压紧轴返回P1,关闭出料口门
/// </summary>
SO_26_GoBack
,
#
endregion
}
...
...
source/DeviceLibrary/store/model/StoreMoveInfo.cs
查看文件 @
4f262f6
...
...
@@ -60,9 +60,7 @@ namespace OnlineStore.DeviceLibrary
}
public
int
ErrorLogType
{
get
;
internal
set
;
}
public
bool
SingleInstore
=
false
;
public
void
NextMoveStep
(
StoreMoveStep
step
)
{
// PreMoveStep = moveStep;
...
...
@@ -92,7 +90,6 @@ namespace OnlineStore.DeviceLibrary
this
.
MoveParam
=
param
;
LastSetpTime
=
DateTime
.
Now
;
WaitList
=
new
List
<
WaitResultInfo
>();
SingleInstore
=
false
;
}
public
void
EndMove
()
{
...
...
source/LoadCVSLibrary/storeConfig/config/IO_Type.cs
查看文件 @
4f262f6
...
...
@@ -178,11 +178,11 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
public
static
string
InDoor_Check
=
"InDoor_Check"
;
/// <summary>
/// DI,1,左侧出料口门上升端,OutDoor_Up,6,PRO_AOI_IP_2,X27,
/// DI,1,左侧出料口门上升
/打开
端,OutDoor_Up,6,PRO_AOI_IP_2,X27,
/// </summary>
public
static
string
OutDoor_Up
=
"OutDoor_Up"
;
/// <summary>
/// DI,1,左侧出料口门下降端,OutDoor_Down,7,PRO_AOI_IP_2,X28,
/// DI,1,左侧出料口门下降
/关闭
端,OutDoor_Down,7,PRO_AOI_IP_2,X28,
/// </summary>
public
static
string
OutDoor_Down
=
"OutDoor_Down"
;
/// <summary>
...
...
@@ -202,11 +202,11 @@ namespace OnlineStore.LoadCSVLibrary
///// </summary>
//public static string InDoor_Check = "InDoor_Check";
///// <summary>
///// DI,2,右侧出料口门上升端,OutDoor_Up,12,PRO_AOI_IP_2,X33,
///// DI,2,右侧出料口门上升
/打开
端,OutDoor_Up,12,PRO_AOI_IP_2,X33,
///// </summary>
//public static string OutDoor_Up = "OutDoor_Up";
///// <summary>
///// DI,2,右侧出料口门下降端,OutDoor_Down,13,PRO_AOI_IP_2,X34,
///// DI,2,右侧出料口门下降
/关闭
端,OutDoor_Down,13,PRO_AOI_IP_2,X34,
///// </summary>
//public static string OutDoor_Down = "OutDoor_Down";
///// <summary>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论