Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
1053_CycleLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 500f3970
由
刘韬
编写于
2025-03-06 16:33:49 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
f3a0c8ca
显示空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
86 行增加
和
38 行删除
DeviceLibrary/VirtuallyStore/VServerComm.cs
DeviceLibrary/VirtuallyStore/VStoreCollection.cs
DeviceLibrary/theMachine/DeviceBase.cs
DeviceLibrary/theMachine/MoveStep.cs
DeviceLibrary/theMachine/TrayManager.cs
DeviceLibrary/theMachine/sub/IDevice.cs
DeviceLibrary/theMachine/sub/MI.cs
DeviceLibrary/theMachine/sub/SideMove.cs
DeviceLibrary/theMachine/sub/TransplantMove.cs
DeviceLibrary/theMachine/sub/TrayStop.cs
LoadCVSLibrary/Config/Config.csv
LoadCVSLibrary/storeConfig/config/IO_Type.cs
DeviceLibrary/VirtuallyStore/VServerComm.cs
查看文件 @
500f397
...
@@ -61,7 +61,7 @@ namespace DeviceLibrary
...
@@ -61,7 +61,7 @@ namespace DeviceLibrary
binding
.
AllowCookies
=
false
;
binding
.
AllowCookies
=
false
;
Uri
baseAddress
=
new
Uri
(
Setting_Init
.
Device_StoreServerURL
);
Uri
baseAddress
=
new
Uri
(
Setting_Init
.
Device_StoreServerURL
);
EndpointAddress
endpointAddress
=
new
EndpointAddress
(
baseAddress
.
ToString
());
EndpointAddress
endpointAddress
=
new
EndpointAddress
(
baseAddress
.
ToString
());
towerAppWSClient
=
new
MydataWcfServiceTest
.
ServiceReference
3
.
WSInterface
Client
(
binding
,
endpointAddress
);
towerAppWSClient
=
new
MydataWcfServiceTest
.
ServiceReference
2
.
TowerAppWS
Client
(
binding
,
endpointAddress
);
}
}
private
void
ServerConnectTimer_Elapsed
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
private
void
ServerConnectTimer_Elapsed
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
...
@@ -590,7 +590,7 @@ namespace DeviceLibrary
...
@@ -590,7 +590,7 @@ namespace DeviceLibrary
return
true
;
return
true
;
}
}
MydataWcfServiceTest
.
ServiceReference
3
.
WSInterface
Client
towerAppWSClient
;
MydataWcfServiceTest
.
ServiceReference
2
.
TowerAppWS
Client
towerAppWSClient
;
/// <summary>
/// <summary>
/// 存储MyCronic料仓的剩余容量 7X8=1000;7X12=345;13X32=100;
/// 存储MyCronic料仓的剩余容量 7X8=1000;7X12=345;13X32=100;
/// </summary>
/// </summary>
...
...
DeviceLibrary/VirtuallyStore/VStoreCollection.cs
查看文件 @
500f397
...
@@ -179,9 +179,9 @@ namespace DeviceLibrary
...
@@ -179,9 +179,9 @@ namespace DeviceLibrary
{
{
try
try
{
{
VLog
.
Info
(
"Host_UnknownMessageReceived:"
);
VLog
.
Error
(
"Host_UnknownMessageReceived:"
);
VLog
.
Info
(
e
.
Message
.
ToString
());
VLog
.
Error
(
e
.
Message
.
ToString
());
VLog
.
Info
(
e
.
Message
.
GetReaderAtBodyContents
().
ToString
());
//VLog.Error
(e.Message.GetReaderAtBodyContents().ToString());
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
...
@@ -216,7 +216,7 @@ namespace DeviceLibrary
...
@@ -216,7 +216,7 @@ namespace DeviceLibrary
binding
.
ReceiveTimeout
=
TimeSpan
.
FromMinutes
(
10
);
binding
.
ReceiveTimeout
=
TimeSpan
.
FromMinutes
(
10
);
Uri
baseAddress
=
new
Uri
(
Setting_Init
.
Device_StoreServerURL
);
Uri
baseAddress
=
new
Uri
(
Setting_Init
.
Device_StoreServerURL
);
EndpointAddress
endpointAddress
=
new
EndpointAddress
(
baseAddress
.
ToString
());
EndpointAddress
endpointAddress
=
new
EndpointAddress
(
baseAddress
.
ToString
());
var
towerAppWSClient
=
new
MydataWcfServiceTest
.
ServiceReference
3
.
WSInterface
Client
(
binding
,
endpointAddress
);
var
towerAppWSClient
=
new
MydataWcfServiceTest
.
ServiceReference
2
.
TowerAppWS
Client
(
binding
,
endpointAddress
);
VLog
.
Info
(
"开始查询 CarrierList"
);
VLog
.
Info
(
"开始查询 CarrierList"
);
var
result
=
towerAppWSClient
.
XmlAction
(
VCmd
.
GetCarrierList
);
var
result
=
towerAppWSClient
.
XmlAction
(
VCmd
.
GetCarrierList
);
VLog
.
Info
(
"结束查询 CarrierList"
);
VLog
.
Info
(
"结束查询 CarrierList"
);
...
...
DeviceLibrary/theMachine/DeviceBase.cs
查看文件 @
500f397
...
@@ -55,7 +55,7 @@ namespace DeviceLibrary
...
@@ -55,7 +55,7 @@ namespace DeviceLibrary
if
(!
DeviceListByAddr
.
ContainsKey
(
nextaddr
))
if
(!
DeviceListByAddr
.
ContainsKey
(
nextaddr
))
return
true
;
return
true
;
return
DeviceListByAddr
[
nextaddr
].
FrontCheck
(
nextaddr
);
return
DeviceListByAddr
[
nextaddr
].
Front
Free
Check
(
nextaddr
);
}
}
public
void
StopMove
(
bool
ServoOff
=
false
)
public
void
StopMove
(
bool
ServoOff
=
false
)
{
{
...
...
DeviceLibrary/theMachine/MoveStep.cs
查看文件 @
500f397
...
@@ -58,6 +58,7 @@ namespace DeviceLibrary
...
@@ -58,6 +58,7 @@ namespace DeviceLibrary
TrayStop_02
,
TrayStop_02
,
TrayStop_03
,
TrayStop_03
,
TrayStop_04
,
TrayStop_04
,
TrayStop_CIIN
,
TrayStop_05
,
TrayStop_05
,
TrayStop_06
,
TrayStop_06
,
TrayStop_07
,
TrayStop_07
,
...
...
DeviceLibrary/theMachine/TrayManager.cs
查看文件 @
500f397
...
@@ -108,7 +108,7 @@ namespace DeviceLibrary
...
@@ -108,7 +108,7 @@ namespace DeviceLibrary
/// deviceGroupName,RequestLoadInfo
/// deviceGroupName,RequestLoadInfo
/// </summary>
/// </summary>
public
static
Dictionary
<
string
,
RequestLoadInfo
>
TrayRequest
=
new
Dictionary
<
string
,
RequestLoadInfo
>();
public
static
Dictionary
<
string
,
RequestLoadInfo
>
TrayRequest
=
new
Dictionary
<
string
,
RequestLoadInfo
>();
public
static
bool
TryGetTrayRequest
(
string
deviceGroupName
,
string
rfid
,
out
ReelParam
reelParam
)
public
static
bool
TryGetTrayRequest
(
string
deviceGroupName
,
string
rfid
,
bool
clearRequest
,
out
ReelParam
reelParam
)
{
{
reelParam
=
null
;
reelParam
=
null
;
LogUtil
.
info
(
$
"[{deviceGroupName}] HasTrayRequest:{deviceGroupName},{rfid},{TrayRequest.ContainsKey(deviceGroupName)}"
);
LogUtil
.
info
(
$
"[{deviceGroupName}] HasTrayRequest:{deviceGroupName},{rfid},{TrayRequest.ContainsKey(deviceGroupName)}"
);
...
@@ -121,6 +121,7 @@ namespace DeviceLibrary
...
@@ -121,6 +121,7 @@ namespace DeviceLibrary
if
(
hasrequest
)
if
(
hasrequest
)
{
{
reelParam
=
TrayRequest
[
deviceGroupName
].
LoadParam
?.
clone
();
reelParam
=
TrayRequest
[
deviceGroupName
].
LoadParam
?.
clone
();
if
(
clearRequest
)
TrayRequest
.
Remove
(
deviceGroupName
);
TrayRequest
.
Remove
(
deviceGroupName
);
return
true
;
return
true
;
}
}
...
...
DeviceLibrary/theMachine/sub/IDevice.cs
查看文件 @
500f397
using
System
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
...
@@ -16,8 +17,14 @@ namespace DeviceLibrary
...
@@ -16,8 +17,14 @@ namespace DeviceLibrary
void
Stop
();
void
Stop
();
void
TrayRelease
();
void
TrayRelease
();
bool
IsFree
();
bool
IsFree
();
bool
FrontCheck
(
int
curaddr
);
/// <summary>
/// 检测该地址的阻挡前检测是否为LOW
/// </summary>
/// <param name="curaddr"></param>
/// <returns></returns>
bool
FrontFreeCheck
(
int
curaddr
);
void
FrontStopProcess
();
void
FrontStopProcess
();
IO_VALUE
IOValue
(
string
ioType
);
}
}
public
enum
DeviceStateE
public
enum
DeviceStateE
...
...
DeviceLibrary/theMachine/sub/MI.cs
查看文件 @
500f397
...
@@ -820,7 +820,7 @@ namespace DeviceLibrary
...
@@ -820,7 +820,7 @@ namespace DeviceLibrary
return
c
;
return
c
;
}
}
public
bool
FrontCheck
(
int
curaddr
)
public
bool
Front
Free
Check
(
int
curaddr
)
{
{
throw
new
NotImplementedException
();
throw
new
NotImplementedException
();
}
}
...
...
DeviceLibrary/theMachine/sub/SideMove.cs
查看文件 @
500f397
...
@@ -594,7 +594,7 @@ namespace DeviceLibrary
...
@@ -594,7 +594,7 @@ namespace DeviceLibrary
{
{
throw
new
NotImplementedException
();
throw
new
NotImplementedException
();
}
}
public
bool
FrontCheck
(
int
curaddr
)
public
bool
Front
Free
Check
(
int
curaddr
)
{
{
if
(
DeviceGroup
.
addr_1
==
curaddr
)
if
(
DeviceGroup
.
addr_1
==
curaddr
)
return
IOValue
(
IO_Type
.
Ls_A_Front_Check
).
Equals
(
IO_VALUE
.
LOW
);
return
IOValue
(
IO_Type
.
Ls_A_Front_Check
).
Equals
(
IO_VALUE
.
LOW
);
...
...
DeviceLibrary/theMachine/sub/TransplantMove.cs
查看文件 @
500f397
...
@@ -220,7 +220,7 @@ namespace DeviceLibrary
...
@@ -220,7 +220,7 @@ namespace DeviceLibrary
}
}
//出库判断
//出库判断
else
if
(!
trayInfo
.
HasLoad
&&
TrayManager
.
TryGetTrayRequest
(
GroupName
,
CurrrentRFID
,
out
ReelParam
reelParam
))
else
if
(!
trayInfo
.
HasLoad
&&
TrayManager
.
TryGetTrayRequest
(
GroupName
,
CurrrentRFID
,
true
,
out
ReelParam
reelParam
))
{
{
if
(
IOValue
(
IO_Type
.
AMH_Reel_Check
).
Equals
(
IO_VALUE
.
LOW
))
if
(
IOValue
(
IO_Type
.
AMH_Reel_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
{
...
@@ -664,7 +664,7 @@ namespace DeviceLibrary
...
@@ -664,7 +664,7 @@ namespace DeviceLibrary
return
true
;
return
true
;
}
}
public
bool
FrontCheck
(
int
curaddr
)
public
bool
Front
Free
Check
(
int
curaddr
)
{
{
return
IOValue
(
IO_Type
.
AMH_Front_Check
).
Equals
(
IO_VALUE
.
LOW
);
return
IOValue
(
IO_Type
.
AMH_Front_Check
).
Equals
(
IO_VALUE
.
LOW
);
}
}
...
...
DeviceLibrary/theMachine/sub/TrayStop.cs
查看文件 @
500f397
...
@@ -95,14 +95,14 @@ namespace DeviceLibrary
...
@@ -95,14 +95,14 @@ namespace DeviceLibrary
switch
(
MoveInfo
.
MoveStep
)
switch
(
MoveInfo
.
MoveStep
)
{
{
case
MoveStep
.
Wait
:
case
MoveStep
.
Wait
:
if
((
GroupName
==
"AMH-ML5-1"
||
GroupName
==
"AMH-ML5-2"
)
&&
RobotManage
.
mainMachine
.
IOValue
(
IO_Type
.
ML5_DoorSafeCheck
).
Equals
(
IO_VALUE
.
LOW
))
if
(!
DoorSingnlSafeCheck
())
{
Msg
.
add
(
crc
.
GetString
(
"Res0041"
,
"ML5料口门光栅被遮挡"
),
MsgLevel
.
warning
);
return
;
return
;
}
if
(
IOValue
(
IO_Type
.
MI_In_Check
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOValue
(
IO_Type
.
MI_In_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
MoveInfo
.
log
(
"中间检测到托盘"
);
MoveInfo
.
log
(
"中间检测到托盘"
);
if
(
GroupName
==
"CI-IN"
)
MoveInfo
.
NextMoveStep
(
MoveStep
.
TrayStop_CIIN
);
else
MoveInfo
.
NextMoveStep
(
MoveStep
.
TrayStop_04
);
MoveInfo
.
NextMoveStep
(
MoveStep
.
TrayStop_04
);
Location
.
ToLow
(
MoveInfo
);
Location
.
ToLow
(
MoveInfo
);
}
}
...
@@ -119,6 +119,18 @@ namespace DeviceLibrary
...
@@ -119,6 +119,18 @@ namespace DeviceLibrary
Msg
.
add
(
crc
.
GetString
(
"Res0100.9451681e"
,
"入口长时间未检测到托盘,请检查."
),
MsgLevel
.
alarm
);
Msg
.
add
(
crc
.
GetString
(
"Res0100.9451681e"
,
"入口长时间未检测到托盘,请检查."
),
MsgLevel
.
alarm
);
}
}
break
;
break
;
case
MoveStep
.
TrayStop_CIIN
:
if
(
IOValue
(
IO_Type
.
MI_In_Check
).
Equals
(
IO_VALUE
.
HIGH
)
&&
MoveInfo
.
IsTimeOut
(
1
))
{
MoveInfo
.
NextMoveStep
(
MoveStep
.
TrayStop_03
);
MoveInfo
.
log
(
"确认为CI-IN物料"
);
}
else
if
(
MoveInfo
.
IsTimeOut
(
2
))
{
MoveInfo
.
NextMoveStep
(
MoveStep
.
TrayStop_04
);
MoveInfo
.
log
(
"确认为CI-IN错过物料"
);
}
break
;
case
MoveStep
.
TrayStop_01
:
case
MoveStep
.
TrayStop_01
:
if
(
IOValue
(
IO_Type
.
MI_Front_Check
).
Equals
(
IO_VALUE
.
LOW
))
if
(
IOValue
(
IO_Type
.
MI_Front_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
{
...
@@ -148,7 +160,7 @@ namespace DeviceLibrary
...
@@ -148,7 +160,7 @@ namespace DeviceLibrary
{
{
CurrrentRFID
=
Common
.
RfidFilter
(
data
);
CurrrentRFID
=
Common
.
RfidFilter
(
data
);
TrayManager
.
Process
(
MoveInfo
,
CurrrentRFID
,
DeviceGroup
.
addr_1
,
IOValue
(
IO_Type
.
MI_Reel_Check
).
Equals
(
IO_VALUE
.
HIGH
)?
1
:
0
,
out
TrayInfo
trayInfo
);
TrayManager
.
Process
(
MoveInfo
,
CurrrentRFID
,
DeviceGroup
.
addr_1
,
IOValue
(
IO_Type
.
MI_Reel_Check
).
Equals
(
IO_VALUE
.
HIGH
)?
1
:
0
,
out
TrayInfo
trayInfo
);
var
stop
=
TrayManager
.
TryGetTrayRequest
(
GroupName
,
CurrrentRFID
,
out
_
);
var
stop
=
TrayManager
.
TryGetTrayRequest
(
GroupName
,
CurrrentRFID
,
false
,
out
_
);
MoveInfo
.
log
(
$
"CurrrentRFID:{CurrrentRFID},HasLoad:{trayInfo.HasLoad},MI_Reel_Check:{IOValue(IO_Type.MI_Reel_Check)},NeedStop:{stop},GroupName:{GroupName},TrayType:{trayInfo.TrayType}"
);
MoveInfo
.
log
(
$
"CurrrentRFID:{CurrrentRFID},HasLoad:{trayInfo.HasLoad},MI_Reel_Check:{IOValue(IO_Type.MI_Reel_Check)},NeedStop:{stop},GroupName:{GroupName},TrayType:{trayInfo.TrayType}"
);
#
region
MI1
,
Mi2
的情况判断
#
region
MI1
,
Mi2
的情况判断
if
((
GroupName
==
"AMH-MI1"
||
GroupName
==
"AMH-MI2"
)
&&
trayInfo
.
TrayType
==
TrayTypeE
.
MTP1
)
if
((
GroupName
==
"AMH-MI1"
||
GroupName
==
"AMH-MI2"
)
&&
trayInfo
.
TrayType
==
TrayTypeE
.
MTP1
)
...
@@ -248,6 +260,7 @@ namespace DeviceLibrary
...
@@ -248,6 +260,7 @@ namespace DeviceLibrary
#
endregion
#
endregion
if
(
stop
&&
!
trayInfo
.
HasLoad
)
if
(
stop
&&
!
trayInfo
.
HasLoad
)
{
{
TrayManager
.
ClearTrayRequest
(
GroupName
);
if
(
IOValue
(
IO_Type
.
MI_Reel_Check
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOValue
(
IO_Type
.
MI_Reel_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
TrayManager
.
SetTrayError
(
CurrrentRFID
);
TrayManager
.
SetTrayError
(
CurrrentRFID
);
...
@@ -305,6 +318,7 @@ namespace DeviceLibrary
...
@@ -305,6 +318,7 @@ namespace DeviceLibrary
}
}
else
else
{
{
SRec
.
info
(
crc
.
GetString
(
"Res0042"
,
"托盘挡停"
),
GroupName
,
crc
.
GetString
(
"Res0025"
,
"载物托盘"
),
crc
.
GetString
(
"Res0044"
,
"等待物料被接走"
),
CurrrentRFID
,
remoteLoad
.
RequestLoadInfo
.
LoadParam
.
WareCode
);
SRec
.
info
(
crc
.
GetString
(
"Res0042"
,
"托盘挡停"
),
GroupName
,
crc
.
GetString
(
"Res0025"
,
"载物托盘"
),
crc
.
GetString
(
"Res0044"
,
"等待物料被接走"
),
CurrrentRFID
,
remoteLoad
.
RequestLoadInfo
.
LoadParam
.
WareCode
);
MoveInfo
.
log
(
$
"{GroupName} 请求出库成功"
+
remoteLoad
.
RequestLoadInfo
.
LoadParam
.
ToStr
());
MoveInfo
.
log
(
$
"{GroupName} 请求出库成功"
+
remoteLoad
.
RequestLoadInfo
.
LoadParam
.
ToStr
());
}
}
...
@@ -334,11 +348,8 @@ namespace DeviceLibrary
...
@@ -334,11 +348,8 @@ namespace DeviceLibrary
Location
.
ToLow
(
MoveInfo
);
Location
.
ToLow
(
MoveInfo
);
break
;
break
;
case
MoveStep
.
TrayStop_05
:
case
MoveStep
.
TrayStop_05
:
if
((
GroupName
==
"AMH-ML5-1"
||
GroupName
==
"AMH-ML5-2"
)
&&
RobotManage
.
mainMachine
.
IOValue
(
IO_Type
.
ML5_DoorSafeCheck
).
Equals
(
IO_VALUE
.
LOW
))
if
(!
DoorSingnlSafeCheck
())
{
Msg
.
add
(
crc
.
GetString
(
"Res0041"
,
"ML5料口门光栅被遮挡"
),
MsgLevel
.
warning
);
return
;
return
;
}
MoveInfo
.
NextMoveStep
(
MoveStep
.
TrayStop_06
);
MoveInfo
.
NextMoveStep
(
MoveStep
.
TrayStop_06
);
//IOMove(IO_Type.AMH_Tray_Stop, IO_VALUE.HIGH, IO_Type.MI_In_Check, IO_VALUE.LOW, StopDelayMS);
//IOMove(IO_Type.AMH_Tray_Stop, IO_VALUE.HIGH, IO_Type.MI_In_Check, IO_VALUE.LOW, StopDelayMS);
IOMove
(
IO_Type
.
AMH_Tray_Stop
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
AMH_Tray_Stop
,
IO_VALUE
.
HIGH
);
...
@@ -359,7 +370,7 @@ namespace DeviceLibrary
...
@@ -359,7 +370,7 @@ namespace DeviceLibrary
break
;
break
;
case
MoveStep
.
TrayStop_07
:
case
MoveStep
.
TrayStop_07
:
MoveInfo
.
NextMoveStep
(
MoveStep
.
TrayStop_WaitLoadProcess
);
MoveInfo
.
NextMoveStep
(
MoveStep
.
TrayStop_WaitLoadProcess
);
if
(
GroupName
!=
"AMH-MI1"
&&
GroupName
!=
"AMH-MI2"
&&
GroupName
!=
"CI"
)
if
(
GroupName
!=
"AMH-MI1"
&&
GroupName
!=
"AMH-MI2"
&&
GroupName
!=
"CI
-IN"
&&
GroupName
!=
"CI-OUT
"
)
{
{
Location
.
ToHigh
(
MoveInfo
);
Location
.
ToHigh
(
MoveInfo
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
...
@@ -373,7 +384,7 @@ namespace DeviceLibrary
...
@@ -373,7 +384,7 @@ namespace DeviceLibrary
//}
//}
Msg
.
add
(
crc
.
GetString
(
"Res0046"
,
"等待处理物料"
),
MsgLevel
.
info
);
Msg
.
add
(
crc
.
GetString
(
"Res0046"
,
"等待处理物料"
),
MsgLevel
.
info
);
if
(
GroupName
!=
"AMH-MI1"
&&
GroupName
!=
"AMH-MI2"
&&
GroupName
!=
"CI"
)
if
(
GroupName
!=
"AMH-MI1"
&&
GroupName
!=
"AMH-MI2"
)
{
{
Msg
.
add
(
crc
.
GetString
(
"Res0047"
,
"托盘上有物料,等待同步物料信息."
),
MsgLevel
.
info
);
Msg
.
add
(
crc
.
GetString
(
"Res0047"
,
"托盘上有物料,等待同步物料信息."
),
MsgLevel
.
info
);
//if (result == RemoteResult.True && RobotManage.mainMachine.IOValue(IO_Type.ML5_DoorSafeCheck).Equals(IO_VALUE.HIGH))
//if (result == RemoteResult.True && RobotManage.mainMachine.IOValue(IO_Type.ML5_DoorSafeCheck).Equals(IO_VALUE.HIGH))
...
@@ -417,7 +428,7 @@ namespace DeviceLibrary
...
@@ -417,7 +428,7 @@ namespace DeviceLibrary
}
}
}
}
bool
IsDoorSafe
()
{
bool
IsDoorSafe
()
{
if
(
GroupName
==
"AMH-ML5-1"
||
GroupName
==
"AMH-ML5-2"
)
if
(
GroupName
==
"AMH-ML5-1"
||
GroupName
==
"AMH-ML5-2"
||
GroupName
==
"CI-IN"
||
GroupName
==
"CI-OUT"
)
{
{
var
remoteLoad
=
new
RemoteLoad
();
var
remoteLoad
=
new
RemoteLoad
();
remoteLoad
.
Seq
=
Snowflake
.
Instance
().
GetId
();
remoteLoad
.
Seq
=
Snowflake
.
Instance
().
GetId
();
...
@@ -439,11 +450,8 @@ namespace DeviceLibrary
...
@@ -439,11 +450,8 @@ namespace DeviceLibrary
Debug
.
WriteLine
(
"Remote Timeout IsSafe:False"
);
Debug
.
WriteLine
(
"Remote Timeout IsSafe:False"
);
return
false
;
return
false
;
}
}
else
if
(
RobotManage
.
mainMachine
.
IOValue
(
IO_Type
.
ML5_DoorSafeCheck
).
Equals
(
IO_VALUE
.
LOW
))
else
if
(!
DoorSingnlSafeCheck
())
{
Msg
.
add
(
crc
.
GetString
(
"Res0041"
,
"ML5料口门光栅被遮挡"
),
MsgLevel
.
warning
);
return
false
;
return
false
;
}
else
else
{
{
Debug
.
WriteLine
(
"Remote UnKnow:True"
);
Debug
.
WriteLine
(
"Remote UnKnow:True"
);
...
@@ -479,9 +487,8 @@ namespace DeviceLibrary
...
@@ -479,9 +487,8 @@ namespace DeviceLibrary
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
break
;
break
;
case
MoveStep
.
H01_HomeReset
:
case
MoveStep
.
H01_HomeReset
:
if
(
(
GroupName
==
"AMH-ML5-1"
||
GroupName
==
"AMH-ML5-2"
)
&&
RobotManage
.
mainMachine
.
IOValue
(
IO_Type
.
ML5_DoorSafeCheck
).
Equals
(
IO_VALUE
.
LOW
))
if
(
!
DoorSingnlSafeCheck
(
))
{
{
Msg
.
add
(
crc
.
GetString
(
"Res0041"
,
"ML5料口门光栅被遮挡"
),
MsgLevel
.
warning
);
break
;
break
;
}
}
var
dl
=
new
string
[]
{
"AMH-MI1"
,
"AMH-MI2"
};
var
dl
=
new
string
[]
{
"AMH-MI1"
,
"AMH-MI2"
};
...
@@ -505,11 +512,6 @@ namespace DeviceLibrary
...
@@ -505,11 +512,6 @@ namespace DeviceLibrary
break
;
break
;
case
MoveStep
.
H02_HomeReset
:
case
MoveStep
.
H02_HomeReset
:
MoveInfo
.
NextMoveStep
(
MoveStep
.
H03_HomeReset
);
MoveInfo
.
NextMoveStep
(
MoveStep
.
H03_HomeReset
);
if
((
GroupName
==
"AMH-ML5-1"
||
GroupName
==
"AMH-ML5-2"
)
&&
RobotManage
.
mainMachine
.
IOValue
(
IO_Type
.
ML5_DoorSafeCheck
).
Equals
(
IO_VALUE
.
LOW
))
{
Msg
.
add
(
crc
.
GetString
(
"Res0041"
,
"ML5料口门光栅被遮挡"
),
MsgLevel
.
warning
);
break
;
}
//IOMove(IO_Type.AMH_Tray_Stop, IO_VALUE.HIGH, IO_Type.MI_In_Check, IO_VALUE.LOW, StopDelayMS);
//IOMove(IO_Type.AMH_Tray_Stop, IO_VALUE.HIGH, IO_Type.MI_In_Check, IO_VALUE.LOW, StopDelayMS);
//MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.MI_In_Check,IO_VALUE.LOW));
//MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.MI_In_Check,IO_VALUE.LOW));
break
;
break
;
...
@@ -534,8 +536,12 @@ namespace DeviceLibrary
...
@@ -534,8 +536,12 @@ namespace DeviceLibrary
return
true
;
return
true
;
}
}
public
bool
FrontCheck
(
int
curaddr
)
public
bool
Front
Free
Check
(
int
curaddr
)
{
{
//CI-IN 没有前阻挡检测, 改用托盘检测
if
(
GroupName
==
"CI-IN"
)
return
IOValue
(
IO_Type
.
MI_In_Check
).
Equals
(
IO_VALUE
.
LOW
);
else
return
IOValue
(
IO_Type
.
MI_Front_Check
).
Equals
(
IO_VALUE
.
LOW
);
return
IOValue
(
IO_Type
.
MI_Front_Check
).
Equals
(
IO_VALUE
.
LOW
);
}
}
...
@@ -546,5 +552,28 @@ namespace DeviceLibrary
...
@@ -546,5 +552,28 @@ namespace DeviceLibrary
IOMove
(
IO_Type
.
AMH_Front_Stop
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
AMH_Front_Stop
,
IO_VALUE
.
LOW
);
}
}
}
}
bool
DoorSingnlSafeCheck
()
{
if
((
GroupName
==
"AMH-ML5-1"
||
GroupName
==
"AMH-ML5-2"
)
&&
RobotManage
.
mainMachine
.
IOValue
(
IO_Type
.
ML5_DoorSafeCheck
).
Equals
(
IO_VALUE
.
LOW
))
{
Msg
.
add
(
crc
.
GetString
(
"Res0041"
,
"ML5料口门光栅被遮挡"
),
MsgLevel
.
warning
);
return
false
;
}
else
if
(
GroupName
==
"CI-IN"
&&
RobotManage
.
mainMachine
.
IOValue
(
IO_Type
.
CI_IN_DoorSafeCheck
).
Equals
(
IO_VALUE
.
HIGH
))
{
Msg
.
add
(
"点料机进料口门可能干涉"
,
MsgLevel
.
warning
);
return
false
;
}
else
if
(
GroupName
==
"CI-OUT"
&&
RobotManage
.
mainMachine
.
IOValue
(
IO_Type
.
CI_OUT_DoorSafeCheck
).
Equals
(
IO_VALUE
.
HIGH
))
{
Msg
.
add
(
"点料机进出口门可能干涉"
,
MsgLevel
.
warning
);
return
false
;
}
return
true
;
}
}
}
}
}
\ No newline at end of file
\ No newline at end of file
LoadCVSLibrary/Config/Config.csv
查看文件 @
500f397
...
@@ -29,6 +29,8 @@ DI,0,自动模式,AutoRun_Single,2,,X02,,,,,,,,,,
...
@@ -29,6 +29,8 @@ DI,0,自动模式,AutoRun_Single,2,,X02,,,,,,,,,,
DI,0,气压检测,Airpressure_Check,3,,X03,,,,,,,,,,
DI,0,气压检测,Airpressure_Check,3,,X03,,,,,,,,,,
DI,0,吸盘进气压力检测,Sucker_suction_detection,4,,X04,,,,,,,,,,
DI,0,吸盘进气压力检测,Sucker_suction_detection,4,,X04,,,,,,,,,,
DI,0,ML5出入口安全检测,ML5_DoorSafeCheck,149,,X149,,,,,,,,,,
DI,0,ML5出入口安全检测,ML5_DoorSafeCheck,149,,X149,,,,,,,,,,
DI,0,点料机进料安全检测,CI_IN_DoorSafeCheck,100,,X100,,,,,,,,,,
DI,0,点料机出料安全检测,CI_OUT_DoorSafeCheck,101,,X101,,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
DI,0,LS1-1顶升上升端,Ls_A_Location_Up,5,LS1,X05,,,,,,,,,,
DI,0,LS1-1顶升上升端,Ls_A_Location_Up,5,LS1,X05,,,,,,,,,,
DI,0,LS1-1顶升下降端,Ls_A_Location_Down,6,LS1,X06,,,,,,,,,,
DI,0,LS1-1顶升下降端,Ls_A_Location_Down,6,LS1,X06,,,,,,,,,,
...
...
LoadCVSLibrary/storeConfig/config/IO_Type.cs
查看文件 @
500f397
...
@@ -51,6 +51,14 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -51,6 +51,14 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
/// </summary>
public
static
string
ML5_DoorSafeCheck
=
"ML5_DoorSafeCheck"
;
public
static
string
ML5_DoorSafeCheck
=
"ML5_DoorSafeCheck"
;
/// <summary>
/// <summary>
/// DI,0,点料机进料安全检测,CI_IN_DoorSafeCheck,100,,X100,,,,,,,,,,
/// </summary>
public
static
string
CI_IN_DoorSafeCheck
=
"CI_IN_DoorSafeCheck"
;
/// <summary>
/// DI,0,点料机出料安全检测,CI_OUT_DoorSafeCheck,101,,X101,,,,,,,,,,
/// </summary>
public
static
string
CI_OUT_DoorSafeCheck
=
"CI_OUT_DoorSafeCheck"
;
/// <summary>
/// DO,0,LS3-2顶升上升端,Ls_B_Location_Up,116,HY3,X116,,,,,,,,,,
/// DO,0,LS3-2顶升上升端,Ls_B_Location_Up,116,HY3,X116,,,,,,,,,,
/// </summary>
/// </summary>
public
static
string
Ls_B_Location_Up
=
"Ls_B_Location_Up"
;
public
static
string
Ls_B_Location_Up
=
"Ls_B_Location_Up"
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论