Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Thick-Common
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-Common
Commits
2422f671
Commit
2422f671
authored
Sep 06, 2019
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://private.flyautomation.net:82/panruising/thick_public
parents
58852a0d
02fb55ad
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
95 additions
and
62 deletions
+95
-62
HMI.cs
Project.FLY.FlyADBase/FLY.Simulation.Coating/HMI.cs
+28
-2
WindowCoating.xaml
...ct.FLY.FlyADBase/FLYAD7_Simulation_Wpf/WindowCoating.xaml
+67
-60
No files found.
Project.FLY.FlyADBase/FLY.Simulation.Coating/HMI.cs
View file @
2422f671
...
@@ -21,6 +21,7 @@ namespace FLY.Simulation.Coating
...
@@ -21,6 +21,7 @@ namespace FLY.Simulation.Coating
const
UInt16
ADDR_D_FilmVelocity
=
6
;
//float
const
UInt16
ADDR_D_FilmVelocity
=
6
;
//float
const
UInt16
ADDR_C_STATE
=
0
;
//涂布状态 bit 0
const
UInt16
ADDR_C_STATE
=
0
;
//涂布状态 bit 0
const
UInt16
ADDR_C_OK
=
2
;
//设置 0->1 设置
CoatingCtrl
mCoatingCtrl
;
CoatingCtrl
mCoatingCtrl
;
...
@@ -109,6 +110,7 @@ namespace FLY.Simulation.Coating
...
@@ -109,6 +110,7 @@ namespace FLY.Simulation.Coating
}
}
}
}
public
double
FilmVelocity
public
double
FilmVelocity
{
{
get
get
...
@@ -143,6 +145,21 @@ namespace FLY.Simulation.Coating
...
@@ -143,6 +145,21 @@ namespace FLY.Simulation.Coating
}
}
}
}
public
bool
OK
{
get
{
return
mPLCRegister
.
GetBool
(
ADDR_C_OK
);
}
set
{
if
(
OK
!=
value
)
{
mPLCRegister
.
SetBool
(
ADDR_C_OK
,
value
);
NotifyPropertyChanged
(
"OK"
);
}
}
}
public
HMI
(
Coating
coating
,
CoatingCtrl
cc
,
int
port
)
public
HMI
(
Coating
coating
,
CoatingCtrl
cc
,
int
port
)
{
{
mCoatingCtrl
=
cc
;
mCoatingCtrl
=
cc
;
...
@@ -158,6 +175,9 @@ namespace FLY.Simulation.Coating
...
@@ -158,6 +175,9 @@ namespace FLY.Simulation.Coating
Addrs
.
Add
(
ADDR_D_RightSet
,
"RightSet"
);
Addrs
.
Add
(
ADDR_D_RightSet
,
"RightSet"
);
Addrs
.
Add
(
ADDR_D_Right
,
"Right"
);
Addrs
.
Add
(
ADDR_D_Right
,
"Right"
);
Addrs
.
Add
(
ADDR_D_FilmVelocity
,
"FilmVelocity"
);
Addrs
.
Add
(
ADDR_D_FilmVelocity
,
"FilmVelocity"
);
Addrs
.
Add
(
ADDR_C_OK
,
"OK"
);
Misc
.
BindingOperations
.
SetBinding
(
cc
.
NowCtrl
,
"Pump"
,
this
,
"PumpSet"
,
Misc
.
BindingOperations
.
BindingMode
.
TwoWay
);
Misc
.
BindingOperations
.
SetBinding
(
cc
.
NowCtrl
,
"Pump"
,
this
,
"PumpSet"
,
Misc
.
BindingOperations
.
BindingMode
.
TwoWay
);
Misc
.
BindingOperations
.
SetBinding
(
cc
.
NowCtrl
,
"LeftDis"
,
this
,
"Left"
);
Misc
.
BindingOperations
.
SetBinding
(
cc
.
NowCtrl
,
"LeftDis"
,
this
,
"Left"
);
...
@@ -169,15 +189,21 @@ namespace FLY.Simulation.Coating
...
@@ -169,15 +189,21 @@ namespace FLY.Simulation.Coating
LeftSet
=
Left
;
LeftSet
=
Left
;
RightSet
=
Right
;
RightSet
=
Right
;
this
.
PropertyChanged
+=
new
PropertyChangedEventHandler
(
HMI_PropertyChanged
);
this
.
PropertyChanged
+=
new
PropertyChangedEventHandler
(
HMI_PropertyChanged
);
}
}
void
HMI_PropertyChanged
(
object
sender
,
PropertyChangedEventArgs
e
)
void
HMI_PropertyChanged
(
object
sender
,
PropertyChangedEventArgs
e
)
{
{
if
((
e
.
PropertyName
==
"PumpSet"
)
||
(
e
.
PropertyName
==
"LeftSet"
)
||
(
e
.
PropertyName
==
"RightSet"
))
if
(
e
.
PropertyName
==
"OK"
)
{
if
(
OK
==
true
)
{
{
mCoatingCtrl
.
SetCoatingCtrl
(
PumpSet
,
LeftSet
,
RightSet
);
mCoatingCtrl
.
SetCoatingCtrl
(
PumpSet
,
LeftSet
,
RightSet
);
}
}
}
}
}
void
plcregister_RegChanged
(
object
sender
,
ModbusModule
.
PLCRegister
.
RegChangedEventArgs
e
)
void
plcregister_RegChanged
(
object
sender
,
ModbusModule
.
PLCRegister
.
RegChangedEventArgs
e
)
{
{
...
...
Project.FLY.FlyADBase/FLYAD7_Simulation_Wpf/WindowCoating.xaml
View file @
2422f671
...
@@ -12,7 +12,8 @@
...
@@ -12,7 +12,8 @@
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="273*" />
<RowDefinition Height="273*" />
</Grid.RowDefinitions>
</Grid.RowDefinitions>
<Grid HorizontalAlignment="Left" Margin="12,3" Name="grid1" >
<StackPanel Orientation="Horizontal">
<Grid HorizontalAlignment="Left" Margin="12,3" >
<Grid.ColumnDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
...
@@ -80,6 +81,13 @@
...
@@ -80,6 +81,13 @@
</Grid>
</Grid>
<StackPanel>
<CheckBox Content="设置位" FontSize="18" FontWeight="Bold" Height="23" Margin="3" VerticalAlignment="Center" FlowDirection="RightToLeft" IsChecked="{Binding OK}" IsEnabled="False"/>
<CheckBox Content="涂布状态" FontSize="18" FontWeight="Bold" Height="23" Margin="3" VerticalAlignment="Center" FlowDirection="RightToLeft" IsChecked="{Binding DeviceState}" IsEnabled="False"/>
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" Grid.Row="1" Margin="12,3">
<StackPanel Orientation="Horizontal" Grid.Row="1" Margin="12,3">
<StackPanel Orientation="Horizontal" Margin="3">
<StackPanel Orientation="Horizontal" Margin="3">
<TextBlock Text="modbusTCP 端口:" />
<TextBlock Text="modbusTCP 端口:" />
...
@@ -97,7 +105,6 @@
...
@@ -97,7 +105,6 @@
<TextBlock Text="转移涂布"/>
<TextBlock Text="转移涂布"/>
</ComboBoxItem>
</ComboBoxItem>
</ComboBox>
</ComboBox>
<CheckBox Content="涂布状态" FontSize="18" FontWeight="Bold" Height="23" Margin="3" Name="checkBox1" VerticalAlignment="Center" FlowDirection="RightToLeft" IsChecked="{Binding DeviceState}"/>
<TextBlock FontSize="18" FontWeight="Bold" Height="23" Margin="3" VerticalAlignment="Center" >
<TextBlock FontSize="18" FontWeight="Bold" Height="23" Margin="3" VerticalAlignment="Center" >
<Run Text="当前平均值:" />
<Run Text="当前平均值:" />
<Run Text="{Binding Avg}" />
<Run Text="{Binding Avg}" />
...
...
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