Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC30-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 5338ca7a
由
几米阳光
编写于
2019-03-14 17:17:44 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
拿走料盘的过程中增加出库处理。
1 个父辈
35b5eb93
全部展开
显示空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
204 行增加
和
94 行删除
source/ACSingleStore/App.config
source/ACSingleStore/记录.txt
source/DeviceLibrary/PanasonicServo/ACServerManager_Partial.cs
source/DeviceLibrary/PanasonicServo/BatchAxisController.cs
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
source/DeviceLibrary/StoreConfig/AC/linePositions.csv
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.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/App.config
查看文件 @
5338ca7
...
...
@@ -10,22 +10,22 @@
<
add
key
=
"Server_Log_Open"
value
=
"0"
/>
<
add
key
=
"scanner_start_command"
value
=
"S"
/>
<!-- 开始吹气的判断值(配置值=服务器发送的湿度值-开始吹气值)-->
<
add
key
=
"StartBlowValue"
value
=
"
4
"
/>
<
add
key
=
"StartBlowValue"
value
=
"
0.5
"
/>
<!-- 停止吹气的判断值(配置值=服务器发送的湿度值-停止吹气值)-->
<
add
key
=
"StopBlowValue"
value
=
"
4
"
/>
<
add
key
=
"StopBlowValue"
value
=
"
1
"
/>
<!--
Server
address
-->
<
add
key
=
"http.server"
value
=
""
/
>
<
!--<
add
key
=
"http.server"
value
=
"http://192.168.1.187/myproject/"
/> --
>
<
!--<
add
key
=
"http.server"
value
=
""
/>--
>
<
add
key
=
"http.server"
value
=
"http://localhost/myproject/"
/
>
<!--
storeType
-->
<
add
key
=
"store_count"
value
=
"1"
/>
<!--
start
one
store
config
-->
<
add
key
=
"Store_Position_Config"
value
=
"\StoreConfig\AC\linePositions.csv"
/>
<
add
key
=
"Store_ConfigPath"
value
=
"\StoreConfig\AC\StoreConfig.csv"
/>
<
add
key
=
"Store_Type"
value
=
"AUTO_SA_Config"
/>
<
add
key
=
"Store_CID"
value
=
"
nanrui
1"
/>
<
add
key
=
"Store_CID"
value
=
"
auto
1"
/>
<!--
end
one
store
config
-->
<!--摄像机名称列表配置,用
#分割-->
<
add
key
=
"CameraName"
value
=
"GigE:MV-CE100-30GC (00C
69898477
)"
/>
<
add
key
=
"CameraName"
value
=
"GigE:MV-CE100-30GC (00C
81915560)#GigE:MV-CE100-30GC (00C81915565
)"
/>
<!--二维码类型列表配置,用
#分割-->
<
add
key
=
"CodeType"
value
=
"QR Code"
/>
<!--<
add
key
=
"CodeType"
value
=
"Data Matrix ECC 200#QR Code"
/>-->
...
...
@@ -36,11 +36,11 @@
<!--
5000
脉冲对应
1
mm
-->
<
add
key
=
"AxisChangeValue"
value
=
"5000"
/>
<!--压紧轴计量检测信号亮
1
次的脉冲值-->
<
add
key
=
"ComAxisChangeValue"
value
=
"
1
0000"
/>
<
add
key
=
"DebugPosId"
value
=
"1#AC1_2_1_1"
/>
<
add
key
=
"ComAxisChangeValue"
value
=
"
2
0000"
/>
<
add
key
=
"DebugPosId"
value
=
"1#AC2_2_1_1"
/>
<!--是否有门禁屏蔽功能,=
1
表示有此功能-->
<
add
key
=
"HasDisableDoorControl"
value
=
"0"
/>
<
add
key
=
"ACBaudRate"
value
=
"9600"
/>
<
add
key
=
"HasDisableDoorControl"
value
=
"1"
/>
<
add
key
=
"ACBaudRate"
value
=
"9600"
/>
<
add
key
=
"Default_Language"
value
=
"zh-CN"
/>
</
appSettings
>
<
log4net
>
...
...
source/ACSingleStore/记录.txt
查看文件 @
5338ca7
...
...
@@ -130,7 +130,8 @@ PRO,最后一盘料需要补充的高度,LastTrayAddHeight,10,,,,,,,,,
2.从料仓下方接盘时,压紧轴和升降轴一起运动。
3.吸盘吸料后,等待入库的过程中增加超时报警。
20190314修改:
拿走料盘的过程中增加出库处理。
...
...
source/DeviceLibrary/PanasonicServo/ACServerManager_Partial.cs
查看文件 @
5338ca7
...
...
@@ -190,7 +190,10 @@ namespace OnlineStore.DeviceLibrary
dataArray
=
ACCMDManager
.
GetWriteData
(
slvAddr
,
ACCMDManager
.
CMD_WriteCoil
,
addr
,
data
,
length
);
SendData
(
portName
,
dataArray
);
}
public
static
void
SuddenStop
(
ConfigMoveAxis
axis
)
{
SuddenStop
(
axis
.
DeviceName
,
axis
.
GetAxisValue
());
}
public
static
void
SuddenStop
(
string
portName
,
int
slvAddr
)
{
// RunBlock(7);
...
...
source/DeviceLibrary/PanasonicServo/BatchAxisController.cs
查看文件 @
5338ca7
...
...
@@ -15,7 +15,8 @@ namespace OnlineStore.DeviceLibrary
private
static
bool
IsStop
=
false
;
private
static
System
.
Timers
.
Timer
checkTimer
=
null
;
public
static
bool
StartCheck
()
private
static
string
TargetIoType
=
IO_Type
.
TrayCheck_LoadMaterial
;
public
static
bool
StartCheck
(
string
targetIo
)
{
if
(
checkTimer
==
null
)
{
...
...
@@ -25,11 +26,11 @@ namespace OnlineStore.DeviceLibrary
checkTimer
.
Elapsed
+=
CheckTimer_Elapsed
;
checkTimer
.
Enabled
=
false
;
}
TargetIoType
=
targetIo
;
checkTimer
.
Start
();
return
true
;
}
public
static
bool
StopCheck
()
{
if
(!(
checkTimer
==
null
))
...
...
@@ -44,9 +45,9 @@ namespace OnlineStore.DeviceLibrary
if
(
IsInProcess
)
{
return
;
}
IsInProcess
=
true
;
bool
result
=
false
;
if
(
KND
.
IOValue
(
LoadCSVLibrary
.
IO_Type
.
TrayCheck_LoadMaterial
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
KND
.
IOValue
(
TargetIoType
).
Equals
(
IO_VALUE
.
HIGH
))
{
LogUtil
.
info
(
"批量上料轴,检测到
上料机构料盘信号,可以停止运动"
);
LogUtil
.
info
(
"批量上料轴,检测到
【"
+
TargetIoType
+
"】信号,可以停止运动"
);
result
=
true
;
}
//else if (ACServerManager.GetLimitPositiveSingle(StoreManager.Config.Batch_Axis).Equals(1))
...
...
@@ -61,7 +62,7 @@ namespace OnlineStore.DeviceLibrary
ACServerManager
.
SuddenStop
(
StoreManager
.
Config
.
Batch_Axis
.
DeviceName
,
StoreManager
.
Config
.
Batch_Axis
.
GetAxisValue
());
StopCheck
();
}
IsInProcess
=
false
;
IsInProcess
=
false
;
}
}
}
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
查看文件 @
5338ca7
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/StoreConfig/AC/linePositions.csv
查看文件 @
5338ca7
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
5338ca7
...
...
@@ -180,8 +180,6 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
wait
.
WaitType
==
(
int
)
Wait_Type
.
BatchAxisMove_10
)
{
//if ((Config.Batch_Axis.IsSameAxis(wait.AxisInfo.DeviceName, wait.AxisInfo.GetAxisValue())) && wait.TargetPosition.Equals(Config.BatchAxis_P1))
//{
if
(!
wait
.
IsEnd
)
{
wait
.
IsEnd
=
AutomaticBaiting
.
BatchAxisIsEnd
(
wait
);
...
...
@@ -403,7 +401,7 @@ namespace OnlineStore.DeviceLibrary
InStoreLog
(
"入库:SI_06 压紧轴压紧,压紧轴到P2,升降轴稍微下降【"
+
Config
.
UpDownAxis_DownValue
+
"】,目标位置【"
+
targetPosition
+
"】 "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_06_CompressWork
);
ComMoveToPosition
(
moveP
.
ComPress_P2
,
true
);
ACAxisMove
(
Config
.
UpDown_Axis
,
targetPosition
,
Config
.
UpDownAxis_P
1
_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
targetPosition
,
Config
.
UpDownAxis_P
4
_Speed
);
}
else
{
...
...
@@ -832,10 +830,15 @@ namespace OnlineStore.DeviceLibrary
{
StoreMove
.
TimeOutSeconds
=
120
;
//ACAxisMove(Config.Batch_Axis, Config.BatchAxis_P1, Config.BatchAxis_P1_Speed);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBatchAxisStop
(
Config
.
Batch_Axis
,
Config
.
BatchAxis_P1
));
BatchAxisController
.
StartCheck
();
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBatchAxisStop
(
Config
.
Batch_Axis
,
Config
.
BatchAxis_P1
,
IO_Type
.
TrayCheck_LoadMaterial
));
BatchAxisController
.
StartCheck
(
IO_Type
.
TrayCheck_LoadMaterial
);
Config
.
Batch_Axis
.
TargetPosition
=
Config
.
BatchAxis_P1
;
ACServerManager
.
AbsMove
(
Config
.
Batch_Axis
.
DeviceName
,
Config
.
Batch_Axis
.
GetAxisValue
(),
Config
.
BatchAxis_P1
,
Config
.
BatchAxis_P1_Speed
);
int
speed
=
Config
.
BatchAxis_P1_Speed
;
if
(
AutomaticBaiting
.
BatchOutStoreHeight
>
0
)
{
speed
=
Config
.
BatchAxis_P1_Speed
/
2
;
}
ACServerManager
.
AbsMove
(
Config
.
Batch_Axis
.
DeviceName
,
Config
.
Batch_Axis
.
GetAxisValue
(),
Config
.
BatchAxis_P1
,
speed
);
OutStoreLog
(
"出库:SO_02 批量上下料轴到P1点【"
+
Config
.
BatchAxis_P1
+
"】 "
);
}
}
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
查看文件 @
5338ca7
...
...
@@ -67,7 +67,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
OutStore
))
{
//
OutStoreProcess();
OutStoreProcess
();
}
}
}
catch
(
Exception
ex
)
...
...
@@ -245,13 +245,15 @@ namespace OnlineStore.DeviceLibrary
default
:
break
;
}
}
#
region
入库流程
private
static
void
IsNeedInstore
()
{
if
(
IsNeedStartInout
)
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_R03_AutoAxisHome
);
LogUtil
.
info
(
Name
+
"复位中:需要检测是否有料盘,批量轴匀速上升速度【"
+
StoreManager
.
Config
.
Batch_Axis
.
TargetSpeed
+
"】"
);
ACAxisSpeedMove
(
StoreManager
.
Config
.
Batch_Axis
,
StoreManager
.
Config
.
Batch_Axis
.
TargetSpeed
);
ACAxisSpeedMove
(
StoreManager
.
Config
.
Batch_Axis
,
StoreManager
.
Config
.
Batch_Axis
.
TargetSpeed
,
IO_Type
.
TrayCheck_LoadMaterial
);
}
else
{
...
...
@@ -304,7 +306,7 @@ namespace OnlineStore.DeviceLibrary
else
{
LogUtil
.
info
(
Name
+
" 入料 ,轴上升到检测到料盘,速度【"
+
StoreManager
.
Config
.
Batch_Axis
.
TargetSpeed
+
"】"
);
ACAxisSpeedMove
(
StoreManager
.
Config
.
Batch_Axis
,
StoreManager
.
Config
.
Batch_Axis
.
TargetSpeed
);
ACAxisSpeedMove
(
StoreManager
.
Config
.
Batch_Axis
,
StoreManager
.
Config
.
Batch_Axis
.
TargetSpeed
,
IO_Type
.
TrayCheck_LoadMaterial
);
}
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_I02_MoveToUp
))
...
...
@@ -327,7 +329,7 @@ namespace OnlineStore.DeviceLibrary
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I06_SuckingDisc_Up
);
LogUtil
.
info
(
Name
+
"入料: 吸盘上升"
);
LogUtil
.
info
(
Name
+
"入料: 吸盘上升"
);
CylinderMove
(
IO_Type
.
SuckingDisc_Up
,
IO_Type
.
SuckingDisc_Down
,
false
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SuckingDisc_Down
,
IO_VALUE
.
LOW
));
...
...
@@ -339,7 +341,7 @@ namespace OnlineStore.DeviceLibrary
else
{
//TODO 报警
WarnMsg
=
ResourceControl
.
GetString
(
ResourceControl
.
XiLiaoError
,
"吸盘吸料失败"
);
WarnMsg
=
ResourceControl
.
GetString
(
ResourceControl
.
XiLiaoError
,
"吸盘吸料失败"
);
StoreManager
.
Store
.
Alarm
(
StoreAlarmType
.
BatchAlarm
,
ResourceControl
.
GetString
(
ResourceControl
.
XiLiaoError
,
"吸盘吸料失败"
),
WarnMsg
,
StoreMoveType
.
InStore
);
LogUtil
.
error
(
WarnMsg
,
103
);
}
...
...
@@ -350,7 +352,7 @@ namespace OnlineStore.DeviceLibrary
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I07_BatchAxisUp
);
LogUtil
.
info
(
Name
+
"入料: 批量上下料轴上升速度【"
+
StoreManager
.
Config
.
BatchAxis_SlowSpeed
+
"】"
);
ACAxisSpeedMove
(
StoreManager
.
Config
.
Batch_Axis
,
StoreManager
.
Config
.
BatchAxis_SlowSpeed
);
ACAxisSpeedMove
(
StoreManager
.
Config
.
Batch_Axis
,
StoreManager
.
Config
.
BatchAxis_SlowSpeed
,
IO_Type
.
TrayCheck_LoadMaterial
);
CylinderMove
(
IO_Type
.
SuckingDisc_Up
,
IO_Type
.
SuckingDisc_Down
,
true
);
if
(
StoreManager
.
Config
.
Default_TrayWidth
.
Equals
(
7
))
{
...
...
@@ -371,7 +373,7 @@ namespace OnlineStore.DeviceLibrary
{
WarnMsg
=
ResourceControl
.
GetString
(
ResourceControl
.
XiLiaoError
,
"吸盘吸料失败"
);
StoreManager
.
Store
.
Alarm
(
StoreAlarmType
.
BatchAlarm
,
ResourceControl
.
GetString
(
ResourceControl
.
XiLiaoError
,
"吸盘吸料失败"
),
WarnMsg
,
StoreMoveType
.
InStore
);
LogUtil
.
error
(
Name
+
"入料: 吸盘上升后未检测到吸盘压力信号,吸取料盘失败"
,
105
);
LogUtil
.
error
(
Name
+
"入料: 吸盘上升后未检测到吸盘压力信号,吸取料盘失败"
,
105
);
}
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_I07_BatchAxisUp
))
...
...
@@ -481,7 +483,7 @@ namespace OnlineStore.DeviceLibrary
addHeight
=
StoreManager
.
Config
.
LastTrayAddHeight
;
}
LastHeight
+=
addHeight
;
LogUtil
.
info
(
Name
+
"入料: 计算盘高:上升前【"
+
StartMovePosition
+
"】实时【"
+
EndMovePosition
+
"】补充【"
+
addHeight
+
"】计算后高度【"
+
LastHeight
+
"】"
);
LogUtil
.
info
(
Name
+
"入料: 计算盘高:上升前【"
+
StartMovePosition
+
"】实时【"
+
EndMovePosition
+
"】补充【"
+
addHeight
+
"】计算后高度【"
+
LastHeight
+
"】"
);
if
(
LastHeight
<
0
)
{
LastHeight
=
StoreManager
.
Config
.
GetDefaultHeight
();
...
...
@@ -588,6 +590,114 @@ namespace OnlineStore.DeviceLibrary
}
}
#
endregion
#
region
出库流程
public
static
string
StartOut
()
{
if
((!
StoreManager
.
Store
.
storeRunStatus
.
Equals
(
StoreRunStatus
.
Runing
))
||
(!
StoreManager
.
Store
.
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
None
)))
{
LogUtil
.
error
(
Name
+
" 启动出料流程失败,料仓不在待机状态"
+
StoreManager
.
Store
.
storeRunStatus
+
",MoveType"
+
StoreManager
.
Store
.
StoreMove
.
MoveType
);
return
"料仓不在待机状态"
+
StoreManager
.
Store
.
storeRunStatus
+
",MoveType"
+
StoreManager
.
Store
.
StoreMove
.
MoveType
;
}
if
(
AutoBaitingStatus
==
StoreRunStatus
.
Runing
&&
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
None
))
{
AutoBaitingStatus
=
StoreRunStatus
.
Busy
;
StoreMove
.
NewMove
(
StoreMoveType
.
OutStore
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_O00_Wait
);
LogUtil
.
info
(
Name
+
"启动出料"
);
return
""
;
}
else
{
LogUtil
.
error
(
Name
+
" 启动出料失败, Status="
+
AutoBaitingStatus
+
",MoveType="
+
StoreMove
.
MoveType
);
return
"启动出料失败, Status = "
+
AutoBaitingStatus
+
",MoveType = "
+
StoreMove
.
MoveType
;
}
}
private
static
void
OutStoreProcess
()
{
if
(
StoreMove
.
IsInWait
)
{
CheckWait
();
}
if
(
StoreMove
.
IsInWait
)
{
return
;
}
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_O00_Wait
))
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_O01_WaitDoorOpen
);
LogUtil
.
info
(
Name
+
"出料: 等待门锁打开 "
);
BatchDoorOpen
(
true
);
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_O01_WaitDoorOpen
))
{
if
(
KND
.
IOValue
(
IO_Type
.
OutCheck
).
Equals
(
IO_VALUE
.
HIGH
))
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_O02_WaitOutSingleLow
);
LogUtil
.
info
(
Name
+
" 出料 ,等待出料检测信号关闭"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
OutCheck
,
IO_VALUE
.
LOW
));
}
else
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_O03_SpeedMove
);
LogUtil
.
info
(
Name
+
" 出料 ,轴上升到检测到出料信号,速度【"
+
StoreManager
.
Config
.
BatchAxis_SlowSpeed
+
"】"
);
ACAxisSpeedMove
(
StoreManager
.
Config
.
Batch_Axis
,
StoreManager
.
Config
.
BatchAxis_SlowSpeed
,
IO_Type
.
OutCheck
);
}
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_O02_WaitOutSingleLow
))
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_O03_SpeedMove
);
LogUtil
.
info
(
Name
+
" 出料 ,轴上升到检测到出料信号,速度【"
+
StoreManager
.
Config
.
BatchAxis_SlowSpeed
+
"】"
);
ACAxisSpeedMove
(
StoreManager
.
Config
.
Batch_Axis
,
StoreManager
.
Config
.
Batch_Axis
.
TargetSpeed
,
IO_Type
.
OutCheck
);
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_O03_SpeedMove
))
{
//先判断极限是否亮
int
value
=
ACServerManager
.
GetLimitPositiveSingle
(
StoreManager
.
Config
.
Batch_Axis
);
if
(
value
.
Equals
(
1
))
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_O05_BackToP2
);
LogUtil
.
info
(
Name
+
"出料:上料轴移动到p2点【"
+
StoreManager
.
Config
.
BatchAxis_P2
+
"】"
);
ACAxisAbsMove
(
StoreManager
.
Config
.
Batch_Axis
,
StoreManager
.
Config
.
BatchAxis_P2
,
StoreManager
.
Config
.
BatchAxis_P2_Speed
);
}
else
{
//等待出料信号亮
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_O02_WaitOutSingleLow
);
LogUtil
.
info
(
Name
+
" 出料 ,等待出料检测信号关闭"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
OutCheck
,
IO_VALUE
.
LOW
));
}
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_O05_BackToP2
))
{
//TODO
LogUtil
.
info
(
Name
+
"出料:回到待机点完成,出料结束"
);
StoreMove
.
EndMove
();
AutoBaitingStatus
=
StoreRunStatus
.
Runing
;
}
else
{
LogUtil
.
error
(
Name
+
"未找到步骤:"
+
StoreMove
.
MoveType
);
}
}
private
static
void
StopOutProcess
()
{
if
(
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
OutStore
))
{
LogUtil
.
error
(
Name
+
"正在出料中,停止出料流程"
);
ACServerManager
.
SuddenStop
(
StoreManager
.
Config
.
Batch_Axis
);
StoreMove
.
EndMove
();
AutoBaitingStatus
=
StoreRunStatus
.
Runing
;
}
}
#
endregion
public
static
bool
DoorIsClose
()
{
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
查看文件 @
5338ca7
...
...
@@ -15,14 +15,14 @@ namespace OnlineStore.DeviceLibrary
private
static
int
StartMovePosition
=
0
;
private
static
int
EndMovePosition
=
0
;
//public static int AutoAxisIsMove = 0;
private
static
void
ACAxisSpeedMove
(
ConfigMoveAxis
moveAxis
,
int
targetSpeed
)
private
static
void
ACAxisSpeedMove
(
ConfigMoveAxis
moveAxis
,
int
targetSpeed
,
string
targetSingle
)
{
//AutoAxisIsMove = 1;
StartMovePosition
=
ACServerManager
.
GetActualtPosition
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
());
EndMovePosition
=
StartMovePosition
;
LogUtil
.
debug
(
"当前坐标:"
+
StartMovePosition
+
",批量上料轴开始匀速"
+
targetSpeed
+
"上升"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBatchAxisStop
(
moveAxis
,
0
));
BatchAxisController
.
StartCheck
();
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBatchAxisStop
(
moveAxis
,
0
,
targetSingle
));
BatchAxisController
.
StartCheck
(
targetSingle
);
ACServerManager
.
SpeedMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
targetSpeed
);
}
...
...
@@ -119,19 +119,7 @@ namespace OnlineStore.DeviceLibrary
IO_VALUE
value
=
(
IO_VALUE
)
ACServerManager
.
GetHomeSingle
(
wait
.
AxisInfo
.
DeviceName
,
wait
.
AxisInfo
.
GetAxisValue
());
wait
.
IsEnd
=
wait
.
IoValue
.
Equals
(
value
);
}
//else if (wait.WaitType == (int)Wait_Type.WaitHeight_7)
//{
//}
//else if (wait.WaitType == (int)Wait_Type.AxisLimitNegativeSingle_8)
//{
// IO_VALUE value = (IO_VALUE)ACServerManager.GetLimitNegativeSingle(wait.AxisInfo);
// wait.IsEnd = wait.IoValue.Equals(value);
//}
//else if (wait.WaitType == (int)Wait_Type.AxisLimitPositiveSingle_9)
//{
// IO_VALUE value = (IO_VALUE)ACServerManager.GetLimitPositiveSingle(wait.AxisInfo);
// wait.IsEnd = wait.IoValue.Equals(value);
//}
else
if
(
wait
.
WaitType
==
(
int
)
Wait_Type
.
BatchAxisMove_10
)
{
wait
.
IsEnd
=
BatchAxisIsEnd
(
wait
);
...
...
@@ -239,9 +227,9 @@ namespace OnlineStore.DeviceLibrary
public
static
bool
BatchAxisIsEnd
(
WaitResultInfo
wait
)
{
bool
result
=
false
;
if
(
KND
.
IOValue
(
IO_Type
.
TrayCheck_LoadMaterial
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
KND
.
IOValue
(
wait
.
IoType
).
Equals
(
IO_VALUE
.
HIGH
))
{
LogUtil
.
info
(
wait
.
ToStr
()
+
" 检测到
上料机构料盘信号,可以停止运动"
);
LogUtil
.
info
(
wait
.
ToStr
()
+
" 检测到
【"
+
wait
.
IoType
+
"】信号,可以停止运动"
);
result
=
true
;
}
else
if
(
ACServerManager
.
GetLimitPositiveSingle
(
wait
.
AxisInfo
).
Equals
(
1
))
...
...
@@ -477,7 +465,7 @@ namespace OnlineStore.DeviceLibrary
map
.
Add
(
ParamDefine
.
closeLock
,
ParamDefine
.
disable
);
map
.
Add
(
ParamDefine
.
takeOutReel
,
ParamDefine
.
disable
);
map
.
Add
(
ParamDefine
.
confirmReelOut
,
ParamDefine
.
disable
);
if
(
AutomaticBaiting
.
DoorStatus
.
Equals
(
2
))
if
(
DoorStatus
.
Equals
(
2
))
{
map
.
Add
(
ParamDefine
.
doorStatus
,
ResourceControl
.
GetString
(
ResourceControl
.
doorClose
,
"Door lock close"
));
}
...
...
@@ -487,15 +475,15 @@ namespace OnlineStore.DeviceLibrary
}
if
(
AutomaticBaiting
.
IsWaitTragGo
&&
(
AutomaticBaiting
.
IsGetTrayGo
.
Equals
(
false
)))
if
(
IsWaitTragGo
&&
(
IsGetTrayGo
.
Equals
(
false
)))
{
map
[
ParamDefine
.
confirmReelOut
]
=
ParamDefine
.
enable
;
}
else
if
(
AutomaticBaiting
.
CanOpenBatchDoor
())
else
if
(
CanOpenBatchDoor
())
{
if
(
AutomaticBaiting
.
DoorStatus
.
Equals
(
2
))
if
(
DoorStatus
.
Equals
(
2
))
{
if
(
AutomaticBaiting
.
BatchOutStoreCount
>
0
)
if
(
BatchOutStoreCount
>
0
)
{
map
[
ParamDefine
.
takeOutReel
]
=
ParamDefine
.
enable
;
}
...
...
@@ -515,10 +503,10 @@ namespace OnlineStore.DeviceLibrary
public
static
string
doOpenDoor
()
{
if
(
AutomaticBaiting
.
CanOpenBatchDoor
())
if
(
CanOpenBatchDoor
())
{
AutomaticBaiting
.
BatchDoorOpen
(
false
);
AutomaticBaiting
.
IsNeedStartInout
=
false
;
BatchDoorOpen
(
false
);
IsNeedStartInout
=
false
;
return
""
;
}
else
...
...
@@ -528,28 +516,29 @@ namespace OnlineStore.DeviceLibrary
}
public
static
string
doStartBatchIn
()
{
if
(!
AutomaticBaiting
.
DoorIsClose
())
if
(!
DoorIsClose
())
{
return
ResourceControl
.
GetString
(
ResourceControl
.
batchInError
,
"Batch storing Error: Close feeding device"
);
}
if
(
KND
.
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
HIGH
))
{
return
ResourceControl
.
GetString
(
ResourceControl
.
batchInError2
,
"Batch storing Error: gripper full, check before restoring"
);
}
AutomaticBaiting
.
BatchDoorClose
(
false
);
AutomaticBaiting
.
Reset
(
false
,
true
);
StopOutProcess
();
BatchDoorClose
(
false
);
Reset
(
false
,
true
);
return
""
;
}
public
static
string
doTakeReel
()
{
if
(
AutomaticBaiting
.
CanOpenBatchDoor
())
if
(
CanOpenBatchDoor
())
{
if
(
AutomaticBaiting
.
BatchOutStoreCount
>
0
&&
AutomaticBaiting
.
BatchOutStoreHeight
>
0
)
if
(
BatchOutStoreCount
>
0
&&
BatchOutStoreHeight
>
0
)
{
AutomaticBaiting
.
BatchDoorOpen
(
false
);
return
""
;
BatchDoorOpen
(
false
);
return
StartOut
();
//return "";
}
else
{
...
...
@@ -563,19 +552,23 @@ namespace OnlineStore.DeviceLibrary
}
public
static
string
doCloseDoor
()
{
if
(!
AutomaticBaiting
.
DoorIsClose
())
if
(!
DoorIsClose
())
{
return
(
ResourceControl
.
GetString
(
ResourceControl
.
CloseError
,
"Door lock Error: Close feeding device"
));
}
AutomaticBaiting
.
BatchDoorClose
(
false
);
AutomaticBaiting
.
Reset
(
false
,
false
);
StopOutProcess
();
BatchDoorClose
(
false
);
Reset
(
false
,
false
);
return
""
;
}
public
static
bool
doConfirmReelGo
()
{
LogUtil
.
info
(
ResourceControl
.
GetString
(
ResourceControl
.
TakeTrayOut
,
"Take out reel manually"
));
AutomaticBaiting
.
IsWaitTragGo
=
false
;
AutomaticBaiting
.
IsGetTrayGo
=
true
;
IsWaitTragGo
=
false
;
IsGetTrayGo
=
true
;
return
true
;
}
}
...
...
source/DeviceLibrary/store/StoreMoveStep.cs
查看文件 @
5338ca7
...
...
@@ -488,29 +488,28 @@ namespace OnlineStore.DeviceLibrary
#
endregion
//#region 自动上下料出料功能
///// <summary>
///// 吸盘吸走料盘,同时上料轴开始上升
///// </summary>
//AUTO_O01_SuckingDisc_Work,
///// <summary>
///// 等待1秒后吸盘下降
///// </summary>
//AUTO_O02_WaitTimeDown,
#
region
自动上下料出料功能
///// <summary>
///// 吸盘下降
///// </summary>
//AUTO_O03_SuckingDisc_Down,
///// <summary>
///// 放下料盘
///// </summary>
//AUTO_O04_PutTrayDown,
///// <summary>
///// 吸盘上升
///// </summary>
//AUTO_O05_SuckingDisc_Up,
//#endregion
AUTO_O00_Wait
=
1300
,
/// <summary>
/// 等待门锁打开
/// </summary>
AUTO_O01_WaitDoorOpen
=
1301
,
/// <summary>
/// 等待出料检测信号关闭
/// </summary>
AUTO_O02_WaitOutSingleLow
=
1302
,
/// <summary>
/// 向上运动,等待DI12亮或者极限亮停止
/// </summary>
AUTO_O03_SpeedMove
=
1303
,
/// <summary>
/// 极限亮,返回P2点
/// </summary>
AUTO_O05_BackToP2
=
1304
,
#
endregion
}
...
...
source/DeviceLibrary/store/model/StoreMoveInfo.cs
查看文件 @
5338ca7
...
...
@@ -277,7 +277,7 @@ namespace OnlineStore.DeviceLibrary
/// 10=等待批量上下料轴运动 停止
/// </summary>
/// <returns></returns>
public
static
WaitResultInfo
WaitBatchAxisStop
(
ConfigMoveAxis
moveAxis
,
int
targetPosition
)
public
static
WaitResultInfo
WaitBatchAxisStop
(
ConfigMoveAxis
moveAxis
,
int
targetPosition
,
string
targetIoType
)
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
TargetPosition
=
targetPosition
;
...
...
@@ -286,6 +286,7 @@ namespace OnlineStore.DeviceLibrary
wait
.
WaitType
=
(
int
)
Wait_Type
.
BatchAxisMove_10
;
wait
.
IsHomeMove
=
true
;
wait
.
IsEnd
=
false
;
wait
.
IoType
=
targetIoType
;
return
wait
;
}
/// <summary>
...
...
@@ -435,7 +436,6 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public
int
HeightValue
{
get
;
set
;
}
}
public
enum
Wait_Type
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论