Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
thick-casting
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
潘栩锋
thick-casting
Commits
f3f9babb
Commit
f3f9babb
authored
Aug 01, 2022
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复 修复一系列bug
parent
cc0ba723
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
82 additions
and
68 deletions
+82
-68
PgHeatAnalyse.xaml
...asting.AutoDie.UI.Client/PgHeatAnalyse/PgHeatAnalyse.xaml
+2
-2
IHeatBufService.cs
...toDie/FLY.FilmCasting.AutoDie/IService/IHeatBufService.cs
+1
-1
IPLCLink.cs
...ting.AutoDie/FLY.FilmCasting.AutoDie/IService/IPLCLink.cs
+1
-1
FeedbackHeat.cs
...ng.AutoDie/FLY.FilmCasting.AutoDie/Server/FeedbackHeat.cs
+0
-3
HeatBuf.cs
...Casting.AutoDie/FLY.FilmCasting.AutoDie/Server/HeatBuf.cs
+1
-1
HeatCell.cs
...asting.AutoDie/FLY.FilmCasting.AutoDie/Server/HeatCell.cs
+49
-38
PLCLink.cs
...Casting.AutoDie/FLY.FilmCasting.AutoDie/Server/PLCLink.cs
+7
-7
PlcLinkExt.cs
...ting.AutoDie/FLY.FilmCasting.AutoDie/Server/PlcLinkExt.cs
+5
-5
AssemblyInfo.cs
...LY.Thick.FilmCasting.UI.Client/Properties/AssemblyInfo.cs
+2
-2
AssemblyInfo.cs
...LY.Thick.FilmCasting.UI.Server/Properties/AssemblyInfo.cs
+2
-2
ScanWarning.cs
...k.FilmCasting/FLY.Thick.FilmCasting/Server/ScanWarning.cs
+7
-3
3.get_exe.sh
脚本/3.get_exe.sh
+2
-1
filmCastingInstallZipVersionInfo.json
脚本/filmCastingInstallZipVersionInfo.json
+3
-2
No files found.
Project.FLY.FilmCasting.AutoDie/FLY.FilmCasting.AutoDie.UI.Client/PgHeatAnalyse/PgHeatAnalyse.xaml
View file @
f3f9babb
...
...
@@ -38,11 +38,11 @@
<TextBlock Style="{StaticResource Styles.TitleBar.Text}" Text="对位分析"/>
<StackPanel>
<StackPanel Orientation="Horizontal" >
<TextBlock Style="{StaticResource
TextBlockStyle_
FieldHeader}" Text="有效数据" Foreground="LightGray"/>
<TextBlock Style="{StaticResource
Styles.Text.
FieldHeader}" Text="有效数据" Foreground="LightGray"/>
<ToggleButton Style="{StaticResource CheckStyle}" HorizontalAlignment="Left" IsChecked="{Binding IsMoveByTakeEffect}" Width="30" Height="auto" Foreground="White" Background="#02FFFFFF" />
</StackPanel>
<StackPanel Orientation="Horizontal" >
<TextBlock Style="{StaticResource
TextBlockStyle_
FieldHeader}" Text="模头改变" Foreground="LightGray"/>
<TextBlock Style="{StaticResource
Styles.Text.
FieldHeader}" Text="模头改变" Foreground="LightGray"/>
<ToggleButton Style="{StaticResource CheckStyle}" HorizontalAlignment="Left" IsChecked="{Binding IsMoveByDiffCTime}" Width="30" Height="auto" Foreground="White" Background="#02FFFFFF" />
</StackPanel>
</StackPanel>
...
...
Project.FLY.FilmCasting.AutoDie/FLY.FilmCasting.AutoDie/IService/IHeatBufService.cs
View file @
f3f9babb
...
...
@@ -30,7 +30,7 @@ namespace FLY.FilmCasting.AutoDie.IService
int
StableRange
{
get
;
set
;
}
/// <summary>
///
对位模式, 加热与厚度相关性阀值, 相关性 >=0.7
///
加热与厚度相关性阀值, 相关性 >=0.8
/// </summary>
double
ThresholdR
{
get
;
set
;
}
...
...
Project.FLY.FilmCasting.AutoDie/FLY.FilmCasting.AutoDie/IService/IPLCLink.cs
View file @
f3f9babb
...
...
@@ -39,7 +39,7 @@ namespace FLY.FilmCasting.AutoDie.Server
#
endregion
#
region
状态
bool
IsConected
{
get
;
}
bool
IsCon
n
ected
{
get
;
}
#
endregion
}
...
...
Project.FLY.FilmCasting.AutoDie/FLY.FilmCasting.AutoDie/Server/FeedbackHeat.cs
View file @
f3f9babb
...
...
@@ -163,9 +163,6 @@ namespace FLY.FilmCasting.AutoDie.Server
{
if
(!
Load
())
Save
();
}
...
...
Project.FLY.FilmCasting.AutoDie/FLY.FilmCasting.AutoDie/Server/HeatBuf.cs
View file @
f3f9babb
...
...
@@ -35,7 +35,7 @@ namespace FLY.FilmCasting.AutoDie.Server
/// <summary>
/// 加热生效曲线,允许为空,则不生效
/// </summary>
public
int
[]
HeatEffectCurve
{
get
;
set
;
}
=
new
int
[]
{
3
,
4
,
5
,
6
,
5
,
4
,
3
};
public
int
[]
HeatEffectCurve
{
get
;
set
;
}
=
new
int
[]
{
3
,
4
,
7
,
4
,
3
};
/// <summary>
...
...
Project.FLY.FilmCasting.AutoDie/FLY.FilmCasting.AutoDie/Server/HeatCell.cs
View file @
f3f9babb
...
...
@@ -30,6 +30,7 @@ namespace FLY.FilmCasting.AutoDie.Server
/// 测厚仪厚度数据混合数
/// </summary>
public
int
Mix
{
get
;
set
;
}
=
3
;
/// <summary>
/// 平滑的阀值,只有超出阀值,才平滑
/// </summary>
...
...
@@ -220,9 +221,11 @@ namespace FLY.FilmCasting.AutoDie.Server
}
void
create_thickPercentTargets
(
double
centerTarget
,
int
dataBegin
,
int
dataEnd
)
{
if
(
this
.
centerTarget
==
centerTarget
&&
this
.
dataBegin
==
dataBegin
&&
this
.
dataEnd
==
dataEnd
)
return
;
if
(
centerTarget
==
0
)
{
thickPercentTargets
=
new
double
[
ChannelCnt
];
thi
s
.
thi
ckPercentTargets
=
new
double
[
ChannelCnt
];
this
.
centerTarget
=
0
;
this
.
dataBegin
=
0
;
this
.
dataEnd
=
ChannelCnt
-
1
;
...
...
@@ -263,19 +266,8 @@ namespace FLY.FilmCasting.AutoDie.Server
if
(
mHeatBuf
.
Stability
!=
STABILITY
.
OK_CORREL
)
//稳定 与 待定时 加热
return
;
double
ctrlLine
=
CtrlLine
;
if
(
IsLvCtrlLinesValid
())
{
for
(
int
i
=
0
;
i
<
LvCtrlLines
.
Count
();
i
++)
{
int
index
=
LvCtrlLines
.
Count
()
-
1
-
i
;
if
(
thickPercentsCollection
.
Count
()
>=
LvCtrlLines
[
index
].
Mix
)
{
ctrlLine
=
LvCtrlLines
[
index
].
CtrlLine
;
break
;
}
}
}
double
ctrlLine
=
getCtrlLine
(
thickPercentsCollection
.
Count
());
//转为 加热棒数量
var
thickPercents
=
ThickPercents
;
...
...
@@ -286,6 +278,21 @@ namespace FLY.FilmCasting.AutoDie.Server
if
(!
double
.
IsNaN
(
thickPercents
[
i
])
&&
!
double
.
IsNaN
(
thickPercentTargets
[
i
]))
{
double
delta
=
(
thickPercents
[
i
]
-
thickPercentTargets
[
i
]);
offsets
[
i
]
=
calOffset
(
delta
,
ctrlLine
,
Kp
);
}
}
Offsets
=
offsets
;
UpdatePreHeats
();
//这句一定要加!!!! 不然没法平滑,没法加热
if
(!
IsForbidUpDown
)
//禁止整体上移下降
ModifyBase
();
//自动整体上移下降
Smooth
();
//平滑,它会导致Offset被修改,<0的都被删除掉
HeatApply
();
//执行加热
}
double
calOffset
(
double
delta
,
double
ctrlLine
,
double
kp
)
{
double
d
=
Math
.
Abs
(
delta
);
if
(
d
>=
ctrlLine
)
...
...
@@ -304,22 +311,26 @@ namespace FLY.FilmCasting.AutoDie.Server
{
d
=
0
;
}
double
offset
=
d
*
Kp
;
offsets
[
i
]
=
delta
>=
0
?
offset
:
-
offset
;
double
offset
=
d
*
kp
;
return
delta
>=
0
?
offset
:
-
offset
;
}
double
getCtrlLine
(
int
currMix
)
{
double
ctrlLine
=
CtrlLine
;
if
(
IsLvCtrlLinesValid
())
{
for
(
int
i
=
0
;
i
<
LvCtrlLines
.
Count
();
i
++)
{
int
index
=
LvCtrlLines
.
Count
()
-
1
-
i
;
if
(
currMix
>=
LvCtrlLines
[
index
].
Mix
)
{
ctrlLine
=
LvCtrlLines
[
index
].
CtrlLine
;
break
;
}
}
}
Offsets
=
offsets
;
UpdatePreHeats
();
//这句一定要加!!!! 不然没法平滑,没法加热
if
(!
IsForbidUpDown
)
//禁止整体上移下降
ModifyBase
();
//自动整体上移下降
Smooth
();
//平滑,它会导致Offset被修改,<0的都被删除掉
HeatApply
();
//执行加热
return
ctrlLine
;
}
public
void
SetThickPercents
(
double
[]
thkpercents
)
{
var
thkPercents
=
thkpercents
.
ToArray
();
...
...
Project.FLY.FilmCasting.AutoDie/FLY.FilmCasting.AutoDie/Server/PLCLink.cs
View file @
f3f9babb
...
...
@@ -54,7 +54,7 @@ namespace FLY.FilmCasting.AutoDie.Server
/// </summary>
public
UInt16
HeatUpdate_R
{
get
;
private
set
;
}
public
bool
IsConected
{
get
;
private
set
;
}
public
bool
IsCon
n
ected
{
get
;
private
set
;
}
public
event
PropertyChangedEventHandler
PropertyChanged
;
...
...
@@ -91,7 +91,7 @@ namespace FLY.FilmCasting.AutoDie.Server
public
void
SetChannelCnt
(
UInt16
channelCnt
)
{
if
(!
IsConected
)
if
(!
IsCon
n
ected
)
return
;
//D200 4x201 通道数量
...
...
@@ -103,7 +103,7 @@ namespace FLY.FilmCasting.AutoDie.Server
}
public
void
SetHeatUpdate
(
UInt16
heatUpdate
)
{
if
(!
IsConected
)
if
(!
IsCon
n
ected
)
return
;
//D201 4x202 设置值 更新
...
...
@@ -184,7 +184,7 @@ namespace FLY.FilmCasting.AutoDie.Server
goto
_error
;
//连接断开,终止更新线程
}
IsConected
=
true
;
IsCon
n
ected
=
true
;
}
//输出写入数据
...
...
@@ -200,13 +200,13 @@ namespace FLY.FilmCasting.AutoDie.Server
}
_error
:
IsConected
=
false
;
IsCon
n
ected
=
false
;
ErrorCnt
++;
goto
_connect
;
_end
:
mclient
.
Close
();
IsConected
=
true
;
IsCon
n
ected
=
true
;
IsRunning
=
false
;
}
...
...
@@ -258,7 +258,7 @@ namespace FLY.FilmCasting.AutoDie.Server
/// <param name="values"></param>
public
void
SetHeat
(
IEnumerable
<
UInt16
>
values
)
{
if
(!
IsConected
)
if
(!
IsCon
n
ected
)
return
;
UInt16
[]
buf
=
values
.
ToArray
();
...
...
Project.FLY.FilmCasting.AutoDie/FLY.FilmCasting.AutoDie/Server/PlcLinkExt.cs
View file @
f3f9babb
...
...
@@ -54,7 +54,7 @@ namespace FLY.FilmCasting.AutoDie.Server
{
this
.
plcLink
=
plcLink
;
Misc
.
BindingOperations
.
SetBinding
(
plcLink
,
nameof
(
plcLink
.
IsConected
),
this
,
nameof
(
IsConected
));
Misc
.
BindingOperations
.
SetBinding
(
plcLink
,
nameof
(
plcLink
.
IsCon
n
ected
),
this
,
nameof
(
IsConected
));
Misc
.
BindingOperations
.
SetBinding
(
plcLink
,
nameof
(
plcLink
.
HasElectricity
),
this
,
nameof
(
HasElectricity
));
Misc
.
BindingOperations
.
SetBinding
(
plcLink
,
nameof
(
plcLink
.
HasFan
),
this
,
nameof
(
HasFan
));
...
...
@@ -67,7 +67,7 @@ namespace FLY.FilmCasting.AutoDie.Server
stopwatch
=
new
Stopwatch
();
if
(
plcLink
.
IsConected
)
if
(
plcLink
.
IsCon
n
ected
)
{
//刚连上,把 之前的数据都重新发给它。
plcLink
.
SetChannelCnt
((
UInt16
)
channelCnt
);
...
...
@@ -89,7 +89,7 @@ namespace FLY.FilmCasting.AutoDie.Server
}
void
setHeats
()
{
if
(!
plcLink
.
IsConected
)
if
(!
plcLink
.
IsCon
n
ected
)
return
;
UInt16
[]
plcHeats
=
heats
.
Select
(
h
=>
{
...
...
@@ -129,9 +129,9 @@ namespace FLY.FilmCasting.AutoDie.Server
private
void
PlcLinkExt_PropertyChanged
(
object
sender
,
PropertyChangedEventArgs
e
)
{
if
(
e
.
PropertyName
==
nameof
(
plcLink
.
IsConected
))
if
(
e
.
PropertyName
==
nameof
(
plcLink
.
IsCon
n
ected
))
{
if
(
plcLink
.
IsConected
)
if
(
plcLink
.
IsCon
n
ected
)
{
//刚连上,把 之前的数据都重新发给它。
plcLink
.
SetChannelCnt
((
UInt16
)
channelCnt
);
...
...
Project.FLY.Thick.FilmCasting/FLY.Thick.FilmCasting.UI.Client/Properties/AssemblyInfo.cs
View file @
f3f9babb
...
...
@@ -51,6 +51,6 @@ using System.Windows;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.5.
7
.0")]
[assembly: AssemblyFileVersion("7.5.
7
.0")]
[assembly: AssemblyVersion("7.5.
8
.0")]
[assembly: AssemblyFileVersion("7.5.
8
.0")]
[assembly: Guid("BD20A921-953E-44CA-8FAB-4619D3CBCD06")]
Project.FLY.Thick.FilmCasting/FLY.Thick.FilmCasting.UI.Server/Properties/AssemblyInfo.cs
View file @
f3f9babb
...
...
@@ -51,6 +51,6 @@ using System.Windows;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.3.
6
")]
[assembly: AssemblyFileVersion("7.3.
6
")]
[assembly: AssemblyVersion("7.3.
7
")]
[assembly: AssemblyFileVersion("7.3.
7
")]
[assembly: Guid("E7D930E0-C871-4001-A31A-DC748ED5817C")]
Project.FLY.Thick.FilmCasting/FLY.Thick.FilmCasting/Server/ScanWarning.cs
View file @
f3f9babb
...
...
@@ -51,11 +51,15 @@ namespace FLY.Thick.FilmCasting.Server
Idle
,
Warning
}
public
CheckResult
Check
(
double
[]
data
)
public
CheckResult
Check
(
double
[]
data
,
int
dataBeginIdx
,
int
dataEndIdx
)
{
int
cnt
=
0
;
for
(
int
i
=
0
;
i
<
data
.
Length
;
i
++)
for
(
int
i
=
dataBeginIdx
;
i
<
dataEndIdx
;
i
++)
{
if
(
i
>=
data
.
Count
())
break
;
if
(
i
<
0
)
continue
;
double
d
=
data
[
i
];
if
(
double
.
IsNaN
(
d
))
{
...
...
@@ -141,7 +145,7 @@ namespace FLY.Thick.FilmCasting.Server
if
(
reponse
.
scanData
!=
null
&&
reponse
.
scanData
.
Thicks
.
Count
()
>
0
)
{
lc_ScanData
=
reponse
.
scanData
;
result
=
Check
(
lc_ScanData
.
Thicks
);
result
=
Check
(
lc_ScanData
.
Thicks
,
lc_ScanData
.
DataBegin
,
lc_ScanData
.
DataEnd
);
}
else
{
...
...
脚本/3.get_exe.sh
View file @
f3f9babb
...
...
@@ -74,7 +74,8 @@ src_dir="../Project.FLY.Thick.FilmCasting/FLY.Thick.FilmCasting.UI.Client"
dest_dir
=
"FLY.Thick.FilmCasting.UI.Client"
files
=(
\
"FLY.Thick.FilmCasting.UI.Client.exe"
\
"default"
"unity"
"layout"
"music"
"update"
\
"default"
"unity"
"layout"
"music"
"update"
\
"paramDict.json"
\
"nlog.config"
\
)
copy_to2
$src_dir
$dest_dir
$files
...
...
脚本/filmCastingInstallZipVersionInfo.json
View file @
f3f9babb
{
"InstallZipVersion"
:
"7.5.
7
"
,
"InstallZipUrl"
:
"http://server.flyautomation.net:8889/download/流延测厚仪安装包_v7.5.
7_20220510
.7z"
"InstallZipVersion"
:
"7.5.
9
"
,
"InstallZipUrl"
:
"http://server.flyautomation.net:8889/download/流延测厚仪安装包_v7.5.
9_20220624
.7z"
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment