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
6de5408f
Commit
6de5408f
authored
Jun 23, 2019
by
leon.huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add North and south water repel each other
parent
41afdcdc
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1214 additions
and
66 deletions
+1214
-66
ModualControl.cs
ModbusDemo/MessageFormat/ModualControl.cs
+190
-49
ModbusDemo.csproj
ModbusDemo/ModbusDemo.csproj
+1
-1
ModualPoll.cs
ModbusDemo/Modular/ModualPoll.cs
+8
-8
AllPond.cs
ModbusDemo/application/AllPond.cs
+877
-0
ControlMap.cs
ModbusDemo/application/ControlMap.cs
+131
-1
Form1.cs
ModbusDemo/windows/Form1.cs
+7
-7
No files found.
ModbusDemo/MessageFormat/ModualControl.cs
View file @
6de5408f
...
...
@@ -102,7 +102,7 @@ namespace ModbusDemo.MessageFormat
public
string
[]
strOperationChannelName
;
}
private
const
double
OPENCURRENT
=
4.1
;
private
const
double
OPENCURRENT
=
7
;
private
const
double
CLOSECURRENT
=
4
;
public
class
pcLiquidLevelConfig
{
...
...
@@ -161,7 +161,7 @@ namespace ModbusDemo.MessageFormat
usDurationTime
=
(
ushort
)(
cControl
.
ss
[
i
].
op
[
m
].
duration
*
60
),
ulStartTime
=
cControl
.
ss
[
i
].
op
[
m
].
startTime
};
cModualCntrol
.
bControlStatus
=
ModualPoll
.
bGet_channel_Value
<
bool
>(
cModualCntrol
.
sbModbusID
,
out
cModualCntrol
.
bControlData
,
"d0"
,
"d1"
,
"d
1"
,
"d2"
,
"d3"
,
"d4"
,
"d5
"
);
cModualCntrol
.
bControlStatus
=
ModualPoll
.
bGet_channel_Value
<
bool
>(
cModualCntrol
.
sbModbusID
,
out
cModualCntrol
.
bControlData
,
"d0"
,
"d1"
,
"d
2"
,
"d3"
,
"d4"
,
"d5"
,
"d6
"
);
if
(
jsonObj
[
"ss"
][
i
][
"op"
][
m
]
!=
null
)
{
string
str
;
...
...
@@ -192,11 +192,10 @@ namespace ModbusDemo.MessageFormat
cModualCntrol
.
strOperationChannelName
=
strOperation
.
ToArray
();
if
(
cModualCntrol
.
bControlStatus
==
true
&&
cModualCntrol
.
ulStartTime
<=
Form1
.
GetTimeStamp
())
{
//Form1.vSuspend_Poll_Control(true);
cModualCntrol
.
bStartControl
=
true
;
for
(
int
j
=
0
;
j
<
cModualCntrol
.
strOperationChannelName
.
Count
();
j
++)
{
if
(
ControlMap
.
bControl_Map
(
cModualCntrol
.
bOpenMachine
,
cModualCntrol
.
sbModbusID
,
cModualCntrol
.
bControlData
,
cModualCntrol
.
strOperationChannelName
[
j
]))
if
(
bNorth_South_Water_Mutual_Check
(
cModualCntrol
.
sbModbusID
,
cModualCntrol
.
strOperationChannelName
[
j
])
&&
ControlMap
.
bControl_Map
(
cModualCntrol
.
bOpenMachine
,
cModualCntrol
.
sbModbusID
,
cModualCntrol
.
bControlData
,
cModualCntrol
.
strOperationChannelName
[
j
]))
{
bOperationStatus
[
j
]
=
ControlMap
.
bDelege_Operation
(
cModualCntrol
.
bControlData
);
cModualCntrol
.
bControlStatus
=
bOperationStatus
[
j
];
...
...
@@ -207,8 +206,6 @@ namespace ModbusDemo.MessageFormat
bOperationStatus
[
j
]
=
false
;
}
}
//Form1.vSuspend_Poll_Control(false);
}
if
(
cModualCntrol
.
bControlStatus
==
true
&&
cModualCntrol
.
strOperationChannelName
.
Count
()
<=
1
)
{
...
...
@@ -257,7 +254,7 @@ namespace ModbusDemo.MessageFormat
{
liModuualControl
[
i
].
bStartControl
=
true
;
bool
[]
bControlData
;
liModuualControl
[
i
].
bControlStatus
=
ModualPoll
.
bGet_channel_Value
<
bool
>(
liModuualControl
[
i
].
sbModbusID
,
out
bControlData
,
"d0"
,
"d1"
,
"d1"
,
"d2"
,
"d3"
,
"d4"
,
"d5"
,
"d6"
,
"d7"
);
liModuualControl
[
i
].
bControlStatus
=
ModualPoll
.
bGet_channel_Value
<
bool
>(
liModuualControl
[
i
].
sbModbusID
,
out
bControlData
,
"d0"
,
"d1"
,
"d2"
,
"d3"
,
"d4"
,
"d5"
,
"d6"
,
"d7"
);
if
(
ControlMap
.
bControl_Map
(
liModuualControl
[
i
].
bOpenMachine
,
liModuualControl
[
i
].
sbModbusID
,
liModuualControl
[
i
].
bControlData
,
liModuualControl
[
i
].
strOperationChannelName
[
0
]))
{
liModuualControl
[
i
].
bControlStatus
=
ControlMap
.
bDelege_Operation
(
bControlData
);
...
...
@@ -270,15 +267,15 @@ namespace ModbusDemo.MessageFormat
{
bool
[]
bControlData
;
string
str
;
liModuualControl
[
i
].
bControlStatus
=
ModualPoll
.
bGet_channel_Value
<
bool
>(
liModuualControl
[
i
].
sbModbusID
,
out
bControlData
,
"d0"
,
"d1"
,
"d
1"
,
"d
2"
,
"d3"
,
"d4"
,
"d5"
,
"d6"
,
"d7"
);
for
(
int
j
=
0
;
j
<
8
;
j
++)
{
str
=
"d"
+
j
.
ToString
();
if
(
str
==
liModuualControl
[
i
].
strOperationChannelName
[
0
])
{
liModuualControl
[
i
].
bControlData
[
j
]
=
!
liModuualControl
[
i
].
bControlData
[
j
];
}
}
liModuualControl
[
i
].
bControlStatus
=
ModualPoll
.
bGet_channel_Value
<
bool
>(
liModuualControl
[
i
].
sbModbusID
,
out
bControlData
,
"d0"
,
"d1"
,
"d2"
,
"d3"
,
"d4"
,
"d5"
,
"d6"
,
"d7"
);
//
for (int j = 0; j < 8; j++)
//
{
//
str = "d"+j.ToString();
//
if (str == liModuualControl[i].strOperationChannelName[0])
//
{
//
liModuualControl[i].bControlData[j] = !liModuualControl[i].bControlData[j];
//
}
//
}
if
(
ControlMap
.
bControl_Map
(!
liModuualControl
[
i
].
bOpenMachine
,
liModuualControl
[
i
].
sbModbusID
,
liModuualControl
[
i
].
bControlData
,
liModuualControl
[
i
].
strOperationChannelName
[
0
]))
{
liModuualControl
[
i
].
bControlStatus
=
ControlMap
.
bDelege_Operation
(
bControlData
);
...
...
@@ -294,21 +291,10 @@ namespace ModbusDemo.MessageFormat
}
public
static
Task
vControl_Res_Poll
()
{
if
(
filConfigFiles
.
Length
==
0
)
{
pcConfig
.
WriteConfig
(
"匀浆池配置"
,
"报警最高液位"
,
"8"
);
pcConfig
.
WriteConfig
(
"匀浆池配置"
,
"报警最低液位"
,
"1"
);
AllPond
.
cEastTransitPool
.
vSetMaxLevel
=
pcConfig
.
ReadConfig
<
double
>(
"匀浆池配置"
,
"报警最高液位"
);
AllPond
.
cEastTransitPool
.
vSetMinLevel
=
pcConfig
.
ReadConfig
<
double
>(
"匀浆池配置"
,
"报警最低液位"
);
}
else
{
AllPond
.
cEastTransitPool
.
vSetMaxLevel
=
pcConfig
.
ReadConfig
<
double
>(
"匀浆池配置"
,
"报警最高液位"
);
AllPond
.
cEastTransitPool
.
vSetMinLevel
=
pcConfig
.
ReadConfig
<
double
>(
"匀浆池配置"
,
"报警最低液位"
);
}
vInit_Level_Config
();
while
(
true
)
{
#
region
东中转反馈检测
for
(
sbyte
sbEastTransitPoolIndex
=
0
;
sbEastTransitPoolIndex
<
AllPond
.
WestTransitPoolList
.
Count
();
sbEastTransitPoolIndex
++)
{
if
(
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
bHadRefControl
==
true
&&
AllPond
.
EastTransitPoolList
[
sbEastTransitPoolIndex
].
bHadOpenPumb
==
true
)
...
...
@@ -334,6 +320,17 @@ namespace ModbusDemo.MessageFormat
}
Thread
.
Sleep
(
200
);
}
//if ( AllPond.cEastTransitPool.cLevel.dCurrentlevel >= AllPond.cEastTransitPool.vSetMaxLevel || AllPond.cEastTransitPool.cLevel.dCurrentlevel <= AllPond.cEastTransitPool.vSetMinLevel)
//{
// ModualAlarm.vSet_Modual_Alarm(AllPond.cEastTransitPool.cLevel.byModbusID, (ushort)ModualAlarm.eAlarmCode.ChannelLevelError, true, 1, AllPond.cEastTransitPool.cLevel.strChannelNumber);
//}
//else
//{
// ModualAlarm.vSet_Modual_Alarm(AllPond.cEastTransitPool.cLevel.byModbusID, (ushort)ModualAlarm.eAlarmCode.ChannelLevelError, false, 1, AllPond.cEastTransitPool.cLevel.strChannelNumber);
//}
Thread
.
Sleep
(
1000
);
#
endregion
#
region
西中转反馈检测
for
(
sbyte
sbWestTransitPoolIndex
=
0
;
sbWestTransitPoolIndex
<
AllPond
.
WestTransitPoolList
.
Count
();
sbWestTransitPoolIndex
++)
{
if
(
AllPond
.
WestTransitPoolList
[
sbWestTransitPoolIndex
].
bHadRefControl
==
true
&&
AllPond
.
WestTransitPoolList
[
sbWestTransitPoolIndex
].
bHadOpenPumb
==
true
)
...
...
@@ -358,7 +355,19 @@ namespace ModbusDemo.MessageFormat
}
}
Thread
.
Sleep
(
200
);
}
}
//if ( AllPond.cWestTransitPool.cLevel.dCurrentlevel >= AllPond.cWestTransitPool.vSetMaxLevel || AllPond.cWestTransitPool.cLevel.dCurrentlevel <= AllPond.cWestTransitPool.vSetMinLevel)
//{
// ModualAlarm.vSet_Modual_Alarm(AllPond.cWestTransitPool.cLevel.byModbusID, (ushort)ModualAlarm.eAlarmCode.ChannelLevelError, true, 1, AllPond.cWestTransitPool.cLevel.strChannelNumber);
//}
//else
//{
// ModualAlarm.vSet_Modual_Alarm(AllPond.cWestTransitPool.cLevel.byModbusID, (ushort)ModualAlarm.eAlarmCode.ChannelLevelError, false, 1, AllPond.cWestTransitPool.cLevel.strChannelNumber);
//}
Thread
.
Sleep
(
1000
);
#
endregion
#
region
沉砂池反馈和液位检测
for
(
sbyte
sbDesiltingPoolIndex
=
0
;
sbDesiltingPoolIndex
<
AllPond
.
DesiltingPoolList
.
Count
();
sbDesiltingPoolIndex
++)
{
if
(
AllPond
.
DesiltingPoolList
[
sbDesiltingPoolIndex
].
bHadRefControl
==
true
&&
AllPond
.
DesiltingPoolList
[
sbDesiltingPoolIndex
].
bHadOpenPumb
==
true
)
...
...
@@ -383,7 +392,18 @@ namespace ModbusDemo.MessageFormat
}
}
Thread
.
Sleep
(
200
);
}
if
(
AllPond
.
cDesiltingPool
.
cLevel
.
dCurrentlevel
>=
AllPond
.
cDesiltingPool
.
vSetMaxLevel
||
AllPond
.
cDesiltingPool
.
cLevel
.
dCurrentlevel
<=
AllPond
.
cDesiltingPool
.
vSetMinLevel
)
{
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
cDesiltingPool
.
cLevel
.
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelLevelError
,
true
,
1
,
AllPond
.
cDesiltingPool
.
cLevel
.
strChannelNumber
);
}
else
{
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
cDesiltingPool
.
cLevel
.
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelLevelError
,
false
,
1
,
AllPond
.
cDesiltingPool
.
cLevel
.
strChannelNumber
);
}
Thread
.
Sleep
(
1000
);
#
endregion
#
region
出料池反馈和液位检测
for
(
sbyte
sbEastTransitPoolIndex
=
0
;
sbEastTransitPoolIndex
<
AllPond
.
DischargePoolList
.
Count
();
sbEastTransitPoolIndex
++)
{
if
(
AllPond
.
DischargePoolList
[
sbEastTransitPoolIndex
].
bHadRefControl
==
true
&&
AllPond
.
DischargePoolList
[
sbEastTransitPoolIndex
].
bHadOpenPumb
==
true
)
...
...
@@ -408,7 +428,18 @@ namespace ModbusDemo.MessageFormat
}
}
Thread
.
Sleep
(
200
);
}
if
(
AllPond
.
cDischargePool
.
cLevel
.
dCurrentlevel
>=
AllPond
.
cDischargePool
.
vSetMaxLevel
||
AllPond
.
cDischargePool
.
cLevel
.
dCurrentlevel
<=
AllPond
.
cDischargePool
.
vSetMinLevel
)
{
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
cDischargePool
.
cLevel
.
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelLevelError
,
true
,
1
,
AllPond
.
cDischargePool
.
cLevel
.
strChannelNumber
);
}
else
{
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
cDischargePool
.
cLevel
.
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelLevelError
,
false
,
1
,
AllPond
.
cDischargePool
.
cLevel
.
strChannelNumber
);
}
Thread
.
Sleep
(
1000
);
#
endregion
#
region
匀浆池反馈和液位检测
for
(
sbyte
sbSlurryPoolIndex
=
0
;
sbSlurryPoolIndex
<
AllPond
.
SlurryPoolList
.
Count
();
sbSlurryPoolIndex
++)
{
if
(
AllPond
.
SlurryPoolList
[
sbSlurryPoolIndex
].
bHadRefControl
==
true
&&
AllPond
.
SlurryPoolList
[
sbSlurryPoolIndex
].
bHadOpenPumb
==
true
)
...
...
@@ -433,7 +464,18 @@ namespace ModbusDemo.MessageFormat
}
}
Thread
.
Sleep
(
200
);
}
if
(
AllPond
.
cSlurryPool
.
cLevel
.
dCurrentlevel
>=
AllPond
.
cSlurryPool
.
vSetMaxLevel
||
AllPond
.
cSlurryPool
.
cLevel
.
dCurrentlevel
<=
AllPond
.
cSlurryPool
.
vSetMinLevel
)
{
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
cSlurryPool
.
cLevel
.
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelLevelError
,
true
,
1
,
AllPond
.
cSlurryPool
.
cLevel
.
strChannelNumber
);
}
else
{
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
cSlurryPool
.
cLevel
.
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelLevelError
,
false
,
1
,
AllPond
.
cSlurryPool
.
cLevel
.
strChannelNumber
);
}
Thread
.
Sleep
(
1000
);
#
endregion
#
region
八角池反馈和液位检测
for
(
sbyte
sbOctagonalPoolIndex
=
0
;
sbOctagonalPoolIndex
<
AllPond
.
OctagonalPoolList
.
Count
();
sbOctagonalPoolIndex
++)
{
if
(
AllPond
.
OctagonalPoolList
[
sbOctagonalPoolIndex
].
bHadRefControl
==
true
&&
AllPond
.
OctagonalPoolList
[
sbOctagonalPoolIndex
].
bHadOpenPumb
==
true
)
...
...
@@ -458,23 +500,18 @@ namespace ModbusDemo.MessageFormat
}
}
}
double
EastTransitPoolLevel
;
EastTransitPoolLevel
=
AllPond
.
cEastTransitPool
.
cLevel
.
dCurrentlevel
;
if
(
EastTransitPoolLevel
>=
AllPond
.
cEastTransitPool
.
vSetMaxLevel
||
EastTransitPoolLevel
<=
AllPond
.
cEastTransitPool
.
vSetMinLevel
)
}
if
(
AllPond
.
cOctagonalPool
.
cLevel
.
dCurrentlevel
>=
AllPond
.
cOctagonalPool
.
vSetMaxLevel
||
AllPond
.
cOctagonalPool
.
cLevel
.
dCurrentlevel
<=
AllPond
.
cOctagonalPool
.
vSetMinLevel
)
{
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
c
EastTransitPool
.
cLevel
.
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelLevelError
,
true
,
1
,
AllPond
.
cEastTransit
Pool
.
cLevel
.
strChannelNumber
);
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
c
OctagonalPool
.
cLevel
.
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelLevelError
,
true
,
1
,
AllPond
.
cOctagonal
Pool
.
cLevel
.
strChannelNumber
);
}
else
{
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
c
EastTransitPool
.
cLevel
.
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelLevelError
,
false
,
1
,
AllPond
.
cEastTransit
Pool
.
cLevel
.
strChannelNumber
);
ModualAlarm
.
vSet_Modual_Alarm
(
AllPond
.
c
OctagonalPool
.
cLevel
.
byModbusID
,
(
ushort
)
ModualAlarm
.
eAlarmCode
.
ChannelLevelError
,
false
,
1
,
AllPond
.
cOctagonal
Pool
.
cLevel
.
strChannelNumber
);
}
Thread
.
Sleep
(
1000
);
Thread
.
Sleep
(
1000
);
#
endregion
}
}
public
static
bool
bOperation_Machine
(
bool
bOpenMachine
,
byte
sbModbusID
,
bool
[]
bControlData
,
bool
[]
bControlBit
,
out
bool
bHadOpenMachine
,
byte
byResModualID
,
string
stResChannel
)
{
...
...
@@ -486,7 +523,7 @@ namespace ModbusDemo.MessageFormat
{
double
[]
dConvertData
;
bHadOpenMachine
=
true
;
Thread
.
Sleep
(
1
000
);
Thread
.
Sleep
(
2
000
);
bControlStatus
=
ModualPoll
.
bGet_channel_Value
<
double
>(
byResModualID
,
out
dConvertData
,
stResChannel
);
if
(
dConvertData
[
0
]
>
OPENCURRENT
&&
bControlStatus
==
true
)
{
...
...
@@ -501,7 +538,7 @@ namespace ModbusDemo.MessageFormat
{
double
[]
dConvertData
;
bHadOpenMachine
=
false
;
Thread
.
Sleep
(
1
000
);
Thread
.
Sleep
(
2
000
);
bControlStatus
=
ModualPoll
.
bGet_channel_Value
<
double
>(
byResModualID
,
out
dConvertData
,
stResChannel
);
if
(
dConvertData
[
0
]
<
CLOSECURRENT
&&
bControlStatus
==
true
)
{
...
...
@@ -595,14 +632,118 @@ namespace ModbusDemo.MessageFormat
}
public
static
void
vSet_Pool_Alarm_Level
(
byte
byModbusID
,
double
dMaxLevel
,
double
dMinLevel
)
{
if
(
byModbusID
==
AllPond
.
cEastTransitPool
.
cLevel
.
byModbusID
)
if
(
byModbusID
==
AllPond
.
cSlurryPool
.
cLevel
.
byModbusID
)
{
AllPond
.
cSlurryPool
.
vSetMaxLevel
=
dMaxLevel
;
AllPond
.
cSlurryPool
.
vSetMinLevel
=
dMinLevel
;
pcConfig
.
WriteConfig
(
"匀浆池配置"
,
"报警最高液位"
,
AllPond
.
cSlurryPool
.
vSetMaxLevel
.
ToString
());
pcConfig
.
WriteConfig
(
"匀浆池配置"
,
"报警最低液位"
,
AllPond
.
cSlurryPool
.
vSetMinLevel
.
ToString
());
}
else
if
(
byModbusID
==
AllPond
.
cDesiltingPool
.
cLevel
.
byModbusID
)
{
AllPond
.
cDesiltingPool
.
vSetMaxLevel
=
dMaxLevel
;
AllPond
.
cDesiltingPool
.
vSetMinLevel
=
dMinLevel
;
pcConfig
.
WriteConfig
(
"沉砂池池配置"
,
"报警最高液位"
,
AllPond
.
cDesiltingPool
.
vSetMaxLevel
.
ToString
());
pcConfig
.
WriteConfig
(
"沉砂池池配置"
,
"报警最低液位"
,
AllPond
.
cDesiltingPool
.
vSetMinLevel
.
ToString
());
}
else
if
(
byModbusID
==
AllPond
.
cOctagonalPool
.
cLevel
.
byModbusID
)
{
AllPond
.
cOctagonalPool
.
vSetMaxLevel
=
dMaxLevel
;
AllPond
.
cOctagonalPool
.
vSetMinLevel
=
dMinLevel
;
pcConfig
.
WriteConfig
(
"八角池配置"
,
"报警最高液位"
,
AllPond
.
cOctagonalPool
.
vSetMaxLevel
.
ToString
());
pcConfig
.
WriteConfig
(
"八角池配置"
,
"报警最低液位"
,
AllPond
.
cOctagonalPool
.
vSetMinLevel
.
ToString
());
}
else
if
(
byModbusID
==
AllPond
.
cDischargePool
.
cLevel
.
byModbusID
)
{
AllPond
.
cDischargePool
.
vSetMaxLevel
=
dMaxLevel
;
AllPond
.
cDischargePool
.
vSetMinLevel
=
dMinLevel
;
pcConfig
.
WriteConfig
(
"出料池配置"
,
"报警最高液位"
,
AllPond
.
cDischargePool
.
vSetMaxLevel
.
ToString
());
pcConfig
.
WriteConfig
(
"出料池配置"
,
"报警最低液位"
,
AllPond
.
cDischargePool
.
vSetMinLevel
.
ToString
());
}
}
public
static
void
vInit_Level_Config
()
{
if
(
filConfigFiles
.
Length
==
0
)
{
pcConfig
.
WriteConfig
(
"匀浆池配置"
,
"报警最高液位"
,
"8"
);
pcConfig
.
WriteConfig
(
"匀浆池配置"
,
"报警最低液位"
,
"1"
);
pcConfig
.
WriteConfig
(
"沉砂池池配置"
,
"报警最高液位"
,
"8"
);
pcConfig
.
WriteConfig
(
"沉砂池池配置"
,
"报警最低液位"
,
"1"
);
pcConfig
.
WriteConfig
(
"八角池配置"
,
"报警最高液位"
,
"8"
);
pcConfig
.
WriteConfig
(
"八角池配置"
,
"报警最低液位"
,
"1"
);
pcConfig
.
WriteConfig
(
"出料池配置"
,
"报警最高液位"
,
"8"
);
pcConfig
.
WriteConfig
(
"出料池配置"
,
"报警最低液位"
,
"1"
);
AllPond
.
cSlurryPool
.
vSetMaxLevel
=
pcConfig
.
ReadConfig
<
double
>(
"匀浆池配置"
,
"报警最高液位"
);
AllPond
.
cSlurryPool
.
vSetMinLevel
=
pcConfig
.
ReadConfig
<
double
>(
"匀浆池配置"
,
"报警最低液位"
);
AllPond
.
cDesiltingPool
.
vSetMaxLevel
=
pcConfig
.
ReadConfig
<
double
>(
"沉砂池池配置"
,
"报警最高液位"
);
AllPond
.
cDesiltingPool
.
vSetMinLevel
=
pcConfig
.
ReadConfig
<
double
>(
"沉砂池池配置"
,
"报警最低液位"
);
AllPond
.
cOctagonalPool
.
vSetMaxLevel
=
pcConfig
.
ReadConfig
<
double
>(
"八角池配置"
,
"报警最高液位"
);
AllPond
.
cOctagonalPool
.
vSetMinLevel
=
pcConfig
.
ReadConfig
<
double
>(
"八角池配置"
,
"报警最低液位"
);
AllPond
.
cDischargePool
.
vSetMaxLevel
=
pcConfig
.
ReadConfig
<
double
>(
"出料池配置"
,
"报警最高液位"
);
AllPond
.
cDischargePool
.
vSetMinLevel
=
pcConfig
.
ReadConfig
<
double
>(
"出料池配置"
,
"报警最低液位"
);
}
else
{
AllPond
.
cSlurryPool
.
vSetMaxLevel
=
pcConfig
.
ReadConfig
<
double
>(
"匀浆池配置"
,
"报警最高液位"
);
AllPond
.
cSlurryPool
.
vSetMinLevel
=
pcConfig
.
ReadConfig
<
double
>(
"匀浆池配置"
,
"报警最低液位"
);
AllPond
.
cDesiltingPool
.
vSetMaxLevel
=
pcConfig
.
ReadConfig
<
double
>(
"沉砂池池配置"
,
"报警最高液位"
);
AllPond
.
cDesiltingPool
.
vSetMinLevel
=
pcConfig
.
ReadConfig
<
double
>(
"沉砂池池配置"
,
"报警最低液位"
);
AllPond
.
cOctagonalPool
.
vSetMaxLevel
=
pcConfig
.
ReadConfig
<
double
>(
"八角池配置"
,
"报警最高液位"
);
AllPond
.
cOctagonalPool
.
vSetMinLevel
=
pcConfig
.
ReadConfig
<
double
>(
"八角池配置"
,
"报警最低液位"
);
AllPond
.
cDischargePool
.
vSetMaxLevel
=
pcConfig
.
ReadConfig
<
double
>(
"出料池配置"
,
"报警最高液位"
);
AllPond
.
cDischargePool
.
vSetMinLevel
=
pcConfig
.
ReadConfig
<
double
>(
"出料池配置"
,
"报警最低液位"
);
}
}
public
static
bool
bNorth_South_Water_Mutual_Check
(
byte
byModbusID
,
string
strOperationChannelsName
)
{
bool
bCheckStatus
=
true
;
if
(
byModbusID
==
AllPond
.
cEastTransitPool
.
cSouthWater
.
byModbusID
&&
strOperationChannelsName
==
AllPond
.
cEastTransitPool
.
cSouthWater
.
strOperationNumber
)
{
bCheckStatus
=
false
;
if
(
AllPond
.
cEastTransitPool
.
cNorthWater
.
bHadOpenPumb
==
false
&&
AllPond
.
cWestTransitPool
.
cNorthWater
.
bHadOpenPumb
==
false
&&
AllPond
.
cWestTransitPool
.
cSouthWater
.
bHadOpenPumb
==
false
)
{
bCheckStatus
=
true
;
}
}
else
if
(
byModbusID
==
AllPond
.
cEastTransitPool
.
cNorthWater
.
byModbusID
&&
strOperationChannelsName
==
AllPond
.
cEastTransitPool
.
cNorthWater
.
strOperationNumber
)
{
bCheckStatus
=
false
;
if
(
AllPond
.
cEastTransitPool
.
cSouthWater
.
bHadOpenPumb
==
false
&&
AllPond
.
cWestTransitPool
.
cNorthWater
.
bHadOpenPumb
==
false
&&
AllPond
.
cWestTransitPool
.
cSouthWater
.
bHadOpenPumb
==
false
)
{
bCheckStatus
=
true
;
}
}
else
if
(
byModbusID
==
AllPond
.
cWestTransitPool
.
cSouthWater
.
byModbusID
&&
strOperationChannelsName
==
AllPond
.
cWestTransitPool
.
cSouthWater
.
strOperationNumber
)
{
bCheckStatus
=
false
;
if
(
AllPond
.
cWestTransitPool
.
cNorthWater
.
bHadOpenPumb
==
false
&&
AllPond
.
cEastTransitPool
.
cSouthWater
.
bHadOpenPumb
==
false
&&
AllPond
.
cEastTransitPool
.
cNorthWater
.
bHadOpenPumb
==
false
)
{
bCheckStatus
=
true
;
}
}
else
if
(
byModbusID
==
AllPond
.
cWestTransitPool
.
cNorthWater
.
byModbusID
&&
strOperationChannelsName
==
AllPond
.
cWestTransitPool
.
cNorthWater
.
strOperationNumber
)
{
bCheckStatus
=
false
;
if
(
AllPond
.
cWestTransitPool
.
cSouthWater
.
bHadOpenPumb
==
false
&&
AllPond
.
cEastTransitPool
.
cSouthWater
.
bHadOpenPumb
==
false
&&
AllPond
.
cEastTransitPool
.
cNorthWater
.
bHadOpenPumb
==
false
)
{
bCheckStatus
=
true
;
}
}
if
(
bCheckStatus
==
false
)
{
AllPond
.
cEastTransitPool
.
vSetMaxLevel
=
dMaxLevel
;
AllPond
.
cEastTransitPool
.
vSetMinLevel
=
dMinLevel
;
pcConfig
.
WriteConfig
(
"匀浆池配置"
,
"报警最高液位"
,
AllPond
.
cEastTransitPool
.
vSetMaxLevel
.
ToString
());
pcConfig
.
WriteConfig
(
"匀浆池配置"
,
"报警最低液位"
,
AllPond
.
cEastTransitPool
.
vSetMinLevel
.
ToString
());
ModualPoll
.
vSend_Actual_Data
(
byModbusID
);
}
return
bCheckStatus
;
}
}
}
\ No newline at end of file
ModbusDemo/ModbusDemo.csproj
View file @
6de5408f
...
...
@@ -43,7 +43,7 @@
<DebugType>
full
</DebugType>
<Optimize>
false
</Optimize>
<OutputPath>
bin\Debug\
</OutputPath>
<DefineConstants>
TRACE;DEBUG;DEBUG_TEST
</DefineConstants>
<DefineConstants>
TRACE;DEBUG;DEBUG_TEST
1
</DefineConstants>
<ErrorReport>
prompt
</ErrorReport>
<WarningLevel>
4
</WarningLevel>
<Prefer32Bit>
false
</Prefer32Bit>
...
...
ModbusDemo/Modular/ModualPoll.cs
View file @
6de5408f
...
...
@@ -182,16 +182,16 @@ namespace ModbusDemo.Modular
switch
(
cx18x
.
beChannelType
[
i
,
j
])
{
case
modual
.
eX18xSensorChannelType
.
Weiertai
:
cx18x
.
sX18xDataStruct
[
i
].
dNowConvertData
[
j
]
=
8
-
((
double
.
Parse
(
sTempString
[
i
][
j
])
-
4
)
/
16
*
8
);
cx18x
.
sX18xDataStruct
[
i
].
dNowConvertData
[
j
]
=
((
double
.
Parse
(
sTempString
[
i
][
j
])
-
4
)
/
16
*
8
);
break
;
case
modual
.
eX18xSensorChannelType
.
Mike_5
:
cx18x
.
sX18xDataStruct
[
i
].
dNowConvertData
[
j
]
=
5
-
((
double
.
Parse
(
sTempString
[
i
][
j
])
-
4
)
/
16
*
5
);
cx18x
.
sX18xDataStruct
[
i
].
dNowConvertData
[
j
]
=
((
double
.
Parse
(
sTempString
[
i
][
j
])
-
4
)
/
16
*
5
);
break
;
case
modual
.
eX18xSensorChannelType
.
Mike_6
:
cx18x
.
sX18xDataStruct
[
i
].
dNowConvertData
[
j
]
=
6
-
((
double
.
Parse
(
sTempString
[
i
][
j
])
-
4
)
/
16
*
6
);
cx18x
.
sX18xDataStruct
[
i
].
dNowConvertData
[
j
]
=
((
double
.
Parse
(
sTempString
[
i
][
j
])
-
4
)
/
16
*
6
);
break
;
case
modual
.
eX18xSensorChannelType
.
Mike_7
:
cx18x
.
sX18xDataStruct
[
i
].
dNowConvertData
[
j
]
=
7
-
((
double
.
Parse
(
sTempString
[
i
][
j
])
-
4
)
/
16
*
7
);
cx18x
.
sX18xDataStruct
[
i
].
dNowConvertData
[
j
]
=
((
double
.
Parse
(
sTempString
[
i
][
j
])
-
4
)
/
16
*
7
);
break
;
case
modual
.
eX18xSensorChannelType
.
NormalCurrent
:
cx18x
.
sX18xDataStruct
[
i
].
dNowConvertData
[
j
]
=
double
.
Parse
(
sTempString
[
i
][
j
]);
...
...
@@ -544,16 +544,16 @@ namespace ModbusDemo.Modular
switch
(
cx18x
.
beChannelType
[
i
,
k
])
{
case
modual
.
eX18xSensorChannelType
.
Weiertai
:
cx18x
.
sX18xDataStruct
[
i
].
dNowConvertData
[
k
]
=
8
-
((
double
.
Parse
(
strCalculData
[
k
])
-
4
)
/
16
*
8
);
cx18x
.
sX18xDataStruct
[
i
].
dNowConvertData
[
k
]
=
((
double
.
Parse
(
strCalculData
[
k
])
-
4
)
/
16
*
8
);
break
;
case
modual
.
eX18xSensorChannelType
.
Mike_5
:
cx18x
.
sX18xDataStruct
[
i
].
dNowConvertData
[
k
]
=
5
-
((
double
.
Parse
(
strCalculData
[
k
])
-
4
)
/
16
*
5
);
cx18x
.
sX18xDataStruct
[
i
].
dNowConvertData
[
k
]
=
((
double
.
Parse
(
strCalculData
[
k
])
-
4
)
/
16
*
5
);
break
;
case
modual
.
eX18xSensorChannelType
.
Mike_6
:
cx18x
.
sX18xDataStruct
[
i
].
dNowConvertData
[
k
]
=
6
-
((
double
.
Parse
(
strCalculData
[
k
])
-
6
)
/
16
*
6
);
cx18x
.
sX18xDataStruct
[
i
].
dNowConvertData
[
k
]
=
((
double
.
Parse
(
strCalculData
[
k
])
-
6
)
/
16
*
6
);
break
;
case
modual
.
eX18xSensorChannelType
.
Mike_7
:
cx18x
.
sX18xDataStruct
[
i
].
dNowConvertData
[
k
]
=
7
-
((
double
.
Parse
(
strCalculData
[
k
])
-
4
)
/
16
*
7
);
cx18x
.
sX18xDataStruct
[
i
].
dNowConvertData
[
k
]
=
((
double
.
Parse
(
strCalculData
[
k
])
-
4
)
/
16
*
7
);
break
;
case
modual
.
eX18xSensorChannelType
.
NormalCurrent
:
cx18x
.
sX18xDataStruct
[
i
].
dNowConvertData
[
k
]
=
double
.
Parse
(
strCalculData
[
k
]);
...
...
ModbusDemo/application/AllPond.cs
View file @
6de5408f
...
...
@@ -879,5 +879,882 @@ namespace ModbusDemo.application
public
static
ModualPool
.
pcButton
cHandButton8
{
get
=>
cFeedstockHandButton8
;
set
=>
cFeedstockHandButton8
=
value
;
}
}
}
#else
public
static
class
AllPond
{
#
region
东中转池
private
static
ModualPool
.
pcTemperature
cEastTransitPoolTemper
=
new
ModualPool
.
pcTemperature
(
"EastTransitPoolTemper"
,
1
,
"d0"
);
private
static
ModualPool
.
pcLiquidlevel
cEastTransitPoolLevel
=
new
ModualPool
.
pcLiquidlevel
(
"EastTransitPoolLevel"
,
3
,
"d0"
,
"d2"
);
private
static
ModualPool
.
pcOperation
cEastTransitPoolSouthWaterBase
=
new
ModualPool
.
pcOperation
{
byModbusID
=
4
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
,
true
},
bCloseOperation
=
new
bool
[]
{
false
,
false
},
bHadRefControl
=
false
,
byResModbusID
=
0xFF
,
strResChannelNumber
=
null
};
private
static
ModualPool
.
pcMachine
cEastTransitPoolSouthWater
=
new
ModualPool
.
pcMachine
(
"EastTransitPoolSouthWater"
,
cEastTransitPoolSouthWaterBase
);
private
static
ModualPool
.
pcOperation
cEastTransitPoolNorthWaterBase
=
new
ModualPool
.
pcOperation
{
byModbusID
=
4
,
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
{
byModbusID
=
39
,
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
cEastTransitPoolPumb1
=
new
ModualPool
.
pcMachine
(
"EastTransitPoolPumb_1"
,
cEastTransitPoolPumb1Base
);
private
static
ModualPool
.
pcOperation
cEastTransitPoolPumb2Base
=
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
cEastTransitPoolPumb2
=
new
ModualPool
.
pcMachine
(
"EastTransitPoolPumb_2"
,
cEastTransitPoolPumb2Base
);
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
=
false
,
byResModbusID
=
0xFF
,
strResChannelNumber
=
null
};
private
static
ModualPool
.
pcMachine
cEastTransitPoolStirrer1
=
new
ModualPool
.
pcMachine
(
"EastTransitPoolStirrer_1"
,
cEastTransitPoolStirrer1Base
);
private
static
ModualPool
.
pcOperation
cEastTransitPoolStirrer2Base
=
new
ModualPool
.
pcOperation
{
byModbusID
=
90
,
strOperationNumber
=
"d1"
,
strChannelNumber
=
new
string
[]
{
"d1"
},
bOpenOperation
=
new
bool
[]
{
true
},
bCloseOperation
=
new
bool
[]
{
false
},
bHadRefControl
=
false
,
byResModbusID
=
0xFF
,
strResChannelNumber
=
null
};
private
static
ModualPool
.
pcMachine
cEastTransitPoolStirrer2
=
new
ModualPool
.
pcMachine
(
"EastTransitPoolStirrer_2"
,
cEastTransitPoolStirrer2Base
);
private
static
ModualPool
.
pcOperation
cEastTransitPoolStirrer3Base
=
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
cEastTransitPoolStirrer3
=
new
ModualPool
.
pcMachine
(
"EastTransitPoolStirrer_3"
,
cEastTransitPoolStirrer3Base
);
private
static
ModualPool
.
pcOperation
cEastTransitPoolStirrer4Base
=
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
cEastTransitPoolStirrer4
=
new
ModualPool
.
pcMachine
(
"EastTransitPoolStirrer_4"
,
cEastTransitPoolStirrer4Base
);
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
double
vSetMaxLevel
;
public
static
double
vSetMinLevel
;
public
static
ModualPool
.
pcTemperature
cTemper
{
get
=>
cEastTransitPoolTemper
;
set
=>
cEastTransitPoolTemper
=
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
cNorthWater
{
get
=>
cEastTransitPoolNorthWater
;
set
=>
cEastTransitPoolNorthWater
=
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
cStirrer1
{
get
=>
cEastTransitPoolStirrer1
;
set
=>
cEastTransitPoolStirrer1
=
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
cStirrer4
{
get
=>
cEastTransitPoolStirrer4
;
set
=>
cEastTransitPoolStirrer4
=
value
;
}
}
#
endregion
#
region
西中转池
private
static
ModualPool
.
pcTemperature
cWestTransitPoolTemper
=
new
ModualPool
.
pcTemperature
(
"WestTransitPoolTemper"
,
29
,
"d0"
);
private
static
ModualPool
.
pcLiquidlevel
cWestTransitPoolLevel
=
new
ModualPool
.
pcLiquidlevel
(
"WestTransitPoolLevel"
,
6
,
"d0"
,
"d1"
);
private
static
ModualPool
.
pcOperation
cWestTransitPoolSouthWaterBase
=
new
ModualPool
.
pcOperation
{
byModbusID
=
49
,
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
cWestTransitPoolSouthWater
=
new
ModualPool
.
pcMachine
(
"WestTransitPoolSouthWater"
,
cWestTransitPoolSouthWaterBase
);
private
static
ModualPool
.
pcOperation
cWestTransitPoolNorthWaterBase
=
new
ModualPool
.
pcOperation
{
byModbusID
=
49
,
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
cWestTransitPoolPumb1
=
new
ModualPool
.
pcMachine
(
"WestTransitPoolPumb_1"
,
cWestTransitPoolPumb1Base
);
private
static
ModualPool
.
pcOperation
cWestTransitPoolPumb2Base
=
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
cWestTransitPoolPumb2
=
new
ModualPool
.
pcMachine
(
"WestTransitPoolPumb_2"
,
cWestTransitPoolPumb2Base
);
private
static
ModualPool
.
pcOperation
cWestTransitPoolStirrer1Base
=
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
cWestTransitPoolStirrer1
=
new
ModualPool
.
pcMachine
(
"WestTransitPoolStirrer_1"
,
cWestTransitPoolStirrer1Base
);
private
static
ModualPool
.
pcOperation
cWestTransitPoolStirrer2Base
=
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
cWestTransitPoolStirrer2
=
new
ModualPool
.
pcMachine
(
"WestTransitPoolStirrer_2"
,
cWestTransitPoolStirrer2Base
);
private
static
ModualPool
.
pcOperation
cWestTransitPoolStirrer3Base
=
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
cWestTransitPoolStirrer3
=
new
ModualPool
.
pcMachine
(
"WestTransitPoolStirrer_3"
,
cWestTransitPoolStirrer3Base
);
private
static
ModualPool
.
pcOperation
cWestTransitPoolStirrer4Base
=
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
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
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
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
;
}
}
#
endregion
#
region
沉砂池
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
;
}
}
#
endregion
#
region
出料池
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
;
}
}
#
endregion
#
region
匀浆池
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
;
}
}
#
endregion
#
region
八角池
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
;
}
}
#
endregion
#
region
中控柜
private
static
ModualPool
.
pcButtonOperation
cFeedstockStartButton1Base
=
new
ModualPool
.
pcButtonOperation
{
byModbusID
=
47
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d4"
},
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
=
47
,
strOperationNumber
=
"d1"
,
strChannelNumber
=
new
string
[]
{
"d1"
,
"d3"
},
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
=
44
,
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
=
44
,
strOperationNumber
=
"d3"
,
strChannelNumber
=
new
string
[]
{
"d3"
,
"d4"
},
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
=
30
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d4"
},
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
=
30
,
strOperationNumber
=
"d1"
,
strChannelNumber
=
new
string
[]
{
"d1"
,
"d3"
},
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
=
22
,
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
=
22
,
strOperationNumber
=
"d3"
,
strChannelNumber
=
new
string
[]
{
"d3"
,
"d4"
},
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
=
43
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d4"
},
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
=
43
,
strOperationNumber
=
"d1"
,
strChannelNumber
=
new
string
[]
{
"d1"
,
"d3"
},
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
=
36
,
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
=
36
,
strOperationNumber
=
"d3"
,
strChannelNumber
=
new
string
[]
{
"d3"
,
"d4"
},
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
=
42
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d4"
},
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
=
42
,
strOperationNumber
=
"d1"
,
strChannelNumber
=
new
string
[]
{
"d1"
,
"d3"
},
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
=
40
,
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
=
40
,
strOperationNumber
=
"d3"
,
strChannelNumber
=
new
string
[]
{
"d3"
,
"d4"
},
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
=
48
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d4"
},
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
=
48
,
strOperationNumber
=
"d1"
,
strChannelNumber
=
new
string
[]
{
"d1"
,
"d3"
},
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
=
32
,
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
=
32
,
strOperationNumber
=
"d3"
,
strChannelNumber
=
new
string
[]
{
"d3"
,
"d4"
},
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
=
54
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d4"
},
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
=
54
,
strOperationNumber
=
"d1"
,
strChannelNumber
=
new
string
[]
{
"d1"
,
"d3"
},
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
=
15
,
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
=
15
,
strOperationNumber
=
"d3"
,
strChannelNumber
=
new
string
[]
{
"d3"
,
"d4"
},
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
=
19
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d4"
},
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
=
19
,
strOperationNumber
=
"d1"
,
strChannelNumber
=
new
string
[]
{
"d1"
,
"d3"
},
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
=
23
,
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
=
23
,
strOperationNumber
=
"d3"
,
strChannelNumber
=
new
string
[]
{
"d3"
,
"d4"
},
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
=
26
,
strOperationNumber
=
"d0"
,
strChannelNumber
=
new
string
[]
{
"d0"
,
"d4"
},
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
=
26
,
strOperationNumber
=
"d1"
,
strChannelNumber
=
new
string
[]
{
"d1"
,
"d3"
},
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
=
9
,
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
=
9
,
strOperationNumber
=
"d3"
,
strChannelNumber
=
new
string
[]
{
"d3"
,
"d4"
},
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
;
}
}
#
endregion
}
#endif
}
ModbusDemo/application/ControlMap.cs
View file @
6de5408f
...
...
@@ -7,7 +7,8 @@ using ModbusDemo.application;
using
ModbusDemo.MessageFormat
;
namespace
ModbusDemo.application
{
public
class
ControlMap
#if DEBUG_TEST
public
class
ControlMap
{
public
delegate
bool
bDelege_Handle
(
bool
[]
bControlData
);
public
static
bDelege_Handle
bDelege_Operation
;
...
...
@@ -136,4 +137,133 @@ namespace ModbusDemo.application
return
bMapStatus
;
}
}
#else
public
class
ControlMap
{
public
delegate
bool
bDelege_Handle
(
bool
[]
bControlData
);
public
static
bDelege_Handle
bDelege_Operation
;
public
static
byte
byMapIdleID
;
public
static
bool
[]
byMapIdleControlData
;
public
static
string
[]
strMapIdleChannelName
;
public
static
bool
bMap_Idle_Open_Control
(
bool
[]
bControldata
)
{
bool
[]
bControlBit
=
new
bool
[
bControldata
.
Count
()];
bool
bStatus
;
bool
bHadOperation
;
for
(
int
i
=
0
;
i
<
bControldata
.
Count
();
i
++)
{
string
str
=
"d"
+
i
.
ToString
();
for
(
int
j
=
0
;
j
<
strMapIdleChannelName
.
Count
();
j
++)
{
if
(
str
==
strMapIdleChannelName
[
j
])
{
bControlBit
[
i
]
=
true
;
bControldata
[
i
]
=
byMapIdleControlData
[
i
];
}
}
}
bStatus
=
ModualControl
.
bOperation_Machine
(
true
,
byMapIdleID
,
bControldata
,
bControlBit
,
out
bHadOperation
,
0
,
null
);
return
bStatus
;
}
public
static
bool
bMap_Idle_Close_Control
(
bool
[]
bControldata
)
{
bool
[]
bControlBit
=
new
bool
[
bControldata
.
Count
()];
bool
bStatus
;
bool
bHadOperation
;
for
(
int
i
=
0
;
i
<
bControldata
.
Count
();
i
++)
{
string
str
=
"d"
+
i
.
ToString
();
for
(
int
j
=
0
;
j
<
strMapIdleChannelName
.
Count
();
j
++)
{
if
(
str
==
strMapIdleChannelName
[
j
])
{
bControlBit
[
i
]
=
true
;
bControldata
[
i
]
=
byMapIdleControlData
[
i
];
}
}
}
bStatus
=
ModualControl
.
bOperation_Machine
(
true
,
byMapIdleID
,
bControldata
,
bControlBit
,
out
bHadOperation
,
0
,
null
);
return
bStatus
;
}
public
static
bool
bControl_Map
(
bool
bOpen
,
byte
byControlID
,
bool
[]
bControlData
,
params
string
[]
strOperationChannelName
)
{
bool
bMapStatus
=
true
;
if
(
bOpen
==
true
)
{
#
region
东中转池开映射
if
(
byControlID
==
4
&&
strOperationChannelName
[
0
]
==
"d0"
)
{
bDelege_Operation
=
AllPond
.
cEastTransitPool
.
cSouthWater
.
bOpen_Machine
;
}
else
if
(
byControlID
==
4
&&
strOperationChannelName
[
0
]
==
"d2"
)
{
bDelege_Operation
=
AllPond
.
cEastTransitPool
.
cNorthWater
.
bOpen_Machine
;
}
#
endregion
#
region
西中转池开映射
else
if
(
byControlID
==
49
&&
strOperationChannelName
[
0
]
==
"d0"
)
{
bDelege_Operation
=
AllPond
.
cWestTransitPool
.
cSouthWater
.
bOpen_Machine
;
}
else
if
(
byControlID
==
49
&&
strOperationChannelName
[
0
]
==
"d2"
)
{
bDelege_Operation
=
AllPond
.
cWestTransitPool
.
cNorthWater
.
bOpen_Machine
;
}
#
endregion
#
region
中控柜开映射和暂停映射
else
if
(
byControlID
==
47
&&
strOperationChannelName
[
0
]
==
"d0"
)
{
bDelege_Operation
=
AllPond
.
cCentralControlRoom
.
cStartButton1
.
bOpreation_Button
;
}
else
if
(
byControlID
==
44
&&
strOperationChannelName
[
0
]
==
"d0"
)
{
bDelege_Operation
=
AllPond
.
cCentralControlRoom
.
cPauseButton1
.
bOpreation_Button
;
}
#
endregion
else
{
bMapStatus
=
false
;
}
}
else
{
#
region
东中转池关映射
if
(
byControlID
==
4
&&
strOperationChannelName
[
0
]
==
"d0"
)
{
bDelege_Operation
=
AllPond
.
cEastTransitPool
.
cSouthWater
.
bClose_Machine
;
}
else
if
(
byControlID
==
4
&&
strOperationChannelName
[
0
]
==
"d2"
)
{
bDelege_Operation
=
AllPond
.
cEastTransitPool
.
cNorthWater
.
bClose_Machine
;
}
#
endregion
#
region
西中转池开映射
else
if
(
byControlID
==
49
&&
strOperationChannelName
[
0
]
==
"d0"
)
{
bDelege_Operation
=
AllPond
.
cWestTransitPool
.
cSouthWater
.
bClose_Machine
;
}
else
if
(
byControlID
==
49
&&
strOperationChannelName
[
0
]
==
"d2"
)
{
bDelege_Operation
=
AllPond
.
cWestTransitPool
.
cNorthWater
.
bClose_Machine
;
}
#
endregion
#
region
中控柜关映射和手动映射
else
if
(
byControlID
==
47
&&
strOperationChannelName
[
0
]
==
"d0"
)
{
bDelege_Operation
=
AllPond
.
cCentralControlRoom
.
cStopButton1
.
bOpreation_Button
;
}
else
if
(
byControlID
==
44
&&
strOperationChannelName
[
0
]
==
"d0"
)
{
bDelege_Operation
=
AllPond
.
cCentralControlRoom
.
cHandButton1
.
bOpreation_Button
;
}
#
endregion
else
{
bMapStatus
=
false
;
}
}
return
bMapStatus
;
}
}
#endif
}
ModbusDemo/windows/Form1.cs
View file @
6de5408f
...
...
@@ -26,7 +26,7 @@ namespace ModbusDemo
{
public
partial
class
Form1
:
Form
{
const
bool
LOCALDEBUG
=
fals
e
;
const
bool
LOCALDEBUG
=
tru
e
;
private
bool
bStart
=
false
;
AutoResetEvent
exitEvent
;
private
int
waitTime
;
...
...
@@ -1128,12 +1128,12 @@ namespace ModbusDemo
MqttReceiveThread
.
Priority
=
ThreadPriority
.
AboveNormal
;
Task
task1
=
Task
.
Factory
.
StartNew
(
async
()
=>
{
await
ModualControl
.
vControl_Res_Poll
();});
t_AutoControl
=
new
Thread
(
AtuoControl_run
)
{
IsBackground
=
true
};
t_AutoControl
.
Start
();
t_AutoControl
.
Priority
=
ThreadPriority
.
Normal
;
//
t_AutoControl = new Thread(AtuoControl_run)
//
{
//
IsBackground = true
//
};
//
t_AutoControl.Start();
//
t_AutoControl.Priority = ThreadPriority.Normal;
}
totxt
.
Log
(
DateTime
.
Now
.
ToString
()
+
" =>Open "
+
comPort
.
PortName
+
" sucessfully!"
);
await
Subscribe
();
...
...
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