Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hemei
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
潘栩锋
hemei
Commits
ab1a5771
Commit
ab1a5771
authored
Feb 01, 2021
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
现场调整360旋转
parent
4b895549
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
168 additions
and
25 deletions
+168
-25
PgBlowing.xaml
...owing360/FLY.Thick.Blowing360.UI/PgBlowing/PgBlowing.xaml
+34
-14
PgBlowingVm.cs
...owing360/FLY.Thick.Blowing360.UI/PgBlowing/PgBlowingVm.cs
+86
-2
BlowingDetect360EncoderServiceClient.cs
...Blowing360/Client/BlowingDetect360EncoderServiceClient.cs
+10
-0
FLY.Thick.Blowing360.csproj
...owing360/FLY.Thick.Blowing360/FLY.Thick.Blowing360.csproj
+1
-1
IBlowingDetect360Encoder.cs
...FLY.Thick.Blowing360/IService/IBlowingDetect360Encoder.cs
+9
-0
BlowingDetect360Encoder.cs
...60/FLY.Thick.Blowing360/Server/BlowingDetect360Encoder.cs
+28
-8
No files found.
Project.FLY.Thick.Blowing360/FLY.Thick.Blowing360.UI/PgBlowing/PgBlowing.xaml
View file @
ab1a5771
...
...
@@ -172,16 +172,8 @@
<TextBlock Text="状态" />
</Border>
<WrapPanel Orientation="Horizontal" Grid.Column="1" >
<StackPanel Margin="5">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="On信号" />
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="No." Margin="0,5"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding LastLimitNo, Mode=OneWay}" />
</StackPanel>
</StackPanel>
<StackPanel Margin="5">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="
On
信号到当前时间" />
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="
复位
信号到当前时间" />
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding PastTime, Converter={StaticResource timespanconv}, Mode=OneWay}" />
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="min" />
...
...
@@ -193,6 +185,7 @@
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding RenZiJiaPeriod, Converter={StaticResource timespanconv}, Mode=OneWay}" />
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="min/R" />
</StackPanel>
</StackPanel>
<StackPanel Margin="5">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="旋转次数" />
...
...
@@ -234,7 +227,7 @@
<StackPanel Margin="5">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="旋转角度" />
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding Angle, Mode=OneWay, StringFormat={}{0:F
1
}}" />
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding Angle, Mode=OneWay, StringFormat={}{0:F
0
}}" />
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="°" VerticalAlignment="Top"/>
</StackPanel>
</StackPanel>
...
...
@@ -245,6 +238,7 @@
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="m/min" />
</StackPanel>
</StackPanel>
</WrapPanel >
</Grid>
...
...
@@ -323,9 +317,22 @@
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="脉冲" />
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" DataContext="{Binding bDetect}">
<StackPanel Margin="5">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="全局位置" />
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding GlobalPos, Mode=OneWay}" />
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="脉冲" />
</StackPanel>
</StackPanel>
<StackPanel Margin="5">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="全局速度" />
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding Speed, Mode=OneWay}" />
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="脉冲/s" />
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
</WrapPanel>
</Grid>
...
...
@@ -536,7 +543,20 @@
</StackPanel>
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn Binding="{Binding ActPosOfR}" IsReadOnly="True">
<DataGridTextColumn.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="理论旋转1圈总脉冲" FontSize="15"/>
</StackPanel>
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn Binding="{Binding ActPosOfOrgSign}" IsReadOnly="True">
<DataGridTextColumn.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="理论复位信号总脉冲" FontSize="15"/>
</StackPanel>
</DataGridTextColumn.Header>
</DataGridTextColumn>
</DataGrid.Columns>
</DataGrid>
</Grid>
...
...
Project.FLY.Thick.Blowing360/FLY.Thick.Blowing360.UI/PgBlowing/PgBlowingVm.cs
View file @
ab1a5771
...
...
@@ -83,7 +83,7 @@ namespace FLY.Thick.Blowing360.UI
/// <summary>
/// 复位信号列表
/// </summary>
public
ObservableCollection
<
OrgSignData
>
OrgSignList
{
get
;
}
=
new
ObservableCollection
<
OrgSignData
>();
public
ObservableCollection
<
OrgSignData
2
>
OrgSignList
{
get
;
}
=
new
ObservableCollection
<
OrgSignData2
>();
#
endregion
#
region
Command
...
...
@@ -225,7 +225,54 @@ namespace FLY.Thick.Blowing360.UI
for
(
int
i
=
0
;
i
<
reponse
.
Count
();
i
++)
{
int
idx
=
reponse
.
Count
()
-
1
-
i
;
OrgSignList
.
Add
(
reponse
[
idx
]);
OrgSignData2
orgSign
=
new
OrgSignData2
()
{
Time
=
reponse
[
idx
].
Time
,
On
=
reponse
[
idx
].
On
,
GlobalPos
=
reponse
[
idx
].
GlobalPos
,
Speed
=
reponse
[
idx
].
Speed
};
//向前找 ActPosOfR
int
pre_idx
=
idx
;
while
(
true
)
{
pre_idx
--;
if
(
pre_idx
<
0
)
break
;
if
(
reponse
[
pre_idx
].
On
==
orgSign
.
On
)
{
int
pos
=
Math
.
Abs
(
orgSign
.
GlobalPos
-
reponse
[
pre_idx
].
GlobalPos
);
if
(
pos
>
4000
)
{
//成功找到
orgSign
.
ActPosOfR
=
pos
;
}
break
;
}
}
//向前找 ActPosOfOrgSign
pre_idx
=
idx
;
while
(
true
)
{
pre_idx
--;
if
(
pre_idx
<
0
)
break
;
if
(
reponse
[
pre_idx
].
On
!=
orgSign
.
On
)
{
int
pos
=
Math
.
Abs
(
orgSign
.
GlobalPos
-
reponse
[
pre_idx
].
GlobalPos
);
if
(
pos
<
4000
)
{
//成功找到
orgSign
.
ActPosOfOrgSign
=
pos
;
}
break
;
}
}
OrgSignList
.
Add
(
orgSign
);
}
}
...
...
@@ -312,7 +359,44 @@ namespace FLY.Thick.Blowing360.UI
return
true
;
}
}
/// <summary>
/// 复位信号
/// </summary>
public
class
OrgSignData2
:
INotifyPropertyChanged
{
/// <summary>
/// 时间
/// </summary>
public
DateTime
Time
{
get
;
set
;
}
/// <summary>
/// on? off?
/// </summary>
public
bool
On
{
get
;
set
;
}
/// <summary>
/// 全局脉冲
/// </summary>
public
int
GlobalPos
{
get
;
set
;
}
/// <summary>
/// 脉冲/s
/// </summary>
public
int
Speed
{
get
;
set
;
}
/// <summary>
/// 实际 人字架 旋转1周总脉冲数;
/// 与上一个On相同,的GlobalPos差值,且 偏差大于4000
/// </summary>
public
int
ActPosOfR
{
get
;
set
;
}
/// <summary>
/// 实际 复位信号 脉冲数
/// 与上一个On不相同,的GlobalPos差值,且 偏差小于4000
/// </summary>
public
int
ActPosOfOrgSign
{
get
;
set
;
}
public
event
PropertyChangedEventHandler
PropertyChanged
;
}
...
...
Project.FLY.Thick.Blowing360/FLY.Thick.Blowing360/Client/BlowingDetectServiceClient.cs
→
Project.FLY.Thick.Blowing360/FLY.Thick.Blowing360/Client/BlowingDetect
360Encoder
ServiceClient.cs
View file @
ab1a5771
...
...
@@ -87,6 +87,16 @@ namespace FLY.Thick.Blowing360.Client
/// 复位信号列表更新时间
/// </summary>
public
DateTime
OrgSignListUpdateTime
{
get
;
set
;
}
/// <summary>
///旋转架脉冲
/// </summary>
public
int
GlobalPos
{
get
;
set
;
}
/// <summary>
/// 旋转架脉冲速度
/// </summary>
public
int
Speed
{
get
;
set
;
}
#
endregion
#
endregion
...
...
Project.FLY.Thick.Blowing360/FLY.Thick.Blowing360/FLY.Thick.Blowing360.csproj
View file @
ab1a5771
...
...
@@ -41,7 +41,7 @@
<Reference
Include=
"System.Xml"
/>
</ItemGroup>
<ItemGroup>
<Compile
Include=
"Client\BlowingDetectServiceClient.cs"
/>
<Compile
Include=
"Client\BlowingDetect
360Encoder
ServiceClient.cs"
/>
<Compile
Include=
"IService\IBlowingDetect360Encoder.cs"
/>
<Compile
Include=
"IService\IBlowingDetectEncoder.cs"
/>
<Compile
Include=
"IService\IBlowingDetectInServer.cs"
/>
...
...
Project.FLY.Thick.Blowing360/FLY.Thick.Blowing360/IService/IBlowingDetect360Encoder.cs
View file @
ab1a5771
...
...
@@ -79,6 +79,15 @@ namespace FLY.Thick.Blowing360.IService
/// 复位信号列表更新时间
/// </summary>
DateTime
OrgSignListUpdateTime
{
get
;
}
/// <summary>
///旋转架脉冲
/// </summary>
int
GlobalPos
{
get
;
}
/// <summary>
/// 旋转架脉冲速度
/// </summary>
int
Speed
{
get
;
}
#
endregion
void
Apply
();
...
...
Project.FLY.Thick.Blowing360/FLY.Thick.Blowing360/Server/BlowingDetect360Encoder.cs
View file @
ab1a5771
...
...
@@ -102,6 +102,15 @@ namespace FLY.Thick.Blowing360.Server
/// 缓冲区最新数据时间
/// </summary>
public
DateTime
BufLastTime
{
get
;
private
set
;
}
/// <summary>
///旋转架脉冲
/// </summary>
public
int
GlobalPos
{
get
;
private
set
;
}
/// <summary>
/// 旋转架脉冲速度
/// </summary>
public
int
Speed
{
get
;
private
set
;
}
#
endregion
...
...
@@ -183,10 +192,12 @@ namespace FLY.Thick.Blowing360.Server
Clear
();
PropertyChanged
+=
new
PropertyChangedEventHandler
(
RenZiJiaAndFilmPositionDetect_PropertyChanged
);
Load
();
CheckParamErr
();
PropertyChanged
+=
new
PropertyChangedEventHandler
(
RenZiJiaAndFilmPositionDetect_PropertyChanged
);
}
double
getAngle
(
int
pos
)
{
...
...
@@ -226,6 +237,7 @@ namespace FLY.Thick.Blowing360.Server
(
e
.
PropertyName
==
nameof
(
PosOfOrgSign
))
)
{
TouchFilmInfoChanged_lastLimit
(
2
);
}
}
...
...
@@ -330,6 +342,9 @@ namespace FLY.Thick.Blowing360.Server
}
}
mPosList
.
RAdd
(
new
PosData
()
{
Time
=
now
,
Speed
=
speed
,
GlobalPos
=
globalPos
});
GlobalPos
=
globalPos
;
Speed
=
speed
;
if
(
speed
>
0
)
Direction
=
DIRECTION
.
FORWARD
;
else
if
(
speed
<
0
)
...
...
@@ -1077,10 +1092,11 @@ namespace FLY.Thick.Blowing360.Server
{
string
json
=
File
.
ReadAllText
(
file_path
);
var
jsonDb
=
JsonConvert
.
DeserializeObject
<
BlowingDetect360EncoderJsonDb
>(
json
);
BlowingDetect360EncoderJsonDb
.
Mapper
.
Map
(
jsonDb
,
this
);
//BlowingDetect360EncoderJsonDb.Mapper.Map(jsonDb, this);
jsonDb
.
Map
(
this
);
return
true
;
}
catch
catch
(
Exception
e
)
{
//异常,没有json 解码失败
...
...
@@ -1189,17 +1205,21 @@ namespace FLY.Thick.Blowing360.Server
public
static
Mapper
Mapper
{
get
;
}
=
new
AutoMapper
.
Mapper
(
new
MapperConfiguration
(
c
=>
{
c
.
CreateMap
<
BlowingDetect360Encoder
,
BlowingDetect360EncoderJsonDb
>().
ReverseMap
();
}));
public
void
Map
(
BlowingDetect360Encoder
dest
)
{
dest
.
PosOfR
=
PosOfR
;
dest
.
PosOfOrgSign
=
PosOfOrgSign
;
dest
.
FilmLength
=
FilmLength
;
dest
.
RollPerimeter
=
RollPerimeter
;
}
/// <summary>
/// 人字架 旋转1周总脉冲数
/// </summary>
public
int
PosOfR
{
get
;
set
;
}
=
5
0000
;
public
int
PosOfR
{
get
;
set
;
}
=
10
0000
;
/// <summary>
///
原点信号
脉冲数
///
复位信号总
脉冲数
/// </summary>
public
int
PosOfOrgSign
{
get
;
set
;
}
=
100
;
public
int
PosOfOrgSign
{
get
;
set
;
}
=
300
;
/// <summary>
/// 人字架到测厚仪膜长 单位m
/// </summary>
...
...
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