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
0b293b14
Commit
0b293b14
authored
May 30, 2019
by
leon.huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add one pools Data and Control
parent
7f3365ba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
268 additions
and
64 deletions
+268
-64
ModbusToPool.cs
ModbusDemo/application/ModbusToPool.cs
+54
-2
PoolModbusSet.cs
ModbusDemo/application/PoolModbusSet.cs
+214
-62
No files found.
ModbusDemo/application/ModbusToPool.cs
View file @
0b293b14
...
@@ -27,9 +27,10 @@ namespace ModbusDemo.application
...
@@ -27,9 +27,10 @@ namespace ModbusDemo.application
this
.
bOpenStatus
[
i
]
=
bInitOPen
[
i
];
this
.
bOpenStatus
[
i
]
=
bInitOPen
[
i
];
}
}
}
}
public
void
vGet_Module_Channel_Status
()
public
bool
[]
vGet_Module_Channel_Status
()
{
{
ModbusComm
.
Modbus_ReadCoilsTask
(
out
this
.
bGetStatus
,
this
.
byModbusID
,
this
.
usRegAddList
[
0
],
(
ushort
)
this
.
usRegAddList
.
Length
,
out
this
.
bCommunicationStatus
);
ModbusComm
.
Modbus_ReadCoilsTask
(
out
this
.
bGetStatus
,
this
.
byModbusID
,
this
.
usRegAddList
[
0
],
(
ushort
)
this
.
usRegAddList
.
Length
,
out
this
.
bCommunicationStatus
);
return
this
.
bGetStatus
;
}
}
public
void
vSet_Module_Channel_Status
()
public
void
vSet_Module_Channel_Status
()
{
{
...
@@ -52,9 +53,60 @@ namespace ModbusDemo.application
...
@@ -52,9 +53,60 @@ namespace ModbusDemo.application
}
}
}
}
public
void
vRead_Pumb_Data
()
public
double
vRead_Pumb_Data
()
{
ModbusComm
.
Modbus_ReadHoldingRegistersTask
(
out
this
.
usReadData
,
this
.
byModbusID
,
this
.
usRegAddList
[
0
],
(
ushort
)
this
.
usRegAddList
.
Length
,
out
this
.
bCommunicationStatus
);
return
this
.
usReadData
[
0
];
}
}
public
class
pcModbusOperationAgitator
{
public
byte
byModbusID
;
public
ushort
[]
usRegAddList
;
public
bool
[]
bGetStatus
;
public
bool
[]
bSetStatus
;
public
bool
[]
bOpenStatus
;
public
bool
bCommunicationStatus
;
public
pcModbusOperationAgitator
(
byte
byInitModbusID
,
ushort
[]
usInitRegAddressInit
,
bool
[]
bInitOPen
)
{
this
.
byModbusID
=
byInitModbusID
;
for
(
int
i
=
0
;
i
<
usInitRegAddressInit
.
Length
;
i
++)
{
this
.
usRegAddList
[
i
]
=
usInitRegAddressInit
[
i
];
this
.
bOpenStatus
[
i
]
=
bInitOPen
[
i
];
}
}
public
bool
[]
vGet_Module_Channel_Status
()
{
ModbusComm
.
Modbus_ReadCoilsTask
(
out
this
.
bGetStatus
,
this
.
byModbusID
,
this
.
usRegAddList
[
0
],
(
ushort
)
this
.
usRegAddList
.
Length
,
out
this
.
bCommunicationStatus
);
return
this
.
bGetStatus
;
}
public
void
vSet_Module_Channel_Status
()
{
ModbusComm
.
Modbus_WriteMultipleCoils
(
this
.
byModbusID
,
this
.
usRegAddList
[
0
],
this
.
bSetStatus
,
out
this
.
bCommunicationStatus
);
}
}
public
class
pcReadAgitatorOtherData
{
public
byte
byModbusID
;
public
ushort
[]
usRegAddList
;
public
ushort
[]
usReadData
;
public
bool
bCommunicationStatus
;
public
pcReadAgitatorOtherData
(
byte
byInitModbusID
,
ushort
[]
usInitRegAddressInit
)
{
this
.
byModbusID
=
byInitModbusID
;
for
(
int
i
=
0
;
i
<
usInitRegAddressInit
.
Length
;
i
++)
{
this
.
usRegAddList
[
i
]
=
usInitRegAddressInit
[
i
];
}
}
public
double
vRead_Agitator_Data
()
{
{
ModbusComm
.
Modbus_ReadHoldingRegistersTask
(
out
this
.
usReadData
,
this
.
byModbusID
,
this
.
usRegAddList
[
0
],
(
ushort
)
this
.
usRegAddList
.
Length
,
out
this
.
bCommunicationStatus
);
ModbusComm
.
Modbus_ReadHoldingRegistersTask
(
out
this
.
usReadData
,
this
.
byModbusID
,
this
.
usRegAddList
[
0
],
(
ushort
)
this
.
usRegAddList
.
Length
,
out
this
.
bCommunicationStatus
);
return
this
.
usReadData
[
0
];
}
}
}
}
...
...
ModbusDemo/application/PoolModbusSet.cs
View file @
0b293b14
...
@@ -8,9 +8,9 @@ namespace ModbusDemo.application
...
@@ -8,9 +8,9 @@ namespace ModbusDemo.application
{
{
public
struct
psTemperData
public
struct
psTemperData
{
{
public
byte
byModbusID
;
public
byte
byModbusID
;
public
ushort
usTemperRegAddress
;
public
ushort
usTemperRegAddress
;
public
ushort
usTypeRegAddress
;
public
ushort
usTypeRegAddress
;
public
psTemperData
(
byte
bySetModbusID
,
ushort
usSetTempRegAddress
,
ushort
usSetRegAddress
)
public
psTemperData
(
byte
bySetModbusID
,
ushort
usSetTempRegAddress
,
ushort
usSetRegAddress
)
{
{
this
.
byModbusID
=
bySetModbusID
;
this
.
byModbusID
=
bySetModbusID
;
...
@@ -19,40 +19,69 @@ namespace ModbusDemo.application
...
@@ -19,40 +19,69 @@ namespace ModbusDemo.application
}
}
}
}
public
struct
ps
Bump
Data
public
struct
ps
Level
Data
{
{
public
byte
byModbusID
;
public
byte
byModbusID
;
public
ushort
[]
usRegAddList
;
public
ushort
[]
usDataAddressList
;
public
bool
[]
bOpenStatus
;
public
ushort
[]
usTypeAddressList
;
public
psBumpData
(
byte
byInitModbusID
,
ushort
[]
usInitRegAddressInit
,
bool
[]
bInitOPen
)
public
psLevelData
(
byte
byInitModbusID
,
ushort
[]
usDataRegAddress
,
ushort
[]
usDataTypeRegAddress
)
{
this
.
byModbusID
=
byInitModbusID
;
this
.
usDataAddressList
=
usDataRegAddress
;
this
.
usTypeAddressList
=
usDataTypeRegAddress
;
}
}
public
struct
psBumpOperation
{
public
byte
byModbusID
;
public
ushort
[]
usRegAddList
;
public
bool
[]
bOpenStatus
;
public
psBumpOperation
(
byte
byInitModbusID
,
ushort
[]
usInitRegAddressInit
,
bool
[]
bInitOPen
)
{
{
this
.
byModbusID
=
byInitModbusID
;
this
.
byModbusID
=
byInitModbusID
;
this
.
usRegAddList
=
usInitRegAddressInit
;
this
.
usRegAddList
=
usInitRegAddressInit
;
this
.
bOpenStatus
=
bInitOPen
;
this
.
bOpenStatus
=
bInitOPen
;
}
}
}
}
public
struct
psLevel
public
struct
psPumbData
{
{
public
byte
byModbusID
;
public
byte
byModbusID
;
public
ushort
[]
usDataAddressList
;
public
ushort
[]
usRegAddList
;
public
ushort
[]
usTypeAddressList
;
public
psPumbData
(
byte
byInitModbusID
,
ushort
[]
usInitRegAddressInit
)
public
psLevel
(
byte
byInitModbusID
,
ushort
[]
usDataRegAddress
,
ushort
[]
usDataTypeRegAddress
)
{
{
this
.
byModbusID
=
byInitModbusID
;
this
.
byModbusID
=
byInitModbusID
;
this
.
usDataAddressList
=
usDataRegAddress
;
this
.
usRegAddList
=
usInitRegAddressInit
;
this
.
usTypeAddressList
=
usDataTypeRegAddress
;
}
}
}
}
//public struct psPumbPeration
public
struct
psAgitatorOperation
//{
{
// byte byInitModbusID, ushort[] usInitRegAddressInit, bool[] bInitOPen
public
byte
byModbusID
;
public
ushort
[]
usRegAddList
;
//}
public
bool
[]
bOpenStatus
;
public
psAgitatorOperation
(
byte
byInitModbusID
,
ushort
[]
usInitRegAddressInit
,
bool
[]
bInitOPen
)
{
this
.
byModbusID
=
byInitModbusID
;
this
.
usRegAddList
=
usInitRegAddressInit
;
this
.
bOpenStatus
=
bInitOPen
;
}
}
static
class
pcPoolInit
public
struct
psAgitatorData
{
{
private
static
psTemperData
sTemper
=
new
psTemperData
(
1
,
2
,
3
);
public
byte
byModbusID
;
public
ushort
[]
usRegAddList
;
public
psAgitatorData
(
byte
byInitModbusID
,
ushort
[]
usInitRegAddressInit
)
{
this
.
byModbusID
=
byInitModbusID
;
this
.
usRegAddList
=
usInitRegAddressInit
;
}
}
static
class
pcPoolInit
{
private
static
psTemperData
sTemper
=
new
psTemperData
(
1
,
1
,
10
);
private
static
ModbusToPool
.
pcPoolTemperature
cPoolTemperature
=
new
ModbusToPool
.
pcPoolTemperature
(
sTemper
.
byModbusID
,
sTemper
.
usTemperRegAddress
,
sTemper
.
usTypeRegAddress
);
private
static
ModbusToPool
.
pcPoolTemperature
cPoolTemperature
=
new
ModbusToPool
.
pcPoolTemperature
(
sTemper
.
byModbusID
,
sTemper
.
usTemperRegAddress
,
sTemper
.
usTypeRegAddress
);
public
static
double
Get_Current_temper
()
public
static
double
Get_Current_temper
()
{
{
...
@@ -60,69 +89,192 @@ namespace ModbusDemo.application
...
@@ -60,69 +89,192 @@ namespace ModbusDemo.application
cPoolTemperature
.
vRead_Pumb_Type
();
cPoolTemperature
.
vRead_Pumb_Type
();
return
cPoolTemperature
.
usReadData
[
0
];
return
cPoolTemperature
.
usReadData
[
0
];
}
}
public
const
sbyte
PoolBumpNumber
=
4
;
static
ushort
[]
Data
=
{
12
,
4
};
public
const
sbyte
PoolLevelNumber
=
1
;
static
bool
[]
Regdat
=
{
true
,
false
};
static
ushort
[]
usLevelDataReg
=
{
1
};
private
static
psBumpData
psBumpData
=
new
psBumpData
(
1
,
Data
,
Regdat
);
static
ushort
[]
usLevelTypeReg
=
{
16
};
private
static
psLevelData
sLevelData
=
new
psLevelData
(
1
,
usLevelDataReg
,
usLevelTypeReg
);
private
static
ModbusToPool
.
pcPoolLevel
[]
cPoolLevel
=
new
ModbusToPool
.
pcPoolLevel
[]
{
new
ModbusToPool
.
pcPoolLevel
(
sLevelData
.
byModbusID
,
sLevelData
.
usDataAddressList
,
sLevelData
.
usTypeAddressList
)
};
public
static
double
Get_Current_Level
()
{
ushort
usPoolLevel
=
0
;
sbyte
NormalDataNumber
=
0
;
for
(
short
i
=
0
;
i
<
cPoolLevel
.
Length
;
i
++)
{
cPoolLevel
[
i
].
vRead_Level_Data
();
cPoolLevel
[
i
].
vRead_Level_Type
();
if
(
cPoolLevel
[
i
].
bCommunicationStatus
=
true
&&
(
cPoolLevel
[
i
].
usReadData
[
0
]
>=
1
&&
cPoolLevel
[
i
].
usReadData
[
0
]
>=
7
)
&&
cPoolLevel
[
i
].
usReadType
[
0
]
==
1
)
{
usPoolLevel
+=
cPoolLevel
[
i
].
usReadData
[
0
];
NormalDataNumber
++;
}
}
return
usPoolLevel
/
NormalDataNumber
;
}
public
static
ModbusToPool
.
pcModbusOperationPumb
[]
cPumb
=
new
ModbusToPool
.
pcModbusOperationPumb
[
PoolBumpNumber
]
{
new
ModbusToPool
.
pcModbusOperationPumb
(
psBumpData
.
byModbusID
,
psBumpData
.
usRegAddList
,
psBumpData
.
bOpenStatus
),
public
const
sbyte
PoolBumpOperatNumber
=
1
;
new
ModbusToPool
.
pcModbusOperationPumb
(
psBumpData
.
byModbusID
,
psBumpData
.
usRegAddList
,
psBumpData
.
bOpenStatus
)
,
static
ushort
[]
usBumpOperatReg
=
{
16
,
17
};
new
ModbusToPool
.
pcModbusOperationPumb
(
psBumpData
.
byModbusID
,
psBumpData
.
usRegAddList
,
psBumpData
.
bOpenStatus
)
,
static
bool
[]
usBumpOpenStatus
=
{
true
,
false
};
new
ModbusToPool
.
pcModbusOperationPumb
(
psBumpData
.
byModbusID
,
psBumpData
.
usRegAddList
,
psBumpData
.
bOpenStatus
)
private
static
psBumpOperation
psBumpData
=
new
psBumpOperation
(
2
,
usBumpOperatReg
,
usBumpOpenStatus
);
};
public
static
ModbusToPool
.
pcModbusOperationPumb
[]
cPumbOperat
=
new
ModbusToPool
.
pcModbusOperationPumb
[
PoolBumpOperatNumber
]
{
new
ModbusToPool
.
pcModbusOperationPumb
(
psBumpData
.
byModbusID
,
psBumpData
.
usRegAddList
,
psBumpData
.
bOpenStatus
)
};
//public static void vBumpSetting()
public
const
sbyte
PoolBumpCurrentNumber
=
1
;
//{
static
ushort
[]
usBumpCurrentDataReg
=
{
1
};
// cPumb[0].vGet_Module_Channel_Status();
private
static
psPumbData
psBumpReadCurrentData
=
new
psPumbData
(
3
,
usBumpCurrentDataReg
);
public
static
ModbusToPool
.
pcReadPumbOtherData
[]
cPumbCurrent
=
new
ModbusToPool
.
pcReadPumbOtherData
[
PoolBumpCurrentNumber
]
{
new
ModbusToPool
.
pcReadPumbOtherData
(
psBumpReadCurrentData
.
byModbusID
,
psBumpReadCurrentData
.
usRegAddList
)
};
//}
public
const
sbyte
PoolBumpVoltageNumber
=
1
;
static
ushort
[]
usBumpVoltageReg
=
{
1
};
private
static
psPumbData
psBumpReadVoltageData
=
new
psPumbData
(
4
,
usBumpVoltageReg
);
public
static
ModbusToPool
.
pcReadPumbOtherData
[]
cPumbVoltage
=
new
ModbusToPool
.
pcReadPumbOtherData
[
PoolBumpCurrentNumber
]
{
new
ModbusToPool
.
pcReadPumbOtherData
(
psBumpReadVoltageData
.
byModbusID
,
psBumpReadVoltageData
.
usRegAddList
)
};
public
const
sbyte
PoolAgitatorOperatNumber
=
1
;
static
ushort
[]
usAgitatorOperatReg
=
{
16
,
17
};
static
bool
[]
usAgitatorOpenStatus
=
{
true
,
true
};
private
static
psAgitatorOperation
psAgitatorData
=
new
psAgitatorOperation
(
5
,
usAgitatorOperatReg
,
usAgitatorOpenStatus
);
public
static
ModbusToPool
.
pcModbusOperationAgitator
[]
cAgitatorOperat
=
new
ModbusToPool
.
pcModbusOperationAgitator
[
PoolBumpOperatNumber
]
{
new
ModbusToPool
.
pcModbusOperationAgitator
(
psBumpData
.
byModbusID
,
psAgitatorData
.
usRegAddList
,
psAgitatorData
.
bOpenStatus
)
};
public
const
sbyte
PoolAgitatorCurrentNumber
=
1
;
static
ushort
[]
usAgitatorCurrentDataReg
=
{
1
};
private
static
psAgitatorData
psAgitatorReadCurrentData
=
new
psAgitatorData
(
6
,
usAgitatorCurrentDataReg
);
public
static
ModbusToPool
.
pcReadAgitatorOtherData
[]
cAgitatorCurrent
=
new
ModbusToPool
.
pcReadAgitatorOtherData
[
PoolAgitatorCurrentNumber
]
{
new
ModbusToPool
.
pcReadAgitatorOtherData
(
psAgitatorReadCurrentData
.
byModbusID
,
psAgitatorReadCurrentData
.
usRegAddList
)
};
public
const
sbyte
PoolAgitatorVoltageNumber
=
1
;
static
ushort
[]
usAgitatorVoltageReg
=
{
1
};
private
static
psAgitatorData
psAgitatorReadVoltageData
=
new
psAgitatorData
(
7
,
usAgitatorVoltageReg
);
public
static
ModbusToPool
.
pcReadAgitatorOtherData
[]
cAgitatorVoltage
=
new
ModbusToPool
.
pcReadAgitatorOtherData
[
PoolBumpCurrentNumber
]
{
new
ModbusToPool
.
pcReadAgitatorOtherData
(
psAgitatorReadVoltageData
.
byModbusID
,
psAgitatorReadVoltageData
.
usRegAddList
)
};
}
}
public
class
pc
Agitator
public
class
pc
Bump
{
{
private
double
[]
dBumpCurrent
;
private
double
[]
dBumpCurrent
=
new
double
[
pcPoolInit
.
PoolBumpCurrentNumber
]
{
pcPoolInit
.
cPumbCurrent
[
0
].
vRead_Pumb_Data
()};
public
double
dBumpVoltage
;
public
double
[]
dBumpVoltage
=
new
double
[
pcPoolInit
.
PoolBumpVoltageNumber
]
{
pcPoolInit
.
cPumbVoltage
[
0
].
vRead_Pumb_Data
()}
;
public
bool
bBumpStatus
;
public
bool
[]
bBumpStatus
=
new
bool
[
pcPoolInit
.
PoolBumpOperatNumber
]
;
public
bool
bAgitatorHasOpen
;
public
bool
[]
bpcBumpHasOpen
=
new
bool
[
pcPoolInit
.
PoolBumpOperatNumber
]
;
public
double
[]
DBumpCurrent
=
new
double
[
pcPoolInit
.
PoolBumpNumber
]
{
pcPoolInit
.
cPumb
[
0
].
byModbusID
,
pcPoolInit
.
cPumb
[
0
].
byModbusID
,
pcPoolInit
.
cPumb
[
0
].
byModbusID
,
pcPoolInit
.
cPumb
[
0
].
byModbusID
};
public
void
vOpen_
Agitator
(
)
public
void
vOpen_
Bump
(
ushort
usPumbNumber
)
{
{
try
{
pcPoolInit
.
cPumbOperat
[
usPumbNumber
].
bSetStatus
=
pcPoolInit
.
cPumbOperat
[
usPumbNumber
].
bOpenStatus
;
pcPoolInit
.
cPumbOperat
[
usPumbNumber
].
vSet_Module_Channel_Status
();
this
.
bBumpStatus
[
usPumbNumber
]
=
pcPoolInit
.
cPumbOperat
[
usPumbNumber
].
bCommunicationStatus
;
this
.
bpcBumpHasOpen
[
usPumbNumber
]
=
true
;
}
catch
(
Exception
exception
)
{
Form1
.
totxt
.
Log
(
"Bump Open Operation Error"
);
throw
;
}
}
}
public
void
vClose_
Agitator
(
)
public
void
vClose_
Bump
(
ushort
usPumbNumber
)
{
{
try
{
for
(
short
i
=
0
;
i
<
pcPoolInit
.
cPumbOperat
[
usPumbNumber
].
bSetStatus
.
Length
;
i
++)
{
pcPoolInit
.
cPumbOperat
[
usPumbNumber
].
bSetStatus
[
i
]
=
!
pcPoolInit
.
cPumbOperat
[
usPumbNumber
].
bSetStatus
[
i
];
this
.
bBumpStatus
[
usPumbNumber
]
=
pcPoolInit
.
cPumbOperat
[
usPumbNumber
].
bCommunicationStatus
;
this
.
bpcBumpHasOpen
[
usPumbNumber
]
=
false
;
}
pcPoolInit
.
cPumbOperat
[
usPumbNumber
].
vSet_Module_Channel_Status
();
}
catch
(
Exception
exception
)
{
Form1
.
totxt
.
Log
(
"Bump Close Operation Error"
);
throw
;
}
}
}
public
void
vGet_Agitator_Status
(
)
public
bool
[]
vGet_Pumb_Status
(
ushort
usPumbNumber
)
{
{
try
{
return
pcPoolInit
.
cPumbOperat
[
usPumbNumber
].
vGet_Module_Channel_Status
();
}
catch
(
Exception
exception
)
{
Form1
.
totxt
.
Log
(
"Bump Read Status Error"
);
throw
;
}
}
}
}
}
public
class
pcPoolConfig
{
public
class
pcPool
public
class
pcAgitator
{
{
public
pePondName
ePondName
;
private
double
[]
dAgitatorCurrent
=
new
double
[
pcPoolInit
.
PoolAgitatorCurrentNumber
]
{
pcPoolInit
.
cAgitatorCurrent
[
0
].
vRead_Agitator_Data
()
};
public
double
[]
dAgitatorVoltage
=
new
double
[
pcPoolInit
.
PoolAgitatorVoltageNumber
]
{
pcPoolInit
.
cAgitatorVoltage
[
0
].
vRead_Agitator_Data
()
};
public
bool
[]
bAgitatorStatus
=
new
bool
[
pcPoolInit
.
PoolBumpOperatNumber
];
public
bool
[]
bAgitatorHasOpen
=
new
bool
[
pcPoolInit
.
PoolBumpOperatNumber
];
public
double
dMaxlevel
;
//液位最低水位
public
double
dMinlevel
;
//液位最高水位
public
double
dMaxTemper
;
public
void
vOpen_Bump
(
ushort
usAgitatorNumber
)
public
double
dMinTemper
;
{
try
{
pcPoolInit
.
cAgitatorOperat
[
usAgitatorNumber
].
bSetStatus
=
pcPoolInit
.
cAgitatorOperat
[
usAgitatorNumber
].
bOpenStatus
;
pcPoolInit
.
cAgitatorOperat
[
usAgitatorNumber
].
vSet_Module_Channel_Status
();
this
.
bAgitatorStatus
[
usAgitatorNumber
]
=
pcPoolInit
.
cAgitatorOperat
[
usAgitatorNumber
].
bCommunicationStatus
;
this
.
bAgitatorHasOpen
[
usAgitatorNumber
]
=
true
;
}
catch
(
Exception
exception
)
{
Form1
.
totxt
.
Log
(
"Agitator Open Operation Error"
);
throw
;
}
}
public
void
vClose_Bump
(
ushort
usAgitatorNumber
)
{
try
{
for
(
short
i
=
0
;
i
<
pcPoolInit
.
cAgitatorOperat
[
usAgitatorNumber
].
bSetStatus
.
Length
;
i
++)
{
pcPoolInit
.
cAgitatorOperat
[
usAgitatorNumber
].
bSetStatus
[
i
]
=
!
pcPoolInit
.
cAgitatorOperat
[
usAgitatorNumber
].
bSetStatus
[
i
];
this
.
bAgitatorStatus
[
usAgitatorNumber
]
=
pcPoolInit
.
cAgitatorOperat
[
usAgitatorNumber
].
bCommunicationStatus
;
this
.
bAgitatorHasOpen
[
usAgitatorNumber
]
=
false
;
}
pcPoolInit
.
cAgitatorOperat
[
usAgitatorNumber
].
vSet_Module_Channel_Status
();
}
catch
(
Exception
exception
)
{
Form1
.
totxt
.
Log
(
"Agitator Close Operation Error"
);
throw
;
}
}
public
pcPump
[]
cPump
;
public
bool
[]
vGet_Pumb_Status
(
ushort
usAgitatorNumber
)
public
pcAgitator
[]
cAgitator
;
{
public
double
dPondCurrentLevel
;
try
public
double
dPondCurentTemper
{
get
=>
pcPoolInit
.
Get_Current_temper
();
}
{
public
pcPool
(
pePondName
eInitPondName
)
return
pcPoolInit
.
cAgitatorOperat
[
usAgitatorNumber
].
vGet_Module_Channel_Status
();
}
catch
(
Exception
exception
)
{
{
this
.
ePondName
=
eInitPondName
;
Form1
.
totxt
.
Log
(
"Agitator Read Status Error"
);
throw
;
}
}
}
}
public
class
pcPool
{
public
string
ePondName
;
public
double
dMaxlevel
;
//液位最低水位
public
double
dMinlevel
;
//液位最高水位
public
double
dMaxTemper
;
public
double
dMinTemper
;
public
pcPump
cPump
;
public
pcAgitator
cAgitator
;
public
double
dPondCurrentLevel
{
get
=>
pcPoolInit
.
Get_Current_Level
();
}
public
double
dPondCurentTemper
{
get
=>
pcPoolInit
.
Get_Current_temper
();
}
public
pcPool
(
string
eInitPondName
)
{
this
.
ePondName
=
eInitPondName
;
}
}
}
}
...
...
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