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
02fb55ad
Commit
02fb55ad
authored
Sep 04, 2019
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AD盒 涂布模拟 添加 “确定” 寄存器
parent
4e0d0f28
Expand all
Hide 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 @
02fb55ad
...
...
@@ -21,6 +21,7 @@ namespace FLY.Simulation.Coating
const
UInt16
ADDR_D_FilmVelocity
=
6
;
//float
const
UInt16
ADDR_C_STATE
=
0
;
//涂布状态 bit 0
const
UInt16
ADDR_C_OK
=
2
;
//设置 0->1 设置
CoatingCtrl
mCoatingCtrl
;
...
...
@@ -109,6 +110,7 @@ namespace FLY.Simulation.Coating
}
}
public
double
FilmVelocity
{
get
...
...
@@ -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
)
{
mCoatingCtrl
=
cc
;
...
...
@@ -158,6 +175,9 @@ namespace FLY.Simulation.Coating
Addrs
.
Add
(
ADDR_D_RightSet
,
"RightSet"
);
Addrs
.
Add
(
ADDR_D_Right
,
"Right"
);
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
,
"LeftDis"
,
this
,
"Left"
);
...
...
@@ -169,13 +189,19 @@ namespace FLY.Simulation.Coating
LeftSet
=
Left
;
RightSet
=
Right
;
this
.
PropertyChanged
+=
new
PropertyChangedEventHandler
(
HMI_PropertyChanged
);
}
void
HMI_PropertyChanged
(
object
sender
,
PropertyChangedEventArgs
e
)
{
if
((
e
.
PropertyName
==
"PumpSet"
)
||
(
e
.
PropertyName
==
"LeftSet"
)
||
(
e
.
PropertyName
==
"RightSet"
))
if
(
e
.
PropertyName
==
"OK"
)
{
mCoatingCtrl
.
SetCoatingCtrl
(
PumpSet
,
LeftSet
,
RightSet
);
if
(
OK
==
true
)
{
mCoatingCtrl
.
SetCoatingCtrl
(
PumpSet
,
LeftSet
,
RightSet
);
}
}
}
...
...
Project.FLY.FlyADBase/FLYAD7_Simulation_Wpf/WindowCoating.xaml
View file @
02fb55ad
This diff is collapsed.
Click to expand it.
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