Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO815-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
图表
网络
创建新的问题
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 5b74988c
由
几米阳光
编写于
2018-12-13 09:24:19 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
门锁增加验证
1 个父辈
c56f3fcd
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
59 行增加
和
24 行删除
source/ACSingleStore/FrmAxisDebug.cs
source/ACSingleStore/FrmIOStatus.cs
source/ACSingleStore/FrmStoreBox.cs
source/ACSingleStore/记录.txt
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
source/ACSingleStore/FrmAxisDebug.cs
查看文件 @
5b74988
...
@@ -35,7 +35,6 @@ namespace OnlineStore.AutoInOutStore
...
@@ -35,7 +35,6 @@ namespace OnlineStore.AutoInOutStore
inout
=
boxBean
.
Config
.
InOut_Axis
;
inout
=
boxBean
.
Config
.
InOut_Axis
;
auto
=
boxBean
.
Config
.
Batch_Axis
;
auto
=
boxBean
.
Config
.
Batch_Axis
;
InitializeComponent
();
InitializeComponent
();
txtComSpeed
.
Text
=
boxBean
.
Config
.
CompressAxis_EndSpeed
.
ToString
();
this
.
Text
=
boxBean
.
StoreName
+
"_轴点动调试"
;
this
.
Text
=
boxBean
.
StoreName
+
"_轴点动调试"
;
}
}
...
@@ -47,11 +46,11 @@ namespace OnlineStore.AutoInOutStore
...
@@ -47,11 +46,11 @@ namespace OnlineStore.AutoInOutStore
}
}
private
void
FrmAxisDebug_Load
(
object
sender
,
EventArgs
e
)
private
void
FrmAxisDebug_Load
(
object
sender
,
EventArgs
e
)
{
{
txtMiddleSpeed
.
Text
=
middle
.
TargetSpeed
.
ToString
();
txtMiddleSpeed
.
Text
=
(
middle
.
TargetSpeed
/
5
)
.
ToString
();
txtInOutSpeed
.
Text
=
inout
.
TargetSpeed
.
ToString
();
txtInOutSpeed
.
Text
=
(
inout
.
TargetSpeed
/
5
)
.
ToString
();
txtUpDownSpeed
.
Text
=
updown
.
TargetSpeed
.
ToString
();
txtUpDownSpeed
.
Text
=
(
updown
.
TargetSpeed
/
5
)
.
ToString
();
txtAutoSpeed
.
Text
=
auto
.
TargetSpeed
.
ToString
();
txtAutoSpeed
.
Text
=
(
auto
.
TargetSpeed
/
5
)
.
ToString
();
txtComSpeed
.
Text
=
StoreManager
.
Config
.
CompressAxis_EndSpeed
.
ToString
();
txtComSpeed
.
Text
=
(
StoreManager
.
Config
.
CompressAxis_EndSpeed
/
5
)
.
ToString
();
timer1
.
Start
();
timer1
.
Start
();
}
}
/// <summary>
/// <summary>
...
...
source/ACSingleStore/FrmIOStatus.cs
查看文件 @
5b74988
...
@@ -299,14 +299,18 @@ namespace OnlineStore.AutoInOutStore
...
@@ -299,14 +299,18 @@ namespace OnlineStore.AutoInOutStore
private
void
btnDOpen_Click
(
object
sender
,
EventArgs
e
)
private
void
btnDOpen_Click
(
object
sender
,
EventArgs
e
)
{
{
KND
.
IOMove
(
IO_Type
.
BatchDoor_Close
,
IO_VALUE
.
LOW
);
if
(
AutomaticBaiting
.
CanOpenBatchDoor
())
KND
.
IOMove
(
IO_Type
.
BatchDoor_Open
,
IO_VALUE
.
HIGH
);
{
AutomaticBaiting
.
BatchDoorOpen
(
false
);
}
else
{
MessageBox
.
Show
(
"忙碌中,无法打开门锁"
);
}
}
}
private
void
btnDClose_Click
(
object
sender
,
EventArgs
e
)
private
void
btnDClose_Click
(
object
sender
,
EventArgs
e
)
{
{
KND
.
IOMove
(
IO_Type
.
BatchDoor_Open
,
IO_VALUE
.
LOW
);
AutomaticBaiting
.
BatchDoorClose
(
false
);
KND
.
IOMove
(
IO_Type
.
BatchDoor_Close
,
IO_VALUE
.
HIGH
);
}
}
private
void
btnSXi_Click
(
object
sender
,
EventArgs
e
)
private
void
btnSXi_Click
(
object
sender
,
EventArgs
e
)
...
...
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
5b74988
...
@@ -1566,14 +1566,14 @@ namespace OnlineStore.AutoInOutStore
...
@@ -1566,14 +1566,14 @@ namespace OnlineStore.AutoInOutStore
}
}
private
void
BtnOpenDoor_Click
(
object
sender
,
EventArgs
e
)
private
void
BtnOpenDoor_Click
(
object
sender
,
EventArgs
e
)
{
{
if
(
store
.
storeRunStatus
.
Equals
(
StoreRunStatus
.
Runing
)
&&
AutomaticBaiting
.
AutoBaitingStatus
.
Equals
(
StoreRunStatus
.
Runing
))
if
(
AutomaticBaiting
.
CanOpenBatchDoor
(
))
{
{
AutomaticBaiting
.
BatchDoorOpen
(
false
);
AutomaticBaiting
.
BatchDoorOpen
(
false
);
AutomaticBaiting
.
IsNeedStartInout
=
false
;
AutomaticBaiting
.
IsNeedStartInout
=
false
;
}
}
else
else
{
{
MessageBox
.
Show
(
"
当前忙碌中,无法进行此操作
"
);
MessageBox
.
Show
(
"
忙碌中,无法打开门锁
"
);
}
}
}
}
private
void
btnBatchInStore_Click
(
object
sender
,
EventArgs
e
)
private
void
btnBatchInStore_Click
(
object
sender
,
EventArgs
e
)
...
@@ -1581,7 +1581,7 @@ namespace OnlineStore.AutoInOutStore
...
@@ -1581,7 +1581,7 @@ namespace OnlineStore.AutoInOutStore
if
(!
AutomaticBaiting
.
DoorIsClose
())
if
(!
AutomaticBaiting
.
DoorIsClose
())
{
{
MessageBox
.
Show
(
"请先关闭
批量上下料门
"
);
MessageBox
.
Show
(
"请先关闭
门锁
"
);
return
;
return
;
}
}
...
@@ -1593,7 +1593,7 @@ namespace OnlineStore.AutoInOutStore
...
@@ -1593,7 +1593,7 @@ namespace OnlineStore.AutoInOutStore
{
{
if
(!
AutomaticBaiting
.
DoorIsClose
())
if
(!
AutomaticBaiting
.
DoorIsClose
())
{
{
MessageBox
.
Show
(
"请先关闭
批量上下料门
"
);
MessageBox
.
Show
(
"请先关闭
门锁
"
);
return
;
return
;
}
}
AutomaticBaiting
.
BatchDoorClose
(
false
);
AutomaticBaiting
.
BatchDoorClose
(
false
);
...
@@ -1602,7 +1602,7 @@ namespace OnlineStore.AutoInOutStore
...
@@ -1602,7 +1602,7 @@ namespace OnlineStore.AutoInOutStore
}
}
private
void
btnGetOutTray_Click
(
object
sender
,
EventArgs
e
)
private
void
btnGetOutTray_Click
(
object
sender
,
EventArgs
e
)
{
{
if
(
store
.
storeRunStatus
.
Equals
(
StoreRunStatus
.
Runing
)
&&
AutomaticBaiting
.
AutoBaitingStatus
.
Equals
(
StoreRunStatus
.
Runing
))
if
(
AutomaticBaiting
.
CanOpenBatchDoor
(
))
{
{
if
(
AutomaticBaiting
.
BatchOutStoreCount
>
0
&&
AutomaticBaiting
.
BatchOutStoreHeight
>
0
)
if
(
AutomaticBaiting
.
BatchOutStoreCount
>
0
&&
AutomaticBaiting
.
BatchOutStoreHeight
>
0
)
{
{
...
@@ -1615,7 +1615,7 @@ namespace OnlineStore.AutoInOutStore
...
@@ -1615,7 +1615,7 @@ namespace OnlineStore.AutoInOutStore
}
}
else
else
{
{
MessageBox
.
Show
(
"
当前忙碌中,无法进行此操作
"
);
MessageBox
.
Show
(
"
忙碌中,无法打开门锁
"
);
}
}
}
}
...
...
source/ACSingleStore/记录.txt
查看文件 @
5b74988
...
@@ -49,7 +49,10 @@
...
@@ -49,7 +49,10 @@
入库时,叉子深入料盘之后,开始下降时就给服务器发送入库位结束消息。
入库时,叉子深入料盘之后,开始下降时就给服务器发送入库位结束消息。
上下料过程中,不能开门。
批量上料过程中,不能开门。
批量出料过程中不能开门。
单个出库可以开门。
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
5b74988
...
@@ -290,9 +290,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -290,9 +290,9 @@ namespace OnlineStore.DeviceLibrary
InOutWatch
.
Restart
();
InOutWatch
.
Restart
();
string
posId
=
param
!=
null
?
param
.
PositionNum
:
""
;
string
posId
=
param
!=
null
?
param
.
PositionNum
:
""
;
string
logMsg
=
IsBatchWork
?
" 启动批量入库【"
+
posId
+
"】"
:
" 启动入库【"
+
posId
+
"】"
;
string
logMsg
=
IsBatchWork
?
" 启动批量入库【"
+
posId
+
"】"
:
" 启动入库【"
+
posId
+
"】"
;
if
(!
AutomaticBaiting
.
Door
Status
.
Equals
(
2
))
if
(!
AutomaticBaiting
.
Door
CloseOK
(
))
{
{
LogUtil
.
error
(
LOGGER
,
StoreName
+
logMsg
+
" 出错,
批量上下料门
未关闭"
);
LogUtil
.
error
(
LOGGER
,
StoreName
+
logMsg
+
" 出错,
门锁
未关闭"
);
return
false
;
return
false
;
}
}
if
(
storeRunStatus
==
StoreRunStatus
.
Runing
)
if
(
storeRunStatus
==
StoreRunStatus
.
Runing
)
...
@@ -554,9 +554,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -554,9 +554,9 @@ namespace OnlineStore.DeviceLibrary
InOutWatch
.
Restart
();
InOutWatch
.
Restart
();
string
posId
=
param
!=
null
?
param
.
PositionNum
:
""
;
string
posId
=
param
!=
null
?
param
.
PositionNum
:
""
;
string
logMsg
=
IsBatchWork
?
" 启动批量出库【"
+
posId
+
"】"
:
" 启动出库【"
+
posId
+
"】"
;
string
logMsg
=
IsBatchWork
?
" 启动批量出库【"
+
posId
+
"】"
:
" 启动出库【"
+
posId
+
"】"
;
if
(!
AutomaticBaiting
.
Door
Status
.
Equals
(
2
))
if
(!
AutomaticBaiting
.
Door
CloseOK
(
))
{
{
LogUtil
.
error
(
LOGGER
,
StoreName
+
logMsg
+
" 出错,
批量上下料门
未关闭"
);
LogUtil
.
error
(
LOGGER
,
StoreName
+
logMsg
+
" 出错,
门锁
未关闭"
);
return
false
;
return
false
;
}
}
if
(
storeRunStatus
==
StoreRunStatus
.
Runing
)
if
(
storeRunStatus
==
StoreRunStatus
.
Runing
)
...
@@ -813,7 +813,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -813,7 +813,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_08_ToDoorPosition
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_08_ToDoorPosition
);
if
(
StoreMove
.
IsBatchInOutStore
)
if
(
StoreMove
.
IsBatchInOutStore
)
{
{
OutStoreLog
(
"出库:SO_08 升降轴到出料高点P2,旋转轴至P1(待机点) "
);
OutStoreLog
(
"出库:SO_08 升降轴到出料高点P2,旋转轴至P1(待机点)
,等待门锁关闭
"
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_OutHigh_P2
,
Config
.
UpDownAxis_P2_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_OutHigh_P2
,
Config
.
UpDownAxis_P2_Speed
);
ACAxisMove
(
Config
.
Middle_Axis
,
moveP
.
Middle_P1
,
Config
.
MiddleAxis_P1_Speed
);
ACAxisMove
(
Config
.
Middle_Axis
,
moveP
.
Middle_P1
,
Config
.
MiddleAxis_P1_Speed
);
BatchAxisUpTrayHeight
();
BatchAxisUpTrayHeight
();
...
@@ -831,7 +831,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -831,7 +831,6 @@ namespace OnlineStore.DeviceLibrary
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_10_DeviceToDoor
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_10_DeviceToDoor
);
OutStoreLog
(
"出库:SO_10 叉子进出料口,进出轴至P2(进料口取料点) "
);
OutStoreLog
(
"出库:SO_10 叉子进出料口,进出轴至P2(进料口取料点) "
);
ACAxisMove
(
Config
.
InOut_Axis
,
moveP
.
InOut_P2
,
Config
.
InOutAxis_P2_Speed
);
ACAxisMove
(
Config
.
InOut_Axis
,
moveP
.
InOut_P2
,
Config
.
InOutAxis_P2_Speed
);
//NeedCheckSafetyLight = 1;
}
}
#
endregion
#
endregion
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
查看文件 @
5b74988
...
@@ -438,6 +438,36 @@ namespace OnlineStore.DeviceLibrary
...
@@ -438,6 +438,36 @@ namespace OnlineStore.DeviceLibrary
return
false
;
return
false
;
}
}
public
static
bool
DoorCloseOK
()
{
if
(
DoorIsClose
())
{
if
(
KND
.
IOValue
(
IO_Type
.
BatchDoor_Close
).
Equals
(
IO_VALUE
.
HIGH
)
&&
KND
.
IOValue
(
IO_Type
.
BatchDoor_Open
).
Equals
(
IO_VALUE
.
LOW
))
{
return
true
;
}
}
return
false
;
}
/// <summary>
/// 是否可以打开门锁
/// </summary>
public
static
bool
CanOpenBatchDoor
()
{
if
(!
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
None
))
{
return
false
;
}
if
(!
StoreManager
.
Store
.
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
None
))
{
return
false
;
}
if
(
StoreManager
.
Store
.
storeRunStatus
.
Equals
(
StoreRunStatus
.
Runing
)
&&
AutoBaitingStatus
.
Equals
(
StoreRunStatus
.
Runing
))
{
return
true
;
}
return
false
;
}
public
static
void
BatchDoorOpen
(
bool
isWait
)
public
static
void
BatchDoorOpen
(
bool
isWait
)
{
{
ClearInOutInfo
();
ClearInOutInfo
();
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论