Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
G
GC_Branch
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
周磊
GC_Branch
Commits
6ab7294e
Commit
6ab7294e
authored
Jul 26, 2018
by
wangjunqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复组分越界的bug
parent
2ad631d4
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
480 additions
and
225 deletions
+480
-225
GCModbusSlave.cs
GcDevicePc/Common/GCModbusSlave.cs
+474
-218
DataState.cs
GcDevicePc/DataState.cs
+1
-1
GcDataTh.cs
GcDevicePc/ProThread/GcDataTh.cs
+0
-1
HMISearch.cs
GcDevicePc/ProThread/HMISearch.cs
+2
-2
Program.cs
GcDevicePc/Program.cs
+1
-1
RestartHmi.cs
GcDevicePc/RestartHmi.cs
+2
-2
No files found.
GcDevicePc/Common/GCModbusSlave.cs
View file @
6ab7294e
...
...
@@ -89,224 +89,480 @@ namespace GcDevicePc.Common
fnLibModbusSlaveHoldingRegister
(
hModbusHandle
,
MySlaveReadHoldingRegister
,
MySlaveWriteHoldingRegister
,
startaddr
,
nreg
);
}
static
ushort
slavereadhreg
(
ushort
address
)
{
ushort
value
=
0
;
ushort
signalddress
=
17
;
ushort
baseaddress
=
23
;
address
=
(
ushort
)
(
address
-
1
);
int
listnum
=
SharedSpace
.
Data
.
listValue
.
Count
;
if
(
address
>=
17
)
{
ushort
[]
s
=
new
ushort
[
2
];
float
[]
f
=
new
float
[
2
];
if
(
address
>=
17
&&
address
<=
22
)
{
if
(
address
==
17
||
address
==
18
)
f
[
0
]
=
float
.
Parse
(
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
fDetValue
.
ToString
(
"0.000"
));
if
(
address
==
19
||
address
==
20
)
f
[
0
]
=
float
.
Parse
(
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
iDetValue
.
ToString
(
"0.000"
));
if
(
address
==
21
||
address
==
22
)
f
[
0
]
=
float
.
Parse
(
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
bDetValue
.
ToString
(
"0.000"
));
Buffer
.
BlockCopy
(
f
,
2
,
s
,
0
,
2
);
Buffer
.
BlockCopy
(
f
,
0
,
s
,
2
,
2
);
value
=
s
[(
address
-
signalddress
)
%
2
];
}
else
if
(
address
>=
23
&&
listnum
>
0
)
{
int
readnum
=
(
address
-
baseaddress
)
/
2
;
f
[
0
]
=
float
.
Parse
(
SharedSpace
.
Data
.
listValue
[
readnum
].
vale
.
ToString
());
Buffer
.
BlockCopy
(
f
,
2
,
s
,
0
,
2
);
Buffer
.
BlockCopy
(
f
,
0
,
s
,
2
,
2
);
value
=
s
[(
address
-
baseaddress
)
%
2
];
}
else
{
value
=
0
;
}
}
if
(
address
>=
2
&&
address
<
20
)
{
switch
(
address
)
{
case
2
:
{
value
=
(
ushort
)
SharedSpace
.
Data
.
typesint
;
}
break
;
case
3
:
{
value
=
SharedSpace
.
Data
.
change
==
true
?
(
ushort
)
1
:
(
ushort
)
0
;
}
break
;
case
4
:
{
value
=
globaldata
.
m_hmibuffer
.
gcinfo
.
HMIMac
[
0
];
}
break
;
case
5
:
{
value
=
globaldata
.
m_hmibuffer
.
gcinfo
.
HMIMac
[
1
];
}
break
;
case
6
:
{
value
=
globaldata
.
m_hmibuffer
.
gcinfo
.
HMIMac
[
2
];
}
break
;
case
7
:
//设备联机状态
{
value
=
(
ushort
)
(
globaldata
.
m_hmibuffer
.
gcinfo
.
hmioffline
?
1
:
0
);
}
break
;
case
8
:
//HMI状态
{
value
=
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
;
}
break
;
case
9
:
//前进样口
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16InjPortFront
==
1
)
{
value
=
(
ushort
)
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPActualTemp
*
10
);
}
else
{
value
=
0
;
}
}
break
;
case
10
:
//后进样口
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16InjPortBehind
==
1
)
{
value
=
(
ushort
)
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
BPActualTemp
*
10
);
}
else
{
value
=
0
;
}
}
break
;
case
11
:
// 柱箱
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16Col
==
1
)
{
value
=
(
ushort
)
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
ColActualTemp
*
10
);
}
else
{
value
=
0
;
}
}
break
;
case
12
:
//前检测器
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16InjPortFront
==
1
)
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetFrontType
==
0
)
{
value
=
(
ushort
)
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
fDetActualTemp
*
10
);
}
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetFrontType
==
1
)
{
value
=
(
ushort
)
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
fDetActualTemp
*
10
);
}
else
{
value
=
0
;
}
}
else
{
value
=
0
;
}
}
break
;
case
13
:
//中检测器
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInter
==
1
)
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInterType
==
0
)
{
value
=
(
ushort
)
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
iDetActualTemp
*
10
);
}
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInterType
==
1
)
{
value
=
(
ushort
)
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
iDetActualTemp
*
10
);
}
else
{
value
=
0
;
}
}
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16AuxHeater1
==
1
)
{
value
=
(
ushort
)
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
AuxActualTemp1
*
10
);
}
else
{
value
=
0
;
}
}
break
;
case
14
:
//后检测器
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetBehind
==
1
)
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetBehindType
==
0
)
{
value
=
(
ushort
)
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
bDetActualTemp
*
10
);
}
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetBehindType
==
1
)
{
value
=
(
ushort
)
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
bDetActualTemp
*
10
);
}
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16AuxHeater2
==
1
)
{
value
=
(
ushort
)
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
AuxActualTemp2
*
10
);
}
else
{
value
=
0
;
}
}
else
{
value
=
0
;
}
}
break
;
case
15
:
//前点火信号
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetFrontType
==
1
)
{
value
=
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
fDetStatue
;
}
else
{
value
=
0
;
}
}
break
;
case
16
:
//后点火信号
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInterType
==
1
)
{
value
=
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
fDetStatue
;
}
else
{
value
=
0
;
}
}
break
;
}
}
return
value
;
}
static
ushort
slavereadhreg
(
ushort
address
)
{
ushort
value
=
0
;
ushort
signalddress
=
17
;
ushort
baseaddress
=
23
;
address
=
(
ushort
)(
address
-
1
);
int
listnum
=
SharedSpace
.
Data
.
listValue
.
Count
;
if
(
address
>=
17
)
{
ushort
[]
s
=
new
ushort
[
2
];
float
[]
f
=
new
float
[
2
];
if
(
address
>=
17
&&
address
<=
22
)
{
if
(
address
==
17
||
address
==
18
)
f
[
0
]
=
float
.
Parse
(
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
fDetValue
.
ToString
(
"0.000"
));
if
(
address
==
19
||
address
==
20
)
f
[
0
]
=
float
.
Parse
(
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
iDetValue
.
ToString
(
"0.000"
));
if
(
address
==
21
||
address
==
22
)
f
[
0
]
=
float
.
Parse
(
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
bDetValue
.
ToString
(
"0.000"
));
Buffer
.
BlockCopy
(
f
,
2
,
s
,
0
,
2
);
Buffer
.
BlockCopy
(
f
,
0
,
s
,
2
,
2
);
value
=
s
[(
address
-
signalddress
)
%
2
];
}
else
if
(
address
>=
23
&&
listnum
>
0
)
{
int
readnum
=
(
address
-
baseaddress
)
/
2
;
if
(
readnum
<=
listnum
-
1
)
{
f
[
0
]
=
float
.
Parse
(
SharedSpace
.
Data
.
listValue
[
readnum
].
vale
.
ToString
());
Buffer
.
BlockCopy
(
f
,
2
,
s
,
0
,
2
);
Buffer
.
BlockCopy
(
f
,
0
,
s
,
2
,
2
);
value
=
s
[(
address
-
baseaddress
)
%
2
];
}
else
{
value
=
0
;
}
}
else
{
value
=
0
;
}
}
if
(
address
>=
2
&&
address
<
20
)
{
switch
(
address
)
{
case
2
:
{
value
=
(
ushort
)
SharedSpace
.
Data
.
typesint
;
}
break
;
case
3
:
{
value
=
SharedSpace
.
Data
.
change
==
true
?
(
ushort
)
1
:
(
ushort
)
0
;
}
break
;
case
4
:
{
value
=
globaldata
.
m_hmibuffer
.
gcinfo
.
HMIMac
[
0
];
}
break
;
case
5
:
{
value
=
globaldata
.
m_hmibuffer
.
gcinfo
.
HMIMac
[
1
];
}
break
;
case
6
:
{
value
=
globaldata
.
m_hmibuffer
.
gcinfo
.
HMIMac
[
2
];
}
break
;
case
7
:
//设备联机状态
{
value
=
(
ushort
)(
globaldata
.
m_hmibuffer
.
gcinfo
.
hmioffline
?
1
:
0
);
}
break
;
case
8
:
//HMI状态
{
value
=
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
;
}
break
;
case
9
:
//前进样口
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16InjPortFront
==
1
)
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPActualTemp
*
10
);
}
else
{
value
=
0
;
}
}
break
;
case
10
:
//后进样口
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16InjPortBehind
==
1
)
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
BPActualTemp
*
10
);
}
else
{
value
=
0
;
}
}
break
;
case
11
:
// 柱箱
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16Col
==
1
)
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
ColActualTemp
*
10
);
}
else
{
value
=
0
;
}
}
break
;
case
12
:
//前检测器
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16InjPortFront
==
1
)
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetFrontType
==
0
)
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
fDetActualTemp
*
10
);
}
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetFrontType
==
1
)
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
fDetActualTemp
*
10
);
}
else
{
value
=
0
;
}
}
else
{
value
=
0
;
}
}
break
;
case
13
:
//中检测器
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInter
==
1
)
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInterType
==
0
)
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
iDetActualTemp
*
10
);
}
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInterType
==
1
)
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
iDetActualTemp
*
10
);
}
else
{
value
=
0
;
}
}
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16AuxHeater1
==
1
)
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
AuxActualTemp1
*
10
);
}
else
{
value
=
0
;
}
}
break
;
case
14
:
//后检测器
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetBehind
==
1
)
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetBehindType
==
0
)
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
bDetActualTemp
*
10
);
}
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetBehindType
==
1
)
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
bDetActualTemp
*
10
);
}
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16AuxHeater2
==
1
)
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
AuxActualTemp2
*
10
);
}
else
{
value
=
0
;
}
}
else
{
value
=
0
;
}
}
break
;
case
15
:
//前点火信号
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetFrontType
==
1
)
{
value
=
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
fDetStatue
;
}
else
{
value
=
0
;
}
}
break
;
case
16
:
//后点火信号
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInterType
==
1
)
{
value
=
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
fDetStatue
;
}
else
{
value
=
0
;
}
}
break
;
}
}
return
value
;
}
//static ushort slavereadhreg(ushort address)
//{
// ushort value = 0;
// ushort baseaddress = 20;
// address = (ushort)(address - 1);
// int listnum = SharedSpace.Data.listValue.Count;
// int readnum = (address - baseaddress) / 2;
// if (readnum <= listnum - 1 && listnum > 0 && address >= 20)
// {
// // lock(CKVocAnalyzer.GlobalCKV.valueparamlist){
// try
// {
// ushort[] s = new ushort[2];
// float[] f = new float[2];
// {
// f[0] = float.Parse(SharedSpace.Data.listValue[readnum].vale.ToString());
// Buffer.BlockCopy(f, 2, s, 0, 2);
// Buffer.BlockCopy(f, 0, s, 2, 2);
// }
// value = s[(address - baseaddress) % 2];
// }
// catch
// {
// }
// //}
// }
// if (address >= 2 && address < 20)
// {
// switch (address)
// {
// case 2:
// {
// value = (ushort)SharedSpace.Data.typesint;
// }
// break;
// case 3:
// {
// value = SharedSpace.Data.change == true ? (ushort)1 : (ushort)0;
// }
// break;
// case 4:
// {
// value = globaldata.m_hmibuffer.gcinfo.HMIMac[0];
// }
// break;
// case 5:
// {
// value = globaldata.m_hmibuffer.gcinfo.HMIMac[1];
// }
// break;
// case 6:
// {
// value = globaldata.m_hmibuffer.gcinfo.HMIMac[2];
// }
// break;
// case 7: //设备联机状态
// {
// value = (ushort)(globaldata.m_hmibuffer.gcinfo.hmioffline ? 1 : 0);
// }
// break;
// case 8: //HMI状态
// {
// value = globaldata.m_hmibuffer.gcinfo.methodstatus;
// }
// break;
// case 9: //前进样口
// {
// if (CProfileDevice.m_DevParam.syspara.u16InjPortFront == 1)
// {
// value = (ushort)(globaldata.m_dpbuffer.ShowList.showtemp.FPActualTemp * 10);
// }
// else
// {
// value = 0;
// }
// }
// break;
// case 10: //后进样口
// {
// if (CProfileDevice.m_DevParam.syspara.u16InjPortBehind == 1)
// {
// value = (ushort)(globaldata.m_dpbuffer.ShowList.showtemp.BPActualTemp * 10);
// }
// else
// {
// value = 0;
// }
// }
// break;
// case 11: // 柱箱
// {
// if (CProfileDevice.m_DevParam.syspara.u16Col == 1)
// {
// value = (ushort)(globaldata.m_dpbuffer.ShowList.showtemp.ColActualTemp * 10);
// }
// else
// {
// value = 0;
// }
// }
// break;
// case 12: //前检测器
// {
// if (CProfileDevice.m_DevParam.syspara.u16InjPortFront == 1)
// {
// if (CProfileDevice.m_DevParam.syspara.u16DetFrontType == 0)
// {
// value = (ushort)(globaldata.m_dpbuffer.ShowList.showtemp.fDetActualTemp * 10);
// }
// else if (CProfileDevice.m_DevParam.syspara.u16DetFrontType == 1)
// {
// value = (ushort)(globaldata.m_dpbuffer.ShowList.showtemp.fDetActualTemp * 10);
// }
// else
// {
// value = 0;
// }
// }
// else
// {
// value = 0;
// }
// }
// break;
// case 13: //中检测器
// {
// if (CProfileDevice.m_DevParam.syspara.u16DetInter == 1)
// {
// if (CProfileDevice.m_DevParam.syspara.u16DetInterType == 0)
// {
// value = (ushort)(globaldata.m_dpbuffer.ShowList.showtemp.iDetActualTemp * 10);
// }
// else if (CProfileDevice.m_DevParam.syspara.u16DetInterType == 1)
// {
// value = (ushort)(globaldata.m_dpbuffer.ShowList.showtemp.iDetActualTemp * 10);
// }
// else
// {
// value = 0;
// }
// }
// else if (CProfileDevice.m_DevParam.syspara.u16AuxHeater1 == 1)
// {
// value = (ushort)(globaldata.m_dpbuffer.ShowList.showtemp.AuxActualTemp1 * 10);
// }
// else
// {
// value = 0;
// }
// }
// break;
// case 14: //后检测器
// {
// if (CProfileDevice.m_DevParam.syspara.u16DetBehind == 1)
// {
// if (CProfileDevice.m_DevParam.syspara.u16DetBehindType == 0)
// {
// value = (ushort)(globaldata.m_dpbuffer.ShowList.showtemp.bDetActualTemp * 10);
// }
// else if (CProfileDevice.m_DevParam.syspara.u16DetBehindType == 1)
// {
// value = (ushort)(globaldata.m_dpbuffer.ShowList.showtemp.bDetActualTemp * 10);
// }
// else if (CProfileDevice.m_DevParam.syspara.u16AuxHeater2 == 1)
// {
// value = (ushort)(globaldata.m_dpbuffer.ShowList.showtemp.AuxActualTemp2 * 10);
// }
// else
// {
// value = 0;
// }
// }
// else
// {
// value = 0;
// }
// }
// break;
// case 15: //前点火信号
// {
// if (CProfileDevice.m_DevParam.syspara.u16DetFrontType == 1)
// {
// value = globaldata.m_dpbuffer.ShowList.showDet.fDetStatue;
// }
// else
// {
// value = 0;
// }
// }
// break;
// case 16: //后点火信号
// {
// if (CProfileDevice.m_DevParam.syspara.u16DetInterType == 1)
// {
// value = globaldata.m_dpbuffer.ShowList.showDet.fDetStatue;
// }
// else
// {
// value = 0;
// }
// }
// break;
// case 17: //前检测器值
// {
// if (CProfileDevice.m_DevParam.syspara.u16DetFront == 1)
// {
// value = (ushort)(globaldata.m_dpbuffer.ShowList.showDet.fDetValue * 1000);
// }
// else
// {
// value = 0;
// }
// }
// break;
// case 18: //中检测器值
// {
// if (CProfileDevice.m_DevParam.syspara.u16DetInter == 1)
// {
// value = (ushort)(globaldata.m_dpbuffer.ShowList.showDet.iDetValue * 1000);
// }
// else
// {
// value = 0;
// }
// }
// break;
// case 19: //后检测器值
// {
// if (CProfileDevice.m_DevParam.syspara.u16DetBehind == 1)
// {
// value = (ushort)(globaldata.m_dpbuffer.ShowList.showDet.bDetValue * 1000);
// }
// else
// {
// value = 0;
// }
// }
// break;
// }
// }
// return value;
//}
static
void
slavewirtehreg
(
ushort
address
,
ushort
value
)
{
...
...
GcDevicePc/DataState.cs
View file @
6ab7294e
...
...
@@ -110,7 +110,7 @@ namespace GcDevicePc
tempshow
.
Text
=
"运行时间/总时间"
;
if
(
globaldata
.
MethodRun_Statue
==
4
||
globaldata
.
MethodRun_Statue
==
5
)
// tempshow.SubItems.Add((globaldata.RunTime_Now/60.0f).ToString("0.0") + "/" + (globaldata.RunTotal_Now/60.0f).ToString("0.0"));
tempshow
.
SubItems
.
Add
((
globaldata
.
m_dpbuffer
.
ShowList
.
showtime
.
runtimenow
/
60.0f
).
ToString
(
"0.0
"
)
+
"/"
+
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtime
.
alltime
/
60.0f
).
ToString
(
"0.
0"
));
tempshow
.
SubItems
.
Add
((
globaldata
.
m_dpbuffer
.
ShowList
.
showtime
.
runtimenow
/
60.0f
).
ToString
(
"0.0
0"
)
+
"/"
+
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtime
.
alltime
/
60.0f
).
ToString
(
"0.0
0"
));
else
tempshow
.
SubItems
.
Add
(
"未运行"
);
...
...
GcDevicePc/ProThread/GcDataTh.cs
View file @
6ab7294e
...
...
@@ -849,6 +849,5 @@ namespace GcDevicePc.ProThread
}
}
}
}
GcDevicePc/ProThread/HMISearch.cs
View file @
6ab7294e
...
...
@@ -106,8 +106,8 @@ namespace GcDevicePc.ProThread
try
{
client
=
new
UdpClient
(
new
IPEndPoint
(
IPAddress
.
Any
,
0
));
//
client = new UdpClient(new IPEndPoint(IPAddress.Parse(this._localip), 0));
//
client = new UdpClient(new IPEndPoint(IPAddress.Any, 0));
client
=
new
UdpClient
(
new
IPEndPoint
(
IPAddress
.
Parse
(
this
.
_localip
),
0
));
endpoint
=
new
IPEndPoint
(
IPAddress
.
Parse
(
"255.255.255.255"
),
233
);
// endpoint = new IPEndPoint(IPAddress.Parse("192.168.10.230"), 233);
client
.
Send
(
sendBytes
,
sendBytes
.
Length
,
endpoint
);
...
...
GcDevicePc/Program.cs
View file @
6ab7294e
...
...
@@ -13,7 +13,7 @@ namespace GcDevicePc
Application
.
SetCompatibleTextRenderingDefault
(
false
);
bool
createNew
;
// Application.Run(new DebugForm());
{
using
(
System
.
Threading
.
Mutex
mutex
=
new
System
.
Threading
.
Mutex
(
true
,
Application
.
ProductName
,
out
createNew
))
{
...
...
GcDevicePc/RestartHmi.cs
View file @
6ab7294e
...
...
@@ -21,9 +21,9 @@ namespace GcDevicePc
{
int
ret
=
1
;
FileServerClient
singlesend
=
new
FileServerClient
();
singlesend
.
WtClientInit
(
"192.168.1
0.230
"
,
911
);
singlesend
.
WtClientInit
(
"192.168.1
.88
"
,
911
);
ret
=
singlesend
.
WtHMICloseRro
(
"WtMainProc"
);
if
(
ret
==
1
)
//
if (ret == 1)
{
MessageBox
.
Show
(
"停止HMI成功!"
);
ret
=
singlesend
.
WtHMIRunPro
(
"GcDevice.exe"
,
globaldata
.
exeremoteFolder
);
...
...
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