Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-ACPackingStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 1c633ffd
由
LN
编写于
2019-11-18 14:03:56 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
b5cb8691
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
175 行增加
和
131 行删除
source/ACPackingStore/FrmBox.cs
source/ACPackingStore/FrmStore.Designer.cs
source/ACPackingStore/FrmStore.cs
source/ACPackingStore/positionTool/FrmPositionTool.cs
source/ACPackingStore/记录.txt
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean.cs
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Partial.cs
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Shelf.cs
source/DeviceLibrary/ACPackingStore/PackingStoreBean.cs
source/DeviceLibrary/StoreConfig/BoxConfig_2.csv
source/DeviceLibrary/store/AutoInoutInfo.cs
source/DeviceLibrary/store/StoreStep.cs
source/DeviceLibrary/store/model/StoreMoveInfo.cs
source/ACPackingStore/FrmBox.cs
查看文件 @
1c633ff
...
@@ -588,29 +588,24 @@ namespace OnlineStore.ACPackingStore
...
@@ -588,29 +588,24 @@ namespace OnlineStore.ACPackingStore
{
{
if
(
BoxBean
.
AutoInout
.
autoNext
)
if
(
BoxBean
.
AutoInout
.
autoNext
)
{
{
BoxBean
.
AutoInout
.
autoNext
=
false
;
BoxBean
.
AutoInout
.
StopAuto
()
;
btnStartAuTo
.
Text
=
"开始自动出入库"
;
btnStartAuTo
.
Text
=
"开始自动出入库"
;
}
}
else
else
{
{
DialogResult
res
=
MessageBox
.
Show
(
"确定开始自动出入库?"
,
"提示"
,
MessageBoxButtons
.
YesNo
);
DialogResult
res
=
MessageBox
.
Show
(
"确定开始自动出入库?"
,
"提示"
,
MessageBoxButtons
.
YesNo
);
if
(
res
.
Equals
(
DialogResult
.
Yes
))
if
(
res
.
Equals
(
DialogResult
.
Yes
)
&&
cmbPosition
.
SelectedIndex
>=
0
)
{
{
BoxBean
.
AutoInout
.
autoNext
=
true
;
int
jiange
=
FormUtil
.
GetIntValue
(
txtJiange
);
int
jiange
=
FormUtil
.
GetIntValue
(
txtJiange
);
BoxBean
.
AutoInout
.
Jiange
=
jiange
;
int
currIndex
=
cmbPosition
.
SelectedIndex
;
if
(
cmbPosition
.
SelectedIndex
>=
0
)
BoxBean
.
AutoInout
.
StartAuto
(
jiange
,
currIndex
,
cmbShelfPosition
.
Text
);
{
int
currIndex
=
cmbPosition
.
SelectedIndex
;
string
poText
=
cmbPosition
.
Text
;
BoxBean
.
AutoInout
.
positionIndex
=
currIndex
;
BoxBean
.
AutoInout
.
autoMsg
=
"自动出库:"
+
poText
;
BoxBean
.
AutoInout
.
startIndex
=
currIndex
;
LogUtil
.
info
(
LOGGER
,
BoxBean
.
Name
+
"开启自动出入库模式,开始位置【"
+
poText
+
"】(索引="
+
currIndex
+
"),间隔="
+
jiange
+
",入库开始!"
);
BoxBean
.
AutoInout
.
shelfPosId
=
cmbShelfPosition
.
Text
;
//BoxBean.StartOutStoreMove(new InOutStoreParam("", poText));
string
poText
=
cmbPosition
.
Text
;
BoxBean
.
StartInStoreMove
(
new
InOutParam
(
""
,
poText
,
cmbShelfPosition
.
Text
));
BoxBean
.
AutoInout
.
autoMsg
=
"自动出库:"
+
poText
;
LogUtil
.
info
(
LOGGER
,
BoxBean
.
Name
+
"开启自动出入库模式,开始位置【"
+
poText
+
"】(索引="
+
currIndex
+
"),间隔="
+
jiange
+
",入库开始!"
);
//BoxBean.StartOutStoreMove(new InOutStoreParam("", poText));
BoxBean
.
StartInStoreMove
(
new
InOutParam
(
""
,
poText
,
BoxBean
.
AutoInout
.
shelfPosId
));
}
btnStartAuTo
.
Text
=
"停止自动出入库"
;
btnStartAuTo
.
Text
=
"停止自动出入库"
;
}
}
}
}
...
...
source/ACPackingStore/FrmStore.Designer.cs
查看文件 @
1c633ff
...
@@ -121,6 +121,7 @@
...
@@ -121,6 +121,7 @@
this
.
chkDebug
.
TabIndex
=
194
;
this
.
chkDebug
.
TabIndex
=
194
;
this
.
chkDebug
.
Text
=
"开启DEBUG日志"
;
this
.
chkDebug
.
Text
=
"开启DEBUG日志"
;
this
.
chkDebug
.
UseVisualStyleBackColor
=
true
;
this
.
chkDebug
.
UseVisualStyleBackColor
=
true
;
this
.
chkDebug
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
chkDebug_CheckedChanged
);
//
//
// chbAutoRun
// chbAutoRun
//
//
...
...
source/ACPackingStore/FrmStore.cs
查看文件 @
1c633ff
...
@@ -408,5 +408,11 @@ namespace OnlineStore.ACPackingStore
...
@@ -408,5 +408,11 @@ namespace OnlineStore.ACPackingStore
LogUtil
.
info
(
"去掉:启用蜂鸣器"
);
LogUtil
.
info
(
"去掉:启用蜂鸣器"
);
}
}
}
}
private
void
chkDebug_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
LogUtil
.
debug_opened
=
chkDebug
.
Checked
;
LogUtil
.
info
(
"debug_opened:"
+
chkDebug
.
Checked
);
}
}
}
}
}
source/ACPackingStore/positionTool/FrmPositionTool.cs
查看文件 @
1c633ff
...
@@ -34,7 +34,7 @@ namespace OnlineStore.ACPackingStore
...
@@ -34,7 +34,7 @@ namespace OnlineStore.ACPackingStore
this
.
SlvAddr
=
slvAddr
;
this
.
SlvAddr
=
slvAddr
;
this
.
IoIp
=
ioIp
;
this
.
IoIp
=
ioIp
;
this
.
IoIndex
=
ioIndex
;
this
.
IoIndex
=
ioIndex
;
boxName
=
boxName
.
Trim
().
Replace
(
"料仓"
,
""
);
boxName
=
text
.
Trim
().
Replace
(
"料仓"
,
""
);
this
.
Text
=
boxName
+
"_升降轴位置调试"
;
this
.
Text
=
boxName
+
"_升降轴位置调试"
;
LogName
=
boxName
+
"_升降轴调试:"
;
LogName
=
boxName
+
"_升降轴调试:"
;
toolTimer
.
Enabled
=
false
;
toolTimer
.
Enabled
=
false
;
...
...
source/ACPackingStore/记录.txt
查看文件 @
1c633ff
...
@@ -6,7 +6,5 @@
...
@@ -6,7 +6,5 @@
//温湿度超限报警中 亮 闪 灭
//温湿度超限报警中 亮 闪 灭
//温湿度超限报警中超过30分钟 亮 闪 闪
//温湿度超限报警中超过30分钟 亮 闪 闪
//机器未启动 灭 灭 灭
//机器未启动 灭 灭 灭
//机器设备故障(非温湿度)报警 亮 灭 闪
//机器设备故障(非温湿度)报警 亮 灭 闪
新建分支RC1250-ACPackingStore,作为佳世达流水线单台包装料料仓软件
在RC1246-ACPackingStore 项目基础上,
新建分支RC1250-ACPackingStore,作为佳世达流水线单台料仓软件
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean.cs
查看文件 @
1c633ff
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Partial.cs
查看文件 @
1c633ff
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Shelf.cs
查看文件 @
1c633ff
...
@@ -40,13 +40,19 @@ namespace OnlineStore.DeviceLibrary
...
@@ -40,13 +40,19 @@ namespace OnlineStore.DeviceLibrary
storeRunStatus
=
StoreRunStatus
.
Busy
;
storeRunStatus
=
StoreRunStatus
.
Busy
;
storeStatus
=
StoreStatus
.
InStoreExecute
;
storeStatus
=
StoreStatus
.
InStoreExecute
;
EmprtShelfList
=
new
Queue
<
string
>();
EmprtShelfList
=
new
Queue
<
string
>();
//读取RFID
RFIDData
data
=
RFIDManager
.
ReadData
(
Config
.
RFID_IP
);
//TODO 判断料架是否正确
MoveInfo
.
NewMove
(
StoreMoveType
.
InStore
,
new
InOutParam
());
MoveInfo
.
NewMove
(
StoreMoveType
.
InStore
,
new
InOutParam
());
MoveInfo
.
MoveParam
.
MoveP
=
new
LineMoveP
();
MoveInfo
.
MoveParam
.
MoveP
=
new
LineMoveP
();
MoveInfo
.
MoveParam
.
MoveP
.
ComPress_P1
=
Config
.
CompAxis_P1_Position
;
MoveInfo
.
MoveParam
.
MoveP
.
ComPress_P1
=
Config
.
CompAxis_P1_Position
;
MoveInfo
.
MoveParam
.
MoveP
.
InOut_P1
=
Config
.
InOutAxis_P1_Position
;
MoveInfo
.
MoveParam
.
MoveP
.
InOut_P1
=
Config
.
InOutAxis_P1_Position
;
MoveInfo
.
MoveParam
.
MoveP
.
Middle_P1
=
Config
.
MiddleAxis_P1
;
MoveInfo
.
MoveParam
.
MoveP
.
Middle_P1
=
Config
.
MiddleAxis_P1
;
MoveInfo
.
MoveParam
.
MoveP
.
UpDown_P1
=
Config
.
UpDownAxis_P1
;
MoveInfo
.
MoveParam
.
MoveP
.
UpDown_P1
=
Config
.
UpDownAxis_P1
;
MoveInfo
.
MoveParam
.
MoveP
.
UpDown_P2
=
Config
.
UpDownAxis_P2
;
MoveInfo
.
MoveParam
.
MoveP
.
UpDown_P2
=
Config
.
UpDownAxis_P2
;
MoveInfo
.
ShelfPositionList
=
new
List
<
string
>(
ShelfPosList
);
MoveInfo
.
ShelfPositionList
=
new
List
<
string
>(
ShelfPosList
);
...
@@ -129,7 +135,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -129,7 +135,8 @@ namespace OnlineStore.DeviceLibrary
}
}
else
else
{
{
//所有料盘已取料完成
//所有料盘已取料完成,送出料架
StartSendShelfOut
();
}
}
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_11_InoutToP1
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_11_InoutToP1
))
...
@@ -179,18 +186,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -179,18 +186,7 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove
(
Config
.
InOut_Axis
,
Config
.
InOutAxis_P1_Position
,
Config
.
CompAxis_P1_Speed
);
ACAxisMove
(
Config
.
InOut_Axis
,
Config
.
InOutAxis_P1_Position
,
Config
.
CompAxis_P1_Speed
);
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_17_InoutBack
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_17_InoutBack
))
{
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_18_ScanCode
);
InOutStoreLog
(
"料架取料:记录宽度,开始扫码"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
5000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitCode
());
Task
.
Factory
.
StartNew
(
delegate
{
IOMove
(
IO_Type
.
Camera_Led
,
IO_VALUE
.
HIGH
);
LastScanCodes
=
CodeManager
.
CameraScan
();
IOMove
(
IO_Type
.
Camera_Led
,
IO_VALUE
.
LOW
);
});
if
(
IOValue
(
IO_Type
.
TrayCheck_3
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOValue
(
IO_Type
.
TrayCheck_4
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOValue
(
IO_Type
.
TrayCheck_3
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOValue
(
IO_Type
.
TrayCheck_4
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
LastWidth
=
13
;
LastWidth
=
13
;
...
@@ -203,6 +199,26 @@ namespace OnlineStore.DeviceLibrary
...
@@ -203,6 +199,26 @@ namespace OnlineStore.DeviceLibrary
{
{
LogUtil
.
info
(
"未检测到识别区料盘检测信号, 默认高度为7"
);
LogUtil
.
info
(
"未检测到识别区料盘检测信号, 默认高度为7"
);
}
}
if
(
MoveInfo
.
SingleInstore
)
{
//单盘入库,不需要扫码
StartMoveToBag
();
}
else
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_18_ScanCode
);
InOutStoreLog
(
"料架取料:记录宽度,开始扫码"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
5000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitCode
());
Task
.
Factory
.
StartNew
(
delegate
{
IOMove
(
IO_Type
.
Camera_Led
,
IO_VALUE
.
HIGH
);
LastScanCodes
=
CodeManager
.
CameraScan
();
IOMove
(
IO_Type
.
Camera_Led
,
IO_VALUE
.
LOW
);
});
}
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_18_ScanCode
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_18_ScanCode
))
{
{
...
@@ -238,10 +254,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -238,10 +254,7 @@ namespace OnlineStore.DeviceLibrary
#
region
入库逻辑
#
region
入库逻辑
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_20_SetInstoreParam
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_20_SetInstoreParam
))
{
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_21_MoveToBag
);
StartMoveToBag
();
InOutStoreLog
(
"入库:移动到库位点,轴1( 转盘) 至P2( 库位点)轴2(上下) 至P3(库位入库前点)"
);
ACAxisMove
(
Config
.
Middle_Axis
,
moveP
.
Middle_P2
,
Config
.
MiddleAxis_P2_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P3
,
Config
.
UpDownAxis_P3_Speed
);
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_21_MoveToBag
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_21_MoveToBag
))
{
{
...
@@ -261,8 +274,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -261,8 +274,8 @@ namespace OnlineStore.DeviceLibrary
storeStatus
=
StoreStatus
.
InStoreEnd
;
storeStatus
=
StoreStatus
.
InStoreEnd
;
//手动发给服务器状态,防止没有手动
//手动发给服务器状态,防止没有手动
//SendLineStatus(StoreID, posId, StoreStatus.InStoreEnd);
//SendLineStatus(StoreID, posId, StoreStatus.InStoreEnd);
ComMoveToPosition
(
moveP
.
ComPress_P3
,
Config
.
CompAxis_P3_Speed
);
ACAxisMove
(
Config
.
Comp_Axis
,
moveP
.
ComPress_P3
,
Config
.
CompAxis_P3_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P4
,
Config
.
UpDownAxis_P4_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P4
,
Config
.
UpDownAxis_P4_Speed
);
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_23_PutWareToBag
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_23_PutWareToBag
))
...
@@ -275,7 +288,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -275,7 +288,7 @@ namespace OnlineStore.DeviceLibrary
{
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_25_GoBack
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_25_GoBack
);
InOutStoreLog
(
"入库:返回待机点,轴2/轴1/轴4动作至P1( 待机点))开始"
);
InOutStoreLog
(
"入库:返回待机点,轴2/轴1/轴4动作至P1( 待机点))开始"
);
ComMoveToPosition
(
moveP
.
ComPress_P1
,
Config
.
CompAxis_P1_Speed
);
ACAxisMove
(
Config
.
Comp_Axis
,
moveP
.
ComPress_P1
,
Config
.
CompAxis_P1_Speed
);
ACAxisMove
(
Config
.
Middle_Axis
,
moveP
.
Middle_P1
,
Config
.
MiddleAxis_P1_Speed
);
ACAxisMove
(
Config
.
Middle_Axis
,
moveP
.
Middle_P1
,
Config
.
MiddleAxis_P1_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P1
,
Config
.
UpDownAxis_P1_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P1
,
Config
.
UpDownAxis_P1_Speed
);
}
}
...
@@ -326,12 +339,26 @@ namespace OnlineStore.DeviceLibrary
...
@@ -326,12 +339,26 @@ namespace OnlineStore.DeviceLibrary
InOutStoreLog
(
"料架入库:开始循环逐个取料盘,扫码入库"
);
InOutStoreLog
(
"料架入库:开始循环逐个取料盘,扫码入库"
);
}
}
#
endregion
#
endregion
else
//料架送出逻辑
else
if
(
MoveInfo
.
MoveStep
>=
StoreMoveStep
.
BS_01_TopCylinder_Down
&&
MoveInfo
.
MoveStep
>=
StoreMoveStep
.
BS_09_CloseDoor
)
{
SendShelfProcess
();
}
else
{
{
LogInfo
(
" 入库,moveStatus="
+
MoveInfo
.
MoveStep
+
",没有对应的处理!"
);
LogInfo
(
" 入库,moveStatus="
+
MoveInfo
.
MoveStep
+
",没有对应的处理!"
);
}
}
}
}
private
void
StartMoveToBag
()
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_21_MoveToBag
);
InOutStoreLog
(
"入库:移动到库位点,轴1( 转盘) 至P2( 库位点)轴2(上下) 至P3(库位入库前点)"
);
ACAxisMove
(
Config
.
Middle_Axis
,
MoveInfo
.
MoveParam
.
MoveP
.
Middle_P2
,
Config
.
MiddleAxis_P2_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
MoveInfo
.
MoveParam
.
MoveP
.
UpDown_P3
,
Config
.
UpDownAxis_P3_Speed
);
}
private
void
StartSendTray
(
string
str
=
"扫码失败"
)
private
void
StartSendTray
(
string
str
=
"扫码失败"
)
{
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_31_ToNGDoor
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_31_ToNGDoor
);
...
@@ -353,44 +380,56 @@ namespace OnlineStore.DeviceLibrary
...
@@ -353,44 +380,56 @@ namespace OnlineStore.DeviceLibrary
{
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_02_LocatinCylinder_Down
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_02_LocatinCylinder_Down
);
InOutStoreLog
(
"送出料架:定位气缸下降"
);
InOutStoreLog
(
"送出料架:定位气缸下降"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
LocationCylinder_Up
,
IO_Type
.
LocationCylinder_Down
);
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_02_LocatinCylinder_Down
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_02_LocatinCylinder_Down
))
{
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_03_DoorOpen
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_03_DoorOpen
);
InOutStoreLog
(
"送出料架:打开仓门"
);
InOutStoreLog
(
"送出料架:打开仓门"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
EntranceDoor_Close
,
IO_Type
.
EntranceDoor_Open
);
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_03_DoorOpen
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_03_DoorOpen
))
{
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_04_LineBack
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_04_LineBack
);
InOutStoreLog
(
"送出料架:线体反转"
);
InOutStoreLog
(
"送出料架:线体反转"
);
IOMove
(
IO_Type
.
Line_Run
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
Line_BackRun
,
IO_VALUE
.
HIGH
);
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_04_LineBack
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_04_LineBack
))
{
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_05_WaitInLineSingle
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_05_WaitInLineSingle
);
InOutStoreLog
(
"送出料架:等待取料工位无信号,入料口有信号"
);
InOutStoreLog
(
"送出料架:等待取料工位无信号,入料口有信号"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
LineTake_Check
,
IO_VALUE
.
LOW
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
LineIn_Check
,
IO_VALUE
.
HIGH
));
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_05_WaitInLineSingle
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_05_WaitInLineSingle
))
{
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_06_WaitTime
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_06_WaitTime
);
InOutStoreLog
(
"送出料架:再转动300时间"
);
InOutStoreLog
(
"送出料架:再转动300时间"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
300
));
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_06_WaitTime
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_06_WaitTime
))
{
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_07_LineStop
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_07_LineStop
);
InOutStoreLog
(
"送出料架:停止转动"
);
InOutStoreLog
(
"送出料架:停止转动"
);
IOMove
(
IO_Type
.
Line_Run
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
Line_BackRun
,
IO_VALUE
.
LOW
);
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_07_LineStop
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_07_LineStop
))
{
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_08_CallAGV
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_08_CallAGV
);
InOutStoreLog
(
"送出料架:通知调度系统拿走"
);
InOutStoreLog
(
"送出料架:通知调度系统拿走"
);
//TODO
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_08_CallAGV
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_08_CallAGV
))
{
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_09_CloseDoor
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_09_CloseDoor
);
InOutStoreLog
(
"送出料架:关闭仓门"
);
InOutStoreLog
(
"送出料架:关闭仓门"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
EntranceDoor_Open
,
IO_Type
.
EntranceDoor_Close
);
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_09_CloseDoor
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_09_CloseDoor
))
{
{
}
}
}
}
...
...
source/DeviceLibrary/ACPackingStore/PackingStoreBean.cs
查看文件 @
1c633ff
...
@@ -52,6 +52,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -52,6 +52,8 @@ namespace OnlineStore.DeviceLibrary
List
<
string
>
ioList
=
new
List
<
string
>();
List
<
string
>
ioList
=
new
List
<
string
>();
AddDeviceName
(
ioList
,
Config
.
DIODeviceNameList
);
AddDeviceName
(
ioList
,
Config
.
DIODeviceNameList
);
List
<
string
>
rfidList
=
new
List
<
string
>();
foreach
(
AC_BOX_Config
config
in
configList
.
Values
)
foreach
(
AC_BOX_Config
config
in
configList
.
Values
)
{
{
AC_BOX_Bean
equip
=
new
AC_BOX_Bean
(
config
);
AC_BOX_Bean
equip
=
new
AC_BOX_Bean
(
config
);
...
@@ -59,6 +61,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -59,6 +61,8 @@ namespace OnlineStore.DeviceLibrary
AddDeviceName
(
ioList
,
config
.
DIODeviceNameList
);
AddDeviceName
(
ioList
,
config
.
DIODeviceNameList
);
BoxMap
.
Add
(
config
.
DeviceID
,
equip
);
BoxMap
.
Add
(
config
.
DeviceID
,
equip
);
BoxConfigMap
.
Add
(
config
.
DeviceID
,
config
);
BoxConfigMap
.
Add
(
config
.
DeviceID
,
config
);
rfidList
.
Add
(
config
.
RFID_IP
);
}
}
IOManager
.
Init
();
IOManager
.
Init
();
...
@@ -69,6 +73,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -69,6 +73,7 @@ namespace OnlineStore.DeviceLibrary
Task
.
Factory
.
StartNew
(
delegate
Task
.
Factory
.
StartNew
(
delegate
{
{
RFIDManager
.
ConnectRFIOList
(
rfidList
);
IOManager
.
instance
.
ConnectionIOList
(
ioList
);
IOManager
.
instance
.
ConnectionIOList
(
ioList
);
addLastDI
(
IO_Type
.
Airpressure_Check
,
IOValue
(
IO_Type
.
Airpressure_Check
));
addLastDI
(
IO_Type
.
Airpressure_Check
,
IOValue
(
IO_Type
.
Airpressure_Check
));
addLastDI
(
IO_Type
.
SuddenStop_BTN
,
IOValue
(
IO_Type
.
SuddenStop_BTN
));
addLastDI
(
IO_Type
.
SuddenStop_BTN
,
IOValue
(
IO_Type
.
SuddenStop_BTN
));
...
...
source/DeviceLibrary/StoreConfig/BoxConfig_2.csv
查看文件 @
1c633ff
...
@@ -44,8 +44,6 @@ AXIS,(轴三)进出轴,InOut_Axis,3,COM1,0,,,,,
...
@@ -44,8 +44,6 @@ AXIS,(轴三)进出轴,InOut_Axis,3,COM1,0,,,,,
AXIS,(轴四)压紧轴,Comp_Axis,4,COM1,0,,,,,
AXIS,(轴四)压紧轴,Comp_Axis,4,COM1,0,,,,,
PRO,升降轴 进料口取料点 P1,UpDownAxis_P1,403000,,,,,,,
PRO,升降轴 进料口取料点 P1,UpDownAxis_P1,403000,,,,,,,
PRO,升降轴 进料口出料前点 P2,UpDownAxis_P2,415000,,,,,,,
PRO,升降轴 进料口出料前点 P2,UpDownAxis_P2,415000,,,,,,,
PRO,升降轴 进料口取料缓冲点 P7,UpDownAxis_DoorOBPosition_P7,415000,,,,,,,
PRO,升降轴 进料口出料缓冲点 P8,UpDownAxis_DoorIBPosition_P8,403000,,,,,,,
PRO,旋转轴(轴1)P1 待机原位点,MiddleAxis_P1,268093,,,,,,,
PRO,旋转轴(轴1)P1 待机原位点,MiddleAxis_P1,268093,,,,,,,
PRO,进出轴(轴3)P1待机原位点,InOutAxis_P1_Position,1000,,,,,,,
PRO,进出轴(轴3)P1待机原位点,InOutAxis_P1_Position,1000,,,,,,,
PRO,压紧轴(轴4)P1待机原位点,CompAxis_P1_Position,10000,,,,,,,
PRO,压紧轴(轴4)P1待机原位点,CompAxis_P1_Position,10000,,,,,,,
...
@@ -110,8 +108,7 @@ PRO,(轴二)升降轴轴停止时可误差的脉冲数的最大值,UpdownAxis_ErrorCountMax,1000,,
...
@@ -110,8 +108,7 @@ PRO,(轴二)升降轴轴停止时可误差的脉冲数的最大值,UpdownAxis_ErrorCountMax,1000,,
PRO,(轴三)进出轴停止时可误差的脉冲数的最大值,InoutAxis_ErrorCountMax,1000,,,,,,,
PRO,(轴三)进出轴停止时可误差的脉冲数的最大值,InoutAxis_ErrorCountMax,1000,,,,,,,
PRO,出入库多少次,会自动重置旋转轴,Box_ResetMCount,1000,,,,,,,
PRO,出入库多少次,会自动重置旋转轴,Box_ResetMCount,1000,,,,,,,
PRO,出入库多少次,会自动重置所有轴操作,Box_ResetACount,100,,,,,,,
PRO,出入库多少次,会自动重置所有轴操作,Box_ResetACount,100,,,,,,,
PRO,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,,
PRO,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,,
PRO,是否使用料盘检测信号,IsUse_Tray_Check,0,,,,,, ,
PRO,(轴一)旋转轴最小限位,MiddleAxis_PositionMin,0,,,,,,,
PRO,(轴一)旋转轴最小限位,MiddleAxis_PositionMin,0,,,,,,,
PRO,(轴二)升降轴最小限位,UpdownAxis_PositionMin,0,,,,,,,
PRO,(轴二)升降轴最小限位,UpdownAxis_PositionMin,0,,,,,,,
PRO,(轴三)进出轴最小限位,InoutAxis_PositionMin,0,,,,,,,
PRO,(轴三)进出轴最小限位,InoutAxis_PositionMin,0,,,,,,,
...
...
source/DeviceLibrary/store/AutoInoutInfo.cs
查看文件 @
1c633ff
...
@@ -16,11 +16,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -16,11 +16,11 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// <summary>
/// 自动出入库间隔
/// 自动出入库间隔
/// </summary>
/// </summary>
p
ublic
int
Jiange
=
3
;
p
rivate
int
Jiange
=
3
;
p
ublic
int
positionIndex
=
0
;
p
rivate
int
positionIndex
=
0
;
public
string
autoMsg
=
""
;
public
string
autoMsg
=
""
;
p
ublic
int
startIndex
=
-
1
;
p
rivate
int
startIndex
=
-
1
;
p
ublic
string
shelfPosId
=
""
;
p
rivate
string
shelfPosId
=
""
;
#
region
出入库参数
#
region
出入库参数
/// <summary>
/// <summary>
/// 当前出入库的次数,超过配置的数量时,需要自动重置一下,再进行出入库
/// 当前出入库的次数,超过配置的数量时,需要自动重置一下,再进行出入库
...
@@ -29,6 +29,21 @@ namespace OnlineStore.DeviceLibrary
...
@@ -29,6 +29,21 @@ namespace OnlineStore.DeviceLibrary
internal
int
CurrInOutACount
=
0
;
internal
int
CurrInOutACount
=
0
;
#
endregion
#
endregion
public
void
StartAuto
(
int
jiange
,
int
currIndex
,
string
shelfPosId
)
{
autoNext
=
true
;
Jiange
=
jiange
;
positionIndex
=
currIndex
;
startIndex
=
currIndex
;
this
.
shelfPosId
=
shelfPosId
;
}
public
void
StopAuto
()
{
autoNext
=
false
;
}
internal
void
InOutEndProcess
(
AC_BOX_Bean
boxBean
,
StoreMoveType
storeMoveType
)
internal
void
InOutEndProcess
(
AC_BOX_Bean
boxBean
,
StoreMoveType
storeMoveType
)
{
{
try
try
...
@@ -69,14 +84,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -69,14 +84,7 @@ namespace OnlineStore.DeviceLibrary
boxBean
.
Reset
(
false
);
boxBean
.
Reset
(
false
);
autoMsg
=
"自动出库:"
+
posid
;
autoMsg
=
"自动出库:"
+
posid
;
boxBean
.
AddWaitOutInfo
(
new
InOutParam
(
""
,
posid
,
shelfPosId
));
boxBean
.
AddWaitOutInfo
(
new
InOutParam
(
""
,
posid
,
shelfPosId
));
}
}
else
if
(
CurrInOutCount
>=
boxBean
.
Config
.
Box_ResetMCount
)
{
boxBean
.
LogInfo
(
"自动进入下一个出库:posid="
+
posid
+
",当时已经出入库"
+
CurrInOutCount
+
"次,需要重置BOX旋转轴,先把出库信息存入排队列表中"
);
//ResetMiddleAxis(false);
autoMsg
=
"自动出库:"
+
posid
;
boxBean
.
AddWaitOutInfo
(
new
InOutParam
(
""
,
posid
,
shelfPosId
));
}
else
else
{
{
boxBean
.
LogInfo
(
"自动进入下一个出库:posid="
+
posid
);
boxBean
.
LogInfo
(
"自动进入下一个出库:posid="
+
posid
);
...
@@ -112,14 +120,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -112,14 +120,7 @@ namespace OnlineStore.DeviceLibrary
boxBean
.
Reset
(
false
);
boxBean
.
Reset
(
false
);
autoMsg
=
"自动入库:"
+
posid
;
autoMsg
=
"自动入库:"
+
posid
;
boxBean
.
AddWaitOutInfo
(
new
InOutParam
(
"AAAA"
,
posid
,
shelfPosId
));
boxBean
.
AddWaitOutInfo
(
new
InOutParam
(
"AAAA"
,
posid
,
shelfPosId
));
}
}
else
if
(
CurrInOutCount
>=
boxBean
.
Config
.
Box_ResetMCount
)
{
boxBean
.
LogInfo
(
"自动进入下一个出库:posid="
+
posid
+
",当时已经出入库"
+
CurrInOutCount
+
"次,需要重置BOX旋转轴,先把出库信息存入排队列表中"
);
//ResetMiddleAxis(false);
autoMsg
=
"自动入库:"
+
posid
;
boxBean
.
AddWaitOutInfo
(
new
InOutParam
(
"AAAA"
,
posid
,
shelfPosId
));
}
else
else
{
{
boxBean
.
LogInfo
(
"自动进入下一个入库:posid="
+
posid
);
boxBean
.
LogInfo
(
"自动进入下一个入库:posid="
+
posid
);
...
...
source/DeviceLibrary/store/StoreStep.cs
查看文件 @
1c633ff
...
@@ -248,67 +248,67 @@ namespace OnlineStore.DeviceLibrary
...
@@ -248,67 +248,67 @@ namespace OnlineStore.DeviceLibrary
#
endregion
#
endregion
#
region
料仓内部入库步骤
20500
#
region
料仓内部入库步骤
20500
/// <summary>
///
//
<summary>
/// 入库检测
///
//
入库检测
/// </summary>
///
//
</summary>
SI_00_TrayCheck
=
20500
,
//
SI_00_TrayCheck = 20500,
/// <summary>
///
//
<summary>
/// 入库,。定位气缸下降
///
//
入库,。定位气缸下降
/// </summary>
///
//
</summary>
SI_01_LocationCylinderDown
=
20501
,
//
SI_01_LocationCylinderDown =20501,
/// <summary>
///
//
<summary>
/// 入库。。进出轴(叉子)先返回P1
///
//
入库。。进出轴(叉子)先返回P1
/// </summary>
///
//
</summary>
SI_02_InOutAxisHome
=
20502
,
//
SI_02_InOutAxisHome =20502,
/// <summary>
///
//
<summary>
/// 入库。。所有轴先回到待机点,轴2、轴1 动作到P1,,轴4动作至P3
///
//
入库。。所有轴先回到待机点,轴2、轴1 动作到P1,,轴4动作至P3
/// </summary>
///
//
</summary>
SI_03_ReturnHome
=
20503
,
//
SI_03_ReturnHome =20503,
/// <summary>
///
//
<summary>
/// 入库。。压紧物品(有压紧轴的才需要此步骤),轴4( 压紧) 至P3(压紧前点)
///
//
入库。。压紧物品(有压紧轴的才需要此步骤),轴4( 压紧) 至P3(压紧前点)
/// </summary>
///
//
</summary>
SI_04_CompressWare
=
20504
,
//
SI_04_CompressWare =20504,
/// <summary>
///
//
<summary>
/// 入库。。叉子进入入料口,轴3( 叉子) 至P2( 进料口取料点)
///
//
入库。。叉子进入入料口,轴3( 叉子) 至P2( 进料口取料点)
/// </summary>
///
//
</summary>
SI_05_DeviceToDoor
=
20505
,
//
SI_05_DeviceToDoor =20505,
/// <summary>
///
//
<summary>
/// 入库。。把物品放入叉子上,轴2( 上下) 至P7( 进料口取料缓冲点),压紧物品(有压紧轴的才需要此步骤),轴4( 压紧) 至P2(压紧点)
///
//
入库。。把物品放入叉子上,轴2( 上下) 至P7( 进料口取料缓冲点),压紧物品(有压紧轴的才需要此步骤),轴4( 压紧) 至P2(压紧点)
/// </summary>
///
//
</summary>
SI_06_DoorWarToDevice
=
20506
,
//
SI_06_DoorWarToDevice =20506,
/// <summary>
///
//
<summary>
/// 入库。。叉子 从入料口抽出,轴3( 叉子) 至P1( 待机点)
///
//
入库。。叉子 从入料口抽出,轴3( 叉子) 至P1( 待机点)
/// </summary>
///
//
</summary>
SI_07_DeviceBackFromDoor
=
20507
,
//
SI_07_DeviceBackFromDoor =20507,
/// <summary>
///
//
<summary>
/// 入库。。,定位气缸伸出 (有压紧轴的不需要此步骤)
///
//
入库。。,定位气缸伸出 (有压紧轴的不需要此步骤)
/// </summary>
///
//
</summary>
SI_08_LocationCylinder_Up
=
20508
,
//
SI_08_LocationCylinder_Up =20508,
/// <summary>
///
//
<summary>
/// 入库。。移动到库位点,轴1( 转盘) 至P2( 库位点)轴2(上下) 至P3(库位入库前点)
///
//
入库。。移动到库位点,轴1( 转盘) 至P2( 库位点)轴2(上下) 至P3(库位入库前点)
/// </summary>
///
//
</summary>
SI_09_MoveToBag
=
20509
,
//
SI_09_MoveToBag =20509,
/// <summary>
///
//
<summary>
/// 入库。。定位气缸退回 (有压紧轴的不需要此步骤)
///
//
入库。。定位气缸退回 (有压紧轴的不需要此步骤)
/// </summary>
///
//
</summary>
SI_10_LocationCylinder_Down
=
20510
,
//
SI_10_LocationCylinder_Down =20510,
/// <summary>
///
//
<summary>
/// 入库。。叉子进入库位中,轴3( 叉子) 至P3(库位取放料点)
///
//
入库。。叉子进入库位中,轴3( 叉子) 至P3(库位取放料点)
/// </summary>
///
//
</summary>
SI_11_DeviceToBag
=
20511
,
//
SI_11_DeviceToBag =20511,
/// <summary>
///
//
<summary>
/// 入库。。放下物品,轴2( 上下) 至P4( 库位入料缓冲点)轴4( 压紧) 至P3( 压紧前点)
///
//
入库。。放下物品,轴2( 上下) 至P4( 库位入料缓冲点)轴4( 压紧) 至P3( 压紧前点)
/// </summary>
///
//
</summary>
SI_12_PutWareToBag
=
20512
,
//
SI_12_PutWareToBag =20512,
/// <summary>
///
//
<summary>
/// 入库。。叉子从库位中返回,轴3( 叉子) 动作至P1( 待机点)
///
//
入库。。叉子从库位中返回,轴3( 叉子) 动作至P1( 待机点)
/// </summary>
///
//
</summary>
SI_13_DeviceBackFromBag
=
20513
,
//
SI_13_DeviceBackFromBag =20513,
/// <summary>
///
//
<summary>
/// 入库。。返回待机点,轴2/轴1/轴4动作至P1( 待机点))开始
///
//
入库。。返回待机点,轴2/轴1/轴4动作至P1( 待机点))开始
/// </summary>
///
//
</summary>
SI_14_GoBack
=
20514
,
//
SI_14_GoBack =20514,
#
endregion
#
endregion
...
...
source/DeviceLibrary/store/model/StoreMoveInfo.cs
查看文件 @
1c633ff
...
@@ -76,6 +76,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -76,6 +76,8 @@ namespace OnlineStore.DeviceLibrary
{
{
get
{
return
moveStep
;
}
get
{
return
moveStep
;
}
}
}
public
bool
SingleInstore
=
false
;
public
void
NextMoveStep
(
StoreMoveStep
step
)
public
void
NextMoveStep
(
StoreMoveStep
step
)
{
{
...
@@ -132,8 +134,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -132,8 +134,8 @@ namespace OnlineStore.DeviceLibrary
/// 入库时,需要循环料架的料盘取出
/// 入库时,需要循环料架的料盘取出
/// </summary>
/// </summary>
public
List
<
string
>
ShelfPositionList
=
new
List
<
string
>();
public
List
<
string
>
ShelfPositionList
=
new
List
<
string
>();
p
ublic
string
currShelfPosId
=
""
;
p
rivate
string
currShelfPosId
=
""
;
p
ublic
int
currShelfIndex
=
-
1
;
p
rivate
int
currShelfIndex
=
-
1
;
public
bool
NextShelfPos
()
public
bool
NextShelfPos
()
{
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论