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
e35bd63d
Commit
e35bd63d
authored
Aug 17, 2019
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.修改 AD盒模拟 涂布自控 地址
parent
98f6c4b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
HMI.cs
Project.FLY.FlyADBase/FLY.Simulation.Coating/HMI.cs
+13
-13
No files found.
Project.FLY.FlyADBase/FLY.Simulation.Coating/HMI.cs
View file @
e35bd63d
...
@@ -9,16 +9,16 @@ namespace FLY.Simulation.Coating
...
@@ -9,16 +9,16 @@ namespace FLY.Simulation.Coating
{
{
public
class
HMI
:
INotifyPropertyChanged
public
class
HMI
:
INotifyPropertyChanged
{
{
const
UInt16
ADDR_D_PumpSet
=
0
;
//泵速设置 & 泵速显示
const
UInt16
ADDR_D_PumpSet
=
0
;
//泵速设置 & 泵速显示
, float
const
UInt16
ADDR_D_LeftSet
=
2
;
//uint16 65535-> 6553.5
const
UInt16
ADDR_D_LeftSet
=
10
;
//uint16 65535-> 6553.5
const
UInt16
ADDR_D_Left
=
3
;
const
UInt16
ADDR_D_Left
=
12
;
const
UInt16
ADDR_D_RightSet
=
4
;
//uint16 65535-> 6553.5
const
UInt16
ADDR_D_RightSet
=
1
4
;
//uint16 65535-> 6553.5
const
UInt16
ADDR_D_Right
=
5
;
const
UInt16
ADDR_D_Right
=
16
;
const
UInt16
ADDR_D_FilmVelocity
=
6
;
const
UInt16
ADDR_D_FilmVelocity
=
6
;
//float
const
UInt16
ADDR_C_STATE
=
0
;
//涂布状态 bit 0
const
UInt16
ADDR_C_STATE
=
0
;
//涂布状态 bit 0
...
@@ -33,13 +33,13 @@ namespace FLY.Simulation.Coating
...
@@ -33,13 +33,13 @@ namespace FLY.Simulation.Coating
public
double
PumpSet
public
double
PumpSet
{
{
get
{
get
{
UInt16
p
=
mPLCRegister
.
GetUInt16
(
ADDR_D_PumpSet
);
float
p
=
mPLCRegister
.
GetFloat
(
ADDR_D_PumpSet
);
return
p
/
10.0
;
return
p
;
}
}
set
{
set
{
if
(
PumpSet
!=
value
)
if
(
PumpSet
!=
value
)
{
{
mPLCRegister
.
Set
UInt16
(
ADDR_D_PumpSet
,
(
UInt16
)(
value
*
10
)
);
mPLCRegister
.
Set
Float
(
ADDR_D_PumpSet
,
(
float
)
value
);
NotifyPropertyChanged
(
"PumpSet"
);
NotifyPropertyChanged
(
"PumpSet"
);
}
}
}
}
...
@@ -113,14 +113,14 @@ namespace FLY.Simulation.Coating
...
@@ -113,14 +113,14 @@ namespace FLY.Simulation.Coating
{
{
get
get
{
{
UInt16
p
=
mPLCRegister
.
GetUInt16
(
ADDR_D_FilmVelocity
);
float
p
=
mPLCRegister
.
GetFloat
(
ADDR_D_FilmVelocity
);
return
p
/
10.0
;
return
p
;
}
}
set
set
{
{
if
(
FilmVelocity
!=
value
)
if
(
FilmVelocity
!=
value
)
{
{
mPLCRegister
.
Set
UInt16
(
ADDR_D_FilmVelocity
,
(
UInt16
)(
value
*
10
)
);
mPLCRegister
.
Set
Float
(
ADDR_D_FilmVelocity
,
(
float
)
value
);
NotifyPropertyChanged
(
"FilmVelocity"
);
NotifyPropertyChanged
(
"FilmVelocity"
);
}
}
}
}
...
@@ -147,7 +147,7 @@ namespace FLY.Simulation.Coating
...
@@ -147,7 +147,7 @@ namespace FLY.Simulation.Coating
{
{
mCoatingCtrl
=
cc
;
mCoatingCtrl
=
cc
;
mPLCRegister
=
new
ModbusModule
.
PLCRegister
(
20
,
1
0
);
mPLCRegister
=
new
ModbusModule
.
PLCRegister
(
20
0
,
20
0
);
mbServer
=
new
FLY
.
ModbusModule
.
ServerTCP
(
mPLCRegister
,
(
UInt16
)
port
);
mbServer
=
new
FLY
.
ModbusModule
.
ServerTCP
(
mPLCRegister
,
(
UInt16
)
port
);
mPLCRegister
.
RegChanged
+=
new
ModbusModule
.
PLCRegister
.
RegChangedEventHandler
(
plcregister_RegChanged
);
mPLCRegister
.
RegChanged
+=
new
ModbusModule
.
PLCRegister
.
RegChangedEventHandler
(
plcregister_RegChanged
);
...
...
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