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
f9b287c6
Commit
f9b287c6
authored
Jul 12, 2020
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
称重服务器 看到与测厚仪的连接状态
parent
c523cf27
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
45 additions
and
16 deletions
+45
-16
MainWindow.xaml
Project.FLY.Weight/FLY.Weight.UI.Server/MainWindow.xaml
+6
-0
MainWindow.xaml.cs
Project.FLY.Weight/FLY.Weight.UI.Server/MainWindow.xaml.cs
+2
-1
FLY.Weight2.UI.Server.csproj
...eight2/FLY.Weight2.UI.Server/FLY.Weight2.UI.Server.csproj
+4
-0
MainWindow.xaml
Project.FLY.Weight2/FLY.Weight2.UI.Server/MainWindow.xaml
+21
-8
MainWindow.xaml.cs
Project.FLY.Weight2/FLY.Weight2.UI.Server/MainWindow.xaml.cs
+2
-1
SysParam.cs
Project.FLY.Weight2/FLY.Weight2/Server/SysParam.cs
+7
-3
TDGage.cs
Project.FLY.Weight2/FLY.Weight2/Server/TDGage.cs
+2
-2
WeightSystem.cs
Project.FLY.Weight2/FLY.Weight2/Server/WeightSystem.cs
+1
-1
No files found.
Project.FLY.Weight/FLY.Weight.UI.Server/MainWindow.xaml
View file @
f9b287c6
...
...
@@ -7,6 +7,12 @@
<Grid x:Name="grid_plcos"/>
<Grid x:Name="grid_WeightSystem"/>
<StackPanel Margin="5">
<StackPanel Orientation="Vertical" Margin="4" DataContext="{Binding ElementName=grid_WeightSystem,Path=DataContext}">
<TextBlock Text="当前线速度设置m/min*10" />
<TextBlock FontSize="20">
<Run Text="{Binding Accessory.CurrentVelocitySet,StringFormat=\{0:F0\}, Mode=OneWay}" />
</TextBlock>
</StackPanel>
<ItemsControl x:Name="itemcontrol">
<ItemsControl.ItemTemplate>
<DataTemplate>
...
...
Project.FLY.Weight/FLY.Weight.UI.Server/MainWindow.xaml.cs
View file @
f9b287c6
...
...
@@ -46,8 +46,9 @@ namespace FLY.Weight.UI.Server
gage
.
mData
.
PLCos
as
FLY
.
OBJComponents
.
Server
.
PLCProxySystem
;
//grid_plcos.DataContext = plsos;
//grid_plc.DataContext = plsos.PLCs[0];
//grid_WeightSystem.DataContext = mTDG
age.mData;
grid_WeightSystem
.
DataContext
=
g
age
.
mData
;
this
.
itemcontrol
.
ItemsSource
=
plsos
.
PLCs
;
}
private
void
btnSetupClick
(
object
sender
,
RoutedEventArgs
e
)
...
...
Project.FLY.Weight2/FLY.Weight2.UI.Server/FLY.Weight2.UI.Server.csproj
View file @
f9b287c6
...
...
@@ -96,6 +96,10 @@
<None
Include=
"App.config"
/>
</ItemGroup>
<ItemGroup>
<ProjectReference
Include=
"..\..\Project.FLY.Thick.Blowing\FLY.Thick.Blowing\FLY.Thick.Blowing.csproj"
>
<Project>
{CC20ABEB-59F6-492B-A963-51121EB5AE66}
</Project>
<Name>
FLY.Thick.Blowing
</Name>
</ProjectReference>
<ProjectReference
Include=
"..\..\thick_public\Project.FLY.AppHelper\FLY.AppHelper\FLY.AppHelper.csproj"
>
<Project>
{9c46d98f-6500-490b-9e56-c89dfffa05f8}
</Project>
<Name>
FLY.AppHelper
</Name>
...
...
Project.FLY.Weight2/FLY.Weight2.UI.Server/MainWindow.xaml
View file @
f9b287c6
...
...
@@ -6,28 +6,41 @@
<Grid x:Name="grid_plc"/>
<Grid x:Name="grid_plcos"/>
<Grid x:Name="grid_WeightSystem"/>
<StackPanel Orientation="Vertical" Margin="5">
<StackPanel Margin="5">
<StackPanel Orientation="Horizontal">
<StackPanel Margin="4" DataContext="{Binding ElementName=grid_WeightSystem,Path=DataContext}">
<TextBlock Text="当前线速度设置m/min*10" />
<TextBlock FontSize="20">
<Run Text="{Binding Accessory.CurrentVelocitySet,StringFormat=\{0:F0\}, Mode=OneWay}" />
</TextBlock>
</StackPanel>
<StackPanel Margin="4" x:Name="spBDetect">
<TextBlock Text="测厚仪服务器连接状态" />
<TextBlock Text="{Binding IsConnected}" FontSize="20"/>
</StackPanel>
</StackPanel>
<ItemsControl x:Name="itemcontrol">
<ItemsControl.ItemTemplate>
<DataTemplate>
<StackPanel>
<StackPanel Orientation="Horizontal" >
<StackPanel
Orientation="Vertical"
Margin="4" >
<StackPanel Margin="4" >
<TextBlock Text="更新速度" />
<TextBlock FontSize="20">
<Run Text="{Binding ActUpdateInterval,StringFormat=\{0:sfff\}, Mode=OneWay}" />
<Run Text="ms" FontSize="15"/>
</TextBlock>
</StackPanel>
<StackPanel
Orientation="Vertical"
Margin="4" >
<StackPanel Margin="4" >
<TextBlock Text="PLC连接状态" />
<TextBlock Text="{Binding Client.IsConnected}" FontSize="20"/>
</StackPanel>
<StackPanel
Orientation="Vertical"
Margin="4" >
<StackPanel Margin="4" >
<TextBlock Text="异常次数" />
<TextBlock Text="{Binding ErrorCnt}" FontSize="20"/>
</StackPanel>
<StackPanel
Orientation="Vertical"
Margin="4" >
<StackPanel Margin="4" >
<TextBlock Text="寄存器更新数" />
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding DRNeedUpdateCnt}" FontSize="20"/>
...
...
@@ -41,15 +54,15 @@
</ItemsControl.ItemTemplate>
</ItemsControl>
<!--<StackPanel Orientation="Horizontal" >
<StackPanel
Orientation="Vertical"
Margin="4" DataContext="{Binding DataContext,ElementName=grid_plc}">
<StackPanel Margin="4" DataContext="{Binding DataContext,ElementName=grid_plc}">
<TextBlock Text="更新速度" />
<TextBlock Text="{Binding ActUpdateInterval}" FontSize="20"/>
</StackPanel>
<StackPanel
Orientation="Vertical"
Margin="4" DataContext="{Binding DataContext,ElementName=grid_plcos}">
<StackPanel Margin="4" DataContext="{Binding DataContext,ElementName=grid_plcos}">
<TextBlock Text="PLC连接状态" />
<TextBlock Text="{Binding IsRunning}" FontSize="20"/>
</StackPanel>
<StackPanel
Orientation="Vertical"
Margin="4" DataContext="{Binding DataContext,ElementName=grid_plc}">
<StackPanel Margin="4" DataContext="{Binding DataContext,ElementName=grid_plc}">
<TextBlock Text="寄存器更新数" />
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding DRNeedUpdateCnt}" FontSize="20"/>
...
...
Project.FLY.Weight2/FLY.Weight2.UI.Server/MainWindow.xaml.cs
View file @
f9b287c6
...
...
@@ -30,8 +30,9 @@ namespace FLY.Weight2.UI.Server
gage
.
mData
.
PLCos
as
FLY
.
OBJComponents
.
Server
.
PLCProxySystem
;
//grid_plcos.DataContext = plsos;
//grid_plc.DataContext = plsos.PLCs[0];
//grid_WeightSystem.DataContext = mTDG
age.mData;
grid_WeightSystem
.
DataContext
=
g
age
.
mData
;
this
.
itemcontrol
.
ItemsSource
=
plsos
.
PLCs
;
spBDetect
.
DataContext
=
gage
.
mBDetect
;
}
}
}
Project.FLY.Weight2/FLY.Weight2/Server/SysParam.cs
View file @
f9b287c6
...
...
@@ -27,27 +27,31 @@ namespace FLY.Weight2.Server
public
SysParam
()
{
Load
();
if
(!
Load
())
{
Save
();
}
}
public
void
Save
()
{
string
json
=
Newtonsoft
.
Json
.
JsonConvert
.
SerializeObject
(
this
,
Newtonsoft
.
Json
.
Formatting
.
Indented
);
File
.
WriteAllText
(
"system.json"
,
json
);
}
public
void
Load
()
public
bool
Load
()
{
if
(!
File
.
Exists
(
"system.json"
))
{
return
;
return
false
;
}
try
{
string
json
=
File
.
ReadAllText
(
"system.json"
);
Newtonsoft
.
Json
.
JsonConvert
.
PopulateObject
(
json
,
this
);
return
true
;
}
catch
{
}
return
false
;
}
}
}
Project.FLY.Weight2/FLY.Weight2/Server/TDGage.cs
View file @
f9b287c6
...
...
@@ -35,7 +35,7 @@ namespace FLY.Weight2.Server
/// <summary>
/// 吹膜测厚仪, 旋转架模型
/// </summary>
FLY
.
Thick
.
Blowing
.
Client
.
BlowingDetectServiceClient
mBDetect
;
public
FLY
.
Thick
.
Blowing
.
Client
.
BlowingDetectServiceClient
mBDetect
;
#
endregion
public
TDGage
(
string
nam
)
...
...
@@ -88,7 +88,7 @@ namespace FLY.Weight2.Server
private
void
MBDetect_PropertyChanged
(
object
sender
,
System
.
ComponentModel
.
PropertyChangedEventArgs
e
)
{
if
(
e
.
PropertyName
==
"FilmVelocity"
)
if
(
e
.
PropertyName
==
nameof
(
mBDetect
.
FilmVelocity
)
)
{
mData
.
Accessory
.
CurrentVelocitySet
=
(((
int
)(
mBDetect
.
FilmVelocity
*
10
))
/
10.0f
);
}
...
...
Project.FLY.Weight2/FLY.Weight2/Server/WeightSystem.cs
View file @
f9b287c6
...
...
@@ -255,7 +255,7 @@ namespace FLY.Weight2.Server
});
//这个是从测厚仪获取的,每几秒就写一次,不调试!!!!!
//plcos.IgnoreLogProperties.Add(new SenderProperty() { sender = Accessory, propertyName = "CurrentVelocitySet"
});
plcos
.
IgnoreLogProperties
.
Add
(
new
SenderProperty
()
{
sender
=
Accessory
,
propertyName
=
nameof
(
Accessory
.
CurrentVelocitySet
)
});
}
...
...
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