Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit ad5ca24d
由
LN
编写于
2020-03-08 22:27:51 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
上料机构优化。
托盘优化:阻挡下降后,可能等不到check1灭。
1 个父辈
d2453747
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
327 行增加
和
174 行删除
source/AssemblyLineClient/App.config
source/AssemblyLineClient/FrmLineStore.cs
source/AssemblyLineClient/记录.txt
source/DeviceLibrary/assemblyLine/EquipBase.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_OutStore.cs
source/DeviceLibrary/assemblyLine/LineBean.cs
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
source/DeviceLibrary/model/KTK_Store.cs
source/AssemblyLineClient/App.config
查看文件 @
ad5ca24
...
...
@@ -6,64 +6,76 @@
<
appSettings
>
<!--是否开机自动启动料仓-->
<
add
key
=
"App_AutoRun"
value
=
"1"
/>
<
add
key
=
"App_Title"
value
=
"包装料料仓"
/>
<!-- 开始吹气的判断值(配置值=服务器发送的湿度值-开始吹气值)-->
<
add
key
=
"StartBlowValue"
value
=
"4"
/>
<!-- 停止吹气的判断值(配置值=服务器发送的湿度值-停止吹气值)-->
<
add
key
=
"StopBlowValue"
value
=
"4"
/>
<
add
key
=
"App_Title"
value
=
"流水线客户端"
/>
<!--
Server
address
-->
<
add
key
=
"http.server"
value
=
"http://10.85.160.25/myproject/"
/>
<!--<
add
key
=
"http.server"
value
=
"http://localhost/myproject/service/store/emptyPosForPutin"
/>-->
<
add
key
=
"http.server"
value
=
"http://192.168.101.11/myproject/"
/>
<!--
storeType
-->
<
add
key
=
"store_count"
value
=
"2"
/>
<
add
key
=
"Store_ConfigPath"
value
=
"\StoreConfig\StoreConfig.csv"
/>
<
add
key
=
"Line_moveEquip_count"
value
=
"18"
/>
<
add
key
=
"Line_feedingEquip_count"
value
=
"4"
/>
<
add
key
=
"Line_providingEquip_count"
value
=
"4"
/>
<
add
key
=
"Line_dischargeLine_count"
value
=
"2"
/>
<!--
start
one
store
config
-->
<
add
key
=
"
Shelf_Position_Config"
value
=
"\StoreConfig\shelfPosition
.csv"
/>
<
add
key
=
"
Store_Position_Config"
value
=
"\StoreConfig\linePositions
.csv"
/>
<
add
key
=
"
BOX_ConfigPath"
value
=
"\StoreConfig\BoxConfig
.csv"
/>
<
add
key
=
"
Store_Type"
value
=
"RC_AC_PA
"
/>
<
add
key
=
"
Store_CID"
value
=
"packing-store
"
/>
<
add
key
=
"
Store_CID_1"
value
=
"packing-19
"
/>
<
add
key
=
"
Store_CID_2"
value
=
"packing-2
0"
/>
<
add
key
=
"
ConfigPath_Line"
value
=
"\LineConfig\Config_Line
.csv"
/>
<
add
key
=
"
ConfigPath_MoveEquip"
value
=
"\LineConfig\MoveEquip\Config_MoveEquip
.csv"
/>
<
add
key
=
"
ConfigPath_FeedingEquip"
value
=
"\LineConfig\Config_FeedingEquip
.csv"
/>
<
add
key
=
"
ConfigPath_ProvidingEquip"
value
=
"\LineConfig\Config_ProvidingEquip.csv
"
/>
<
add
key
=
"
ConfigPath_DischargeLine"
value
=
"\LineConfig\Config_DischargeLine.csv
"
/>
<
add
key
=
"
Line_Type"
value
=
"Line
"
/>
<
add
key
=
"
Line_CID"
value
=
"rc125
0"
/>
<!--
end
one
store
config
-->
<
add
key
=
"ACBaudRate"
value
=
"115200"
/>
<
add
key
=
"InOutDefaultPosition"
value
=
"52000"
/>
<
add
key
=
"Config_Pwd"
value
=
"123456"
/>
<!--摄像机名称列表配置,用
#分割-->
<
add
key
=
"CameraName"
value
=
"GigE:MV-CE100-30GC (00C69898519)#GigE:MV-CE100-30GC (00C95305929)"
/>
<!--二维码类型列表配置,用
#分割,一维码=Barcode 二维码: QR Code#Data Matrix ECC 200#Micro QR Code-->
<
add
key
=
"CodeType"
value
=
"QR Code#Data Matrix ECC 200"
/>
<!--<
add
key
=
"CodeType"
value
=
"Data Matrix ECC 200"
/>-->
<
add
key
=
"ACBaudRate"
value
=
"115200"
/>
<!--二维码参数文件所在路径,文件名与二维码类型名一样-->
<
add
key
=
"CodeParamPath"
value
=
"\CodeParam\"
/>
<
add
key
=
"Config_Pwd"
value
=
"123456"
/>
<!--出库等待料盘拿走的时间,秒-->
<
add
key
=
"OutStoreWaitSeconds"
value
=
"1"
/>
<!--温控器类型,
0
=壁挂王字壳温湿度变送器,
1
=妙昕温湿度记录仪-->
<
add
key
=
"HumitureControllerType"
value
=
"0"
/>
<
add
key
=
"OutStoreWaitSeconds"
value
=
"10"
/>
<
add
key
=
"UseAIOBOX"
value
=
"1"
/>
<
add
key
=
"DIMS"
value
=
"60"
/>
<
add
key
=
"DOMS"
value
=
"300"
/>
<!--流水线地址和端口配置-->
<
add
key
=
"LineServerIp"
value
=
"192.168.101.11"
/>
<
add
key
=
"LineServerPort"
value
=
"5246"
/>
<!--是否调试状态-->
<
add
key
=
"IsInDebug"
value
=
"1"
/>
<
add
key
=
"UseBuzzer"
value
=
"0"
/>
<!--
IO
模块是否主动上传-->
<
add
key
=
"AIOAutoUpload"
value
=
"0"
/>
<!--流水线监听端口-->
<
add
key
=
"TCPServerPort"
value
=
"5246"
/>
<!--
AGV
调度服务器地址-->
<
add
key
=
"AgvServerIp"
value
=
"10.85.160.20"
/>
<!--
IO
配置-->
<
add
key
=
"DIMS"
value
=
"60"
/>
<
add
key
=
"DOMS"
value
=
"300"
/>
<
add
key
=
"LineRunTest"
value
=
"1"
/>
<!--
ABB
机器人服务器-->
<
add
key
=
"ABBServerPort"
value
=
"21"
/>
<!--是否打开托盘编码界面-->
<
add
key
=
"OpenRFIDWrite"
value
=
"1"
/>
<
add
key
=
"DefaultPWD"
value
=
"123456"
/>
<!--当前调试的设备
ID
,分号分割-->
<
add
key
=
"DebugDeviceId"
value
=
"0"
/>
<
add
key
=
"Server_Log_Open"
value
=
"0"
/>
<
add
key
=
"CodeCount"
value
=
"3"
/>
<
add
key
=
"Tool_P3_Offset"
value
=
"7000"
/>
<
add
key
=
"Tool_P4_Offset"
value
=
"-2000"
/>
<
add
key
=
"Tool_P5_Offset"
value
=
"-2000"
/>
<
add
key
=
"Tool_P6_Offset"
value
=
"7000"
/>
<
add
key
=
"Tool_TargetSpeed"
value
=
"20"
/>
<
add
key
=
"Tool_TargetPosition"
value
=
"1835000"
/>
<!--是否启用入料口移门,
1
=启用,
0
=禁用-->
<
add
key
=
"UseDoor"
value
=
"0"
/>
<
add
key
=
"Agv_Log_Open"
value
=
"1"
/>
<
add
key
=
"AutoShelfInstore"
value
=
"1"
/>
<
add
key
=
"DefaultTrayNum"
value
=
"0"
/>
<
add
key
=
"NeedScanCode"
value
=
"1"
/>
<
add
key
=
"Agv_Log_Open"
value
=
"0"
/>
</
appSettings
>
<!-- <
log4net
> -->
<!-- <
appender
name
=
"RollingLogFileAppender"
type
=
"log4net.Appender.RollingFileAppender"
> -->
<!-- <
file
value
=
"logs/Line-RC1250.log"
/> -->
<!-- <
param
name
=
"Encoding"
value
=
"UTF-8"
/> -->
<!-- <
appendToFile
value
=
"true"
/> -->
<!-- <
rollingStyle
value
=
"Date"
/> -->
<!-- <
datePattern
value
=
"yyyy-MM-dd"
/> -->
<!-- <
layout
type
=
"log4net.Layout.PatternLayout"
> -->
<!-- <
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/> -->
<!-- </
layout
> -->
<!-- </
appender
> -->
<!-- <
root
> -->
<!-- <
level
value
=
"Info"
/> -->
<!-- <
appender
-
ref
ref
=
"RollingLogFileAppender"
/> -->
<!-- </
root
> -->
<!-- </
log4net
> -->
<
log4net
>
<
appender
name
=
"RollingLogFileAppender"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"logs/
Packing-store-19-2
0.log"
/>
<
file
value
=
"logs/
Line-RC125
0.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
...
...
@@ -73,7 +85,7 @@
</
layout
>
</
appender
>
<
appender
name
=
"TheRFID"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"logs/TheRFID-
19-20
.log"
/>
<
file
value
=
"logs/TheRFID-
line
.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
...
...
@@ -87,9 +99,13 @@
<
appender
-
ref
ref
=
"RollingLogFileAppender"
/>
</
logger
>
<
logger
name
=
"TheRFID"
>
<
level
value
=
"
Debug
"
/>
<
level
value
=
"
Info
"
/>
<
appender
-
ref
ref
=
"TheRFID"
/>
</
logger
>
<!--<
root
>
<
level
value
=
"Info"
/>
<
appender
-
ref
ref
=
"RollingLogFileAppender"
/>
</
root
>-->
</
log4net
>
<
startup
>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.6.1"
/>
...
...
source/AssemblyLineClient/FrmLineStore.cs
查看文件 @
ad5ca24
...
...
@@ -418,8 +418,11 @@ namespace OnlineStore.AssemblyLine
}
AgvClient
.
Dispose
();
IOManager
.
instance
.
CloseAllDO
();
IOManager
.
instance
.
CloseAllConnection
();
if
(
IOManager
.
instance
!=
null
)
{
IOManager
.
instance
.
CloseAllDO
();
IOManager
.
instance
.
CloseAllConnection
();
}
}
private
void
btnClearLog_Click
(
object
sender
,
EventArgs
e
)
...
...
source/AssemblyLineClient/记录.txt
查看文件 @
ad5ca24
...
...
@@ -274,7 +274,8 @@ PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,0X0=800
20200308
增加托盘顺序检测功能NeedCheckTray的开关选项。
上料机构优化。
托盘优化:阻挡下降后,可能等不到check1灭。
...
...
source/DeviceLibrary/assemblyLine/EquipBase.cs
查看文件 @
ad5ca24
...
...
@@ -146,6 +146,11 @@ namespace OnlineStore.DeviceLibrary
return
;
}
BaseTimerProcess
();
if
(
TimerMaxSeconds
>
3
&&
runStatus
>=
LineRunStatus
.
Runing
)
{
TimerMaxSeconds
=
3
;
}
}
catch
(
Exception
ex
)
{
...
...
@@ -194,6 +199,7 @@ namespace OnlineStore.DeviceLibrary
}
protected
void
ResetClearData
()
{
TimerMaxSeconds
=
10
;
trayCount
=
0
;
SetWarnMsg
(
""
);
alarmType
=
LineAlarmType
.
None
;
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
查看文件 @
ad5ca24
...
...
@@ -105,13 +105,15 @@ namespace OnlineStore.DeviceLibrary
lastStopDown
=
DateTime
.
Now
;
SecondMoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
,
CheckParam
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_00_Stop1Down
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
200
));
//
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
LogUtil
.
debug
(
Name
+
" ["
+
trayCount
+
"] 检测到SW_StopCheck:"
+
SecondMoveInfo
.
SLog
+
"阻挡气缸下降 ,等待 SW_StopCheck=0"
);
//CheckLog("检测到SW_StopCheck:" + SecondMoveInfo.SLog + "阻挡气缸下降 ,等待 SW_StopCheck=0" );
IOMove
(
IO_Type
.
SW_StopDown
,
IO_VALUE
.
HIGH
,
1200
);
SecondMoveInfo
.
OneWaitCanEndStep
=
true
;
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.StopDownWaitTime));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW_StopDown
,
IO_VALUE
.
HIGH
));
//
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW_StopDown, IO_VALUE.HIGH));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW_StopCheck
,
IO_VALUE
.
LOW
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW_TrayCheck
,
IO_VALUE
.
HIGH
));
//IOMove(IO_Type.SW_StopDown, IO_VALUE.HIGH, TrayManager.StopDownWaitTime);
}
}
...
...
@@ -143,8 +145,10 @@ namespace OnlineStore.DeviceLibrary
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_00_Stop1Down
);
CheckLog
(
" 检测到FL_StopCheck:"
+
SecondMoveInfo
.
SLog
+
" FL阻挡1下降 ,等待 FL_StopCheck=0"
);
IOMove
(
IO_Type
.
FL_StopCylinder_Down1
,
IO_VALUE
.
HIGH
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
FL_StopCylinder_Down1
,
IO_VALUE
.
HIGH
));
SecondMoveInfo
.
OneWaitCanEndStep
=
true
;
//SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.FL_StopCylinder_Down1, IO_VALUE.HIGH));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
FL_StopCheck
,
IO_VALUE
.
LOW
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
FL_TrayCheck
,
IO_VALUE
.
HIGH
));
/// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.StopDownWaitTime));
}
}
...
...
@@ -199,7 +203,7 @@ namespace OnlineStore.DeviceLibrary
{
TimeSpan
span
=
DateTime
.
Now
-
SecondMoveInfo
.
LastSetpTime
;
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_01_FixtureCheck
);
LogUtil
.
debug
(
Name
+
"托盘阻挡:"
+
SecondMoveInfo
.
SLog
+
"阻挡气缸上升,下降耗时("
+
FormUtil
.
GetSpanStr
(
span
)+
"),等待SW_TrayCheck=1)"
);
LogUtil
.
debug
(
Name
+
"托盘阻挡:"
+
SecondMoveInfo
.
SLog
+
"阻挡气缸上升,下降耗时("
+
FormUtil
.
GetSpanStr
(
span
)
+
"),等待SW_TrayCheck=1)"
);
IOMove
(
IO_Type
.
SW_StopDown
,
IO_VALUE
.
LOW
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW_TrayCheck
,
IO_VALUE
.
HIGH
));
}
...
...
@@ -258,7 +262,7 @@ namespace OnlineStore.DeviceLibrary
LineManager
.
Line
.
CylinderMove
(
null
,
IO_Type
.
SW3_TopCylinder_Down
,
IO_Type
.
SW3_TopCylinder_Up
);
}
else
{
{
CheckLog
(
"托盘检测:"
+
SecondMoveInfo
.
SLog
+
" 需要此托盘,横移顶升气缸上 升 "
);
}
}
...
...
@@ -274,13 +278,13 @@ namespace OnlineStore.DeviceLibrary
CheckLog
(
"托盘放行 "
+
SecondMoveInfo
.
SLog
+
" ,等待 NextStopCheck=0"
);
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.NextStopCheck, IO_VALUE.LOW));
}
else
else
{
CheckLog
(
"托盘检测:不需要此托盘,写一下顶升上升,结束处理"
);
if
(
Config
.
SidesWayNum
.
Equals
(
2
))
{
CylinderMove
(
null
,
IO_Type
.
SW_TopCylinder_Down
,
IO_Type
.
SW_TopCylinder_Up
);
if
(
LineManager
.
Line
.
SwCanUpMove
(
3
))
if
(
LineManager
.
Line
.
SwCanUpMove
(
3
))
{
LineManager
.
Line
.
CylinderMove
(
null
,
IO_Type
.
SW3_TopCylinder_Down
,
IO_Type
.
SW3_TopCylinder_Up
);
}
...
...
@@ -356,17 +360,18 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_14_TopDown
))
{
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_15_WaitCanGo
);
if
(
Config
.
SidesWayNum
>
0
)
{
CheckLog
(
"托盘放行 "
+
SecondMoveInfo
.
SLog
+
" ,等待托盘离开"
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW_TrayCheck
,
IO_VALUE
.
LOW
));
}
else
{
CheckLog
(
"托盘放行 "
+
SecondMoveInfo
.
SLog
+
" ,等待 NextStopCheck=0"
);
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.NextStopCheck, IO_VALUE.LOW));
}
MO_15_WaitCanGo
();
//SecondMoveInfo.NextMoveStep(LineMoveStep.MO_15_WaitCanGo);
//if (Config.SidesWayNum > 0)
//{
// CheckLog("托盘放行 " + SecondMoveInfo.SLog + " ,等待托盘离开");
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW_TrayCheck, IO_VALUE.LOW));
//}
//else
//{
// CheckLog("托盘放行 " + SecondMoveInfo.SLog + " ,等待 NextStopCheck=0");
// // SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.NextStopCheck, IO_VALUE.LOW));
//}
}
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_15_WaitCanGo
))
{
...
...
@@ -423,7 +428,63 @@ namespace OnlineStore.DeviceLibrary
}
}
}
private
void
TrayMoveOk
()
{
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_12_MoveOk
);
if
(
Config
.
SidesWayNum
>
0
)
{
if
(
CylinderIsOk
(
IO_Type
.
SW_LocationCylinder_Up
,
IO_Type
.
SW_LocationCylinder_Down
))
{
if
(
Config
.
SidesWayNum
.
Equals
(
2
))
{
//preTrayNum = currTrayNum;
CheckLog
(
"托盘放行: 此处为环形线横移2,顶升气缸不需要下降, (托盘放行结束) "
);
SMoveEnd
();
}
else
{
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_14_TopDown
);
CheckLog
(
"托盘放行, "
+
SecondMoveInfo
.
SLog
+
" ,环形线顶升气缸下降)"
);
CylinderMove
(
SecondMoveInfo
,
IO_Type
.
SW_TopCylinder_Up
,
IO_Type
.
SW_TopCylinder_Down
);
}
}
else
{
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_13_LoactionDown
);
SInLog
(
"托盘放行, "
+
SecondMoveInfo
.
SLog
+
" 托盘开始放行,环形线定位气缸下降"
);
CylinderMove
(
SecondMoveInfo
,
IO_Type
.
SW_LocationCylinder_Up
,
IO_Type
.
SW_LocationCylinder_Down
);
}
}
else
{
if
(
CylinderIsOk
(
IO_Type
.
FL_TopCylinder_Up
,
IO_Type
.
FL_TopCylinder_Down
))
{
MO_15_WaitCanGo
();
}
else
{
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_14_TopDown
);
CheckLog
(
"托盘放行, "
+
SecondMoveInfo
.
SLog
+
" , 顶升气缸下降)"
);
CylinderMove
(
SecondMoveInfo
,
IO_Type
.
FL_TopCylinder_Up
,
IO_Type
.
FL_TopCylinder_Down
);
}
}
}
private
void
MO_15_WaitCanGo
()
{
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_15_WaitCanGo
);
if
(
Config
.
SidesWayNum
>
0
)
{
CheckLog
(
"托盘放行 "
+
SecondMoveInfo
.
SLog
+
" ,等待托盘离开"
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW_TrayCheck
,
IO_VALUE
.
LOW
));
}
else
{
CheckLog
(
"托盘放行 "
+
SecondMoveInfo
.
SLog
+
" ,等待 NextStopCheck=0"
);
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.NextStopCheck, IO_VALUE.LOW));
}
}
private
void
SMoveEnd
()
{
lastStopDown
=
DateTime
.
Now
.
AddSeconds
(-
2
);
...
...
@@ -804,12 +865,6 @@ namespace OnlineStore.DeviceLibrary
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":上料横移机构上升 "
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_26_CylinderUp
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_27_UpDownAxisToP1
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":升降伺服到P1点"
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
UpDownAxisP1
,
Config
.
UpdownAxis_P1Speed
);
if
(
Config
.
SidesWayNum
>
0
)
{
InLog
(
MoveInfo
.
SLog
+
" 提前下降顶升气缸 ,环形线定位气缸先下降"
);
...
...
@@ -820,12 +875,18 @@ namespace OnlineStore.DeviceLibrary
InLog
(
MoveInfo
.
SLog
+
" 提前顶升下降, 顶升气缸下降)"
);
CylinderMove
(
null
,
IO_Type
.
FL_TopCylinder_Up
,
IO_Type
.
FL_TopCylinder_Down
);
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_26_CylinderUp
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_27_UpDownAxisToP1
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":升降伺服到P1点,托盘开始放行"
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
UpDownAxisP1
,
Config
.
UpdownAxis_P1Speed
);
// SecondMoveInfo.NextMoveStep(LineMoveStep.MO_12_MoveOk);
TrayMoveOk
();
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_27_UpDownAxisToP1
))
{
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":上料横移机构上升已到位,托盘开始放行 "
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_12_MoveOk
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":上料横移机构上升已到位 "
);
CheckHasTray
();
}
#
endregion
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_OutStore.cs
查看文件 @
ad5ca24
...
...
@@ -407,6 +407,11 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_216_CylinderUp
);
OutLog
(
"紧急出料"
+
MoveInfo
.
SLog
+
":上料横移机构上升"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
if
(
Config
.
SidesWayNum
.
Equals
(
3
))
{
InLog
(
MoveInfo
.
SLog
+
" 提前下降顶升气缸 ,环形线定位气缸先下降"
);
CylinderMove
(
null
,
IO_Type
.
SW_LocationCylinder_Up
,
IO_Type
.
SW_LocationCylinder_Down
);
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_216_CylinderUp
))
{
...
...
@@ -417,7 +422,8 @@ namespace OnlineStore.DeviceLibrary
int
trayNum
=
MoveInfo
.
MoveParam
!=
null
?
MoveInfo
.
MoveParam
.
TrayNumber
:
currTrayNum
;
//更新此托盘为空托盘
TrayManager
.
UpdateTrayInfo
(
trayNum
,
false
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_12_MoveOk
);
//SecondMoveInfo.NextMoveStep(LineMoveStep.MO_12_MoveOk);
TrayMoveOk
();
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_217_UpdownAxisToP1
))
{
...
...
source/DeviceLibrary/assemblyLine/LineBean.cs
查看文件 @
ad5ca24
...
...
@@ -293,7 +293,8 @@ namespace OnlineStore.DeviceLibrary
}
private
void
RHomeOp
()
{
mainTimer
.
Interval
=
1000
;
maxSeconds
=
10
;
// TrayManager.SidesWayStateMap = new System.Collections.Concurrent.ConcurrentDictionary<int, int>() ;
alarmType
=
LineAlarmType
.
None
;
mainTimer
.
Enabled
=
false
;
...
...
@@ -691,10 +692,11 @@ namespace OnlineStore.DeviceLibrary
}
private
bool
busyPro
=
false
;
private
DateTime
busyProTime
=
DateTime
.
Now
;
private
int
maxSeconds
=
3
;
private
void
LineTimerPro
()
{
TimeSpan
span
=
DateTime
.
Now
-
busyProTime
;
if
(
busyPro
&&
span
.
TotalSeconds
<
3
)
if
(
busyPro
&&
span
.
TotalSeconds
<
maxSeconds
)
{
return
;
}
...
...
@@ -893,7 +895,9 @@ namespace OnlineStore.DeviceLibrary
runStatus
=
LineRunStatus
.
Runing
;
lineStatus
=
LineStatus
.
StoreOnline
;
MoveInfo
.
EndMove
();
LogUtil
.
info
(
Name
+
"所有移栽模块复位完成,打开流水线,开始运转,耗时 ["
+
FormUtil
.
GetSpanStr
(
span
)
+
"]"
);
mainTimer
.
Interval
=
300
;
maxSeconds
=
3
;
LogUtil
.
info
(
Name
+
"所有移栽模块复位完成,打开流水线,开始运转,定时器改为300,耗时 ["
+
FormUtil
.
GetSpanStr
(
span
)
+
"]"
);
}
else
if
(
span
.
TotalSeconds
>
120
)
{
...
...
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
查看文件 @
ad5ca24
...
...
@@ -21,7 +21,7 @@ namespace OnlineStore.DeviceLibrary
public
bool
CanProcessLine
(
bool
isCheckSleep
=
true
)
{
if
(
runStatus
<=
LineRunStatus
.
Wait
)
if
(
runStatus
<=
LineRunStatus
.
Wait
)
{
return
true
;
}
...
...
@@ -31,12 +31,12 @@ namespace OnlineStore.DeviceLibrary
IOManager
.
IOValue
(
IO_Type
.
DriveMotor_Run3
,
0
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOManager
.
IOValue
(
IO_Type
.
DriveMotor_Run4
,
0
).
Equals
(
IO_VALUE
.
HIGH
))
{
return
true
;
return
true
;
}
return
false
;
}
private
DateTime
preIoTimerOutTime
=
DateTime
.
Now
;
private
void
IOTimeOutProcess
()
{
...
...
@@ -63,7 +63,7 @@ namespace OnlineStore.DeviceLibrary
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"IOTimeOutProcess出错:"
,
ex
);
LogUtil
.
error
(
"IOTimeOutProcess出错:"
,
ex
);
}
}
private
DateTime
preRWTime
=
DateTime
.
Now
;
...
...
@@ -87,12 +87,12 @@ namespace OnlineStore.DeviceLibrary
isOk
=
false
;
}
foreach
(
WaitResultInfo
wait
in
list
)
{
if
(
wait
==
null
||
wait
.
IsEnd
)
{
if
(
wait
==
null
||
wait
.
IsEnd
)
{
continue
;
}
NotOkMsg
=
" ["
+
wait
.
ToStr
()+
"] "
;
NotOkMsg
=
" ["
+
wait
.
ToStr
()
+
"] "
;
if
(
wait
.
WaitType
.
Equals
(
WaitEnum
.
W002_IOValue
))
{
NotOkMsg
=
" ["
+
Config
.
GetDisplayName
(
wait
.
IoType
)
+
"="
+
wait
.
IoValue
+
"] "
;
...
...
@@ -147,7 +147,8 @@ namespace OnlineStore.DeviceLibrary
{
int
storeId
=
checkWaitInfo
.
MoveParam
.
GetStoreId
();
wait
.
IsEnd
=
LineServer
.
BoxCanReviceTray
(
storeId
);
}
else
if
(
wait
.
WaitType
.
Equals
(
WaitEnum
.
W010_SWCanTopUp
))
}
else
if
(
wait
.
WaitType
.
Equals
(
WaitEnum
.
W010_SWCanTopUp
))
{
wait
.
IsEnd
=
SwCanUpMove
(
wait
.
TargetPosition
);
}
...
...
@@ -166,7 +167,7 @@ namespace OnlineStore.DeviceLibrary
{
checkWaitInfo
.
EndStepWait
();
}
else
if
(
span
.
TotalSeconds
>
checkWaitInfo
.
TimeOutSeconds
)
else
if
(
span
.
TotalSeconds
>
checkWaitInfo
.
TimeOutSeconds
)
{
WarnMsg
=
checkWaitInfo
.
Name
+
"["
+
checkWaitInfo
.
MoveStep
+
"]["
+
NotOkMsg
+
"]已等待["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]秒"
;
LogUtil
.
error
(
WarnMsg
,
100
);
...
...
@@ -175,32 +176,32 @@ namespace OnlineStore.DeviceLibrary
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
checkWaitInfo
.
Name
+
" ["
+
checkWaitInfo
.
MoveStep
+
"] CheckWait 出错:"
,
ex
);
LogUtil
.
error
(
checkWaitInfo
.
Name
+
" ["
+
checkWaitInfo
.
MoveStep
+
"] CheckWait 出错:"
,
ex
);
}
}
}
#
endregion
#
region
出库
public
override
bool
StartOutStoreMove
(
InOutParam
param
)
{
{
return
true
;
}
protected
override
void
OutStoreProcess
()
{
{
}
#
endregion
#
region
入库
public
override
bool
StartInStoreMove
(
InOutParam
param
)
{
return
true
;
{
return
true
;
}
protected
override
void
InStoreProcess
()
{
{
}
#
endregion
...
...
@@ -243,17 +244,16 @@ namespace OnlineStore.DeviceLibrary
Sw23TrayNum
=
trayNum
;
SW23_MoveInfo
.
NewMove
(
LineMoveType
.
InStore
);
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW03_WaitTime
);
SW23WaitTrayNum
=
-
1
;
SWLog
(
"横移轨道23:检测到SW2_TrayCheck,等待SW3_TrayCheck=0, 托盘号 ["
+
Sw23TrayNum
+
"] ,清空 SW23WaitTrayNum="
+
SW23WaitTrayNum
);
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW2_TrayCheck
,
IO_VALUE
.
HIGH
));
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW3_TrayCheck
,
IO_VALUE
.
LOW
));
// CylinderMove(SW23_MoveInfo, IO_Type.SW2_LocationCylinder_Up, IO_Type.SW2_LocationCylinder_Down);
// CylinderMove(SW23_MoveInfo, IO_Type.SW3_LocationCylinder_Up, IO_Type.SW3_LocationCylinder_Down);
//SW23WaitTrayNum = -1;
//SWLog("横移轨道23:检测到SW2_TrayCheck,等待SW3_TrayCheck=0, 托盘号 [" + Sw23TrayNum + "] ,清空 SW23WaitTrayNum=" + SW23WaitTrayNum);
//SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW2_TrayCheck, IO_VALUE.HIGH));
//SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW3_TrayCheck, IO_VALUE.LOW));
SW23_SW04_WaitCanUp
();
}
else
{
SW23WaitTrayNum
=
trayNum
;
LogInfo
(
"Equip_TrayPEndEvent【"
+
swNum
+
"】【"
+
trayNum
+
"】失败,SW23_MoveInfo 忙碌中,记录 SW23WaitTrayNum="
+
SW23WaitTrayNum
);
LogInfo
(
"Equip_TrayPEndEvent【"
+
swNum
+
"】【"
+
trayNum
+
"】失败,SW23_MoveInfo 忙碌中,记录 SW23WaitTrayNum="
+
SW23WaitTrayNum
);
}
}
else
if
(
swNum
.
Equals
(
4
))
...
...
@@ -264,16 +264,15 @@ namespace OnlineStore.DeviceLibrary
SW41_MoveInfo
.
NewMove
(
LineMoveType
.
InStore
);
SW41_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW03_WaitTime
);
SW41WaitTrayNum
=
-
1
;
SWLog
(
"横移轨道41:检测到SW4_TrayCheck,等待SW1_TrayCheck=0,托盘号 ["
+
Sw41TrayNum
+
"] ,清空 SW41WaitTrayNum="
+
SW41WaitTrayNum
);
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW4_TrayCheck
,
IO_VALUE
.
HIGH
));
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW1_TrayCheck
,
IO_VALUE
.
LOW
));
//CylinderMove(SW41_MoveInfo, IO_Type.SW4_LocationCylinder_Up, IO_Type.SW4_LocationCylinder_Down);
// CylinderMove(SW41_MoveInfo, IO_Type.SW1_LocationCylinder_Up, IO_Type.SW1_LocationCylinder_Down);
//SWLog("横移轨道41:检测到SW4_TrayCheck,等待SW1_TrayCheck=0,托盘号 [" + Sw41TrayNum + "] ,清空 SW41WaitTrayNum=" + SW41WaitTrayNum);
//SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW4_TrayCheck, IO_VALUE.HIGH));
//SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW1_TrayCheck, IO_VALUE.LOW));
SW41_SW04_WaitCanUp
();
}
else
{
SW41WaitTrayNum
=
trayNum
;
LogInfo
(
"Equip_TrayPEndEvent【"
+
swNum
+
"】【"
+
trayNum
+
"】失败,SW41_MoveInfo 忙碌中,记录 SW41WaitTrayNum ="
+
SW41WaitTrayNum
);
LogInfo
(
"Equip_TrayPEndEvent【"
+
swNum
+
"】【"
+
trayNum
+
"】失败,SW41_MoveInfo 忙碌中,记录 SW41WaitTrayNum ="
+
SW41WaitTrayNum
);
}
}
}
...
...
@@ -297,10 +296,10 @@ namespace OnlineStore.DeviceLibrary
return
true
;
}
if
(
sidesWayNum
.
Equals
(
2
)
&&
SW23WaitTrayNum
<
0
)
{
{
if
(
SW23_MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
{
return
true
;
return
true
;
}
else
if
(
SW23_MoveInfo
.
MoveStep
<=
(
LineMoveStep
.
SW12_WaitTrayGo
)
&&
SW23_MoveInfo
.
MoveStep
>=
(
LineMoveStep
.
SW10_WatOutFixture2
))
...
...
@@ -311,12 +310,12 @@ namespace OnlineStore.DeviceLibrary
else
if
(
sidesWayNum
.
Equals
(
3
)
&&
SW23WaitTrayNum
<
0
&&
runStatus
<=
LineRunStatus
.
Wait
)
{
return
true
;
}
}
else
if
(
sidesWayNum
.
Equals
(
4
)
&&
SW41WaitTrayNum
<
0
)
{
{
if
(
SW41_MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
{
return
true
;
return
true
;
}
else
if
(
SW41_MoveInfo
.
MoveStep
<=
(
LineMoveStep
.
SW12_WaitTrayGo
)
&&
SW41_MoveInfo
.
MoveStep
>=
(
LineMoveStep
.
SW10_WatOutFixture2
))
...
...
@@ -377,18 +376,18 @@ namespace OnlineStore.DeviceLibrary
private
static
LineMoveInfo
SW41_MoveInfo
=
null
;
private
static
LineMoveInfo
SW23_MoveInfo
=
null
;
private
void
SideWayStop
()
{
sw23WaitWatch
.
Stop
();
sw41WaitWatch
.
Stop
();
sw41WaitWatch
.
Stop
();
SW41_MoveInfo
.
EndMove
();
SW23_MoveInfo
.
EndMove
();
SW23_MoveInfo
.
EndMove
();
IOMove
(
IO_Type
.
SW1_MotorRun
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SW2_MotorRun
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SW3_MotorRun
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SW4_MotorRun
,
IO_VALUE
.
LOW
);
}
IOMove
(
IO_Type
.
SW4_MotorRun
,
IO_VALUE
.
LOW
);
}
private
Stopwatch
sw41WaitWatch
=
new
Stopwatch
();
private
Stopwatch
sw23WaitWatch
=
new
Stopwatch
();
private
bool
sdIsInprocess
=
false
;
...
...
@@ -427,7 +426,7 @@ namespace OnlineStore.DeviceLibrary
if
(
SW41_MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
)
&&
ProvidingEquipMap
[
204
].
runStatus
<=
LineRunStatus
.
Wait
)
{
if
(
IOValue
(
IO_Type
.
SW4_TrayCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOValue
(
IO_Type
.
SW1_TrayCheck
).
Equals
(
IO_VALUE
.
LOW
)
&&
if
(
IOValue
(
IO_Type
.
SW4_TrayCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOValue
(
IO_Type
.
SW1_TrayCheck
).
Equals
(
IO_VALUE
.
LOW
)
&&
TrayManager
.
LineCanMoveSW
(
4
)
&&
TrayManager
.
LineCanMoveSW
(
1
))
{
if
(
TrayManager
.
checkWatch
(
sw41WaitWatch
,
TrayManager
.
SwTrayWaitTime
,
true
))
...
...
@@ -475,7 +474,7 @@ namespace OnlineStore.DeviceLibrary
{
//检测到阻挡夹具信号后,阻挡气缸下降,等待有夹具信号,阻挡气缸上升,
//顶升气缸上升到位,开始流水线转动,检测到出口信号后,停止转动,顶升气缸下降,阻挡4下降,盘通过
if
(
IOValue
(
IO_Type
.
SW2_TrayCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOValue
(
IO_Type
.
SW3_TrayCheck
).
Equals
(
IO_VALUE
.
LOW
)
&&
if
(
IOValue
(
IO_Type
.
SW2_TrayCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOValue
(
IO_Type
.
SW3_TrayCheck
).
Equals
(
IO_VALUE
.
LOW
)
&&
TrayManager
.
LineCanMoveSW
(
2
)
&&
TrayManager
.
LineCanMoveSW
(
3
))
{
if
(
TrayManager
.
checkWatch
(
sw23WaitWatch
,
TrayManager
.
SwTrayWaitTime
,
true
))
...
...
@@ -493,7 +492,7 @@ namespace OnlineStore.DeviceLibrary
IOValue
(
IO_Type
.
SW2_StopDown
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOValue
(
IO_Type
.
SW2_TrayCheck
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOValue
(
IO_Type
.
SW3_TrayCheck
).
Equals
(
IO_VALUE
.
LOW
)
&&
(
DateTime
.
Now
-
lastSw2StopDownTime
).
TotalSeconds
>
2
&&
(
DateTime
.
Now
-
lastSw2StopDownTime
).
TotalSeconds
>
2
&&
TrayManager
.
LineCanMoveSW
(
2
)
&&
TrayManager
.
LineCanMoveSW
(
3
))
{
if
(
TrayManager
.
checkWatch
(
sw23WaitWatch
,
TrayManager
.
SwTrayWaitTime
,
true
))
...
...
@@ -573,7 +572,7 @@ namespace OnlineStore.DeviceLibrary
if
(
SW41_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW00_Wait
))
{
SW41_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW01_StopDown
);
LogUtil
.
info
(
Name
+
"横移轨道41: 阻挡气缸下降 等待 SW4_StopCheck=0"
);
LogUtil
.
info
(
Name
+
"横移轨道41: 阻挡气缸下降 等待 SW4_StopCheck=0"
);
IOMove
(
IO_Type
.
SW4_StopDown
,
IO_VALUE
.
HIGH
);
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW4_StopCheck
,
IO_VALUE
.
LOW
));
//SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.StopDownWaitTime));
...
...
@@ -598,12 +597,8 @@ namespace OnlineStore.DeviceLibrary
{
if
(
IOValue
(
IO_Type
.
SW4_TrayCheck
).
Equals
(
IO_VALUE
.
HIGH
))
{
SW41_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW04_WaitCanUp
);
SWLog
(
"横移轨道41: 等待横移4托盘检测信号 ,SW4_StopDown上升 ,等待横移1(上料1)无托盘处理 "
);
CheckAndMove
(
IO_Type
.
SW4_StopDown
,
IO_VALUE
.
LOW
);
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW4_TrayCheck
,
IO_VALUE
.
HIGH
));
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW1_TrayCheck
,
IO_VALUE
.
LOW
));
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitSWCanTopUp
(
1
));
SW41_SW04_WaitCanUp
();
// SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.SwTrayWaitTime));
}
else
...
...
@@ -617,20 +612,29 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
SW41_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW04_WaitCanUp
))
{
SW41_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW05_LocationDown
);
SWLog
(
"横移轨道41:定位气缸下降 "
);
CylinderMove
(
SW41_MoveInfo
,
IO_Type
.
SW4_LocationCylinder_Up
,
IO_Type
.
SW4_LocationCylinder_Down
);
CylinderMove
(
SW41_MoveInfo
,
IO_Type
.
SW1_LocationCylinder_Up
,
IO_Type
.
SW1_LocationCylinder_Down
);
if
(
CylinderIsOk
(
IO_Type
.
SW4_LocationCylinder_Up
,
IO_Type
.
SW4_LocationCylinder_Down
)
&&
CylinderIsOk
(
IO_Type
.
SW1_LocationCylinder_Up
,
IO_Type
.
SW1_LocationCylinder_Down
))
{
SW41_SW06_TopCylinderUp
();
}
else
{
SW41_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW05_LocationDown
);
SWLog
(
"横移轨道41:定位气缸下降 "
);
CylinderMove
(
SW41_MoveInfo
,
IO_Type
.
SW4_LocationCylinder_Up
,
IO_Type
.
SW4_LocationCylinder_Down
);
CylinderMove
(
SW41_MoveInfo
,
IO_Type
.
SW1_LocationCylinder_Up
,
IO_Type
.
SW1_LocationCylinder_Down
);
}
}
else
if
(
SW41_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW05_LocationDown
))
{
SW41_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW06_TopCylinderUp
);
SWLog
(
"横移轨道41:顶升气缸上升 ,至少等待1000 "
);
IOMove
(
IO_Type
.
SW4_StopDown
,
IO_VALUE
.
LOW
);
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
CylinderMove
(
SW41_MoveInfo
,
IO_Type
.
SW4_TopCylinder_Down
,
IO_Type
.
SW4_TopCylinder_Up
);
Thread
.
Sleep
(
50
);
CylinderMove
(
SW41_MoveInfo
,
IO_Type
.
SW1_TopCylinder_Down
,
IO_Type
.
SW1_TopCylinder_Up
);
SW41_SW06_TopCylinderUp
();
//SW41_MoveInfo.NextMoveStep(LineMoveStep.SW06_TopCylinderUp);
//SWLog("横移轨道41:顶升气缸上升 ,至少等待1000 ");
//IOMove(IO_Type.SW4_StopDown, IO_VALUE.LOW);
//SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
//CylinderMove(SW41_MoveInfo, IO_Type.SW4_TopCylinder_Down, IO_Type.SW4_TopCylinder_Up);
//Thread.Sleep(50);
//CylinderMove(SW41_MoveInfo, IO_Type.SW1_TopCylinder_Down, IO_Type.SW1_TopCylinder_Up);
}
else
if
(
SW41_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW06_TopCylinderUp
))
{
...
...
@@ -654,7 +658,7 @@ namespace OnlineStore.DeviceLibrary
SWLog
(
"横移轨道41:收到SW1_TrayCheck,先顶升4下降 "
);
CylinderMove
(
SW41_MoveInfo
,
IO_Type
.
SW4_TopCylinder_Up
,
IO_Type
.
SW4_TopCylinder_Down
);
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
300
));
// SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW1_TrayCheck, IO_VALUE.HIGH));
// SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW1_TrayCheck, IO_VALUE.HIGH));
}
else
if
(
SW41_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW09_WaitOutCheck
))
{
...
...
@@ -715,8 +719,8 @@ namespace OnlineStore.DeviceLibrary
else
{
SW41_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW11_TopDown
);
SWLog
(
"横移轨道41:托盘已到达出口,重新顶升气缸下降 "
);
CylinderMove
(
SW41_MoveInfo
,
IO_Type
.
SW1_TopCylinder_Up
,
IO_Type
.
SW1_TopCylinder_Down
);
SWLog
(
"横移轨道41:托盘已到达出口,重新顶升气缸下降 "
);
CylinderMove
(
SW41_MoveInfo
,
IO_Type
.
SW1_TopCylinder_Up
,
IO_Type
.
SW1_TopCylinder_Down
);
}
}
}
...
...
@@ -731,7 +735,27 @@ namespace OnlineStore.DeviceLibrary
SWLog
(
"横移轨道41:横移结束 "
);
}
}
private
bool
CheckTrayIsNeed
(
int
deviceId
,
int
trayNum
)
private
void
SW41_SW06_TopCylinderUp
()
{
SW41_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW06_TopCylinderUp
);
SWLog
(
"横移轨道41:顶升气缸上升 ,至少等待1000 "
);
IOMove
(
IO_Type
.
SW4_StopDown
,
IO_VALUE
.
LOW
);
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
CylinderMove
(
SW41_MoveInfo
,
IO_Type
.
SW4_TopCylinder_Down
,
IO_Type
.
SW4_TopCylinder_Up
);
Thread
.
Sleep
(
50
);
CylinderMove
(
SW41_MoveInfo
,
IO_Type
.
SW1_TopCylinder_Down
,
IO_Type
.
SW1_TopCylinder_Up
);
}
private
void
SW41_SW04_WaitCanUp
()
{
SW41_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW04_WaitCanUp
);
SWLog
(
"横移轨道41: 等待横移4托盘检测信号 ,SW4_StopDown上升 ,等待横移1(上料1)无托盘处理 "
);
CheckAndMove
(
IO_Type
.
SW4_StopDown
,
IO_VALUE
.
LOW
);
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW4_TrayCheck
,
IO_VALUE
.
HIGH
));
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW1_TrayCheck
,
IO_VALUE
.
LOW
));
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitSWCanTopUp
(
1
));
}
private
bool
CheckTrayIsNeed
(
int
deviceId
,
int
trayNum
)
{
//横移1对应入料1
if
(
FeedingEquipMap
.
ContainsKey
(
deviceId
))
...
...
@@ -739,7 +763,7 @@ namespace OnlineStore.DeviceLibrary
FeedingEquip
equip
=
FeedingEquipMap
[
deviceId
];
if
(
equip
.
runStatus
>=
LineRunStatus
.
Runing
)
{
if
(
equip
.
CurrTrayIsNeed
(
trayNum
,
false
))
if
(
equip
.
CurrTrayIsNeed
(
trayNum
,
false
))
{
return
true
;
}
...
...
@@ -760,7 +784,7 @@ namespace OnlineStore.DeviceLibrary
if
(
SW23_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW00_Wait
))
{
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW01_StopDown
);
LogUtil
.
info
(
Name
+
"横移轨道23:阻挡气缸下降 等待 SW2_StopCheck=0 "
);
LogUtil
.
info
(
Name
+
"横移轨道23:阻挡气缸下降 等待 SW2_StopCheck=0 "
);
IOMove
(
IO_Type
.
SW2_StopDown
,
IO_VALUE
.
HIGH
);
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW2_StopCheck
,
IO_VALUE
.
LOW
));
// SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.StopDownWaitTime));
...
...
@@ -785,14 +809,7 @@ namespace OnlineStore.DeviceLibrary
{
if
(
IOValue
(
IO_Type
.
SW2_TrayCheck
).
Equals
(
IO_VALUE
.
HIGH
))
{
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW04_WaitCanUp
);
SWLog
(
"横移轨道23: 等待横移4托盘检测信号 ,SW2_StopDown上升 ,等待横移3(上料4)处无托盘 "
);
CheckAndMove
(
IO_Type
.
SW2_StopDown
,
IO_VALUE
.
LOW
);
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW2_TrayCheck
,
IO_VALUE
.
HIGH
));
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW3_TrayCheck
,
IO_VALUE
.
LOW
));
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitSWCanTopUp
(
3
));
// SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.SwTrayWaitTime));
SW23_SW04_WaitCanUp
();
}
else
{
...
...
@@ -805,20 +822,29 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
SW23_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW04_WaitCanUp
))
{
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW05_LocationDown
);
SWLog
(
"横移轨道23:定位气缸下降 "
);
CylinderMove
(
SW23_MoveInfo
,
IO_Type
.
SW2_LocationCylinder_Up
,
IO_Type
.
SW2_LocationCylinder_Down
);
CylinderMove
(
SW23_MoveInfo
,
IO_Type
.
SW3_LocationCylinder_Up
,
IO_Type
.
SW3_LocationCylinder_Down
);
if
(
CylinderIsOk
(
IO_Type
.
SW2_LocationCylinder_Up
,
IO_Type
.
SW2_LocationCylinder_Down
)
&&
CylinderIsOk
(
IO_Type
.
SW3_LocationCylinder_Up
,
IO_Type
.
SW3_LocationCylinder_Down
))
{
SW23_SW06_TopCylinderUp
();
}
else
{
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW05_LocationDown
);
SWLog
(
"横移轨道23:定位气缸下降 "
);
CylinderMove
(
SW23_MoveInfo
,
IO_Type
.
SW2_LocationCylinder_Up
,
IO_Type
.
SW2_LocationCylinder_Down
);
CylinderMove
(
SW23_MoveInfo
,
IO_Type
.
SW3_LocationCylinder_Up
,
IO_Type
.
SW3_LocationCylinder_Down
);
}
}
else
if
(
SW23_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW05_LocationDown
))
{
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW06_TopCylinderUp
);
SWLog
(
"横移轨道23:顶升气缸上升 ,至少等待1000 "
);
IOMove
(
IO_Type
.
SW2_StopDown
,
IO_VALUE
.
LOW
);
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
CylinderMove
(
SW23_MoveInfo
,
IO_Type
.
SW2_TopCylinder_Down
,
IO_Type
.
SW2_TopCylinder_Up
);
Thread
.
Sleep
(
50
);
CylinderMove
(
SW23_MoveInfo
,
IO_Type
.
SW3_TopCylinder_Down
,
IO_Type
.
SW3_TopCylinder_Up
);
SW23_SW06_TopCylinderUp
();
//SW23_MoveInfo.NextMoveStep(LineMoveStep.SW06_TopCylinderUp);
//SWLog("横移轨道23:顶升气缸上升 ,至少等待1000 ");
//IOMove(IO_Type.SW2_StopDown, IO_VALUE.LOW);
//SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
//CylinderMove(SW23_MoveInfo, IO_Type.SW2_TopCylinder_Down, IO_Type.SW2_TopCylinder_Up);
//Thread.Sleep(50);
//CylinderMove(SW23_MoveInfo, IO_Type.SW3_TopCylinder_Down, IO_Type.SW3_TopCylinder_Up);
}
else
if
(
SW23_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW06_TopCylinderUp
))
{
...
...
@@ -898,8 +924,8 @@ namespace OnlineStore.DeviceLibrary
else
{
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW11_TopDown
);
SWLog
(
"横移轨道23:托盘已到达出口,重新顶升气缸下降 "
);
CylinderMove
(
SW23_MoveInfo
,
IO_Type
.
SW3_TopCylinder_Up
,
IO_Type
.
SW3_TopCylinder_Down
);
SWLog
(
"横移轨道23:托盘已到达出口,重新顶升气缸下降 "
);
CylinderMove
(
SW23_MoveInfo
,
IO_Type
.
SW3_TopCylinder_Up
,
IO_Type
.
SW3_TopCylinder_Down
);
}
}
}
...
...
@@ -915,14 +941,35 @@ namespace OnlineStore.DeviceLibrary
}
}
private
void
SW23_SW06_TopCylinderUp
()
{
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW06_TopCylinderUp
);
SWLog
(
"横移轨道23:顶升气缸上升 ,至少等待1000 "
);
IOMove
(
IO_Type
.
SW2_StopDown
,
IO_VALUE
.
LOW
);
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
CylinderMove
(
SW23_MoveInfo
,
IO_Type
.
SW2_TopCylinder_Down
,
IO_Type
.
SW2_TopCylinder_Up
);
Thread
.
Sleep
(
50
);
CylinderMove
(
SW23_MoveInfo
,
IO_Type
.
SW3_TopCylinder_Down
,
IO_Type
.
SW3_TopCylinder_Up
);
}
private
void
SW23_SW04_WaitCanUp
()
{
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW04_WaitCanUp
);
SWLog
(
"横移轨道23: 等待横移4托盘检测信号 ,SW2_StopDown上升 ,等待横移3(上料4)处无托盘 "
);
CheckAndMove
(
IO_Type
.
SW2_StopDown
,
IO_VALUE
.
LOW
);
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW2_TrayCheck
,
IO_VALUE
.
HIGH
));
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW3_TrayCheck
,
IO_VALUE
.
LOW
));
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitSWCanTopUp
(
3
));
}
private
void
SWLog
(
string
msg
)
{
LogUtil
.
debug
(
Name
+
msg
);
}
#
endregion
#
region
料仓出入库逻辑处理
/// <summary>--
/// BOX出入库完成事件
/// </summary>
...
...
@@ -946,9 +993,10 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
info
(
Name
+
" 执行出库【"
+
param
.
ToStr
()
+
"】失败, 加入等待队列"
);
moveEquip
.
AddWaitOutInfo
(
param
);
}
}
else
if
(
moveEquip
.
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
OutStore
)
&&
moveEquip
.
MoveInfo
.
MoveParam
!=
null
&&
moveEquip
.
MoveInfo
.
MoveParam
.
PosId
.
Equals
(
posId
))
}
else
if
(
moveEquip
.
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
OutStore
)
&&
moveEquip
.
MoveInfo
.
MoveParam
!=
null
&&
moveEquip
.
MoveInfo
.
MoveParam
.
PosId
.
Equals
(
posId
))
{
LogUtil
.
info
(
param
.
ToStr
()
+
"已经完成出库,"
+
moveEquip
.
Name
+
"正在【"
+
posId
+
"】出库中,库位号重复,不处理!"
);
LogUtil
.
info
(
param
.
ToStr
()
+
"已经完成出库,"
+
moveEquip
.
Name
+
"正在【"
+
posId
+
"】出库中,库位号重复,不处理!"
);
}
else
{
...
...
@@ -992,7 +1040,7 @@ namespace OnlineStore.DeviceLibrary
else
if
(
move
.
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_56_CylinderAfter
)
&&
move
.
MoveInfo
.
IsInWait
.
Equals
(
false
))
{
return
true
;
}
}
}
}
return
false
;
...
...
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
查看文件 @
ad5ca24
...
...
@@ -509,11 +509,13 @@ namespace OnlineStore.DeviceLibrary
//托盘在第一个阻挡处
SecondMoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_00_Stop1Down
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
200
));
//
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
CheckLog
(
" 托盘检测:料盘检测StopCylinder_Check1 "
+
SecondMoveInfo
.
SLog
+
"阻挡气缸1-1下降 , 等待 StopCylinder_Check1=0"
);
IOMove
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
HIGH
,
1200
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
HIGH
));
SecondMoveInfo
.
OneWaitCanEndStep
=
true
;
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Down1, IO_VALUE.HIGH));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Check1
,
IO_VALUE
.
LOW
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Check2
,
IO_VALUE
.
HIGH
));
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.StopDownWaitTime));
}
}
...
...
source/DeviceLibrary/model/KTK_Store.cs
查看文件 @
ad5ca24
...
...
@@ -374,7 +374,13 @@ namespace OnlineStore.DeviceLibrary
return
sta
;
}
}
public
bool
CylinderIsOk
(
string
IoLowType
,
string
IoHighType
)
{
if
(
IOValue
(
IoLowType
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOValue
(
IoHighType
).
Equals
(
IO_VALUE
.
HIGH
)){
return
true
;
}
return
false
;
}
public
void
CylinderMove
(
LineMoveInfo
moveInfo
,
string
IoLowType
,
string
IoHighType
,
bool
isCheckMove
=
false
)
{
try
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论