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
Show 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,8 +8,10 @@ using ModbusDemo;
...
@@ -8,8 +8,10 @@ using ModbusDemo;
using
ModbusDemo.application
;
using
ModbusDemo.application
;
namespace
ModbusDemo.application
namespace
ModbusDemo.application
{
{
#if DEBUG_TEST
public
static
class
AllPond
public
static
class
AllPond
{
{
private
static
ModualPool
.
pcTemperature
cEastTransitPoolTemper
=
new
ModualPool
.
pcTemperature
(
"EastTransitPoolTemper"
,
27
,
"d0"
);
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
.
pcLiquidlevel
cEastTransitPoolLevel
=
new
ModualPool
.
pcLiquidlevel
(
"EastTransitPoolLevel"
,
13
,
"d0"
);
private
static
ModualPool
.
pcOperation
cEastTransitPoolSouthWaterBase
=
new
ModualPool
.
pcOperation
private
static
ModualPool
.
pcOperation
cEastTransitPoolSouthWaterBase
=
new
ModualPool
.
pcOperation
...
@@ -20,7 +22,7 @@ namespace ModbusDemo.application
...
@@ -20,7 +22,7 @@ namespace ModbusDemo.application
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
cEastTransitPoolSouthWater
=
new
ModualPool
.
pcMachine
(
"EastTransitPoolSouthWater"
,
cEastTransitPoolSouthWaterBase
);
private
static
ModualPool
.
pcMachine
cEastTransitPoolSouthWater
=
new
ModualPool
.
pcMachine
(
"EastTransitPoolSouthWater"
,
cEastTransitPoolSouthWaterBase
);
...
@@ -117,16 +119,6 @@ namespace ModbusDemo.application
...
@@ -117,16 +119,6 @@ namespace ModbusDemo.application
};
};
private
static
ModualPool
.
pcMachine
cEastTransitPoolStirrer4
=
new
ModualPool
.
pcMachine
(
"EastTransitPoolStirrer_4"
,
cEastTransitPoolStirrer4Base
);
private
static
ModualPool
.
pcMachine
cEastTransitPoolStirrer4
=
new
ModualPool
.
pcMachine
(
"EastTransitPoolStirrer_4"
,
cEastTransitPoolStirrer4Base
);
private
static
ModualPool
.
pcButtonOperation
cEastTransitPoolButton1Base
=
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
cEastTransitPoolButton1
=
new
ModualPool
.
pcButton
(
"EastTransitPoolButton1"
,
cEastTransitPoolButton1Base
);
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
...
@@ -143,7 +135,6 @@ namespace ModbusDemo.application
...
@@ -143,7 +135,6 @@ namespace ModbusDemo.application
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
;
}
}
}
...
@@ -254,15 +245,15 @@ namespace ModbusDemo.application
...
@@ -254,15 +245,15 @@ namespace ModbusDemo.application
strResChannelNumber
=
null
strResChannelNumber
=
null
};
};
private
static
ModualPool
.
pcMachine
cWestTransitPoolStirrer4
=
new
ModualPool
.
pcMachine
(
"WestTransitPoolStirrer_4"
,
cWestTransitPoolStirrer4Base
);
private
static
ModualPool
.
pcMachine
cWestTransitPoolStirrer4
=
new
ModualPool
.
pcMachine
(
"WestTransitPoolStirrer_4"
,
cWestTransitPoolStirrer4Base
);
public
static
class
pcWestTransitPool
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
vSetMaxLevel
;
public
static
double
vSetMinLevel
;
public
static
double
vSetMinLevel
;
public
static
ModualPool
.
pcTemperature
cTemper
{
get
=>
cWestTransitPoolTemper
;
set
=>
cWestTransitPoolTemper
=
value
;
}
public
static
ModualPool
.
pcTemperature
cTemper
{
get
=>
cWestTransitPoolTemper
;
set
=>
cWestTransitPoolTemper
=
value
;
}
public
static
ModualPool
.
pcLiquidlevel
cLevel
{
get
=>
cWestTransitPoolLevel
;
set
=>
cWestTransitPoolLevel
=
value
;
}
public
static
ModualPool
.
pcLiquidlevel
cLevel
{
get
=>
cWestTransitPoolLevel
;
set
=>
cWestTransitPoolLevel
=
value
;
}
public
static
ModualPool
.
pcMachine
cSouthWater
{
get
=>
cWestTransitPoolSouthWater
;
set
=>
cWestTransitPoolSouthWater
=
value
;
}
public
static
ModualPool
.
pcMachine
cNorthWater
{
get
=>
cWestTransitPoolNorthWater
;
set
=>
cWestTransitPoolNorthWater
=
value
;
}
public
static
ModualPool
.
pcMachine
cPumb1
{
get
=>
cWestTransitPoolPumb1
;
set
=>
cWestTransitPoolPumb1
=
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
cPumb2
{
get
=>
cWestTransitPoolPumb2
;
set
=>
cWestTransitPoolPumb2
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer1
{
get
=>
cWestTransitPoolStirrer1
;
set
=>
cWestTransitPoolStirrer1
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer1
{
get
=>
cWestTransitPoolStirrer1
;
set
=>
cWestTransitPoolStirrer1
=
value
;
}
...
@@ -270,9 +261,623 @@ namespace ModbusDemo.application
...
@@ -270,9 +261,623 @@ namespace ModbusDemo.application
public
static
ModualPool
.
pcMachine
cStirrer3
{
get
=>
cWestTransitPoolStirrer3
;
set
=>
cWestTransitPoolStirrer3
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer3
{
get
=>
cWestTransitPoolStirrer3
;
set
=>
cWestTransitPoolStirrer3
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer4
{
get
=>
cWestTransitPoolStirrer4
;
set
=>
cWestTransitPoolStirrer4
=
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
cDesiltingPoolPumb1Base
=
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
cDesiltingPoolPumb1
=
new
ModualPool
.
pcMachine
(
"DesiltingPoolPumb1"
,
cDesiltingPoolPumb1Base
);
private
static
ModualPool
.
pcOperation
cDesiltingPoolPumb2Base
=
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
cDesiltingPoolPumb2
=
new
ModualPool
.
pcMachine
(
"DesiltingPoolPumb2"
,
cDesiltingPoolPumb2Base
);
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
vSetMinLevel
;
public
static
ModualPool
.
pcTemperature
cTemper
{
get
=>
cDesiltingPoolTemper
;
set
=>
cDesiltingPoolTemper
=
value
;
}
public
static
ModualPool
.
pcLiquidlevel
cLevel
{
get
=>
cDesiltingPoolLevel
;
set
=>
cDesiltingPoolLevel
=
value
;
}
public
static
ModualPool
.
pcMachine
cPumb1
{
get
=>
cDesiltingPoolPumb1
;
set
=>
cDesiltingPoolPumb1
=
value
;
}
public
static
ModualPool
.
pcMachine
cPumb2
{
get
=>
cDesiltingPoolPumb2
;
set
=>
cDesiltingPoolPumb2
=
value
;
}
public
static
ModualPool
.
pcMachine
cPumb3
{
get
=>
cDesiltingPoolPumb3
;
set
=>
cDesiltingPoolPumb3
=
value
;
}
public
static
ModualPool
.
pcMachine
cPumb4
{
get
=>
cDesiltingPoolPumb4
;
set
=>
cDesiltingPoolPumb4
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer1
{
get
=>
cDesiltingPoolStirrer1
;
set
=>
cDesiltingPoolStirrer1
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer2
{
get
=>
cDesiltingPoolStirrer2
;
set
=>
cDesiltingPoolStirrer2
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer3
{
get
=>
cDesiltingPoolStirrer3
;
set
=>
cDesiltingPoolStirrer3
=
value
;
}
public
static
ModualPool
.
pcMachine
cStirrer4
{
get
=>
cDesiltingPoolStirrer4
;
set
=>
cDesiltingPoolStirrer4
=
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