Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
PastureGateway
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
steven.sha
PastureGateway
Commits
41afdcdc
Commit
41afdcdc
authored
Jun 21, 2019
by
leon.huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add all poll return control
parent
c72d7fa8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
854 additions
and
314 deletions
+854
-314
ModualControl.cs
ModbusDemo/MessageFormat/ModualControl.cs
+47
-100
ModualPoll.cs
ModbusDemo/Modular/ModualPoll.cs
+0
-1
AllPond.cs
ModbusDemo/application/AllPond.cs
+807
-202
Form1.cs
ModbusDemo/windows/Form1.cs
+0
-11
No files found.
ModbusDemo/MessageFormat/ModualControl.cs
View file @
41afdcdc
...
@@ -243,7 +243,7 @@ namespace ModbusDemo.MessageFormat
...
@@ -243,7 +243,7 @@ namespace ModbusDemo.MessageFormat
stResponseData
=
jsonObj
.
ToString
();
stResponseData
=
jsonObj
.
ToString
();
}
}
public
static
void
vControl_Poll
()
//async Task
public
static
void
vControl_Poll
()
{
{
while
(
true
)
while
(
true
)
{
{
...
@@ -309,7 +309,7 @@ namespace ModbusDemo.MessageFormat
...
@@ -309,7 +309,7 @@ namespace ModbusDemo.MessageFormat
}
}
while
(
true
)
while
(
true
)
{
{
for
(
sbyte
sbEastTransitPoolIndex
=
0
;
sbEastTransitPoolIndex
<
AllPond
.
Ea
stTransitPoolList
.
Count
();
sbEastTransitPoolIndex
++)
for
(
sbyte
sbEastTransitPoolIndex
=
0
;
sbEastTransitPoolIndex
<
AllPond
.
We
stTransitPoolList
.
Count
();
sbEastTransitPoolIndex
++)
{
{
if
(
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
bHadRefControl
==
true
&&
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
bHadOpenPumb
==
true
)
if
(
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
bHadRefControl
==
true
&&
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
bHadOpenPumb
==
true
)
{
{
...
@@ -334,156 +334,132 @@ namespace ModbusDemo.MessageFormat
...
@@ -334,156 +334,132 @@ namespace ModbusDemo.MessageFormat
}
}
Thread
.
Sleep
(
200
);
Thread
.
Sleep
(
200
);
}
}
for
(
sbyte
sb
EastTransitPoolIndex
=
0
;
sbEastTransitPoolIndex
<
AllPond
.
EastTransitPoolList
.
Count
();
sbEa
stTransitPoolIndex
++)
for
(
sbyte
sb
WestTransitPoolIndex
=
0
;
sbWestTransitPoolIndex
<
AllPond
.
WestTransitPoolList
.
Count
();
sbWe
stTransitPoolIndex
++)
{
{
if
(
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
bHadRefControl
==
true
&&
AllPond
.
EastTransitPoolList
[
sbEa
stTransitPoolIndex
].
bHadOpenPumb
==
true
)
if
(
AllPond
.
WestTransitPoolList
[
sbWestTransitPoolIndex
].
bHadRefControl
==
true
&&
AllPond
.
WestTransitPoolList
[
sbWe
stTransitPoolIndex
].
bHadOpenPumb
==
true
)
{
{
if
(
AllPond
.
EastTransitPoolList
[
sbEa
stTransitPoolIndex
].
dChannelCurrent
<
OPENCURRENT
)
if
(
AllPond
.
WestTransitPoolList
[
sbWe
stTransitPoolIndex
].
dChannelCurrent
<
OPENCURRENT
)
{
{
bool
[]
bControlData
;
bool
[]
bControlData
;
if
(
ModualPoll
.
bGet_channel_Value
<
bool
>(
AllPond
.
EastTransitPoolList
[
sbEa
stTransitPoolIndex
].
byModbusID
,
out
bControlData
,
"d0"
,
"d1"
,
"d2"
,
"d3"
,
"d4"
,
"d5"
,
"d6"
,
"d7"
)
==
true
)
if
(
ModualPoll
.
bGet_channel_Value
<
bool
>(
AllPond
.
WestTransitPoolList
[
sbWe
stTransitPoolIndex
].
byModbusID
,
out
bControlData
,
"d0"
,
"d1"
,
"d2"
,
"d3"
,
"d4"
,
"d5"
,
"d6"
,
"d7"
)
==
true
)
{
{
if
(
AllPond
.
EastTransitPoolList
[
sbEa
stTransitPoolIndex
].
bClose_Machine
(
bControlData
)
==
true
)
if
(
AllPond
.
WestTransitPoolList
[
sbWe
stTransitPoolIndex
].
bClose_Machine
(
bControlData
)
==
true
)
{
{
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelControlError
,
true
,
1
,
AllPond
.
EastTransitPoolList
[
sbEa
stTransitPoolIndex
].
strChannelNumber
);
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
WestTransitPoolList
[
sbWestTransitPoolIndex
].
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelControlError
,
true
,
1
,
AllPond
.
WestTransitPoolList
[
sbWe
stTransitPoolIndex
].
strChannelNumber
);
}
}
}
}
}
}
}
}
if
(
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
bHadRefControl
==
true
&&
AllPond
.
EastTransitPoolList
[
sbEa
stTransitPoolIndex
].
bHadOpenPumb
==
false
)
if
(
AllPond
.
WestTransitPoolList
[
sbWestTransitPoolIndex
].
bHadRefControl
==
true
&&
AllPond
.
WestTransitPoolList
[
sbWe
stTransitPoolIndex
].
bHadOpenPumb
==
false
)
{
{
if
(
AllPond
.
EastTransitPoolList
[
sbEa
stTransitPoolIndex
].
dChannelCurrent
>
CLOSECURRENT
)
if
(
AllPond
.
WestTransitPoolList
[
sbWe
stTransitPoolIndex
].
dChannelCurrent
>
CLOSECURRENT
)
{
{
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelControlError
,
true
,
1
,
AllPond
.
EastTransitPoolList
[
sbEa
stTransitPoolIndex
].
strChannelNumber
);
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
WestTransitPoolList
[
sbWestTransitPoolIndex
].
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelControlError
,
true
,
1
,
AllPond
.
WestTransitPoolList
[
sbWe
stTransitPoolIndex
].
strChannelNumber
);
}
}
}
}
Thread
.
Sleep
(
200
);
Thread
.
Sleep
(
200
);
}
}
for
(
sbyte
sb
EastTransitPoolIndex
=
0
;
sbEastTransitPoolIndex
<
AllPond
.
EastTransitPoolList
.
Count
();
sbEastTransit
PoolIndex
++)
for
(
sbyte
sb
DesiltingPoolIndex
=
0
;
sbDesiltingPoolIndex
<
AllPond
.
DesiltingPoolList
.
Count
();
sbDesilting
PoolIndex
++)
{
{
if
(
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
bHadRefControl
==
true
&&
AllPond
.
EastTransitPoolList
[
sbEastTransit
PoolIndex
].
bHadOpenPumb
==
true
)
if
(
AllPond
.
DesiltingPoolList
[
sbDesiltingPoolIndex
].
bHadRefControl
==
true
&&
AllPond
.
DesiltingPoolList
[
sbDesilting
PoolIndex
].
bHadOpenPumb
==
true
)
{
{
if
(
AllPond
.
EastTransitPoolList
[
sbEastTransit
PoolIndex
].
dChannelCurrent
<
OPENCURRENT
)
if
(
AllPond
.
DesiltingPoolList
[
sbDesilting
PoolIndex
].
dChannelCurrent
<
OPENCURRENT
)
{
{
bool
[]
bControlData
;
bool
[]
bControlData
;
if
(
ModualPoll
.
bGet_channel_Value
<
bool
>(
AllPond
.
EastTransitPoolList
[
sbEastTransit
PoolIndex
].
byModbusID
,
out
bControlData
,
"d0"
,
"d1"
,
"d2"
,
"d3"
,
"d4"
,
"d5"
,
"d6"
,
"d7"
)
==
true
)
if
(
ModualPoll
.
bGet_channel_Value
<
bool
>(
AllPond
.
DesiltingPoolList
[
sbDesilting
PoolIndex
].
byModbusID
,
out
bControlData
,
"d0"
,
"d1"
,
"d2"
,
"d3"
,
"d4"
,
"d5"
,
"d6"
,
"d7"
)
==
true
)
{
{
if
(
AllPond
.
EastTransitPoolList
[
sbEastTransit
PoolIndex
].
bClose_Machine
(
bControlData
)
==
true
)
if
(
AllPond
.
DesiltingPoolList
[
sbDesilting
PoolIndex
].
bClose_Machine
(
bControlData
)
==
true
)
{
{
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelControlError
,
true
,
1
,
AllPond
.
EastTransitPoolList
[
sbEastTransit
PoolIndex
].
strChannelNumber
);
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
DesiltingPoolList
[
sbDesiltingPoolIndex
].
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelControlError
,
true
,
1
,
AllPond
.
DesiltingPoolList
[
sbDesilting
PoolIndex
].
strChannelNumber
);
}
}
}
}
}
}
}
}
if
(
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
bHadRefControl
==
true
&&
AllPond
.
EastTransitPoolList
[
sbEastTransit
PoolIndex
].
bHadOpenPumb
==
false
)
if
(
AllPond
.
DesiltingPoolList
[
sbDesiltingPoolIndex
].
bHadRefControl
==
true
&&
AllPond
.
DesiltingPoolList
[
sbDesilting
PoolIndex
].
bHadOpenPumb
==
false
)
{
{
if
(
AllPond
.
EastTransitPoolList
[
sbEastTransit
PoolIndex
].
dChannelCurrent
>
CLOSECURRENT
)
if
(
AllPond
.
DesiltingPoolList
[
sbDesilting
PoolIndex
].
dChannelCurrent
>
CLOSECURRENT
)
{
{
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelControlError
,
true
,
1
,
AllPond
.
EastTransitPoolList
[
sbEastTransit
PoolIndex
].
strChannelNumber
);
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
DesiltingPoolList
[
sbDesiltingPoolIndex
].
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelControlError
,
true
,
1
,
AllPond
.
DesiltingPoolList
[
sbDesilting
PoolIndex
].
strChannelNumber
);
}
}
}
}
Thread
.
Sleep
(
200
);
Thread
.
Sleep
(
200
);
}
}
for
(
sbyte
sbEastTransitPoolIndex
=
0
;
sbEastTransitPoolIndex
<
AllPond
.
EastTransit
PoolList
.
Count
();
sbEastTransitPoolIndex
++)
for
(
sbyte
sbEastTransitPoolIndex
=
0
;
sbEastTransitPoolIndex
<
AllPond
.
Discharge
PoolList
.
Count
();
sbEastTransitPoolIndex
++)
{
{
if
(
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
bHadRefControl
==
true
&&
AllPond
.
EastTransit
PoolList
[
sbEastTransitPoolIndex
].
bHadOpenPumb
==
true
)
if
(
AllPond
.
DischargePoolList
[
sbEastTransitPoolIndex
].
bHadRefControl
==
true
&&
AllPond
.
Discharge
PoolList
[
sbEastTransitPoolIndex
].
bHadOpenPumb
==
true
)
{
{
if
(
AllPond
.
EastTransit
PoolList
[
sbEastTransitPoolIndex
].
dChannelCurrent
<
OPENCURRENT
)
if
(
AllPond
.
Discharge
PoolList
[
sbEastTransitPoolIndex
].
dChannelCurrent
<
OPENCURRENT
)
{
{
bool
[]
bControlData
;
bool
[]
bControlData
;
if
(
ModualPoll
.
bGet_channel_Value
<
bool
>(
AllPond
.
EastTransit
PoolList
[
sbEastTransitPoolIndex
].
byModbusID
,
out
bControlData
,
"d0"
,
"d1"
,
"d2"
,
"d3"
,
"d4"
,
"d5"
,
"d6"
,
"d7"
)
==
true
)
if
(
ModualPoll
.
bGet_channel_Value
<
bool
>(
AllPond
.
Discharge
PoolList
[
sbEastTransitPoolIndex
].
byModbusID
,
out
bControlData
,
"d0"
,
"d1"
,
"d2"
,
"d3"
,
"d4"
,
"d5"
,
"d6"
,
"d7"
)
==
true
)
{
{
if
(
AllPond
.
EastTransit
PoolList
[
sbEastTransitPoolIndex
].
bClose_Machine
(
bControlData
)
==
true
)
if
(
AllPond
.
Discharge
PoolList
[
sbEastTransitPoolIndex
].
bClose_Machine
(
bControlData
)
==
true
)
{
{
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelControlError
,
true
,
1
,
AllPond
.
EastTransit
PoolList
[
sbEastTransitPoolIndex
].
strChannelNumber
);
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
DischargePoolList
[
sbEastTransitPoolIndex
].
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelControlError
,
true
,
1
,
AllPond
.
Discharge
PoolList
[
sbEastTransitPoolIndex
].
strChannelNumber
);
}
}
}
}
}
}
}
}
if
(
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
bHadRefControl
==
true
&&
AllPond
.
EastTransit
PoolList
[
sbEastTransitPoolIndex
].
bHadOpenPumb
==
false
)
if
(
AllPond
.
DischargePoolList
[
sbEastTransitPoolIndex
].
bHadRefControl
==
true
&&
AllPond
.
Discharge
PoolList
[
sbEastTransitPoolIndex
].
bHadOpenPumb
==
false
)
{
{
if
(
AllPond
.
EastTransit
PoolList
[
sbEastTransitPoolIndex
].
dChannelCurrent
>
CLOSECURRENT
)
if
(
AllPond
.
Discharge
PoolList
[
sbEastTransitPoolIndex
].
dChannelCurrent
>
CLOSECURRENT
)
{
{
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelControlError
,
true
,
1
,
AllPond
.
EastTransit
PoolList
[
sbEastTransitPoolIndex
].
strChannelNumber
);
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
DischargePoolList
[
sbEastTransitPoolIndex
].
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelControlError
,
true
,
1
,
AllPond
.
Discharge
PoolList
[
sbEastTransitPoolIndex
].
strChannelNumber
);
}
}
}
}
Thread
.
Sleep
(
200
);
Thread
.
Sleep
(
200
);
}
}
for
(
sbyte
sb
EastTransitPoolIndex
=
0
;
sbEastTransitPoolIndex
<
AllPond
.
EastTransitPoolList
.
Count
();
sbEastTransit
PoolIndex
++)
for
(
sbyte
sb
SlurryPoolIndex
=
0
;
sbSlurryPoolIndex
<
AllPond
.
SlurryPoolList
.
Count
();
sbSlurry
PoolIndex
++)
{
{
if
(
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
bHadRefControl
==
true
&&
AllPond
.
EastTransitPoolList
[
sbEastTransit
PoolIndex
].
bHadOpenPumb
==
true
)
if
(
AllPond
.
SlurryPoolList
[
sbSlurryPoolIndex
].
bHadRefControl
==
true
&&
AllPond
.
SlurryPoolList
[
sbSlurry
PoolIndex
].
bHadOpenPumb
==
true
)
{
{
if
(
AllPond
.
EastTransitPoolList
[
sbEastTransit
PoolIndex
].
dChannelCurrent
<
OPENCURRENT
)
if
(
AllPond
.
SlurryPoolList
[
sbSlurry
PoolIndex
].
dChannelCurrent
<
OPENCURRENT
)
{
{
bool
[]
bControlData
;
bool
[]
bControlData
;
if
(
ModualPoll
.
bGet_channel_Value
<
bool
>(
AllPond
.
EastTransitPoolList
[
sbEastTransit
PoolIndex
].
byModbusID
,
out
bControlData
,
"d0"
,
"d1"
,
"d2"
,
"d3"
,
"d4"
,
"d5"
,
"d6"
,
"d7"
)
==
true
)
if
(
ModualPoll
.
bGet_channel_Value
<
bool
>(
AllPond
.
SlurryPoolList
[
sbSlurry
PoolIndex
].
byModbusID
,
out
bControlData
,
"d0"
,
"d1"
,
"d2"
,
"d3"
,
"d4"
,
"d5"
,
"d6"
,
"d7"
)
==
true
)
{
{
if
(
AllPond
.
EastTransitPoolList
[
sbEastTransit
PoolIndex
].
bClose_Machine
(
bControlData
)
==
true
)
if
(
AllPond
.
SlurryPoolList
[
sbSlurry
PoolIndex
].
bClose_Machine
(
bControlData
)
==
true
)
{
{
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelControlError
,
true
,
1
,
AllPond
.
EastTransitPoolList
[
sbEastTransit
PoolIndex
].
strChannelNumber
);
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
SlurryPoolList
[
sbSlurryPoolIndex
].
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelControlError
,
true
,
1
,
AllPond
.
SlurryPoolList
[
sbSlurry
PoolIndex
].
strChannelNumber
);
}
}
}
}
}
}
}
}
if
(
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
bHadRefControl
==
true
&&
AllPond
.
EastTransitPoolList
[
sbEastTransit
PoolIndex
].
bHadOpenPumb
==
false
)
if
(
AllPond
.
SlurryPoolList
[
sbSlurryPoolIndex
].
bHadRefControl
==
true
&&
AllPond
.
SlurryPoolList
[
sbSlurry
PoolIndex
].
bHadOpenPumb
==
false
)
{
{
if
(
AllPond
.
EastTransitPoolList
[
sbEastTransit
PoolIndex
].
dChannelCurrent
>
CLOSECURRENT
)
if
(
AllPond
.
SlurryPoolList
[
sbSlurry
PoolIndex
].
dChannelCurrent
>
CLOSECURRENT
)
{
{
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelControlError
,
true
,
1
,
AllPond
.
EastTransitPoolList
[
sbEastTransit
PoolIndex
].
strChannelNumber
);
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
SlurryPoolList
[
sbSlurryPoolIndex
].
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelControlError
,
true
,
1
,
AllPond
.
SlurryPoolList
[
sbSlurry
PoolIndex
].
strChannelNumber
);
}
}
}
}
Thread
.
Sleep
(
200
);
Thread
.
Sleep
(
200
);
}
}
for
(
sbyte
sb
EastTransitPoolIndex
=
0
;
sbEastTransitPoolIndex
<
AllPond
.
EastTransitPoolList
.
Count
();
sbEastTransit
PoolIndex
++)
for
(
sbyte
sb
OctagonalPoolIndex
=
0
;
sbOctagonalPoolIndex
<
AllPond
.
OctagonalPoolList
.
Count
();
sbOctagonal
PoolIndex
++)
{
{
if
(
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
bHadRefControl
==
true
&&
AllPond
.
EastTransitPoolList
[
sbEastTransit
PoolIndex
].
bHadOpenPumb
==
true
)
if
(
AllPond
.
OctagonalPoolList
[
sbOctagonalPoolIndex
].
bHadRefControl
==
true
&&
AllPond
.
OctagonalPoolList
[
sbOctagonal
PoolIndex
].
bHadOpenPumb
==
true
)
{
{
if
(
AllPond
.
EastTransitPoolList
[
sbEastTransit
PoolIndex
].
dChannelCurrent
<
OPENCURRENT
)
if
(
AllPond
.
OctagonalPoolList
[
sbOctagonal
PoolIndex
].
dChannelCurrent
<
OPENCURRENT
)
{
{
bool
[]
bControlData
;
bool
[]
bControlData
;
if
(
ModualPoll
.
bGet_channel_Value
<
bool
>(
AllPond
.
EastTransitPoolList
[
sbEastTransit
PoolIndex
].
byModbusID
,
out
bControlData
,
"d0"
,
"d1"
,
"d2"
,
"d3"
,
"d4"
,
"d5"
,
"d6"
,
"d7"
)
==
true
)
if
(
ModualPoll
.
bGet_channel_Value
<
bool
>(
AllPond
.
OctagonalPoolList
[
sbOctagonal
PoolIndex
].
byModbusID
,
out
bControlData
,
"d0"
,
"d1"
,
"d2"
,
"d3"
,
"d4"
,
"d5"
,
"d6"
,
"d7"
)
==
true
)
{
{
if
(
AllPond
.
EastTransitPoolList
[
sbEastTransit
PoolIndex
].
bClose_Machine
(
bControlData
)
==
true
)
if
(
AllPond
.
OctagonalPoolList
[
sbOctagonal
PoolIndex
].
bClose_Machine
(
bControlData
)
==
true
)
{
{
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelControlError
,
true
,
1
,
AllPond
.
EastTransitPoolList
[
sbEastTransit
PoolIndex
].
strChannelNumber
);
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
OctagonalPoolList
[
sbOctagonalPoolIndex
].
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelControlError
,
true
,
1
,
AllPond
.
OctagonalPoolList
[
sbOctagonal
PoolIndex
].
strChannelNumber
);
}
}
}
}
}
}
}
}
if
(
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
bHadRefControl
==
true
&&
AllPond
.
EastTransitPoolList
[
sbEastTransit
PoolIndex
].
bHadOpenPumb
==
false
)
if
(
AllPond
.
OctagonalPoolList
[
sbOctagonalPoolIndex
].
bHadRefControl
==
true
&&
AllPond
.
OctagonalPoolList
[
sbOctagonal
PoolIndex
].
bHadOpenPumb
==
false
)
{
{
if
(
AllPond
.
EastTransitPoolList
[
sbEastTransit
PoolIndex
].
dChannelCurrent
>
CLOSECURRENT
)
if
(
AllPond
.
OctagonalPoolList
[
sbOctagonal
PoolIndex
].
dChannelCurrent
>
CLOSECURRENT
)
{
{
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelControlError
,
true
,
1
,
AllPond
.
EastTransitPoolList
[
sbEastTransit
PoolIndex
].
strChannelNumber
);
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
OctagonalPoolList
[
sbOctagonalPoolIndex
].
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelControlError
,
true
,
1
,
AllPond
.
OctagonalPoolList
[
sbOctagonal
PoolIndex
].
strChannelNumber
);
}
}
}
}
}
}
for
(
sbyte
sbEastTransitPoolIndex
=
0
;
sbEastTransitPoolIndex
<
AllPond
.
EastTransitPoolList
.
Count
();
sbEastTransitPoolIndex
++)
{
if
(
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
bHadRefControl
==
true
&&
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
bHadOpenPumb
==
true
)
{
if
(
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
dChannelCurrent
<
OPENCURRENT
)
{
bool
[]
bControlData
;
if
(
ModualPoll
.
bGet_channel_Value
<
bool
>(
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
byModbusID
,
out
bControlData
,
"d0"
,
"d1"
,
"d2"
,
"d3"
,
"d4"
,
"d5"
,
"d6"
,
"d7"
)
==
true
)
{
if
(
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
bClose_Machine
(
bControlData
)
==
true
)
{
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelControlError
,
true
,
1
,
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
strChannelNumber
);
}
}
}
}
if
(
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
bHadRefControl
==
true
&&
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
bHadOpenPumb
==
false
)
{
if
(
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
dChannelCurrent
>
CLOSECURRENT
)
{
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelControlError
,
true
,
1
,
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
strChannelNumber
);
}
}
}
double
EastTransitPoolLevel
;
double
EastTransitPoolLevel
;
EastTransitPoolLevel
=
AllPond
.
cEastTransitPool
.
cLevel
.
dCurrentlevel
;
EastTransitPoolLevel
=
AllPond
.
cEastTransitPool
.
cLevel
.
dCurrentlevel
;
...
@@ -500,34 +476,6 @@ namespace ModbusDemo.MessageFormat
...
@@ -500,34 +476,6 @@ namespace ModbusDemo.MessageFormat
}
}
}
}
public
static
modual
.
eModualType
eModdusId_Find_ModualType
(
string
sModbusID
)
{
for
(
int
i
=
0
;
i
<
ModualPoll
.
byX66cNumber
;
i
++)
{
if
(
byte
.
Parse
(
sModbusID
)
==
ModualPoll
.
cx66c
.
byModbusID
[
i
])
{
return
modual
.
eModualType
.
WTDR66C
;
}
}
for
(
int
i
=
0
;
i
<
ModualPoll
.
byX18xNumber
;
i
++)
{
if
(
byte
.
Parse
(
sModbusID
)
==
ModualPoll
.
cx78c
.
byModbusID
[
i
])
{
return
modual
.
eModualType
.
WTDR78C
;
}
}
//if(cControlMap.chMap[i].srcType == "WTDR14P")
// return modual.eModualType.WTDR14P;
//else if(cControlMap.chMap[i].srcType == "WTDR18X")
// return modual.eModualType.WTDR18X;
//else if(cControlMap.chMap[i].srcType == "WTDR78C")
// return modual.eModualType.WTDR78C;
//else if(cControlMap.chMap[i].srcType == "WTDR66C")
// return modual.eModualType.WTDR66C;
return
modual
.
eModualType
.
IDLE
;
}
public
static
bool
bOperation_Machine
(
bool
bOpenMachine
,
byte
sbModbusID
,
bool
[]
bControlData
,
bool
[]
bControlBit
,
out
bool
bHadOpenMachine
,
byte
byResModualID
,
string
stResChannel
)
public
static
bool
bOperation_Machine
(
bool
bOpenMachine
,
byte
sbModbusID
,
bool
[]
bControlData
,
bool
[]
bControlBit
,
out
bool
bHadOpenMachine
,
byte
byResModualID
,
string
stResChannel
)
{
{
bHadOpenMachine
=
true
;
bHadOpenMachine
=
true
;
...
@@ -645,7 +593,6 @@ namespace ModbusDemo.MessageFormat
...
@@ -645,7 +593,6 @@ namespace ModbusDemo.MessageFormat
stResponseStrign
=
jsonObj
.
ToString
();
stResponseStrign
=
jsonObj
.
ToString
();
}
}
}
}
public
static
void
vSet_Pool_Alarm_Level
(
byte
byModbusID
,
double
dMaxLevel
,
double
dMinLevel
)
public
static
void
vSet_Pool_Alarm_Level
(
byte
byModbusID
,
double
dMaxLevel
,
double
dMinLevel
)
{
{
if
(
byModbusID
==
AllPond
.
cEastTransitPool
.
cLevel
.
byModbusID
)
if
(
byModbusID
==
AllPond
.
cEastTransitPool
.
cLevel
.
byModbusID
)
...
...
ModbusDemo/Modular/ModualPoll.cs
View file @
41afdcdc
...
@@ -700,7 +700,6 @@ namespace ModbusDemo.Modular
...
@@ -700,7 +700,6 @@ namespace ModbusDemo.Modular
return
bGetStatus
;
return
bGetStatus
;
}
}
public
static
bool
bSet_All_Channel_Value
(
byte
byModbusID
,
bool
[]
bControlData
)
public
static
bool
bSet_All_Channel_Value
(
byte
byModbusID
,
bool
[]
bControlData
)
{
{
bool
bControlStatus
=
true
;
bool
bControlStatus
=
true
;
...
...
ModbusDemo/application/AllPond.cs
View file @
41afdcdc
...
@@ -8,271 +8,876 @@ using ModbusDemo;
...
@@ -8,271 +8,876 @@ using ModbusDemo;
using
ModbusDemo.application
;
using
ModbusDemo.application
;
namespace
ModbusDemo.application
namespace
ModbusDemo.application
{
{
public
static
class
AllPond
#if DEBUG_TEST
public
static
class
AllPond
{
{
private
static
ModualPool
.
pcTemperature
cEastTransitPoolTemper
=
new
ModualPool
.
pcTemperature
(
"EastTransitPoolTemper"
,
27
,
"d0"
);
private
static
ModualPool
.
pcLiquidlevel
cEastTransitPoolLevel
=
new
ModualPool
.
pcLiquidlevel
(
"EastTransitPoolLevel"
,
13
,
"d0"
);
private
static
ModualPool
.
pcOperation
cEastTransitPoolSouthWaterBase
=
new
ModualPool
.
pcOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
},
bHadRefControl
=
false
,
byResModbusID
=
0
,
strResChannelNumber
=
null
};
private
static
ModualPool
.
pcMachine
cEastTransitPoolSouthWater
=
new
ModualPool
.
pcMachine
(
"EastTransitPoolSouthWater"
,
cEastTransitPoolSouthWaterBase
);
private
static
ModualPool
.
pcOperation
cEastTransitPoolNorthWaterBase
=
new
ModualPool
.
pcOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d2"
,
strChannelNumber
=
new
string
[]
{
"d2"
,
"d3"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
},
bHadRefControl
=
false
,
byResModbusID
=
0xFF
,
strResChannelNumber
=
null
};
private
static
ModualPool
.
pcMachine
cEastTransitPoolNorthWater
=
new
ModualPool
.
pcMachine
(
"EastTransitPoolNorthWater"
,
cEastTransitPoolNorthWaterBase
);
private
static
ModualPool
.
pcOperation
cEastTransitPoolPumb1Base
=
new
ModualPool
.
pcOperation
private
static
ModualPool
.
pcTemperature
cEastTransitPoolTemper
=
new
ModualPool
.
pcTemperature
(
"EastTransitPoolTemper"
,
27
,
"d0"
);
private
static
ModualPool
.
pcLiquidlevel
cEastTransitPoolLevel
=
new
ModualPool
.
pcLiquidlevel
(
"EastTransitPoolLevel"
,
13
,
"d0"
);
private
static
ModualPool
.
pcOperation
cEastTransitPoolSouthWaterBase
=
new
ModualPool
.
pcOperation
{
{
byModbusID
=
39
,
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
},
bCloseOperation
=
new
bool
[]
{
false
,
false
},
bHadRefControl
=
false
,
bHadRefControl
=
false
,
byResModbusID
=
0
,
byResModbusID
=
0xFF
,
strResChannelNumber
=
null
strResChannelNumber
=
null
};
};
private
static
ModualPool
.
pcMachine
cEastTransitPoolPumb1
=
new
ModualPool
.
pcMachine
(
"EastTransitPoolPumb_1"
,
cEastTransitPoolPumb1
Base
);
private
static
ModualPool
.
pcMachine
cEastTransitPoolSouthWater
=
new
ModualPool
.
pcMachine
(
"EastTransitPoolSouthWater"
,
cEastTransitPoolSouthWater
Base
);
private
static
ModualPool
.
pcOperation
cEastTransitPoolPumb2Base
=
new
ModualPool
.
pcOperation
private
static
ModualPool
.
pcOperation
cEastTransitPoolNorthWaterBase
=
new
ModualPool
.
pcOperation
{
{
byModbusID
=
39
,
byModbusID
=
16
,
strOperationNumber
=
"d2"
,
strOperationNumber
=
"d2"
,
strChannelNumber
=
new
string
[]
{
"d2"
,
"d3"
},
strChannelNumber
=
new
string
[]
{
"d2"
,
"d3"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
tru
e
},
bCloseOperation
=
new
bool
[]
{
false
,
fals
e
},
bHadRefControl
=
false
,
bHadRefControl
=
false
,
byResModbusID
=
0
,
byResModbusID
=
0xFF
,
strResChannelNumber
=
null
strResChannelNumber
=
null
};
};
private
static
ModualPool
.
pcMachine
cEastTransitPoolPumb2
=
new
ModualPool
.
pcMachine
(
"EastTransitPoolPumb_2"
,
cEastTransitPoolPumb2
Base
);
private
static
ModualPool
.
pcMachine
cEastTransitPoolNorthWater
=
new
ModualPool
.
pcMachine
(
"EastTransitPoolNorthWater"
,
cEastTransitPoolNorthWater
Base
);
private
static
ModualPool
.
pcOperation
cEastTransitPoolStirrer1Base
=
new
ModualPool
.
pcOperation
private
static
ModualPool
.
pcOperation
cEastTransitPoolPumb1Base
=
new
ModualPool
.
pcOperation
{
{
byModbusID
=
90
,
byModbusID
=
39
,
strOperationNumber
=
"d0"
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0
"
},
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1
"
},
bOpenOperation
=
new
bool
[]
{
true
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
},
bCloseOperation
=
new
bool
[]
{
false
,
false
},
bHadRefControl
=
tru
e
,
bHadRefControl
=
fals
e
,
byResModbusID
=
13
,
byResModbusID
=
0
,
strResChannelNumber
=
"d0"
strResChannelNumber
=
null
};
};
private
static
ModualPool
.
pcMachine
cEastTransitPoolStirrer1
=
new
ModualPool
.
pcMachine
(
"EastTransitPoolStirrer_1"
,
cEastTransitPoolStirrer
1Base
);
private
static
ModualPool
.
pcMachine
cEastTransitPoolPumb1
=
new
ModualPool
.
pcMachine
(
"EastTransitPoolPumb_1"
,
cEastTransitPoolPumb
1Base
);
private
static
ModualPool
.
pcOperation
cEastTransitPoolStirrer2Base
=
new
ModualPool
.
pcOperation
private
static
ModualPool
.
pcOperation
cEastTransitPoolPumb2Base
=
new
ModualPool
.
pcOperation
{
{
byModbusID
=
90
,
byModbusID
=
39
,
strOperationNumber
=
"d1
"
,
strOperationNumber
=
"d2
"
,
strChannelNumber
=
new
string
[]
{
"d1
"
},
strChannelNumber
=
new
string
[]
{
"d2"
,
"d3
"
},
bOpenOperation
=
new
bool
[]
{
true
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
fals
e
},
bCloseOperation
=
new
bool
[]
{
false
,
tru
e
},
bHadRefControl
=
false
,
bHadRefControl
=
false
,
byResModbusID
=
0xFF
,
byResModbusID
=
0
,
strResChannelNumber
=
"d0"
strResChannelNumber
=
null
};
};
private
static
ModualPool
.
pcMachine
cEastTransitPoolStirrer2
=
new
ModualPool
.
pcMachine
(
"EastTransitPoolStirrer_2"
,
cEastTransitPoolStirrer
2Base
);
private
static
ModualPool
.
pcMachine
cEastTransitPoolPumb2
=
new
ModualPool
.
pcMachine
(
"EastTransitPoolPumb_2"
,
cEastTransitPoolPumb
2Base
);
private
static
ModualPool
.
pcOperation
cEastTransitPoolStirrer1Base
=
new
ModualPool
.
pcOperation
{
byModbusID
=
90
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
},
bOpenOperation
=
new
bool
[]
{
true
},
bCloseOperation
=
new
bool
[]
{
false
},
bHadRefControl
=
true
,
byResModbusID
=
13
,
strResChannelNumber
=
"d0"
};
private
static
ModualPool
.
pcMachine
cEastTransitPoolStirrer1
=
new
ModualPool
.
pcMachine
(
"EastTransitPoolStirrer_1"
,
cEastTransitPoolStirrer1Base
);
private
static
ModualPool
.
pcOperation
cEastTransitPoolStirrer3Base
=
new
ModualPool
.
pcOperation
private
static
ModualPool
.
pcOperation
cEastTransitPoolStirrer2Base
=
new
ModualPool
.
pcOperation
{
{
byModbusID
=
90
,
byModbusID
=
90
,
strOperationNumber
=
"d2
"
,
strOperationNumber
=
"d1
"
,
strChannelNumber
=
new
string
[]
{
"d2
"
},
strChannelNumber
=
new
string
[]
{
"d1
"
},
bOpenOperation
=
new
bool
[]
{
true
},
bOpenOperation
=
new
bool
[]
{
true
},
bCloseOperation
=
new
bool
[]
{
false
},
bCloseOperation
=
new
bool
[]
{
false
},
bHadRefControl
=
false
,
bHadRefControl
=
false
,
byResModbusID
=
0xFF
,
byResModbusID
=
0xFF
,
strResChannelNumber
=
null
strResChannelNumber
=
"d0"
};
};
private
static
ModualPool
.
pcMachine
cEastTransitPoolStirrer3
=
new
ModualPool
.
pcMachine
(
"EastTransitPoolStirrer_3"
,
cEastTransitPoolStirrer3
Base
);
private
static
ModualPool
.
pcMachine
cEastTransitPoolStirrer2
=
new
ModualPool
.
pcMachine
(
"EastTransitPoolStirrer_2"
,
cEastTransitPoolStirrer2
Base
);
private
static
ModualPool
.
pcOperation
cEastTransitPoolStirrer4Base
=
new
ModualPool
.
pcOperation
private
static
ModualPool
.
pcOperation
cEastTransitPoolStirrer3Base
=
new
ModualPool
.
pcOperation
{
{
byModbusID
=
90
,
byModbusID
=
90
,
strOperationNumber
=
"d3
"
,
strOperationNumber
=
"d2
"
,
strChannelNumber
=
new
string
[]
{
"d3
"
},
strChannelNumber
=
new
string
[]
{
"d2
"
},
bOpenOperation
=
new
bool
[]
{
true
},
bOpenOperation
=
new
bool
[]
{
true
},
bCloseOperation
=
new
bool
[]
{
false
},
bCloseOperation
=
new
bool
[]
{
false
},
bHadRefControl
=
false
,
bHadRefControl
=
false
,
byResModbusID
=
0xFF
,
byResModbusID
=
0xFF
,
strResChannelNumber
=
null
strResChannelNumber
=
null
};
};
private
static
ModualPool
.
pcMachine
cEastTransitPoolStirrer4
=
new
ModualPool
.
pcMachine
(
"EastTransitPoolStirrer_4"
,
cEastTransitPoolStirrer4
Base
);
private
static
ModualPool
.
pcMachine
cEastTransitPoolStirrer3
=
new
ModualPool
.
pcMachine
(
"EastTransitPoolStirrer_3"
,
cEastTransitPoolStirrer3
Base
);
private
static
ModualPool
.
pc
ButtonOperation
cEastTransitPoolButton1Base
=
new
ModualPool
.
pcButton
Operation
private
static
ModualPool
.
pc
Operation
cEastTransitPoolStirrer4Base
=
new
ModualPool
.
pc
Operation
{
{
byModbusID
=
16
,
byModbusID
=
90
,
strOperationNumber
=
"d0"
,
strOperationNumber
=
"d3"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
strChannelNumber
=
new
string
[]
{
"d3"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bOpenOperation
=
new
bool
[]
{
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
bCloseOperation
=
new
bool
[]
{
false
},
bHadRefControl
=
false
,
byResModbusID
=
0xFF
,
strResChannelNumber
=
null
};
};
private
static
ModualPool
.
pc
Button
cEastTransitPoolButton1
=
new
ModualPool
.
pcButton
(
"EastTransitPoolButton1"
,
cEastTransitPoolButton1
Base
);
private
static
ModualPool
.
pc
Machine
cEastTransitPoolStirrer4
=
new
ModualPool
.
pcMachine
(
"EastTransitPoolStirrer_4"
,
cEastTransitPoolStirrer4
Base
);
public
static
List
<
ModualPool
.
pcMachine
>
EastTransitPoolList
=
new
List
<
ModualPool
.
pcMachine
>(
new
ModualPool
.
pcMachine
[]
{
cEastTransitPoolSouthWater
,
cEastTransitPoolNorthWater
,
cEastTransitPoolPumb1
,
cEastTransitPoolPumb2
,
cEastTransitPoolStirrer1
,
cEastTransitPoolStirrer2
,
cEastTransitPoolStirrer3
,
cEastTransitPoolStirrer4
});
public
static
List
<
ModualPool
.
pcMachine
>
EastTransitPoolList
=
new
List
<
ModualPool
.
pcMachine
>(
new
ModualPool
.
pcMachine
[]
{
cEastTransitPoolSouthWater
,
cEastTransitPoolNorthWater
,
cEastTransitPoolPumb1
,
cEastTransitPoolPumb2
,
cEastTransitPoolStirrer1
,
cEastTransitPoolStirrer2
,
cEastTransitPoolStirrer3
,
cEastTransitPoolStirrer4
});
public
static
class
cEastTransitPool
public
static
class
cEastTransitPool
{
{
public
static
double
vSetMaxLevel
;
public
static
double
vSetMaxLevel
;
public
static
double
vSetMinLevel
;
public
static
double
vSetMinLevel
;
public
static
ModualPool
.
pcTemperature
cTemper
{
get
=>
cEastTransitPoolTemper
;
set
=>
cEastTransitPoolTemper
=
value
;
}
public
static
ModualPool
.
pcTemperature
cTemper
{
get
=>
cEastTransitPoolTemper
;
set
=>
cEastTransitPoolTemper
=
value
;
}
public
static
ModualPool
.
pcLiquidlevel
cLevel
{
get
=>
cEastTransitPoolLevel
;
set
=>
cEastTransitPoolLevel
=
value
;
}
public
static
ModualPool
.
pcLiquidlevel
cLevel
{
get
=>
cEastTransitPoolLevel
;
set
=>
cEastTransitPoolLevel
=
value
;
}
public
static
ModualPool
.
pcMachine
cSouthWater
{
get
=>
cEastTransitPoolSouthWater
;
set
=>
cEastTransitPoolSouthWater
=
value
;
}
public
static
ModualPool
.
pcMachine
cSouthWater
{
get
=>
cEastTransitPoolSouthWater
;
set
=>
cEastTransitPoolSouthWater
=
value
;
}
public
static
ModualPool
.
pcMachine
cNorthWater
{
get
=>
cEastTransitPoolNorthWater
;
set
=>
cEastTransitPoolNorthWater
=
value
;
}
public
static
ModualPool
.
pcMachine
cNorthWater
{
get
=>
cEastTransitPoolNorthWater
;
set
=>
cEastTransitPoolNorthWater
=
value
;
}
public
static
ModualPool
.
pcMachine
cPumb1
{
get
=>
cEastTransitPoolPumb1
;
set
=>
cEastTransitPoolPumb1
=
value
;
}
public
static
ModualPool
.
pcMachine
cPumb1
{
get
=>
cEastTransitPoolPumb1
;
set
=>
cEastTransitPoolPumb1
=
value
;
}
public
static
ModualPool
.
pcMachine
cPumb2
{
get
=>
cEastTransitPoolPumb2
;
set
=>
cEastTransitPoolPumb2
=
value
;
}
public
static
ModualPool
.
pcMachine
cPumb2
{
get
=>
cEastTransitPoolPumb2
;
set
=>
cEastTransitPoolPumb2
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer1
{
get
=>
cEastTransitPoolStirrer1
;
set
=>
cEastTransitPoolStirrer1
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer1
{
get
=>
cEastTransitPoolStirrer1
;
set
=>
cEastTransitPoolStirrer1
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer2
{
get
=>
cEastTransitPoolStirrer2
;
set
=>
cEastTransitPoolStirrer2
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer2
{
get
=>
cEastTransitPoolStirrer2
;
set
=>
cEastTransitPoolStirrer2
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer3
{
get
=>
cEastTransitPoolStirrer3
;
set
=>
cEastTransitPoolStirrer3
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer3
{
get
=>
cEastTransitPoolStirrer3
;
set
=>
cEastTransitPoolStirrer3
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer4
{
get
=>
cEastTransitPoolStirrer4
;
set
=>
cEastTransitPoolStirrer4
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer4
{
get
=>
cEastTransitPoolStirrer4
;
set
=>
cEastTransitPoolStirrer4
=
value
;
}
public
static
ModualPool
.
pcButton
cButton1
{
get
=>
cEastTransitPoolButton1
;
set
=>
cEastTransitPoolButton1
=
value
;
}
}
}
private
static
ModualPool
.
pcTemperature
cWestTransitPoolTemper
=
new
ModualPool
.
pcTemperature
(
"WestTransitPoolTemper"
,
27
,
"d0"
);
private
static
ModualPool
.
pcTemperature
cWestTransitPoolTemper
=
new
ModualPool
.
pcTemperature
(
"WestTransitPoolTemper"
,
27
,
"d0"
);
private
static
ModualPool
.
pcLiquidlevel
cWestTransitPoolLevel
=
new
ModualPool
.
pcLiquidlevel
(
"WestTransitPoolLevel"
,
13
,
"d0"
);
private
static
ModualPool
.
pcLiquidlevel
cWestTransitPoolLevel
=
new
ModualPool
.
pcLiquidlevel
(
"WestTransitPoolLevel"
,
13
,
"d0"
);
private
static
ModualPool
.
pcOperation
cWestTransitPoolSouthWaterBase
=
new
ModualPool
.
pcOperation
private
static
ModualPool
.
pcOperation
cWestTransitPoolSouthWaterBase
=
new
ModualPool
.
pcOperation
{
{
byModbusID
=
35
,
byModbusID
=
35
,
strOperationNumber
=
"d0"
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
},
bCloseOperation
=
new
bool
[]
{
false
,
false
},
bHadRefControl
=
false
,
bHadRefControl
=
false
,
byResModbusID
=
0
,
byResModbusID
=
0
,
strResChannelNumber
=
null
strResChannelNumber
=
null
};
private
static
ModualPool
.
pcMachine
cWestTransitPoolSouthWater
=
new
ModualPool
.
pcMachine
(
"WestTransitPoolSouthWater"
,
cWestTransitPoolSouthWaterBase
);
private
static
ModualPool
.
pcOperation
cWestTransitPoolNorthWaterBase
=
new
ModualPool
.
pcOperation
{
byModbusID
=
35
,
strOperationNumber
=
"d2"
,
strChannelNumber
=
new
string
[]
{
"d2"
,
"d3"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
},
bHadRefControl
=
false
,
byResModbusID
=
0xFF
,
strResChannelNumber
=
null
};
private
static
ModualPool
.
pcMachine
cWestTransitPoolNorthWater
=
new
ModualPool
.
pcMachine
(
"WestTransitPoolNorthWater"
,
cWestTransitPoolNorthWaterBase
);
private
static
ModualPool
.
pcOperation
cWestTransitPoolPumb1Base
=
new
ModualPool
.
pcOperation
{
byModbusID
=
31
,
strOperationNumber
=
"d2"
,
strChannelNumber
=
new
string
[]
{
"d2"
,
"d3"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
},
bHadRefControl
=
false
,
byResModbusID
=
0
,
strResChannelNumber
=
null
};
};
private
static
ModualPool
.
pcMachine
cWestTransitPoolSouthWater
=
new
ModualPool
.
pcMachine
(
"WestTransitPoolSouthWater"
,
cWestTransitPoolSouthWater
Base
);
private
static
ModualPool
.
pcMachine
cWestTransitPoolPumb1
=
new
ModualPool
.
pcMachine
(
"WestTransitPoolPumb_1"
,
cWestTransitPoolPumb1
Base
);
private
static
ModualPool
.
pcOperation
cWestTransitPoolNorthWaterBase
=
new
ModualPool
.
pcOperation
private
static
ModualPool
.
pcOperation
cWestTransitPoolPumb2Base
=
new
ModualPool
.
pcOperation
{
{
byModbusID
=
35
,
byModbusID
=
39
,
strOperationNumber
=
"d2"
,
strOperationNumber
=
"d2"
,
strChannelNumber
=
new
string
[]
{
"d2"
,
"d3"
},
strChannelNumber
=
new
string
[]
{
"d2"
,
"d3"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
fals
e
},
bCloseOperation
=
new
bool
[]
{
false
,
tru
e
},
bHadRefControl
=
false
,
bHadRefControl
=
false
,
byResModbusID
=
0xFF
,
byResModbusID
=
0
,
strResChannelNumber
=
null
strResChannelNumber
=
null
};
};
private
static
ModualPool
.
pcMachine
cWestTransitPoolNorthWater
=
new
ModualPool
.
pcMachine
(
"WestTransitPoolNorthWater"
,
cWestTransitPoolNorthWater
Base
);
private
static
ModualPool
.
pcMachine
cWestTransitPoolPumb2
=
new
ModualPool
.
pcMachine
(
"WestTransitPoolPumb_2"
,
cWestTransitPoolPumb2
Base
);
private
static
ModualPool
.
pcOperation
cWestTransitPoolPumb1Base
=
new
ModualPool
.
pcOperation
private
static
ModualPool
.
pcOperation
cWestTransitPoolStirrer1Base
=
new
ModualPool
.
pcOperation
{
{
byModbusID
=
31
,
byModbusID
=
31
,
strOperationNumber
=
"d2
"
,
strOperationNumber
=
"d4
"
,
strChannelNumber
=
new
string
[]
{
"d2"
,
"d3
"
},
strChannelNumber
=
new
string
[]
{
"d4"
,
"d5
"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
},
bCloseOperation
=
new
bool
[]
{
false
,
false
},
bHadRefControl
=
false
,
bHadRefControl
=
false
,
byResModbusID
=
0
,
byResModbusID
=
0xFF
,
strResChannelNumber
=
null
strResChannelNumber
=
null
};
};
private
static
ModualPool
.
pcMachine
cWestTransitPoolPumb1
=
new
ModualPool
.
pcMachine
(
"WestTransitPoolPumb_1"
,
cWestTransitPoolPumb
1Base
);
private
static
ModualPool
.
pcMachine
cWestTransitPoolStirrer1
=
new
ModualPool
.
pcMachine
(
"WestTransitPoolStirrer_1"
,
cWestTransitPoolStirrer
1Base
);
private
static
ModualPool
.
pcOperation
cWestTransitPoolPumb2Base
=
new
ModualPool
.
pcOperation
private
static
ModualPool
.
pcOperation
cWestTransitPoolStirrer2Base
=
new
ModualPool
.
pcOperation
{
{
byModbusID
=
39
,
byModbusID
=
90
,
strOperationNumber
=
"d2
"
,
strOperationNumber
=
"d1
"
,
strChannelNumber
=
new
string
[]
{
"d2"
,
"d3
"
},
strChannelNumber
=
new
string
[]
{
"d1
"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bOpenOperation
=
new
bool
[]
{
true
},
bCloseOperation
=
new
bool
[]
{
false
,
tru
e
},
bCloseOperation
=
new
bool
[]
{
fals
e
},
bHadRefControl
=
false
,
bHadRefControl
=
false
,
byResModbusID
=
0
,
byResModbusID
=
0xFF
,
strResChannelNumber
=
null
strResChannelNumber
=
"d0"
};
};
private
static
ModualPool
.
pcMachine
cWestTransitPoolPumb2
=
new
ModualPool
.
pcMachine
(
"WestTransitPoolPumb_2"
,
cWestTransitPoolPumb2Base
);
private
static
ModualPool
.
pcMachine
cWestTransitPoolStirrer2
=
new
ModualPool
.
pcMachine
(
"WestTransitPoolStirrer_2"
,
cWestTransitPoolStirrer2Base
);
private
static
ModualPool
.
pcOperation
cWestTransitPoolStirrer1Base
=
new
ModualPool
.
pcOperation
private
static
ModualPool
.
pcOperation
cWestTransitPoolStirrer3Base
=
new
ModualPool
.
pcOperation
{
{
byModbusID
=
31
,
byModbusID
=
90
,
strOperationNumber
=
"d4
"
,
strOperationNumber
=
"d2
"
,
strChannelNumber
=
new
string
[]
{
"d4"
,
"d5
"
},
strChannelNumber
=
new
string
[]
{
"d2
"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bOpenOperation
=
new
bool
[]
{
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
},
bCloseOperation
=
new
bool
[]
{
false
},
bHadRefControl
=
false
,
bHadRefControl
=
false
,
byResModbusID
=
0xFF
,
byResModbusID
=
0xFF
,
strResChannelNumber
=
null
strResChannelNumber
=
null
};
};
private
static
ModualPool
.
pcMachine
cWestTransitPoolStirrer1
=
new
ModualPool
.
pcMachine
(
"WestTransitPoolStirrer_1"
,
cWestTransitPoolStirrer1
Base
);
private
static
ModualPool
.
pcMachine
cWestTransitPoolStirrer3
=
new
ModualPool
.
pcMachine
(
"WestTransitPoolStirrer_3"
,
cWestTransitPoolStirrer3
Base
);
private
static
ModualPool
.
pcOperation
cWestTransitPoolStirrer2Base
=
new
ModualPool
.
pcOperation
private
static
ModualPool
.
pcOperation
cWestTransitPoolStirrer4Base
=
new
ModualPool
.
pcOperation
{
{
byModbusID
=
90
,
byModbusID
=
90
,
strOperationNumber
=
"d1
"
,
strOperationNumber
=
"d3
"
,
strChannelNumber
=
new
string
[]
{
"d1
"
},
strChannelNumber
=
new
string
[]
{
"d3
"
},
bOpenOperation
=
new
bool
[]
{
true
},
bOpenOperation
=
new
bool
[]
{
true
},
bCloseOperation
=
new
bool
[]
{
false
},
bCloseOperation
=
new
bool
[]
{
false
},
bHadRefControl
=
false
,
bHadRefControl
=
false
,
byResModbusID
=
0xFF
,
byResModbusID
=
0xFF
,
strResChannelNumber
=
"d0"
strResChannelNumber
=
null
};
};
private
static
ModualPool
.
pcMachine
cWestTransitPoolStirrer2
=
new
ModualPool
.
pcMachine
(
"WestTransitPoolStirrer_2"
,
cWestTransitPoolStirrer2Base
);
private
static
ModualPool
.
pcMachine
cWestTransitPoolStirrer4
=
new
ModualPool
.
pcMachine
(
"WestTransitPoolStirrer_4"
,
cWestTransitPoolStirrer4Base
);
public
static
List
<
ModualPool
.
pcMachine
>
WestTransitPoolList
=
new
List
<
ModualPool
.
pcMachine
>(
new
ModualPool
.
pcMachine
[]
{
cWestTransitPoolSouthWater
,
cWestTransitPoolNorthWater
,
cWestTransitPoolPumb1
,
cWestTransitPoolPumb2
,
cWestTransitPoolStirrer1
,
cWestTransitPoolStirrer2
,
cWestTransitPoolStirrer3
,
cWestTransitPoolStirrer4
});
public
static
class
cWestTransitPool
{
public
static
double
vSetMaxLevel
;
public
static
double
vSetMinLevel
;
public
static
ModualPool
.
pcTemperature
cTemper
{
get
=>
cWestTransitPoolTemper
;
set
=>
cWestTransitPoolTemper
=
value
;
}
public
static
ModualPool
.
pcLiquidlevel
cLevel
{
get
=>
cWestTransitPoolLevel
;
set
=>
cWestTransitPoolLevel
=
value
;
}
public
static
ModualPool
.
pcMachine
cPumb1
{
get
=>
cWestTransitPoolPumb1
;
set
=>
cWestTransitPoolPumb1
=
value
;
}
public
static
ModualPool
.
pcMachine
cPumb2
{
get
=>
cWestTransitPoolPumb2
;
set
=>
cWestTransitPoolPumb2
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer1
{
get
=>
cWestTransitPoolStirrer1
;
set
=>
cWestTransitPoolStirrer1
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer2
{
get
=>
cWestTransitPoolStirrer2
;
set
=>
cWestTransitPoolStirrer2
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer3
{
get
=>
cWestTransitPoolStirrer3
;
set
=>
cWestTransitPoolStirrer3
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer4
{
get
=>
cWestTransitPoolStirrer4
;
set
=>
cWestTransitPoolStirrer4
=
value
;
}
}
private
static
ModualPool
.
pcTemperature
cDesiltingPoolTemper
=
new
ModualPool
.
pcTemperature
(
"DesiltingPoolTemper"
,
27
,
"d0"
);
private
static
ModualPool
.
pcLiquidlevel
cDesiltingPoolLevel
=
new
ModualPool
.
pcLiquidlevel
(
"DesiltingPoolLevel"
,
13
,
"d0"
);
private
static
ModualPool
.
pcOperation
cWestTransitPoolStirrer3Base
=
new
ModualPool
.
pcOperation
private
static
ModualPool
.
pcOperation
cDesiltingPoolPumb1Base
=
new
ModualPool
.
pcOperation
{
{
byModbusID
=
90
,
byModbusID
=
31
,
strOperationNumber
=
"d2"
,
strOperationNumber
=
"d2"
,
strChannelNumber
=
new
string
[]
{
"d2
"
},
strChannelNumber
=
new
string
[]
{
"d2"
,
"d3
"
},
bOpenOperation
=
new
bool
[]
{
true
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
},
bCloseOperation
=
new
bool
[]
{
false
,
false
},
bHadRefControl
=
false
,
bHadRefControl
=
false
,
byResModbusID
=
0xFF
,
byResModbusID
=
0
,
strResChannelNumber
=
null
strResChannelNumber
=
null
};
};
private
static
ModualPool
.
pcMachine
cWestTransitPoolStirrer3
=
new
ModualPool
.
pcMachine
(
"WestTransitPoolStirrer_3"
,
cWestTransitPoolStirrer3
Base
);
private
static
ModualPool
.
pcMachine
cDesiltingPoolPumb1
=
new
ModualPool
.
pcMachine
(
"DesiltingPoolPumb1"
,
cDesiltingPoolPumb1
Base
);
private
static
ModualPool
.
pcOperation
cWestTransitPoolStirrer4Base
=
new
ModualPool
.
pcOperation
private
static
ModualPool
.
pcOperation
cDesiltingPoolPumb2Base
=
new
ModualPool
.
pcOperation
{
{
byModbusID
=
90
,
byModbusID
=
39
,
strOperationNumber
=
"d3"
,
strOperationNumber
=
"d2"
,
strChannelNumber
=
new
string
[]
{
"d3"
},
strChannelNumber
=
new
string
[]
{
"d2"
,
"d3"
},
bOpenOperation
=
new
bool
[]
{
true
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
},
bCloseOperation
=
new
bool
[]
{
false
,
true
},
bHadRefControl
=
false
,
bHadRefControl
=
false
,
byResModbusID
=
0xFF
,
byResModbusID
=
0
,
strResChannelNumber
=
null
strResChannelNumber
=
null
};
};
private
static
ModualPool
.
pcMachine
cWestTransitPoolStirrer4
=
new
ModualPool
.
pcMachine
(
"WestTransitPoolStirrer_4"
,
cWestTransitPoolStirrer4Base
);
private
static
ModualPool
.
pcMachine
cDesiltingPoolPumb2
=
new
ModualPool
.
pcMachine
(
"DesiltingPoolPumb2"
,
cDesiltingPoolPumb2Base
);
public
static
class
pcWestTransitPool
private
static
ModualPool
.
pcOperation
cDesiltingPoolPumb3Base
=
new
ModualPool
.
pcOperation
{
byModbusID
=
31
,
strOperationNumber
=
"d2"
,
strChannelNumber
=
new
string
[]
{
"d2"
,
"d3"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
},
bHadRefControl
=
false
,
byResModbusID
=
0
,
strResChannelNumber
=
null
};
private
static
ModualPool
.
pcMachine
cDesiltingPoolPumb3
=
new
ModualPool
.
pcMachine
(
"DesiltingPoolPumb3"
,
cDesiltingPoolPumb3Base
);
private
static
ModualPool
.
pcOperation
cDesiltingPoolPumb4Base
=
new
ModualPool
.
pcOperation
{
byModbusID
=
39
,
strOperationNumber
=
"d2"
,
strChannelNumber
=
new
string
[]
{
"d2"
,
"d3"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
true
},
bHadRefControl
=
false
,
byResModbusID
=
0
,
strResChannelNumber
=
null
};
private
static
ModualPool
.
pcMachine
cDesiltingPoolPumb4
=
new
ModualPool
.
pcMachine
(
"DesiltingPoolPumb4"
,
cDesiltingPoolPumb4Base
);
private
static
ModualPool
.
pcOperation
cDesiltingPoolStirrer1Base
=
new
ModualPool
.
pcOperation
{
byModbusID
=
31
,
strOperationNumber
=
"d4"
,
strChannelNumber
=
new
string
[]
{
"d4"
,
"d5"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
},
bHadRefControl
=
false
,
byResModbusID
=
0xFF
,
strResChannelNumber
=
null
};
private
static
ModualPool
.
pcMachine
cDesiltingPoolStirrer1
=
new
ModualPool
.
pcMachine
(
"DesiltingPoolStirrer1"
,
cDesiltingPoolStirrer1Base
);
private
static
ModualPool
.
pcOperation
cDesiltingPoolStirrer2Base
=
new
ModualPool
.
pcOperation
{
byModbusID
=
90
,
strOperationNumber
=
"d1"
,
strChannelNumber
=
new
string
[]
{
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
},
bCloseOperation
=
new
bool
[]
{
false
},
bHadRefControl
=
false
,
byResModbusID
=
0xFF
,
strResChannelNumber
=
"d0"
};
private
static
ModualPool
.
pcMachine
cDesiltingPoolStirrer2
=
new
ModualPool
.
pcMachine
(
"DesiltingPoolStirrer2"
,
cDesiltingPoolStirrer2Base
);
private
static
ModualPool
.
pcOperation
cDesiltingPoolStirrer3Base
=
new
ModualPool
.
pcOperation
{
byModbusID
=
90
,
strOperationNumber
=
"d2"
,
strChannelNumber
=
new
string
[]
{
"d2"
},
bOpenOperation
=
new
bool
[]
{
true
},
bCloseOperation
=
new
bool
[]
{
false
},
bHadRefControl
=
false
,
byResModbusID
=
0xFF
,
strResChannelNumber
=
null
};
private
static
ModualPool
.
pcMachine
cDesiltingPoolStirrer3
=
new
ModualPool
.
pcMachine
(
"DesiltingPoolStirrer3"
,
cDesiltingPoolStirrer3Base
);
private
static
ModualPool
.
pcOperation
cDesiltingPoolStirrer4Base
=
new
ModualPool
.
pcOperation
{
byModbusID
=
90
,
strOperationNumber
=
"d3"
,
strChannelNumber
=
new
string
[]
{
"d3"
},
bOpenOperation
=
new
bool
[]
{
true
},
bCloseOperation
=
new
bool
[]
{
false
},
bHadRefControl
=
false
,
byResModbusID
=
0xFF
,
strResChannelNumber
=
null
};
private
static
ModualPool
.
pcMachine
cDesiltingPoolStirrer4
=
new
ModualPool
.
pcMachine
(
"DesiltingPoolStirrer4"
,
cDesiltingPoolStirrer4Base
);
public
static
List
<
ModualPool
.
pcMachine
>
DesiltingPoolList
=
new
List
<
ModualPool
.
pcMachine
>(
new
ModualPool
.
pcMachine
[]
{
cDesiltingPoolPumb1
,
cDesiltingPoolPumb2
,
cDesiltingPoolPumb3
,
cDesiltingPoolPumb4
,
cDesiltingPoolStirrer1
,
cDesiltingPoolStirrer2
,
cDesiltingPoolStirrer3
,
cDesiltingPoolStirrer4
});
public
static
class
cDesiltingPool
{
{
public
static
double
vSetMaxLevel
;
public
static
double
vSetMaxLevel
;
public
static
double
vSetMinLevel
;
public
static
double
vSetMinLevel
;
public
static
ModualPool
.
pcTemperature
cTemper
{
get
=>
cWestTransitPoolTemper
;
set
=>
cWestTransit
PoolTemper
=
value
;
}
public
static
ModualPool
.
pcTemperature
cTemper
{
get
=>
cDesiltingPoolTemper
;
set
=>
cDesilting
PoolTemper
=
value
;
}
public
static
ModualPool
.
pcLiquidlevel
cLevel
{
get
=>
cWestTransitPoolLevel
;
set
=>
cWestTransit
PoolLevel
=
value
;
}
public
static
ModualPool
.
pcLiquidlevel
cLevel
{
get
=>
cDesiltingPoolLevel
;
set
=>
cDesilting
PoolLevel
=
value
;
}
public
static
ModualPool
.
pcMachine
c
SouthWater
{
get
=>
cWestTransitPoolSouthWater
;
set
=>
cWestTransitPoolSouthWater
=
value
;
}
public
static
ModualPool
.
pcMachine
c
Pumb1
{
get
=>
cDesiltingPoolPumb1
;
set
=>
cDesiltingPoolPumb1
=
value
;
}
public
static
ModualPool
.
pcMachine
c
NorthWater
{
get
=>
cWestTransitPoolNorthWater
;
set
=>
cWestTransitPoolNorthWater
=
value
;
}
public
static
ModualPool
.
pcMachine
c
Pumb2
{
get
=>
cDesiltingPoolPumb2
;
set
=>
cDesiltingPoolPumb2
=
value
;
}
public
static
ModualPool
.
pcMachine
cPumb
1
{
get
=>
cWestTransitPoolPumb1
;
set
=>
cWestTransitPoolPumb1
=
value
;
}
public
static
ModualPool
.
pcMachine
cPumb
3
{
get
=>
cDesiltingPoolPumb3
;
set
=>
cDesiltingPoolPumb3
=
value
;
}
public
static
ModualPool
.
pcMachine
cPumb
2
{
get
=>
cWestTransitPoolPumb2
;
set
=>
cWestTransitPoolPumb2
=
value
;
}
public
static
ModualPool
.
pcMachine
cPumb
4
{
get
=>
cDesiltingPoolPumb4
;
set
=>
cDesiltingPoolPumb4
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer1
{
get
=>
cWestTransitPoolStirrer1
;
set
=>
cWestTransit
PoolStirrer1
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer1
{
get
=>
cDesiltingPoolStirrer1
;
set
=>
cDesilting
PoolStirrer1
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer2
{
get
=>
cWestTransitPoolStirrer2
;
set
=>
cWestTransit
PoolStirrer2
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer2
{
get
=>
cDesiltingPoolStirrer2
;
set
=>
cDesilting
PoolStirrer2
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer3
{
get
=>
cWestTransitPoolStirrer3
;
set
=>
cWestTransit
PoolStirrer3
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer3
{
get
=>
cDesiltingPoolStirrer3
;
set
=>
cDesilting
PoolStirrer3
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer4
{
get
=>
cWestTransitPoolStirrer4
;
set
=>
cWestTransit
PoolStirrer4
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer4
{
get
=>
cDesiltingPoolStirrer4
;
set
=>
cDesilting
PoolStirrer4
=
value
;
}
}
}
private
static
ModualPool
.
pcTemperature
cDischargePoolTemper
=
new
ModualPool
.
pcTemperature
(
"DischargePoolTemper"
,
27
,
"d0"
);
private
static
ModualPool
.
pcLiquidlevel
cDischargePoolLevel
=
new
ModualPool
.
pcLiquidlevel
(
"DischargePoolLevel"
,
13
,
"d0"
);
private
static
ModualPool
.
pcOperation
cDischargePoolPumb1Base
=
new
ModualPool
.
pcOperation
{
byModbusID
=
31
,
strOperationNumber
=
"d2"
,
strChannelNumber
=
new
string
[]
{
"d2"
,
"d3"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
},
bHadRefControl
=
false
,
byResModbusID
=
0
,
strResChannelNumber
=
null
};
private
static
ModualPool
.
pcMachine
cDischargePoolPumb1
=
new
ModualPool
.
pcMachine
(
"DischargePoolPumb1"
,
cDischargePoolPumb1Base
);
private
static
ModualPool
.
pcOperation
cDischargePoolStirrer1Base
=
new
ModualPool
.
pcOperation
{
byModbusID
=
31
,
strOperationNumber
=
"d4"
,
strChannelNumber
=
new
string
[]
{
"d4"
,
"d5"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
},
bHadRefControl
=
false
,
byResModbusID
=
0xFF
,
strResChannelNumber
=
null
};
private
static
ModualPool
.
pcMachine
cDischargePoolStirrer1
=
new
ModualPool
.
pcMachine
(
"DischargePoolStirrer1"
,
cDischargePoolStirrer1Base
);
public
static
List
<
ModualPool
.
pcMachine
>
DischargePoolList
=
new
List
<
ModualPool
.
pcMachine
>(
new
ModualPool
.
pcMachine
[]
{
cDischargePoolPumb1
,
cDischargePoolStirrer1
});
public
static
class
cDischargePool
{
public
static
double
vSetMaxLevel
;
public
static
double
vSetMinLevel
;
public
static
ModualPool
.
pcTemperature
cTemper
{
get
=>
cDischargePoolTemper
;
set
=>
cDischargePoolTemper
=
value
;
}
public
static
ModualPool
.
pcLiquidlevel
cLevel
{
get
=>
cDischargePoolLevel
;
set
=>
cDischargePoolLevel
=
value
;
}
public
static
ModualPool
.
pcMachine
cPumb1
{
get
=>
cDischargePoolPumb1
;
set
=>
cDischargePoolPumb1
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer1
{
get
=>
cDischargePoolStirrer1
;
set
=>
cDischargePoolStirrer1
=
value
;
}
}
private
static
ModualPool
.
pcTemperature
cSlurryPoolTemper
=
new
ModualPool
.
pcTemperature
(
"SlurryPoolTemper"
,
27
,
"d0"
);
private
static
ModualPool
.
pcLiquidlevel
cSlurryPoolLevel
=
new
ModualPool
.
pcLiquidlevel
(
"SlurryPoolLevel"
,
13
,
"d0"
);
private
static
ModualPool
.
pcOperation
cSlurryPoolPumb1Base
=
new
ModualPool
.
pcOperation
{
byModbusID
=
31
,
strOperationNumber
=
"d2"
,
strChannelNumber
=
new
string
[]
{
"d2"
,
"d3"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
},
bHadRefControl
=
false
,
byResModbusID
=
0
,
strResChannelNumber
=
null
};
private
static
ModualPool
.
pcMachine
cSlurryPoolPumb1
=
new
ModualPool
.
pcMachine
(
"SlurryPoolPumb1"
,
cSlurryPoolPumb1Base
);
private
static
ModualPool
.
pcOperation
cSlurryPoolStirrer1Base
=
new
ModualPool
.
pcOperation
{
byModbusID
=
31
,
strOperationNumber
=
"d4"
,
strChannelNumber
=
new
string
[]
{
"d4"
,
"d5"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
},
bHadRefControl
=
false
,
byResModbusID
=
0xFF
,
strResChannelNumber
=
null
};
private
static
ModualPool
.
pcMachine
cSlurryPoolStirrer1
=
new
ModualPool
.
pcMachine
(
"SlurryPoolStirrer1 "
,
cSlurryPoolStirrer1Base
);
public
static
List
<
ModualPool
.
pcMachine
>
SlurryPoolList
=
new
List
<
ModualPool
.
pcMachine
>(
new
ModualPool
.
pcMachine
[]
{
cSlurryPoolPumb1
,
cSlurryPoolStirrer1
});
public
static
class
cSlurryPool
{
public
static
double
vSetMaxLevel
;
public
static
double
vSetMinLevel
;
public
static
ModualPool
.
pcTemperature
cTemper
{
get
=>
cSlurryPoolTemper
;
set
=>
cSlurryPoolTemper
=
value
;
}
public
static
ModualPool
.
pcLiquidlevel
cLevel
{
get
=>
cSlurryPoolLevel
;
set
=>
cSlurryPoolLevel
=
value
;
}
public
static
ModualPool
.
pcMachine
cPumb1
{
get
=>
cSlurryPoolPumb1
;
set
=>
cSlurryPoolPumb1
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer1
{
get
=>
cSlurryPoolStirrer1
;
set
=>
cSlurryPoolStirrer1
=
value
;
}
}
private
static
ModualPool
.
pcTemperature
cOctagonalPoolTemper
=
new
ModualPool
.
pcTemperature
(
"OctagonalPoolTemper"
,
27
,
"d0"
);
private
static
ModualPool
.
pcLiquidlevel
cOctagonalPoolLevel
=
new
ModualPool
.
pcLiquidlevel
(
"OctagonalPoolLevel"
,
13
,
"d0"
);
private
static
ModualPool
.
pcOperation
cOctagonalPoolPumb1Base
=
new
ModualPool
.
pcOperation
{
byModbusID
=
31
,
strOperationNumber
=
"d2"
,
strChannelNumber
=
new
string
[]
{
"d2"
,
"d3"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
},
bHadRefControl
=
false
,
byResModbusID
=
0
,
strResChannelNumber
=
null
};
private
static
ModualPool
.
pcMachine
cOctagonalPoolPumb1
=
new
ModualPool
.
pcMachine
(
"OctagonalPoolPumb1 "
,
cOctagonalPoolPumb1Base
);
private
static
ModualPool
.
pcOperation
cOctagonalPoolPumb2Base
=
new
ModualPool
.
pcOperation
{
byModbusID
=
39
,
strOperationNumber
=
"d2"
,
strChannelNumber
=
new
string
[]
{
"d2"
,
"d3"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
true
},
bHadRefControl
=
false
,
byResModbusID
=
0
,
strResChannelNumber
=
null
};
private
static
ModualPool
.
pcMachine
cOctagonalPoolPumb2
=
new
ModualPool
.
pcMachine
(
"OctagonalPoolPumb2"
,
cOctagonalPoolPumb2Base
);
private
static
ModualPool
.
pcOperation
cOctagonalPoolStirrer1Base
=
new
ModualPool
.
pcOperation
{
byModbusID
=
90
,
strOperationNumber
=
"d1"
,
strChannelNumber
=
new
string
[]
{
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
},
bCloseOperation
=
new
bool
[]
{
false
},
bHadRefControl
=
false
,
byResModbusID
=
0xFF
,
strResChannelNumber
=
"d0"
};
private
static
ModualPool
.
pcMachine
cOctagonalPoolStirrer1
=
new
ModualPool
.
pcMachine
(
"OctagonalPoolStirrer1"
,
cOctagonalPoolStirrer1Base
);
private
static
ModualPool
.
pcOperation
cOctagonalPoolStirrer2Base
=
new
ModualPool
.
pcOperation
{
byModbusID
=
90
,
strOperationNumber
=
"d1"
,
strChannelNumber
=
new
string
[]
{
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
},
bCloseOperation
=
new
bool
[]
{
false
},
bHadRefControl
=
false
,
byResModbusID
=
0xFF
,
strResChannelNumber
=
"d0"
};
private
static
ModualPool
.
pcMachine
cOctagonalPoolStirrer2
=
new
ModualPool
.
pcMachine
(
"OctagonalPoolStirrer2"
,
cOctagonalPoolStirrer2Base
);
public
static
List
<
ModualPool
.
pcMachine
>
OctagonalPoolList
=
new
List
<
ModualPool
.
pcMachine
>(
new
ModualPool
.
pcMachine
[]
{
cOctagonalPoolPumb1
,
cOctagonalPoolPumb2
,
cOctagonalPoolStirrer1
,
cOctagonalPoolStirrer2
});
public
static
class
cOctagonalPool
{
public
static
double
vSetMaxLevel
;
public
static
double
vSetMinLevel
;
public
static
ModualPool
.
pcTemperature
cTemper
{
get
=>
cOctagonalPoolTemper
;
set
=>
cOctagonalPoolTemper
=
value
;
}
public
static
ModualPool
.
pcLiquidlevel
cLevel
{
get
=>
cOctagonalPoolLevel
;
set
=>
cOctagonalPoolLevel
=
value
;
}
public
static
ModualPool
.
pcMachine
cPumb1
{
get
=>
cOctagonalPoolPumb1
;
set
=>
cOctagonalPoolPumb1
=
value
;
}
public
static
ModualPool
.
pcMachine
cPumb2
{
get
=>
cOctagonalPoolPumb2
;
set
=>
cDesiltingPoolPumb2
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer1
{
get
=>
cOctagonalPoolStirrer1
;
set
=>
cOctagonalPoolStirrer1
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer2
{
get
=>
cOctagonalPoolStirrer2
;
set
=>
cOctagonalPoolStirrer2
=
value
;
}
}
private
static
ModualPool
.
pcButtonOperation
cFeedstockStartButton1Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockStartButton1
=
new
ModualPool
.
pcButton
(
"FeedstockStartButton1"
,
cFeedstockStartButton1Base
);
private
static
ModualPool
.
pcButtonOperation
cFeedstockStopButton1Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockStopButton1
=
new
ModualPool
.
pcButton
(
"FeedstockStopButton1"
,
cFeedstockStopButton1Base
);
private
static
ModualPool
.
pcButtonOperation
cFeedstockPauseButton1Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockPauseButton1
=
new
ModualPool
.
pcButton
(
"FeedstockPauseButton1"
,
cFeedstockPauseButton1Base
);
private
static
ModualPool
.
pcButtonOperation
cFeedstockHandButton1Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockHandButton1
=
new
ModualPool
.
pcButton
(
"FeedstockHandButton1"
,
cFeedstockHandButton1Base
);
private
static
ModualPool
.
pcButtonOperation
cFeedstockStartButton2Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockStartButton2
=
new
ModualPool
.
pcButton
(
"FeedstockStartButton2"
,
cFeedstockStartButton2Base
);
private
static
ModualPool
.
pcButtonOperation
cFeedstockStopButton2Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockStopButton2
=
new
ModualPool
.
pcButton
(
"FeedstockStopButton2"
,
cFeedstockStopButton2Base
);
private
static
ModualPool
.
pcButtonOperation
cFeedstockPauseButton2Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockPauseButton2
=
new
ModualPool
.
pcButton
(
"FeedstockPauseButton2"
,
cFeedstockPauseButton2Base
);
private
static
ModualPool
.
pcButtonOperation
cFeedstockHandButton2Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockHandButton2
=
new
ModualPool
.
pcButton
(
"FeedstockHandButton2"
,
cFeedstockHandButton2Base
);
private
static
ModualPool
.
pcButtonOperation
cFeedstockStartButton3Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockStartButton3
=
new
ModualPool
.
pcButton
(
"FeedstockStartButton3"
,
cFeedstockStartButton3Base
);
private
static
ModualPool
.
pcButtonOperation
cFeedstockStopButton3Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockStopButton3
=
new
ModualPool
.
pcButton
(
"FeedstockStopButton3"
,
cFeedstockStopButton3Base
);
private
static
ModualPool
.
pcButtonOperation
cFeedstockPauseButton3Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockPauseButton3
=
new
ModualPool
.
pcButton
(
"FeedstockPauseButton3"
,
cFeedstockPauseButton3Base
);
private
static
ModualPool
.
pcButtonOperation
cFeedstockHandButton3Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockHandButton3
=
new
ModualPool
.
pcButton
(
"FeedstockHandButton3"
,
cFeedstockHandButton3Base
);
private
static
ModualPool
.
pcButtonOperation
cFeedstockStartButton4Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockStartButton4
=
new
ModualPool
.
pcButton
(
"FeedstockStartButton4"
,
cFeedstockStartButton4Base
);
private
static
ModualPool
.
pcButtonOperation
cFeedstockStopButton4Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockStopButton4
=
new
ModualPool
.
pcButton
(
"FeedstockStopButton4"
,
cFeedstockStopButton4Base
);
private
static
ModualPool
.
pcButtonOperation
cFeedstockPauseButton4Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockPauseButton4
=
new
ModualPool
.
pcButton
(
"FeedstockPauseButton4"
,
cFeedstockPauseButton4Base
);
private
static
ModualPool
.
pcButtonOperation
cFeedstockHandButton4Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockHandButton4
=
new
ModualPool
.
pcButton
(
"FeedstockHandButton4"
,
cFeedstockHandButton4Base
);
private
static
ModualPool
.
pcButtonOperation
cFeedstockStartButton5Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockStartButton5
=
new
ModualPool
.
pcButton
(
"FeedstockStartButton5"
,
cFeedstockStartButton5Base
);
private
static
ModualPool
.
pcButtonOperation
cFeedstockStopButton5Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockStopButton5
=
new
ModualPool
.
pcButton
(
"FeedstockStopButton5"
,
cFeedstockStopButton5Base
);
private
static
ModualPool
.
pcButtonOperation
cFeedstockPauseButton5Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockPauseButton5
=
new
ModualPool
.
pcButton
(
"FeedstockPauseButton5"
,
cFeedstockPauseButton5Base
);
private
static
ModualPool
.
pcButtonOperation
cFeedstockHandButton5Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockHandButton5
=
new
ModualPool
.
pcButton
(
"FeedstockHandButton5"
,
cFeedstockHandButton5Base
);
private
static
ModualPool
.
pcButtonOperation
cFeedstockStartButton6Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockStartButton6
=
new
ModualPool
.
pcButton
(
"FeedstockStartButton6"
,
cFeedstockStartButton6Base
);
private
static
ModualPool
.
pcButtonOperation
cFeedstockStopButton6Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockStopButton6
=
new
ModualPool
.
pcButton
(
"FeedstockStopButton6"
,
cFeedstockStopButton6Base
);
private
static
ModualPool
.
pcButtonOperation
cFeedstockPauseButton6Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockPauseButton6
=
new
ModualPool
.
pcButton
(
"FeedstockPauseButton6"
,
cFeedstockPauseButton6Base
);
private
static
ModualPool
.
pcButtonOperation
cFeedstockHandButton6Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockHandButton6
=
new
ModualPool
.
pcButton
(
"FeedstockHandButton6"
,
cFeedstockHandButton6Base
);
private
static
ModualPool
.
pcButtonOperation
cFeedstockStartButton7Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockStartButton7
=
new
ModualPool
.
pcButton
(
"FeedstockStartButton7"
,
cFeedstockStartButton7Base
);
private
static
ModualPool
.
pcButtonOperation
cFeedstockStopButton7Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockStopButton7
=
new
ModualPool
.
pcButton
(
"FeedstockStopButton7"
,
cFeedstockStopButton7Base
);
private
static
ModualPool
.
pcButtonOperation
cFeedstockPauseButton7Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockPauseButton7
=
new
ModualPool
.
pcButton
(
"FeedstockPauseButton7"
,
cFeedstockPauseButton7Base
);
private
static
ModualPool
.
pcButtonOperation
cFeedstockHandButton7Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockHandButton7
=
new
ModualPool
.
pcButton
(
"FeedstockHandButton7"
,
cFeedstockHandButton7Base
);
private
static
ModualPool
.
pcButtonOperation
cFeedstockStartButton8Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockStartButton8
=
new
ModualPool
.
pcButton
(
"FeedstockStartButton8"
,
cFeedstockStartButton8Base
);
private
static
ModualPool
.
pcButtonOperation
cFeedstockStopButton8Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockStopButton8
=
new
ModualPool
.
pcButton
(
"FeedstockStopButton8"
,
cFeedstockStopButton8Base
);
private
static
ModualPool
.
pcButtonOperation
cFeedstockPauseButton8Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockPauseButton8
=
new
ModualPool
.
pcButton
(
"FeedstockPauseButton8"
,
cFeedstockPauseButton8Base
);
private
static
ModualPool
.
pcButtonOperation
cFeedstockHandButton8Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
16
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
}
};
private
static
ModualPool
.
pcButton
cFeedstockHandButton8
=
new
ModualPool
.
pcButton
(
"FeedstockHandButton8"
,
cFeedstockHandButton8Base
);
public
static
class
cCentralControlRoom
{
public
static
ModualPool
.
pcButton
cStartButton1
{
get
=>
cFeedstockStartButton1
;
set
=>
cFeedstockStartButton1
=
value
;
}
public
static
ModualPool
.
pcButton
cStopButton1
{
get
=>
cFeedstockStopButton1
;
set
=>
cFeedstockStopButton1
=
value
;
}
public
static
ModualPool
.
pcButton
cPauseButton1
{
get
=>
cFeedstockPauseButton1
;
set
=>
cFeedstockPauseButton1
=
value
;
}
public
static
ModualPool
.
pcButton
cHandButton1
{
get
=>
cFeedstockHandButton1
;
set
=>
cFeedstockHandButton2
=
value
;
}
public
static
ModualPool
.
pcButton
cStartButton2
{
get
=>
cFeedstockStartButton2
;
set
=>
cFeedstockStartButton2
=
value
;
}
public
static
ModualPool
.
pcButton
cStopButton2
{
get
=>
cFeedstockStopButton2
;
set
=>
cFeedstockStopButton2
=
value
;
}
public
static
ModualPool
.
pcButton
cPauseButton2
{
get
=>
cFeedstockPauseButton2
;
set
=>
cFeedstockPauseButton2
=
value
;
}
public
static
ModualPool
.
pcButton
cHandButton2
{
get
=>
cFeedstockHandButton2
;
set
=>
cFeedstockHandButton2
=
value
;
}
public
static
ModualPool
.
pcButton
cStartButton3
{
get
=>
cFeedstockStartButton3
;
set
=>
cFeedstockStartButton3
=
value
;
}
public
static
ModualPool
.
pcButton
cStopButton3
{
get
=>
cFeedstockStopButton3
;
set
=>
cFeedstockStopButton3
=
value
;
}
public
static
ModualPool
.
pcButton
cPauseButton3
{
get
=>
cFeedstockPauseButton3
;
set
=>
cFeedstockPauseButton3
=
value
;
}
public
static
ModualPool
.
pcButton
cHandButton3
{
get
=>
cFeedstockHandButton3
;
set
=>
cFeedstockHandButton3
=
value
;
}
public
static
ModualPool
.
pcButton
cStartButton4
{
get
=>
cFeedstockStartButton4
;
set
=>
cFeedstockStartButton4
=
value
;
}
public
static
ModualPool
.
pcButton
cStopButton4
{
get
=>
cFeedstockStopButton4
;
set
=>
cFeedstockStopButton4
=
value
;
}
public
static
ModualPool
.
pcButton
cPauseButton4
{
get
=>
cFeedstockPauseButton4
;
set
=>
cFeedstockPauseButton4
=
value
;
}
public
static
ModualPool
.
pcButton
cHandButton4
{
get
=>
cFeedstockHandButton4
;
set
=>
cFeedstockHandButton5
=
value
;
}
public
static
ModualPool
.
pcButton
cStartButton5
{
get
=>
cFeedstockStartButton5
;
set
=>
cFeedstockStartButton5
=
value
;
}
public
static
ModualPool
.
pcButton
cStopButton5
{
get
=>
cFeedstockStopButton5
;
set
=>
cFeedstockStopButton5
=
value
;
}
public
static
ModualPool
.
pcButton
cPauseButton5
{
get
=>
cFeedstockPauseButton5
;
set
=>
cFeedstockPauseButton5
=
value
;
}
public
static
ModualPool
.
pcButton
cHandButton5
{
get
=>
cFeedstockHandButton5
;
set
=>
cFeedstockHandButton5
=
value
;
}
public
static
ModualPool
.
pcButton
cStartButton6
{
get
=>
cFeedstockStartButton6
;
set
=>
cFeedstockStartButton6
=
value
;
}
public
static
ModualPool
.
pcButton
cStopButton6
{
get
=>
cFeedstockStopButton6
;
set
=>
cFeedstockStopButton6
=
value
;
}
public
static
ModualPool
.
pcButton
cPauseButton6
{
get
=>
cFeedstockPauseButton6
;
set
=>
cFeedstockPauseButton6
=
value
;
}
public
static
ModualPool
.
pcButton
cHandButton6
{
get
=>
cFeedstockHandButton6
;
set
=>
cFeedstockHandButton6
=
value
;
}
public
static
ModualPool
.
pcButton
cStartButton7
{
get
=>
cFeedstockStartButton7
;
set
=>
cFeedstockStartButton7
=
value
;
}
public
static
ModualPool
.
pcButton
cStopButton7
{
get
=>
cFeedstockStopButton7
;
set
=>
cFeedstockStopButton7
=
value
;
}
public
static
ModualPool
.
pcButton
cPauseButton7
{
get
=>
cFeedstockPauseButton7
;
set
=>
cFeedstockPauseButton7
=
value
;
}
public
static
ModualPool
.
pcButton
cHandButton7
{
get
=>
cFeedstockHandButton7
;
set
=>
cFeedstockHandButton7
=
value
;
}
public
static
ModualPool
.
pcButton
cStartButton8
{
get
=>
cFeedstockStartButton8
;
set
=>
cFeedstockStartButton8
=
value
;
}
public
static
ModualPool
.
pcButton
cStopButton8
{
get
=>
cFeedstockStopButton8
;
set
=>
cFeedstockStopButton8
=
value
;
}
public
static
ModualPool
.
pcButton
cPauseButton8
{
get
=>
cFeedstockPauseButton8
;
set
=>
cFeedstockPauseButton8
=
value
;
}
public
static
ModualPool
.
pcButton
cHandButton8
{
get
=>
cFeedstockHandButton8
;
set
=>
cFeedstockHandButton8
=
value
;
}
}
}
}
#endif
}
}
ModbusDemo/windows/Form1.cs
View file @
41afdcdc
...
@@ -1039,18 +1039,11 @@ namespace ModbusDemo
...
@@ -1039,18 +1039,11 @@ namespace ModbusDemo
ModbusComm
.
Modbus
.
Transport
.
WriteTimeout
=
1000
;
ModbusComm
.
Modbus
.
Transport
.
WriteTimeout
=
1000
;
ModbusComm
.
Modbus
.
Transport
.
WaitToRetryMilliseconds
=
0
;
ModbusComm
.
Modbus
.
Transport
.
WaitToRetryMilliseconds
=
0
;
<<<<<<<
HEAD
t_AutoControl
=
new
Thread
(
AtuoControl_run
);
t_AutoControl
.
IsBackground
=
true
;
t_AutoControl
.
Start
();
=======
t_AutoControl
=
new
Thread
(
AtuoControl_run
)
t_AutoControl
=
new
Thread
(
AtuoControl_run
)
{
{
IsBackground
=
true
IsBackground
=
true
};
};
t_AutoControl
.
Start
();
t_AutoControl
.
Start
();
>>>>>>>
origin
/
master
modbus_Timer
.
Enabled
=
true
;
modbus_Timer
.
Enabled
=
true
;
btOpenCOM
.
Enabled
=
false
;
btOpenCOM
.
Enabled
=
false
;
...
@@ -1089,7 +1082,6 @@ namespace ModbusDemo
...
@@ -1089,7 +1082,6 @@ namespace ModbusDemo
}
}
private
async
void
run
()
private
async
void
run
()
{
{
<<<<<<<
HEAD
if
(
LOCALDEBUG
==
true
)
if
(
LOCALDEBUG
==
true
)
{
{
comPort
.
PortName
=
"COM6"
;
comPort
.
PortName
=
"COM6"
;
...
@@ -1098,9 +1090,6 @@ namespace ModbusDemo
...
@@ -1098,9 +1090,6 @@ namespace ModbusDemo
{
{
comPort
.
PortName
=
"COM6"
;
comPort
.
PortName
=
"COM6"
;
}
}
=======
comPort
.
PortName
=
"COM1"
;
>>>>>>>
origin
/
master
comPort
.
BaudRate
=
9600
;
comPort
.
BaudRate
=
9600
;
comPort
.
Parity
=
Parity
.
None
;
comPort
.
Parity
=
Parity
.
None
;
comPort
.
StopBits
=
StopBits
.
One
;
comPort
.
StopBits
=
StopBits
.
One
;
...
...
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