Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO664-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 716e62a7
由
LN
编写于
2020-11-27 10:16:53 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
hy修改
1 个父辈
cbe75bfe
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
165 行增加
和
114 行删除
source/AssemblyLineClient/FrmLineIO.Designer.cs
source/AssemblyLineClient/FrmLineIO.cs
source/AssemblyLineClient/FrmLineStore.cs
source/DeviceLibrary/DeviceLibrary.csproj
source/DeviceLibrary/assemblyLine/EquipBase.cs
source/DeviceLibrary/assemblyLine/HY/HYEquipBase.cs
source/DeviceLibrary/assemblyLine/HY/HY_C1Line.cs
source/DeviceLibrary/assemblyLine/HY/HY_C1_SLStation.cs
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
source/LoadCVSLibrary/storeConfig/config/DeviceConfig.cs
source/LoadCVSLibrary/storeConfig/config/HYEquip_Config.cs
source/AssemblyLineClient/FrmLineIO.Designer.cs
查看文件 @
716e62a
此文件的差异被折叠,
点击展开。
source/AssemblyLineClient/FrmLineIO.cs
查看文件 @
716e62a
...
...
@@ -411,5 +411,14 @@ namespace OnlineStore.AssemblyLine
}
}
}
private
void
chbTray_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
if
(!
groupTray
.
Enabled
.
Equals
(
chbTray
.
Checked
))
{
groupTray
.
Enabled
=
chbTray
.
Checked
;
LogUtil
.
error
(
"勾选 "
+
chbTray
.
Text
+
"="
+
groupTray
.
Enabled
);
}
}
}
}
source/AssemblyLineClient/FrmLineStore.cs
查看文件 @
716e62a
...
...
@@ -305,13 +305,11 @@ namespace OnlineStore.AssemblyLine
Clipboard
.
SetDataObject
(
logBox
.
Text
);
MessageBox
.
Show
(
"已复制日志到粘贴板!"
);
}
#
region
内存回收
[
DllImport
(
"kernel32.dll"
,
EntryPoint
=
"SetProcessWorkingSetSize"
)]
public
static
extern
int
SetProcessWorkingSetSize
(
IntPtr
process
,
int
minSize
,
int
maxSize
);
/// <summary>
/// 释放内存
/// </summary>
public
static
void
ClearMemory
()
{
try
...
...
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
716e62a
...
...
@@ -173,18 +173,9 @@
<Content Include="LineConfig\MoveEquip\Config_MoveEquip.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="LineConfig\MoveEquip\back\Config_MoveEquip_01.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Content Include="LineConfig\MoveEquip\Config_MoveEquip_10.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="LineConfig\MoveEquip\back\Config_MoveEquip_11.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="LineConfig\MoveEquip\back\Config_MoveEquip_12.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Content Include="LineConfig\MoveEquip\Config_MoveEquip_13.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
...
...
@@ -197,48 +188,12 @@
<Content Include="LineConfig\MoveEquip\Config_MoveEquip_16.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="LineConfig\MoveEquip\back\Config_MoveEquip_17.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Content Include="LineConfig\MoveEquip\Config_MoveEquip_18.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="LineConfig\MoveEquip\back\Config_MoveEquip_02.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="LineConfig\MoveEquip\back\Config_MoveEquip_03.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="LineConfig\MoveEquip\back\Config_MoveEquip_04.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="LineConfig\MoveEquip\back\Config_MoveEquip_05.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="LineConfig\MoveEquip\back\Config_MoveEquip_06.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="LineConfig\MoveEquip\back\Config_MoveEquip_07.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="LineConfig\MoveEquip\back\Config_MoveEquip_08.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Content Include="LineConfig\MoveEquip\Config_MoveEquip_09.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="LineConfig\MoveEquip\back\Config_MoveEquip_19.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="LineConfig\MoveEquip\back\Config_MoveEquip_20.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="LineConfig\MoveEquip\back\Config_MoveEquip_21.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="LineConfig\MoveEquip\back\Config_MoveEquip_22.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Content Include="LineConfig\MoveEquip\Config_MoveEquip_23.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
...
...
source/DeviceLibrary/assemblyLine/EquipBase.cs
查看文件 @
716e62a
...
...
@@ -563,7 +563,7 @@ namespace OnlineStore.DeviceLibrary
}
protected
void
InLog
(
string
msg
)
{
string
posId
=
MoveInfo
.
MoveParam
!=
null
?
"["
+
MoveInfo
.
MoveParam
.
PosId
+
"]["
+
MoveInfo
.
MoveParam
.
WareCode
+
"]"
:
""
;
string
posId
=
MoveInfo
.
MoveParam
!=
null
?
"["
+
currTrayNum
+
"]["
+
MoveInfo
.
MoveParam
.
PosId
+
"]["
+
MoveInfo
.
MoveParam
.
WareCode
+
"]"
:
""
;
//baseConfig.DType.Equals(DeviceType.HYEquip)
if
(
baseConfig
.
DType
.
Equals
(
DeviceType
.
MoveEquip
))
{
...
...
@@ -576,7 +576,7 @@ namespace OnlineStore.DeviceLibrary
}
protected
void
OutLog
(
string
msg
)
{
string
posId
=
MoveInfo
.
MoveParam
!=
null
?
"["
+
MoveInfo
.
MoveParam
.
PosId
+
"]["
+
MoveInfo
.
MoveParam
.
WareCode
+
"]"
:
""
;
string
posId
=
MoveInfo
.
MoveParam
!=
null
?
"["
+
currTrayNum
+
"]["
+
MoveInfo
.
MoveParam
.
PosId
+
"]["
+
MoveInfo
.
MoveParam
.
WareCode
+
"]"
:
""
;
//baseConfig.DType.Equals(DeviceType.HYEquip)
if
(
baseConfig
.
DType
.
Equals
(
DeviceType
.
MoveEquip
))
{
...
...
source/DeviceLibrary/assemblyLine/HY/HYEquipBase.cs
查看文件 @
716e62a
...
...
@@ -124,24 +124,24 @@ namespace OnlineStore.DeviceLibrary
StringBuilder
buf
=
new
StringBuilder
();
buf
.
Append
(
" 所在流水线:"
+
Config
.
LineName
+
"\r\n"
);
string
dName
=
"暂无"
;
if
(
Config
.
WorkDevice
>
0
&&
LineManager
.
Line
.
AllEquipMap
.
ContainsKey
(
Config
.
WorkDevice
))
if
(
Config
.
WorkDevice
Id
>
0
&&
LineManager
.
Line
.
AllEquipMap
.
ContainsKey
(
Config
.
WorkDeviceId
))
{
dName
=
LineManager
.
Line
.
AllEquipMap
[
Config
.
WorkDevice
].
Name
;
dName
=
LineManager
.
Line
.
AllEquipMap
[
Config
.
WorkDevice
Id
].
Name
;
}
buf
.
Append
(
" 取放料设备:"
+
dName
+
"\r\n"
);
if
(
Config
.
IsSideWayIn
.
Equals
(
1
)
)
if
(
Config
.
IsSideWayIn
)
{
buf
.
Append
(
"C1线横移入口:✔"
+
"\r\n"
);
}
if
(
Config
.
IsSideWayOut
.
Equals
(
1
)
)
if
(
Config
.
IsSideWayOut
)
{
buf
.
Append
(
"C1线横移出口:✔"
+
"\r\n"
);
}
if
(
Config
.
IsOutLineIn
.
Equals
(
1
)
)
if
(
Config
.
IsOutLineIn
)
{
buf
.
Append
(
" 出料托盘入口:✔"
+
"\r\n"
);
}
if
(
Config
.
IsOutLineOut
.
Equals
(
1
)
)
if
(
Config
.
IsOutLineOut
)
{
buf
.
Append
(
" 出料托盘出口:✔"
+
"\r\n"
);
}
...
...
source/DeviceLibrary/assemblyLine/HY/HY_C1Line.cs
查看文件 @
716e62a
...
...
@@ -223,7 +223,7 @@ namespace OnlineStore.DeviceLibrary
IOMove
(
IO_Type
.
HY_OL_StopDown
,
IO_VALUE
.
LOW
);
}
}
else
if
(
Config
.
IsOutLineOut
.
Equals
(
1
)
&&
IOValue
(
IO_Type
.
HY_OL_Tray_Check
).
Equals
(
IO_VALUE
.
HIGH
))
else
if
(
Config
.
IsOutLineOut
&&
IOValue
(
IO_Type
.
HY_OL_Tray_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
bool
check2IsOk
=
CheckStopWatch
(
trayCheck2LowWait
,
TrayWaitTime
,
false
);
if
(
CheckStopWatch
(
trayCheckWait
,
TrayWaitTime
,
false
)
&&
check2IsOk
)
...
...
@@ -294,25 +294,25 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
HY05_TrayCheck
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
3000
));
if
(
TrayNeedHY
(
currTrayNum
))
//先判断是否需要到出料线,在判断是否需要横移
if
(
TrayNeedToOutLine
(
currTrayNum
))
{
HY
11_TopUpToHY
();
HY
31_IOL_TopUp
();
}
else
if
(
TrayNeed
ToOutLine
(
currTrayNum
))
else
if
(
TrayNeed
HY
(
currTrayNum
))
{
HY
31_IOL_TopUp
();
HY
11_TopUpToHY
();
}
else
{
//直接放盘通过
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
HY91_TrayCanGo
);
CheckLog
(
"托盘阻挡"
+
MoveInfo
.
SLog
+
" 无需处理,放托盘离开"
);
}
}
}
}
#
endregion
#
region
C1
线
->
出料线横移处理
31
...
...
@@ -356,7 +356,7 @@ namespace OnlineStore.DeviceLibrary
int
lineId
=
DeviceID
%
100
;
LogInfo
(
"C1线->出料线 【"
+
MoveInfo
.
MoveParam
.
ToShortStr
()
+
"】"
+
MoveInfo
.
SLog
+
" 更新料盘位置【"
+
MoveInfo
.
MoveParam
.
WareCode
+
"】【INBELT】【"
+
lineId
+
"】"
);
//更新料盘位置
SServerManager
.
UpdateTrayLoc
(
Name
,
MoveInfo
.
MoveParam
.
WareCode
,
LocStatus
.
INBELT
,
lineId
.
ToString
()
);
SServerManager
.
UpdateTrayLoc
(
Name
,
MoveInfo
.
MoveParam
.
WareCode
,
LocStatus
.
INBELT
,
Config
.
LineName
);
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
HY35_IOL_TopDown
))
{
...
...
@@ -383,11 +383,11 @@ namespace OnlineStore.DeviceLibrary
CheckLog
(
"托盘横移"
+
MoveInfo
.
SLog
+
" ,等待"
+
hyout
.
Name
+
" 准备完成(顶升上升,定位下降) "
);
GetHyOutEquip
().
MoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
);
GetHyOutEquip
().
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
HY51_WaitFree
);
ClearTimeoutAlarm
(
"等待"
+
hyout
.
Name
+
"可以横移超时"
);
ClearTimeoutAlarm
(
"等待"
+
hyout
.
Name
+
"可以横移超时"
);
}
else
if
(
MoveInfo
.
IsTimeOut
())
{
MoveTimeOut
(
MoveInfo
,
"等待"
+
hyout
.
Name
+
"可以横移超时"
);
MoveTimeOut
(
MoveInfo
,
"等待"
+
hyout
.
Name
+
"可以横移超时"
);
}
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
HY13_WaitHY2Ready
))
...
...
@@ -401,7 +401,7 @@ namespace OnlineStore.DeviceLibrary
LineRun
(
MoveInfo
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
HY_TrayCheck
,
IO_VALUE
.
LOW
));
ClearTimeoutAlarm
(
"等待"
+
hyout
.
Name
+
"顶升上升完成超时"
);
ClearTimeoutAlarm
(
"等待"
+
hyout
.
Name
+
"顶升上升完成超时"
);
}
else
if
(
MoveInfo
.
IsTimeOut
())
{
...
...
@@ -423,11 +423,11 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
HY16_WatOutFixture2
);
CheckLog
(
"托盘横移"
+
MoveInfo
.
SLog
+
" ,等待托盘到达"
+
hyout
.
Name
+
"持续一段时间 "
);
ClearTimeoutAlarm
(
"等待托盘到达"
+
hyout
.
Name
+
"超时"
);
ClearTimeoutAlarm
(
"等待托盘到达"
+
hyout
.
Name
+
"超时"
);
}
else
if
(
MoveInfo
.
IsTimeOut
())
{
MoveTimeOut
(
MoveInfo
,
"等待托盘到达"
+
hyout
.
Name
+
"超时"
);
MoveTimeOut
(
MoveInfo
,
"等待托盘到达"
+
hyout
.
Name
+
"超时"
);
}
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
HY16_WatOutFixture2
))
...
...
@@ -442,7 +442,7 @@ namespace OnlineStore.DeviceLibrary
CylinderMove
(
MoveInfo
,
IO_Type
.
HY_TopCylinder_Up
,
IO_Type
.
HY_TopCylinder_Down
);
HY_StopCylinderUp
(
MoveInfo
);
OL_StopCylinderUp
(
MoveInfo
);
ClearTimeoutAlarm
(
"等待托盘到达"
+
hyout
.
Name
+
""
);
ClearTimeoutAlarm
(
"等待托盘到达"
+
hyout
.
Name
+
""
);
}
else
if
(
MoveInfo
.
IsTimeOut
())
{
...
...
@@ -587,11 +587,11 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
HY91_TrayCanGo
);
CheckLog
(
"托盘阻挡"
+
MoveInfo
.
SLog
+
" 无需处理,放托盘离开"
);
}
}
}
#
endregion
#
region
分流横移放盘离开
91
...
...
@@ -659,9 +659,87 @@ namespace OnlineStore.DeviceLibrary
{
try
{
if
(
Config
.
IsSideWayIn
.
Equals
(
1
)
&&
trayNum
>
0
)
if
(
Config
.
IsSideWayIn
&&
trayNum
>
0
)
{
TrayInfo
tray
=
TrayManager
.
GetTrayInfo
(
currTrayNum
);
//TODO
if
(
DeviceID
.
Equals
(
204
))
{
//HY4,满料托盘需要横移
//空托盘且T1,T2都不在上料时需要 横移
if
(
tray
.
IsFull
)
{
return
true
;
}
else
{
FeedingEquip
feed1
=
LineManager
.
Line
.
FeedingEquipMap
[
101
];
FeedingEquip
feed2
=
LineManager
.
Line
.
FeedingEquipMap
[
102
];
if
((!
feed1
.
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
InStore
))
||
(!
feed2
.
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
InStore
)))
{
return
true
;
}
}
}
else
if
(
DeviceID
.
Equals
(
209
))
{
//非 1,2,3,4,5,13,14,15,16的入库料需要横移
if
(
tray
.
IsFull
)
{
if
(
tray
.
InOrOutStore
.
Equals
(
1
))
{
int
storeId
=
tray
.
InoutPar
.
GetStoreId
();
List
<
int
>
instoreId
=
new
List
<
int
>
{
1
,
2
,
3
,
4
,
5
,
13
,
14
,
15
,
16
};
if
(!
instoreId
.
Contains
(
storeId
))
{
return
true
;
}
}
}
}
else
if
(
DeviceID
.
Equals
(
215
))
{
//非分盘料的出库需要横移
//非11,12,23,24的入库料需要横移
if
(
tray
.
IsFull
)
{
if
(
tray
.
InOrOutStore
.
Equals
(
2
)
&&
(!
tray
.
InoutPar
.
cutReel
))
{
return
true
;
}
else
if
(
tray
.
InOrOutStore
.
Equals
(
1
))
{
int
storeId
=
tray
.
InoutPar
.
GetStoreId
();
List
<
int
>
instoreId
=
new
List
<
int
>
{
11
,
12
,
23
,
24
};
if
(!
instoreId
.
Contains
(
storeId
))
{
return
true
;
}
}
}
}
else
if
(
DeviceID
.
Equals
(
218
))
{
//HY4,满料托盘,如果不是分盘出料的需要横移,
//空托盘,T5都不在上料时需要横移
if
(
tray
.
IsFull
)
{
//如果是分盘料盘,不需要横移
if
(
tray
.
InOrOutStore
.
Equals
(
2
)
&&
tray
.
InoutPar
.
cutReel
)
{
return
false
;
}
return
true
;
}
else
{
FeedingEquip
feed5
=
LineManager
.
Line
.
FeedingEquipMap
[
102
];
if
(!
feed5
.
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
InStore
))
{
return
true
;
}
}
}
}
}
catch
(
Exception
ex
)
...
...
@@ -679,7 +757,7 @@ namespace OnlineStore.DeviceLibrary
{
try
{
if
(
Config
.
IsOutLineIn
.
Equals
(
1
)
&&
trayNum
>
0
)
if
(
Config
.
IsOutLineIn
&&
trayNum
>
0
)
{
//测线满时不需要横移
if
(!
Config
.
DIList
.
ContainsKey
(
IO_Type
.
HY_OL_Full_Check
)
||
IOValue
(
IO_Type
.
HY_OL_Full_Check
).
Equals
(
IO_VALUE
.
LOW
))
...
...
source/DeviceLibrary/assemblyLine/HY/HY_C1_SLStation.cs
查看文件 @
716e62a
...
...
@@ -191,7 +191,7 @@ namespace OnlineStore.DeviceLibrary
if
(
CheckStopWatch
(
trayCheckWait
,
TrayWaitTime
,
true
))
{
MoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
);
if
(
Config
.
IsSideWayIn
.
Equals
(
1
)
)
if
(
Config
.
IsSideWayIn
)
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
HY03_FrontStopUp
);
...
...
@@ -311,7 +311,7 @@ namespace OnlineStore.DeviceLibrary
{
if
(
TrayNeedSL
(
currTrayNum
))
{
FeedingEquip
feed
=
LineManager
.
Line
.
FeedingEquipMap
[
Config
.
WorkDevice
];
FeedingEquip
feed
=
LineManager
.
Line
.
FeedingEquipMap
[
Config
.
WorkDevice
Id
];
if
(
feed
.
Config
.
IsCanOut
.
Equals
(
1
))
{
//紧急出料
...
...
@@ -545,7 +545,7 @@ namespace OnlineStore.DeviceLibrary
{
try
{
if
(
Config
.
WorkDevice
>
0
)
if
(
Config
.
WorkDevice
Id
>
0
)
{
TrayInfo
trayInfo
=
TrayManager
.
GetTrayInfo
(
trayNum
);
if
(
trayInfo
.
IsFull
)
...
...
@@ -553,7 +553,7 @@ namespace OnlineStore.DeviceLibrary
return
false
;
}
//判断上料T是否在入库等待托盘
FeedingEquip
feedT
=
LineManager
.
Line
.
FeedingEquipMap
[
Config
.
WorkDevice
];
FeedingEquip
feedT
=
LineManager
.
Line
.
FeedingEquipMap
[
Config
.
WorkDevice
Id
];
if
(
feedT
.
CurrTrayIsNeed
(
currTrayNum
,
false
))
{
LogInfo
(
" "
+
feedT
.
Name
+
"拦截托盘【"
+
currTrayNum
+
"】"
);
...
...
@@ -570,7 +570,7 @@ namespace OnlineStore.DeviceLibrary
internal
override
bool
TrayIsReady
()
{
if
(
Config
.
IsSideWayIn
.
Equals
(
1
)
)
if
(
Config
.
IsSideWayIn
)
{
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
CheckFixture
)
&&
MoveInfo
.
IsStep
(
LineMoveStep
.
HY08_SL_WaitProcessReel
))
{
...
...
@@ -591,7 +591,7 @@ namespace OnlineStore.DeviceLibrary
{
if
(
TrayIsReady
())
{
if
(
Config
.
IsSideWayIn
.
Equals
(
1
)
)
if
(
Config
.
IsSideWayIn
)
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
HY09_SL_ReelProEnd
);
CheckLog
(
"托盘阻挡"
+
MoveInfo
.
SLog
+
" 料盘处理完成,开始横移或放行"
);
...
...
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
查看文件 @
716e62a
...
...
@@ -381,7 +381,7 @@ namespace OnlineStore.DeviceLibrary
{
foreach
(
HYEquipBase
hy
in
HYEquipMap
.
Values
)
{
if
(
hy
.
Config
.
WorkDevice
.
Equals
(
deviceID
))
if
(
hy
.
Config
.
WorkDevice
Id
.
Equals
(
deviceID
))
{
if
(
hy
.
TrayIsReady
())
{
...
...
@@ -407,7 +407,7 @@ namespace OnlineStore.DeviceLibrary
{
foreach
(
HYEquipBase
hy
in
HYEquipMap
.
Values
)
{
if
(
hy
.
Config
.
WorkDevice
.
Equals
(
deviceID
))
if
(
hy
.
Config
.
WorkDevice
Id
.
Equals
(
deviceID
))
{
hy
.
TrayCanLeave
();
break
;
...
...
source/LoadCVSLibrary/storeConfig/config/DeviceConfig.cs
查看文件 @
716e62a
...
...
@@ -280,13 +280,24 @@ namespace OnlineStore.LoadCSVLibrary
}
else
{
if
(
prop
.
PropertyType
.
Equals
(
typeof
(
int
)))
try
{
prop
.
SetValue
(
this
,
Convert
.
ChangeType
(
0
,
prop
.
PropertyType
),
null
);
//赋值****在这里需要考虑类型问题
}
else
if
(
prop
.
PropertyType
.
Equals
(
typeof
(
int
))||
prop
.
PropertyType
.
Equals
(
typeof
(
Int32
)))
{
prop
.
SetValue
(
this
,
Convert
.
ChangeType
(
0
,
prop
.
PropertyType
),
null
);
//赋值****在这里需要考虑类型问题
}
else
if
(
prop
.
PropertyType
.
Equals
(
typeof
(
bool
)))
{
prop
.
SetValue
(
this
,
Convert
.
ChangeType
(
false
,
prop
.
PropertyType
),
null
);
//赋值****在这里需要考虑类型问题
}
else
{
prop
.
SetValue
(
this
,
Convert
.
ChangeType
(
""
,
prop
.
PropertyType
),
null
);
//赋值****在这里需要考虑类型问题
}
}
catch
(
Exception
ex
)
{
prop
.
SetValue
(
this
,
Convert
.
ChangeType
(
""
,
prop
.
PropertyType
),
null
);
//赋值****在这里需要考虑类型问题
LogUtil
.
error
(
"LoadConfig赋值出错:"
+
this
.
ToString
()
+
"的属性"
+
str
+
"必须配置值!"
+
ex
.
ToString
());
throw
ex
;
}
}
}
...
...
source/LoadCVSLibrary/storeConfig/config/HYEquip_Config.cs
查看文件 @
716e62a
...
...
@@ -18,34 +18,34 @@ namespace OnlineStore.LoadCSVLibrary
public
HYEquip_Config
(
int
id
,
string
cid
,
string
type
,
string
filepath
)
:
base
(
id
,
cid
,
LoadCSVLibrary
.
DeviceType
.
HYEquip
,
filepath
)
{
IsOutLineOut
=
0
;
IsOutLineIn
=
0
;
IsSideWayIn
=
0
;
IsOutLineOut
=
0
;
IsOutLineOut
=
false
;
IsOutLineIn
=
false
;
IsSideWayIn
=
false
;
IsOutLineOut
=
false
;
UpDownUseAxis
=
0
;
IsDebug
=
0
;
}
public
void
LoadParam
()
{
IsOutLineOut
=
0
;
IsOutLineIn
=
0
;
IsSideWayIn
=
0
;
IsOutLineOut
=
0
;
IsOutLineOut
=
false
;
IsOutLineIn
=
false
;
IsSideWayIn
=
false
;
IsOutLineOut
=
false
;
if
(
Id
.
Equals
(
202
))
{
WorkDevice
=
102
;
WorkDevice
Id
=
102
;
}
else
if
(
Id
.
Equals
(
201
))
{
WorkDevice
=
101
;
WorkDevice
Id
=
101
;
}
else
if
(
Id
.
Equals
(
220
))
{
WorkDevice
=
104
;
WorkDevice
Id
=
104
;
}
else
if
(
Id
.
Equals
(
221
))
{
WorkDevice
=
105
;
WorkDevice
Id
=
105
;
}
int
[]
sideIns
=
new
int
[]
{
202
,
204
,
209
,
215
,
218
,
220
};
...
...
@@ -54,19 +54,19 @@ namespace OnlineStore.LoadCSVLibrary
int
[]
outOuts
=
new
int
[]
{
209
,
211
};
if
(
sideIns
.
Contains
(
Id
))
{
IsSideWayIn
=
1
;
IsSideWayIn
=
true
;
}
else
if
(
sideOuts
.
Contains
(
Id
))
{
IsSideWayOut
=
1
;
IsSideWayOut
=
true
;
}
if
(
outIns
.
Contains
(
Id
))
{
IsOutLineIn
=
1
;
IsOutLineIn
=
true
;
}
else
if
(
outOuts
.
Contains
(
Id
))
{
IsOutLineOut
=
1
;
IsOutLineOut
=
true
;
}
LineName
=
"C1"
;
if
(
Id
.
Equals
(
205
))
...
...
@@ -110,28 +110,28 @@ namespace OnlineStore.LoadCSVLibrary
/// <summary>
/// PRO,0,HY工位对应的取放料设备,WorkDevice,105,,
/// </summary>
[
ConfigProAttribute
(
"WorkDevice"
,
false
)]
public
int
WorkDevice
{
get
;
set
;
}
[
ConfigProAttribute
(
"WorkDevice
Id
"
,
false
)]
public
int
WorkDevice
Id
{
get
;
set
;
}
/// <summary>
/// PRO,0,HY是否是托盘横移入口,IsSideWayIn,0,,
/// </summary>
[
ConfigProAttribute
(
"IsSideWayIn"
,
false
)]
public
int
IsSideWayIn
{
get
;
set
;
}
public
bool
IsSideWayIn
{
get
;
set
;
}
/// <summary>
/// PRO,0,HY是否是托盘横移出口,IsSideWayOut,1,,
/// </summary>
[
ConfigProAttribute
(
"IsSideWayOut"
,
false
)]
public
int
IsSideWayOut
{
get
;
set
;
}
public
bool
IsSideWayOut
{
get
;
set
;
}
/// <summary>
/// PRO,0,HY是否是托盘进入出料线入口,IsOutLineIn,0,,
/// </summary>
[
ConfigProAttribute
(
"IsOutLineIn"
,
false
)]
public
int
IsOutLineIn
{
get
;
set
;
}
public
bool
IsOutLineIn
{
get
;
set
;
}
/// <summary>
/// PRO,0,HY是否是托盘离开出料线出口,IsOutLineOut,0,,
/// </summary>
[
ConfigProAttribute
(
"IsOutLineOut"
,
false
)]
public
int
IsOutLineOut
{
get
;
set
;
}
public
bool
IsOutLineOut
{
get
;
set
;
}
/// <summary>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论