Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO815-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
图表
网络
创建新的问题
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit ec655f8a
由
几米阳光
编写于
2019-06-05 09:21:16 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
出料逻辑修改。
1 个父辈
e1ba4c05
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
93 行增加
和
41 行删除
source/ACSingleStore/ResourceCulture.cs
source/ACSingleStore/记录.txt
source/DeviceLibrary/DeviceLibrary/PanasonicServo/BatchAxisController.cs
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
source/DeviceLibrary/store/StoreMoveStep.cs
source/DeviceLibrary/store/model/StoreMoveInfo.cs
source/ACSingleStore/ResourceCulture.cs
查看文件 @
ec655f8
...
...
@@ -14,7 +14,7 @@ namespace OnlineStore.AutoInOutStore
{
public
class
ResourceCulture
{
public
static
bool
ShowLog
=
true
;
public
static
bool
ShowLog
=
false
;
public
static
string
China
=
"zh-CN"
;
public
static
string
English
=
"en-US"
;
public
static
string
German
=
"ge-DE"
;
...
...
source/ACSingleStore/记录.txt
查看文件 @
ec655f8
...
...
@@ -198,10 +198,11 @@ IO模块读取时间改为可配置。
BUG需要修改:
吸盘吸料过程中需要一直检测吸盘气压信号
门锁未关闭时不能点关闭门锁。
...
...
source/DeviceLibrary/DeviceLibrary/PanasonicServo/BatchAxisController.cs
查看文件 @
ec655f8
...
...
@@ -16,7 +16,8 @@ namespace OnlineStore.DeviceLibrary
private
static
bool
IsStop
=
false
;
private
static
System
.
Timers
.
Timer
checkTimer
=
null
;
private
static
string
TargetIoType
=
IO_Type
.
TrayCheck_LoadMaterial
;
public
static
bool
StartCheck
(
string
targetIo
)
private
static
IO_VALUE
TargetIoValue
=
IO_VALUE
.
HIGH
;
public
static
bool
StartCheck
(
string
targetIo
,
IO_VALUE
value
=
IO_VALUE
.
HIGH
)
{
if
(
checkTimer
==
null
)
{
...
...
@@ -26,6 +27,7 @@ namespace OnlineStore.DeviceLibrary
checkTimer
.
Elapsed
+=
CheckTimer_Elapsed
;
checkTimer
.
Enabled
=
false
;
}
TargetIoValue
=
value
;
TargetIoType
=
targetIo
;
checkTimer
.
Start
();
return
true
;
...
...
@@ -46,9 +48,9 @@ namespace OnlineStore.DeviceLibrary
if
(
IsInProcess
)
{
return
;
}
IsInProcess
=
true
;
bool
result
=
false
;
if
(
IOManager
.
IOValue
(
TargetIoType
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOManager
.
IOValue
(
TargetIoType
).
Equals
(
TargetIoValue
))
{
LogUtil
.
info
(
"批量上料轴,检测到
【"
+
TargetIoType
+
"】信号
,可以停止运动"
);
LogUtil
.
info
(
"批量上料轴,检测到
"
+
TargetIoType
+
"="
+
TargetIoValue
+
"
,可以停止运动"
);
result
=
true
;
}
else
if
(
IOManager
.
IOValue
(
IO_Type
.
BatchAxis_Limit
).
Equals
(
IO_VALUE
.
HIGH
))
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
查看文件 @
ec655f8
...
...
@@ -384,6 +384,8 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_I07_BatchAxisUp
))
{
if
(
IOManager
.
IOValue
(
IO_Type
.
SuckingDisc_Air
).
Equals
(
IO_VALUE
.
HIGH
))
{
TimeSpan
span
=
DateTime
.
Now
-
StoreMove
.
LastSetpTime
;
//需要判断入库超时
...
...
@@ -430,6 +432,13 @@ namespace OnlineStore.DeviceLibrary
StoreManager
.
Store
.
Alarm
(
StoreAlarmType
.
BatchIoTimeOut
,
""
,
WarnMsg
,
StoreMove
.
MoveType
);
}
}
else
{
WarnMsg
=
ResourceControl
.
GetString
(
ResourceControl
.
XiLiaoError
,
"吸盘吸料失败"
);
StoreManager
.
Store
.
Alarm
(
StoreAlarmType
.
BatchAlarm
,
ResourceControl
.
GetString
(
ResourceControl
.
XiLiaoError
,
"吸盘吸料失败"
),
WarnMsg
,
StoreMoveType
.
InStore
);
LogUtil
.
error
(
Name
+
"入料: 吸盘上升后未检测到吸盘压力信号,吸取料盘失败"
,
105
);
}
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_I08_GetPosId
))
{
//判断是否开始入库
...
...
@@ -641,27 +650,44 @@ namespace OnlineStore.DeviceLibrary
{
return
;
}
//取料盘时,先检测X12,若X12不亮,直接打开门。
//若X12亮,先匀速下降到X12不亮,再开门。
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_O00_Wait
))
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_O01_WaitDoorOpen
);
BatchDoorOpen
(
true
);
if
(
IOManager
.
IOValue
(
IO_Type
.
OutCheck
).
Equals
(
IO_VALUE
.
LOW
))
{
LogUtil
.
info
(
Name
+
"出料: 等待门锁打开, OutCheck=LOW批量轴不需要到P2 "
);
LogUtil
.
info
(
Name
+
"出料: OutCheck=LOW ,直接打开门锁 "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_O02_WaitDoorOpen
);
BatchDoorOpen
(
true
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
}
else
{
LogUtil
.
info
(
Name
+
"出料: 等待门锁打开,批量轴回到P2点 "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_O01_BatchAxisDown
);
LogUtil
.
info
(
Name
+
"出料: OutCheck=HIGH,批量轴先匀速下降到P2 "
);
//批量轴直接走到P2
ACAxisAbsMove
(
StoreManager
.
Config
.
Batch_Axis
,
StoreManager
.
Config
.
BatchAxis_P2
,
StoreManager
.
Config
.
BatchAxis_P2_Speed
);
AUTO_SA_Config
Config
=
StoreManager
.
Config
;
//ACAxisSpeedMove(StoreManager.Config.Batch_Axis, StoreManager.Config.BatchAxis_SlowSpeed, IO_Type.OutCheck);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBatchAxisStop
(
Config
.
Batch_Axis
,
Config
.
BatchAxis_P2
,
IO_Type
.
OutCheck
,
IO_VALUE
.
LOW
));
BatchAxisController
.
StartCheck
(
IO_Type
.
OutCheck
,
IO_VALUE
.
LOW
);
StoreManager
.
Config
.
Batch_Axis
.
TargetPosition
=
Config
.
BatchAxis_P2
;
int
speed
=
Config
.
BatchAxis_SlowSpeed
;
ACServerManager
.
AbsMove
(
Config
.
Batch_Axis
.
DeviceName
,
Config
.
Batch_Axis
.
GetAxisValue
(),
Config
.
BatchAxis_OutMaxValue
,
speed
);
// ACAxisAbsMove(StoreManager.Config.Batch_Axis, StoreManager.Config.BatchAxis_P2, StoreManager.Config.BatchAxis_P2_Speed);
}
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_O01_BatchAxisDown
))
{
LogUtil
.
info
(
Name
+
"出料: 批量轴已下降到OutCheck=LOW ,打开门锁 "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_O02_WaitDoorOpen
);
BatchDoorOpen
(
true
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_O0
1
_WaitDoorOpen
))
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_O0
2
_WaitDoorOpen
))
{
if
(
IOManager
.
IOValue
(
IO_Type
.
OutCheck
).
Equals
(
IO_VALUE
.
HIGH
))
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_O0
2
_WaitOutSingleLow
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_O0
3
_WaitOutSingleLow
);
LogUtil
.
info
(
Name
+
" 出料 ,等待出料检测信号关闭"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
OutCheck
,
IO_VALUE
.
LOW
));
}
...
...
@@ -670,12 +696,12 @@ namespace OnlineStore.DeviceLibrary
StartSpeedOut
();
}
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_O0
2
_WaitOutSingleLow
))
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_O0
3
_WaitOutSingleLow
))
{
StartSpeedOut
();
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_O0
3
_SpeedMove
))
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_O0
4
_SpeedMove
))
{
//先判断极限是否亮
//int value = ACServerManager.GetLimitPositiveSingle(StoreManager.Config.Batch_Axis);
...
...
@@ -690,7 +716,7 @@ namespace OnlineStore.DeviceLibrary
else
{
//等待出料信号亮
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_O0
2
_WaitOutSingleLow
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_O0
3
_WaitOutSingleLow
);
LogUtil
.
info
(
Name
+
" 出料 ,等待出料检测信号关闭"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
OutCheck
,
IO_VALUE
.
LOW
));
}
...
...
@@ -709,7 +735,7 @@ namespace OnlineStore.DeviceLibrary
}
private
static
void
StartSpeedOut
()
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_O0
3
_SpeedMove
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_O0
4
_SpeedMove
);
AUTO_SA_Config
Config
=
StoreManager
.
Config
;
LogUtil
.
info
(
Name
+
" 出料 ,轴上升到检测到出料信号,速度【"
+
Config
.
BatchAxis_SlowSpeed
+
"】,最大上升高度【"
+
Config
.
BatchAxis_OutMaxValue
+
"】"
);
//ACAxisSpeedMove(StoreManager.Config.Batch_Axis, StoreManager.Config.BatchAxis_SlowSpeed, IO_Type.OutCheck);
...
...
@@ -789,8 +815,12 @@ namespace OnlineStore.DeviceLibrary
}
}
public
static
void
BatchDoorClose
(
bool
isWait
)
public
static
bool
BatchDoorClose
(
bool
isWait
)
{
if
(!
IOManager
.
IOValue
(
IO_Type
.
DoorClose_LoadMaterial
).
Equals
(
IO_VALUE
.
HIGH
))
{
return
false
;
}
ClearInStoreInfo
();
ClearOutStoreInfo
();
DoorStatus
=
2
;
...
...
@@ -803,6 +833,7 @@ namespace OnlineStore.DeviceLibrary
}
IOManager
.
IOMove
(
IO_Type
.
BatchDoor_Open
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
BatchDoor_Close
,
IO_VALUE
.
HIGH
);
return
true
;
}
}
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
查看文件 @
ec655f8
...
...
@@ -262,9 +262,9 @@ namespace OnlineStore.DeviceLibrary
public
static
bool
BatchAxisIsEnd
(
WaitResultInfo
wait
,
TimeSpan
startSpan
)
{
bool
result
=
false
;
if
(
IOManager
.
IOValue
(
wait
.
IoType
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOManager
.
IOValue
(
wait
.
IoType
).
Equals
(
wait
.
IoValue
))
{
LogUtil
.
debug
(
wait
.
ToStr
()
+
" 检测到
【"
+
wait
.
IoType
+
"】信号
,可以停止运动"
);
LogUtil
.
debug
(
wait
.
ToStr
()
+
" 检测到
"
+
wait
.
IoType
+
"="
+
wait
.
IoValue
+
"
,可以停止运动"
);
result
=
true
;
}
else
if
(
IOManager
.
IOValue
(
IO_Type
.
BatchAxis_Limit
).
Equals
(
IO_VALUE
.
HIGH
))
...
...
@@ -569,15 +569,15 @@ namespace OnlineStore.DeviceLibrary
}
if
(
IsWaitTragGo
&&
(
IsGetTrayGo
.
Equals
(
false
)))
if
(
IsWaitTragGo
&&
(
IsGetTrayGo
.
Equals
(
false
)))
{
map
[
ParamDefine
.
confirmReelOut
]
=
ParamDefine
.
enable
;
}
else
if
(
CanOpenBatchDoor
())
else
if
(
CanOpenBatchDoor
())
{
if
(
DoorStatus
.
Equals
(
2
))
if
(
DoorStatus
.
Equals
(
2
))
{
if
(
BatchOutStoreCount
>
0
)
if
(
BatchOutStoreCount
>
0
)
{
map
[
ParamDefine
.
takeOutReel
]
=
ParamDefine
.
enable
;
}
...
...
@@ -587,12 +587,17 @@ namespace OnlineStore.DeviceLibrary
map
[
ParamDefine
.
singleReelIn
]
=
ParamDefine
.
enable
;
}
}
else
else
if
(
IOManager
.
IOValue
(
IO_Type
.
DoorClose_LoadMaterial
).
Equals
(
IO_VALUE
.
HIGH
))
{
map
[
ParamDefine
.
closeLock
]
=
ParamDefine
.
enable
;
map
[
ParamDefine
.
startBatchIn
]
=
ParamDefine
.
enable
;
}
}
else
if
(
DoorStatus
.
Equals
(
1
)
&&
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
OutStore
)
&&
IOManager
.
IOValue
(
IO_Type
.
DoorClose_LoadMaterial
).
Equals
(
IO_VALUE
.
HIGH
))
{
//出库过程中 可以关门
map
[
ParamDefine
.
closeLock
]
=
ParamDefine
.
enable
;
}
return
map
;
}
...
...
@@ -611,18 +616,18 @@ namespace OnlineStore.DeviceLibrary
}
public
static
string
doStartBatchIn
()
{
if
(!
DoorIsClose
())
if
(!
DoorIsClose
())
{
return
ResourceControl
.
GetString
(
ResourceControl
.
batchInError
,
"Batch storing Error: Close feeding device"
);
}
if
(
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
HIGH
))
{
return
ResourceControl
.
GetString
(
ResourceControl
.
batchInError2
,
"Batch storing Error: gripper full, check before restoring"
);
}
StopOutProcess
();
BatchDoorClose
(
false
);
Reset
(
false
,
true
);
Reset
(
false
,
true
);
return
""
;
}
public
static
string
doTakeReel
()
...
...
@@ -631,7 +636,7 @@ namespace OnlineStore.DeviceLibrary
{
if
(
BatchOutStoreCount
>
0
&&
BatchOutStoreHeight
>
0
)
{
BatchDoorOpen
(
false
);
//
BatchDoorOpen(false);
return
StartOut
();
//return "";
}
...
...
source/DeviceLibrary/store/StoreMoveStep.cs
查看文件 @
ec655f8
...
...
@@ -556,22 +556,26 @@ namespace OnlineStore.DeviceLibrary
AUTO_O00_Wait
=
1300
,
/// <summary>
///
等待门锁打开
///
批量轴先匀速下降到X12不亮
/// </summary>
AUTO_O01_WaitDoorOpen
=
1301
,
AUTO_O01_BatchAxisDown
=
1301
,
/// <summary>
/// 打开门锁
/// </summary>
AUTO_O02_WaitDoorOpen
=
1302
,
/// <summary>
/// 等待出料检测信号关闭
/// </summary>
AUTO_O0
2_WaitOutSingleLow
=
1302
,
AUTO_O0
3_WaitOutSingleLow
=
1303
,
/// <summary>
/// 向上运动,等待DI12亮或者极限亮停止
/// </summary>
AUTO_O0
3_SpeedMove
=
1303
,
AUTO_O0
4_SpeedMove
=
1304
,
/// <summary>
/// 极限亮,返回P2点
/// </summary>
AUTO_O05_BackToP2
=
130
4
,
AUTO_O05_BackToP2
=
130
5
,
#
endregion
...
...
source/DeviceLibrary/store/model/StoreMoveInfo.cs
查看文件 @
ec655f8
...
...
@@ -277,7 +277,7 @@ namespace OnlineStore.DeviceLibrary
/// 10=等待批量上下料轴运动 停止
/// </summary>
/// <returns></returns>
public
static
WaitResultInfo
WaitBatchAxisStop
(
ConfigMoveAxis
moveAxis
,
int
targetPosition
,
string
targetIoType
)
public
static
WaitResultInfo
WaitBatchAxisStop
(
ConfigMoveAxis
moveAxis
,
int
targetPosition
,
string
targetIoType
,
IO_VALUE
value
=
IO_VALUE
.
HIGH
)
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
TargetPosition
=
targetPosition
;
...
...
@@ -287,6 +287,7 @@ namespace OnlineStore.DeviceLibrary
wait
.
IsHomeMove
=
true
;
wait
.
IsEnd
=
false
;
wait
.
IoType
=
targetIoType
;
wait
.
IoValue
=
value
;
return
wait
;
}
/// <summary>
...
...
@@ -350,11 +351,11 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
WaitType
==
(
int
)
Wait_Type
.
WaitHeight_7
)
{
return
ResourceControl
.
GetString
(
ResourceControl
.
trayHeight
,
"料盘高度"
)+
"【"
+
HeightValue
+
"】 "
;
return
ResourceControl
.
GetString
(
ResourceControl
.
trayHeight
,
"料盘高度"
)
+
"【"
+
HeightValue
+
"】 "
;
}
else
if
(
WaitType
==
(
int
)
Wait_Type
.
AxisLimitNegativeSingle_8
)
{
return
"【"
+
AxisInfo
.
DisplayStr
+
"】"
+
ResourceControl
.
GetString
(
ResourceControl
.
FuLimit
,
"负限位"
)+
"【"
+
IoValue
+
"】 "
;
return
"【"
+
AxisInfo
.
DisplayStr
+
"】"
+
ResourceControl
.
GetString
(
ResourceControl
.
FuLimit
,
"负限位"
)
+
"【"
+
IoValue
+
"】 "
;
}
else
if
(
WaitType
==
(
int
)
Wait_Type
.
AxisLimitPositiveSingle_9
)
{
...
...
@@ -362,15 +363,23 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
WaitType
==
(
int
)
Wait_Type
.
BatchAxisMove_10
)
{
return
ResourceControl
.
GetString
(
ResourceControl
.
BatchStop
,
"上料轴运动停止 "
);
}
else
if
(
WaitType
==
(
int
)
Wait_Type
.
ScanCode_11
)
return
ResourceControl
.
GetString
(
ResourceControl
.
BatchStop
,
"上料轴运动停止 "
);
}
else
if
(
WaitType
==
(
int
)
Wait_Type
.
ScanCode_11
)
{
return
ResourceControl
.
GetString
(
ResourceControl
.
ScanOk
,
"扫码结束"
);
}
else
if
(
WaitType
==
(
int
)
Wait_Type
.
TakeTrayGo_12
)
else
if
(
WaitType
==
(
int
)
Wait_Type
.
TakeTrayGo_12
)
{
if
(
AutomaticBaiting
.
WaitIoValue
.
Equals
(
IO_VALUE
.
HIGH
))
{
return
ResourceControl
.
GetString
(
"操作人员放入料盘"
,
"操作人员放入料盘"
);
}
else
{
return
ResourceControl
.
GetString
(
ResourceControl
.
TakeTrayGo
,
"操作人员拿走料盘"
);
}
}
else
if
(
WaitType
==
(
int
)
Wait_Type
.
StoreRuning_13
)
{
return
ResourceControl
.
GetString
(
ResourceControl
.
WaitEnd
,
"等待送料结束"
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论