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
ae9d62a8
Commit
ae9d62a8
authored
Jun 12, 2019
by
leon.huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify mqtt control
parent
7728813d
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
640 additions
and
1007 deletions
+640
-1007
ModualAlarm.cs
ModbusDemo/Common/ModualAlarm.cs
+5
-4
Totxt.cs
ModbusDemo/Common/Totxt.cs
+23
-20
ModbusComm.cs
ModbusDemo/MessageFormat/ModbusComm.cs
+290
-370
ModualControl.cs
ModbusDemo/MessageFormat/ModualControl.cs
+45
-0
mqttpacke.cs
ModbusDemo/MessageFormat/mqttpacke.cs
+0
-1
ModbusDemo.csproj
ModbusDemo/ModbusDemo.csproj
+20
-20
ModualPoll.cs
ModbusDemo/Modular/ModualPoll.cs
+76
-47
Form1.Designer.cs
ModbusDemo/windows/Form1.Designer.cs
+89
-63
Form1.cs
ModbusDemo/windows/Form1.cs
+92
-482
No files found.
ModbusDemo/Common/ModualAlarm.cs
View file @
ae9d62a8
...
@@ -12,7 +12,7 @@ namespace ModbusDemo.Common
...
@@ -12,7 +12,7 @@ namespace ModbusDemo.Common
public
static
class
ModualAlarm
public
static
class
ModualAlarm
{
{
public
const
ushort
usChannelNumber
=
8
;
public
const
ushort
usChannelNumber
=
8
;
private
const
string
sAlarmTopic
=
"Witium/WTDS78X/
20193261
/Alarm"
;
private
const
string
sAlarmTopic
=
"Witium/WTDS78X/
66666666
/Alarm"
;
public
static
string
sAlarmJson
;
public
static
string
sAlarmJson
;
public
static
string
sAlarmJsonPackage
;
public
static
string
sAlarmJsonPackage
;
//private IMqttClient mqttClient = null;
//private IMqttClient mqttClient = null;
...
@@ -24,7 +24,7 @@ namespace ModbusDemo.Common
...
@@ -24,7 +24,7 @@ namespace ModbusDemo.Common
ChannelDataRespError
=
4
,
ChannelDataRespError
=
4
,
ChannelDataChangeError
=
8
ChannelDataChangeError
=
8
}
}
public
static
void
vSetAlarmList
(
ushort
usAddress
,
ushort
[]
usChannel
,
ushort
[]
usChannelAlarmcode
,
bool
bStringIncrease
)
public
static
void
vSetAlarmList
(
ushort
usAddress
,
ushort
[]
usChannel
,
ushort
[]
usChannelAlarmcode
)
{
{
ushort
i
=
0
;
ushort
i
=
0
;
Hashtable
hMqtttAlarmMap
=
new
Hashtable
();
Hashtable
hMqtttAlarmMap
=
new
Hashtable
();
...
@@ -36,11 +36,12 @@ namespace ModbusDemo.Common
...
@@ -36,11 +36,12 @@ namespace ModbusDemo.Common
i
++;
i
++;
}
}
hMqtttAlarmMap
.
Add
(
"ts"
,
Form1
.
GetTimeStamp
());
hMqtttAlarmMap
.
Add
(
"ts"
,
Form1
.
GetTimeStamp
());
sAlarmJson
+=
JsonConvert
.
SerializeObject
(
hMqtttAlarmMap
);
if
(
sAlarmJson
!=
"["
)
if
(
bStringIncrease
==
true
)
{
{
sAlarmJson
+=
","
;
sAlarmJson
+=
","
;
}
}
sAlarmJson
+=
JsonConvert
.
SerializeObject
(
hMqtttAlarmMap
);
}
}
public
static
async
Task
vPublishAlarmPackageJson
(
IMqttClient
mqttClient
)
public
static
async
Task
vPublishAlarmPackageJson
(
IMqttClient
mqttClient
)
{
{
...
...
ModbusDemo/Common/Totxt.cs
View file @
ae9d62a8
...
@@ -13,6 +13,7 @@ namespace ModbusDemo.windows
...
@@ -13,6 +13,7 @@ namespace ModbusDemo.windows
private
string
logFile
;
private
string
logFile
;
private
StreamWriter
writer
;
private
StreamWriter
writer
;
private
FileStream
fileStream
=
null
;
private
FileStream
fileStream
=
null
;
private
static
object
oTxtLock
=
new
object
();
public
Totxt
(
string
fileName
)
public
Totxt
(
string
fileName
)
{
{
logFile
=
fileName
;
logFile
=
fileName
;
...
@@ -20,6 +21,8 @@ namespace ModbusDemo.windows
...
@@ -20,6 +21,8 @@ namespace ModbusDemo.windows
}
}
public
void
Log
(
string
info
)
public
void
Log
(
string
info
)
{
lock
(
oTxtLock
)
{
{
try
try
{
{
...
@@ -47,7 +50,7 @@ namespace ModbusDemo.windows
...
@@ -47,7 +50,7 @@ namespace ModbusDemo.windows
}
}
}
}
}
}
}
public
void
CreateDirectory
(
string
infoPath
)
public
void
CreateDirectory
(
string
infoPath
)
{
{
DirectoryInfo
directoryInfo
=
Directory
.
GetParent
(
infoPath
);
DirectoryInfo
directoryInfo
=
Directory
.
GetParent
(
infoPath
);
...
...
ModbusDemo/MessageFormat/ModbusComm.cs
View file @
ae9d62a8
...
@@ -31,6 +31,9 @@ namespace ModbusDemo.MessageFormat
...
@@ -31,6 +31,9 @@ namespace ModbusDemo.MessageFormat
public
static
ModbusMaster
Modbus
;
public
static
ModbusMaster
Modbus
;
public
static
ushort
usCommunFailTimes
=
0
;
public
static
ushort
usCommunFailTimes
=
0
;
public
static
eModbusErrorCode
Modbus_ReadHoldingRegistersTask
(
out
ushort
[]
OutputValue
,
byte
slaveAddress
,
ushort
startAddress
,
ushort
numberOfPoints
)
public
static
eModbusErrorCode
Modbus_ReadHoldingRegistersTask
(
out
ushort
[]
OutputValue
,
byte
slaveAddress
,
ushort
startAddress
,
ushort
numberOfPoints
)
{
object
oLock
=
new
object
();
lock
(
oLock
)
{
{
eModbusErrorCode
ModbusErrorCode
;
eModbusErrorCode
ModbusErrorCode
;
try
try
...
@@ -46,7 +49,7 @@ namespace ModbusDemo.MessageFormat
...
@@ -46,7 +49,7 @@ namespace ModbusDemo.MessageFormat
if
(
exception
.
Source
.
Equals
(
"System"
))
if
(
exception
.
Source
.
Equals
(
"System"
))
{
{
Console
.
WriteLine
(
DateTime
.
Now
.
ToString
()
+
" "
+
exception
.
Message
);
Console
.
WriteLine
(
DateTime
.
Now
.
ToString
()
+
" "
+
exception
.
Message
);
Form1
.
totxt
.
Log
(
DateTime
.
Now
.
ToString
()
+
" "
+
exception
.
Message
+
"Modbus_ReadHoldingRegistersTask"
);
Form1
.
totxt
.
Log
(
DateTime
.
Now
.
ToString
()
+
" "
+
exception
.
Message
+
"Modbus_ReadHoldingRegistersTask"
);
OutputValue
=
new
ushort
[
numberOfPoints
];
OutputValue
=
new
ushort
[
numberOfPoints
];
ModbusErrorCode
=
eModbusErrorCode
.
MB_ETIMEDOUT
;
ModbusErrorCode
=
eModbusErrorCode
.
MB_ETIMEDOUT
;
usCommunFailTimes
++;
usCommunFailTimes
++;
...
@@ -111,7 +114,11 @@ namespace ModbusDemo.MessageFormat
...
@@ -111,7 +114,11 @@ namespace ModbusDemo.MessageFormat
}
}
return
ModbusErrorCode
;
return
ModbusErrorCode
;
}
}
}
public
static
eModbusErrorCode
Modbus_ReadCoilsTask
(
out
bool
[]
OutputValue
,
byte
slaveAddress
,
ushort
startAddress
,
ushort
numberOfPoints
)
public
static
eModbusErrorCode
Modbus_ReadCoilsTask
(
out
bool
[]
OutputValue
,
byte
slaveAddress
,
ushort
startAddress
,
ushort
numberOfPoints
)
{
object
oLock
=
new
object
();
lock
(
oLock
)
{
{
eModbusErrorCode
ModbusErrorCode
;
eModbusErrorCode
ModbusErrorCode
;
try
try
...
@@ -127,7 +134,7 @@ namespace ModbusDemo.MessageFormat
...
@@ -127,7 +134,7 @@ namespace ModbusDemo.MessageFormat
if
(
exception
.
Source
.
Equals
(
"System"
))
if
(
exception
.
Source
.
Equals
(
"System"
))
{
{
Console
.
WriteLine
(
DateTime
.
Now
.
ToString
()
+
" "
+
exception
.
Message
);
Console
.
WriteLine
(
DateTime
.
Now
.
ToString
()
+
" "
+
exception
.
Message
);
Form1
.
totxt
.
Log
(
DateTime
.
Now
.
ToString
()
+
" "
+
exception
.
Message
+
"Modbus_ReadCoilsTask"
);
Form1
.
totxt
.
Log
(
DateTime
.
Now
.
ToString
()
+
" "
+
exception
.
Message
+
"Modbus_ReadCoilsTask"
);
OutputValue
=
new
bool
[
numberOfPoints
];
OutputValue
=
new
bool
[
numberOfPoints
];
ModbusErrorCode
=
eModbusErrorCode
.
MB_ETIMEDOUT
;
ModbusErrorCode
=
eModbusErrorCode
.
MB_ETIMEDOUT
;
usCommunFailTimes
++;
usCommunFailTimes
++;
...
@@ -192,7 +199,11 @@ namespace ModbusDemo.MessageFormat
...
@@ -192,7 +199,11 @@ namespace ModbusDemo.MessageFormat
}
}
return
ModbusErrorCode
;
return
ModbusErrorCode
;
}
}
}
public
static
eModbusErrorCode
Modbus_WriteSingleCoil
(
byte
slaveAddress
,
ushort
startAddress
,
bool
[]
value
)
public
static
eModbusErrorCode
Modbus_WriteSingleCoil
(
byte
slaveAddress
,
ushort
startAddress
,
bool
[]
value
)
{
object
oLock
=
new
object
();
lock
(
oLock
)
{
{
eModbusErrorCode
ModbusErrorCode
;
eModbusErrorCode
ModbusErrorCode
;
try
try
...
@@ -208,8 +219,9 @@ namespace ModbusDemo.MessageFormat
...
@@ -208,8 +219,9 @@ namespace ModbusDemo.MessageFormat
if
(
exception
.
Source
.
Equals
(
"System"
))
if
(
exception
.
Source
.
Equals
(
"System"
))
{
{
Console
.
WriteLine
(
DateTime
.
Now
.
ToString
()
+
" "
+
exception
.
Message
);
Console
.
WriteLine
(
DateTime
.
Now
.
ToString
()
+
" "
+
exception
.
Message
);
Form1
.
totxt
.
Log
(
DateTime
.
Now
.
ToString
()
+
" "
+
exception
.
Message
+
"Modbus_WriteSingleCoil"
);
Form1
.
totxt
.
Log
(
DateTime
.
Now
.
ToString
()
+
" "
+
exception
.
Message
+
"Modbus_WriteSingleCoil"
);
ModbusErrorCode
=
eModbusErrorCode
.
MB_ETIMEDOUT
;
ModbusErrorCode
=
eModbusErrorCode
.
MB_ETIMEDOUT
;
usCommunFailTimes
++;
}
}
//The server return error code.
//The server return error code.
//You can get the function code and exception code.
//You can get the function code and exception code.
...
@@ -270,7 +282,11 @@ namespace ModbusDemo.MessageFormat
...
@@ -270,7 +282,11 @@ namespace ModbusDemo.MessageFormat
}
}
return
ModbusErrorCode
;
return
ModbusErrorCode
;
}
}
}
public
static
eModbusErrorCode
Modbus_WriteMultipleCoils
(
byte
slaveAddress
,
ushort
startAddress
,
bool
[]
data
)
public
static
eModbusErrorCode
Modbus_WriteMultipleCoils
(
byte
slaveAddress
,
ushort
startAddress
,
bool
[]
data
)
{
object
oLock
=
new
object
();
lock
(
oLock
)
{
{
eModbusErrorCode
ModbusErrorCode
;
eModbusErrorCode
ModbusErrorCode
;
try
try
...
@@ -286,8 +302,9 @@ namespace ModbusDemo.MessageFormat
...
@@ -286,8 +302,9 @@ namespace ModbusDemo.MessageFormat
if
(
exception
.
Source
.
Equals
(
"System"
))
if
(
exception
.
Source
.
Equals
(
"System"
))
{
{
Console
.
WriteLine
(
DateTime
.
Now
.
ToString
()
+
" "
+
exception
.
Message
);
Console
.
WriteLine
(
DateTime
.
Now
.
ToString
()
+
" "
+
exception
.
Message
);
Form1
.
totxt
.
Log
(
DateTime
.
Now
.
ToString
()
+
" "
+
exception
.
Message
+
"Modbus_WriteMultipleCoils"
);
Form1
.
totxt
.
Log
(
DateTime
.
Now
.
ToString
()
+
" "
+
exception
.
Message
+
"Modbus_WriteMultipleCoils"
);
ModbusErrorCode
=
eModbusErrorCode
.
MB_ETIMEDOUT
;
ModbusErrorCode
=
eModbusErrorCode
.
MB_ETIMEDOUT
;
usCommunFailTimes
++;
}
}
//The server return error code.
//The server return error code.
//You can get the function code and exception code.
//You can get the function code and exception code.
...
@@ -348,103 +365,6 @@ namespace ModbusDemo.MessageFormat
...
@@ -348,103 +365,6 @@ namespace ModbusDemo.MessageFormat
}
}
return
ModbusErrorCode
;
return
ModbusErrorCode
;
}
}
//private void Init_Read_data()
}
//{
//}
//private async void Modbus_polling()
//{
// float EastTemperature = 0;
// float Easternwaterlevel = 0;
// float WestWaterLevel = 0;
//ushort[] temperature = { };
//ushort[] type = { };
//string[] vs = { };
//string[] s = { };
//string[] s6 = { };
//ushort[] register = { };
//ushort[] Inputtype = { };
//ushort[] registerN = { };
//ushort[] InputtypeN = { };
//bool[] EIO = { };
//bool[] SIO = { };
//bool[] WIO = { };
//int[] EOnOff = { 0 };
//int[] SOnOff = { 0 };
//int[] WOnOff = { 0 };
//pcDeviceAlarm pcDeviceAlarmdata = new pcDeviceAlarm();
//Modbus_ReadHoldingRegistersTask(out temperature, 1, 0, 4, out int signT);
//Modbus_ReadHoldingRegistersTask(out type, 1, 10, 4, out int sign);
//UInt64 time_1 = Form1.GetTimeStamp();
//Modbus_ReadHoldingRegistersTask(out register, 3, 0, 8, out int signr);
//Modbus_ReadHoldingRegistersTask(out Inputtype, 3, 10, 8, out int signI);
//UInt64 time_2 = Form1.GetTimeStamp();
//Modbus_ReadHoldingRegistersTask(out registerN, 6, 0, 8, out int signre);
//Modbus_ReadHoldingRegistersTask(out InputtypeN, 6, 10, 8, out int signIn);
//UInt64 time_3 = Form1.GetTimeStamp();
//Modbus_ReadCoilsTask(out EIO, 5, 16, 6, out int signE);
//Modbus_ReadCoilsTask(out SIO, 8, 16, 6, out int signS);
//Modbus_ReadCoilsTask(out WIO, 4, 16, 6, out int signW);
//if (sign == -1)
//{
// ushort bAddress = 1;
// ushort[] bChannel = new ushort[pcDeviceAlarm.usChannelNumber];
// pcDeviceAlarm.eAlarmCode[] eAlarmCode = new pcDeviceAlarm.eAlarmCode[pcDeviceAlarm.usChannelNumber];
// for (ushort i = 0; i < pcDeviceAlarm.usChannelNumber; i++)
// {
// eAlarmCode[i] = pcDeviceAlarm.eAlarmCode.CommunError;
// }
// pcDeviceAlarmdata.vSetAlarmList(bAddress, bChannel, eAlarmCode);
// await pcDeviceAlarmdata.vPublishAlarmPackageJson(mqttClient);
//}
//if (sign == -1 || signT ==-1|| signW ==-1 || signr == -1 || signI == -1 || signre == -1 || signIn == -1 || signE == -1 || signS == -1)
//{
// vs = null;
// type = null;
// EastTemperature = 0;
// Easternwaterlevel = 0;
// WestWaterLevel = 0;
//}
//else
//{
//vs = rtd.RtdValue(temperature, type);
//EastTemperature = float.Parse(vs[0]);
//s = Analog.Value(register, Inputtype);
//Easternwaterlevel = (float.Parse(s[0]) - 4) / 16 * 6;
//s6 = Analog.Value(registerN, InputtypeN);
//WestWaterLevel = (float.Parse(s6[0]) - 4) / 16 * 6;
//label3.Text = EastTemperature.ToString();
//label4.Text = Easternwaterlevel.ToString();
//EOnOff = state.IO(EIO);////东中转池
//SOnOff = state.IO(SIO);////西中转池
//WOnOff = state.IO(WIO); ////东南北水
//}
//WTDR14P x = new WTDR14P("1", EastTemperature, 0, 0, 0, time_1);
//WTDR18X p = new WTDR18X("3", Easternwaterlevel, 0, 0, 0, 0, 0, 0, 0, time_2);
//WTDR18X q = new WTDR18X("6", WestWaterLevel, 0, 0, 0, 0, 0, 0, 0, time_3);
////东搅拌
//WTDR66C EastStir = new WTDR66C("5", EOnOff[0], EOnOff[1], EOnOff[2], EOnOff[3], EOnOff[4], EOnOff[5], Form1.GetTimeStamp());
////东南北水
//WTDR66C WestStir = new WTDR66C("4", WOnOff[0], WOnOff[1], WOnOff[2], WOnOff[3], WOnOff[4], WOnOff[5], Form1.GetTimeStamp());
////西搅拌
//WTDR66C SouthWater = new WTDR66C("8", SOnOff[0], SOnOff[1], SOnOff[2], SOnOff[3], SOnOff[4], SOnOff[5], Form1.GetTimeStamp());
// mqttData = "[" +
// JsonConvert.SerializeObject(x) + "," +
// JsonConvert.SerializeObject(p) + "," +
// JsonConvert.SerializeObject(q) + "," +
// JsonConvert.SerializeObject(EastStir) + "," +
// JsonConvert.SerializeObject(WestStir) + "," +
// JsonConvert.SerializeObject(SouthWater)
// + "]";
//}
}
}
}
}
ModbusDemo/MessageFormat/ModualControl.cs
0 → 100644
View file @
ae9d62a8
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
MQTTnet
;
using
MQTTnet.Client
;
using
Newtonsoft.Json
;
namespace
ModbusDemo.MessageFormat
{
public
class
ModualControl
{
public
class
Op
{
public
UInt64
duration
{
get
;
set
;
}
public
UInt64
startTime
{
get
;
set
;}
public
int
d0
{
get
;
set
;
}
public
int
d1
{
get
;
set
;
}
public
int
d2
{
get
;
set
;
}
public
int
d3
{
get
;
set
;
}
public
int
d4
{
get
;
set
;
}
public
int
d5
{
get
;
set
;
}
public
int
d6
{
get
;
set
;
}
public
int
d7
{
get
;
set
;
}
public
UInt64
ts
{
get
;
set
;
}
}
public
class
SsItem
{
public
string
addr
{
get
;
set
;
}
public
Op
op
{
get
;
set
;
}
}
public
class
MqttRoot
{
public
string
taskId
{
get
;
set
;
}
public
List
<
SsItem
>
ss
{
get
;
set
;
}
}
public
static
List
<
MqttRoot
>
liModuualControl
=
new
List
<
MqttRoot
>();
public
static
void
vGetaWay_Receive_Control
(
string
sDataString
)
{
MqttRoot
cControl
=
JsonConvert
.
DeserializeObject
<
MqttRoot
>(
sDataString
);
}
}
}
ModbusDemo/MessageFormat/mqttpacke.cs
View file @
ae9d62a8
...
@@ -132,7 +132,6 @@ namespace ModbusDemo
...
@@ -132,7 +132,6 @@ namespace ModbusDemo
}
}
public
class
Ctrl
public
class
Ctrl
{
{
public
string
taskId
;
public
string
taskId
;
public
void
settaskId
(
string
taskId
)
public
void
settaskId
(
string
taskId
)
{
{
...
...
ModbusDemo/ModbusDemo.csproj
View file @
ae9d62a8
...
@@ -2,6 +2,20 @@
...
@@ -2,6 +2,20 @@
<Project
ToolsVersion=
"12.0"
DefaultTargets=
"Build"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<Project
ToolsVersion=
"12.0"
DefaultTargets=
"Build"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<PropertyGroup>
<PropertyGroup>
<SSDTUnitTestPath
Condition=
"'$(SSDTUnitTestPath)' == ''"
>
$(VsInstallRoot)\Common7\IDE\Extensions\Microsoft\SQLDB
</SSDTUnitTestPath>
<SSDTUnitTestPath
Condition=
"'$(SSDTUnitTestPath)' == ''"
>
$(VsInstallRoot)\Common7\IDE\Extensions\Microsoft\SQLDB
</SSDTUnitTestPath>
<PublishUrl>
publish\
</PublishUrl>
<Install>
true
</Install>
<InstallFrom>
Disk
</InstallFrom>
<UpdateEnabled>
false
</UpdateEnabled>
<UpdateMode>
Foreground
</UpdateMode>
<UpdateInterval>
7
</UpdateInterval>
<UpdateIntervalUnits>
Days
</UpdateIntervalUnits>
<UpdatePeriodically>
false
</UpdatePeriodically>
<UpdateRequired>
false
</UpdateRequired>
<MapFileExtensions>
true
</MapFileExtensions>
<ApplicationRevision>
0
</ApplicationRevision>
<ApplicationVersion>
1.0.0.%2a
</ApplicationVersion>
<UseApplicationTrust>
false
</UseApplicationTrust>
<BootstrapperEnabled>
true
</BootstrapperEnabled>
</PropertyGroup>
</PropertyGroup>
<PropertyGroup>
<PropertyGroup>
<SSDTPath
Condition=
"'$(SSDTPath)' == ''"
>
$(VsInstallRoot)\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\130
</SSDTPath>
<SSDTPath
Condition=
"'$(SSDTPath)' == ''"
>
$(VsInstallRoot)\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\130
</SSDTPath>
...
@@ -22,20 +36,6 @@
...
@@ -22,20 +36,6 @@
<FileAlignment>
512
</FileAlignment>
<FileAlignment>
512
</FileAlignment>
<IsWebBootstrapper>
false
</IsWebBootstrapper>
<IsWebBootstrapper>
false
</IsWebBootstrapper>
<TargetFrameworkProfile
/>
<TargetFrameworkProfile
/>
<PublishUrl>
publish\
</PublishUrl>
<Install>
true
</Install>
<InstallFrom>
Disk
</InstallFrom>
<UpdateEnabled>
false
</UpdateEnabled>
<UpdateMode>
Foreground
</UpdateMode>
<UpdateInterval>
7
</UpdateInterval>
<UpdateIntervalUnits>
Days
</UpdateIntervalUnits>
<UpdatePeriodically>
false
</UpdatePeriodically>
<UpdateRequired>
false
</UpdateRequired>
<MapFileExtensions>
true
</MapFileExtensions>
<ApplicationRevision>
0
</ApplicationRevision>
<ApplicationVersion>
1.0.0.%2a
</ApplicationVersion>
<UseApplicationTrust>
false
</UseApplicationTrust>
<BootstrapperEnabled>
true
</BootstrapperEnabled>
</PropertyGroup>
</PropertyGroup>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "
>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "
>
<PlatformTarget>
x86
</PlatformTarget>
<PlatformTarget>
x86
</PlatformTarget>
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
<DebugType>
full
</DebugType>
<DebugType>
full
</DebugType>
<Optimize>
false
</Optimize>
<Optimize>
false
</Optimize>
<OutputPath>
bin\Debug\
</OutputPath>
<OutputPath>
bin\Debug\
</OutputPath>
<DefineConstants>
DEBUG;TRACE
</DefineConstants>
<DefineConstants>
TRACE;DEBUG;DEBUG_TEST
</DefineConstants>
<ErrorReport>
prompt
</ErrorReport>
<ErrorReport>
prompt
</ErrorReport>
<WarningLevel>
4
</WarningLevel>
<WarningLevel>
4
</WarningLevel>
<Prefer32Bit>
false
</Prefer32Bit>
<Prefer32Bit>
false
</Prefer32Bit>
...
@@ -78,7 +78,6 @@
...
@@ -78,7 +78,6 @@
<HintPath>
..\packages\NModbus4.2.1.0\lib\net40\NModbus4.dll
</HintPath>
<HintPath>
..\packages\NModbus4.2.1.0\lib\net40\NModbus4.dll
</HintPath>
</Reference>
</Reference>
<Reference
Include=
"System"
/>
<Reference
Include=
"System"
/>
<Reference
Include=
"System.Core"
/>
<Reference
Include=
"System.Xml.Linq"
/>
<Reference
Include=
"System.Xml.Linq"
/>
<Reference
Include=
"System.Data.DataSetExtensions"
/>
<Reference
Include=
"System.Data.DataSetExtensions"
/>
<Reference
Include=
"Microsoft.CSharp"
/>
<Reference
Include=
"Microsoft.CSharp"
/>
...
@@ -94,6 +93,7 @@
...
@@ -94,6 +93,7 @@
<Compile
Include=
"application\Pond.cs"
/>
<Compile
Include=
"application\Pond.cs"
/>
<Compile
Include=
"application\UsThread.cs"
/>
<Compile
Include=
"application\UsThread.cs"
/>
<Compile
Include=
"Common\ModualAlarm.cs"
/>
<Compile
Include=
"Common\ModualAlarm.cs"
/>
<Compile
Include=
"MessageFormat\ModualControl.cs"
/>
<Compile
Include=
"MessageFormat\ModbusComm.cs"
/>
<Compile
Include=
"MessageFormat\ModbusComm.cs"
/>
<Compile
Include=
"Modular\414P.cs"
/>
<Compile
Include=
"Modular\414P.cs"
/>
<Compile
Include=
"Modular\478C.cs"
/>
<Compile
Include=
"Modular\478C.cs"
/>
...
...
ModbusDemo/Modular/ModualPoll.cs
View file @
ae9d62a8
This diff is collapsed.
Click to expand it.
ModbusDemo/windows/Form1.Designer.cs
View file @
ae9d62a8
This diff is collapsed.
Click to expand it.
ModbusDemo/windows/Form1.cs
View file @
ae9d62a8
This diff is collapsed.
Click to expand it.
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