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
129cc874
Commit
129cc874
authored
Jul 01, 2019
by
liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
根据林工通信协议修改slave,修改了部分界面,添加了对校零标阀开关问题的逻辑,修改校标零时的问题。
parent
00cc97e1
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
1850 additions
and
437 deletions
+1850
-437
AboutForm.cs
GcDevicePc/AboutForm.cs
+1
-1
App.config
GcDevicePc/App.config
+36
-36
InfoBarUser.cs
GcDevicePc/CK_UI/InfoBarUser.cs
+30
-21
GCModbusSlave.cs
GcDevicePc/Common/GCModbusSlave.cs
+37
-36
NModbusSlave.cs
GcDevicePc/Common/NModbusSlave.cs
+845
-44
MethodMain.cs
GcDevicePc/ConfigMethod/MethodMain.cs
+1
-1
IPPIP.Designer.cs
GcDevicePc/ConfigMethod/injectionport/IPPIP.Designer.cs
+20
-2
IPPIP.cs
GcDevicePc/ConfigMethod/injectionport/IPPIP.cs
+3
-2
PrompBox.cs
GcDevicePc/Controls/PrompBox.cs
+1
-1
DataState.cs
GcDevicePc/DataState.cs
+4
-4
Auxiliary.cs
GcDevicePc/DeviceConfigUI/Auxiliary.cs
+4
-1
ConfigDevice.cs
GcDevicePc/DeviceConfigUI/ConfigDevice.cs
+3
-2
FormUser.Designer.cs
GcDevicePc/FormUser.Designer.cs
+0
-1
FormUser.cs
GcDevicePc/FormUser.cs
+22
-20
GCMethodConfig.cs
GcDevicePc/GCBuffer/GCMethodConfig.cs
+10
-1
HMIBuffer.cs
GcDevicePc/GCBuffer/HMIBuffer.cs
+28
-4
MDIBase.Designer.cs
GcDevicePc/MDIBase.Designer.cs
+1
-1
MDIBase.cs
GcDevicePc/MDIBase.cs
+142
-115
MainForm.Designer.cs
GcDevicePc/MainForm.Designer.cs
+1
-1
GcDataTh.cs
GcDevicePc/ProThread/GcDataTh.cs
+2
-2
HMIControl.cs
GcDevicePc/ProThread/HMIControl.cs
+480
-7
SignalDataToHw.cs
GcDevicePc/ProThread/SignalDataToHw.cs
+1
-1
Program.cs
GcDevicePc/Program.cs
+10
-25
Settings.Designer.cs
GcDevicePc/Properties/Settings.Designer.cs
+1
-1
RunTables.Designer.cs
GcDevicePc/RunTables.Designer.cs
+14
-14
StartForm.cs
GcDevicePc/StartForm.cs
+0
-1
TestForm.Designer.cs
GcDevicePc/TestForm.Designer.cs
+36
-27
TestForm.cs
GcDevicePc/TestForm.cs
+9
-13
TestForm.resx
GcDevicePc/TestForm.resx
+3
-0
auxtool.Designer.cs
GcDevicePc/auxtool.Designer.cs
+90
-49
auxtool.cs
GcDevicePc/auxtool.cs
+12
-1
globaldata.cs
GcDevicePc/globaldata.cs
+3
-2
No files found.
GcDevicePc/AboutForm.cs
View file @
129cc874
...
@@ -42,7 +42,7 @@ namespace GcDevicePc
...
@@ -42,7 +42,7 @@ namespace GcDevicePc
this
.
fid1ver
.
Text
=
this
.
FID1version
;
this
.
fid1ver
.
Text
=
this
.
FID1version
;
this
.
fid2ver
.
Text
=
this
.
FID2version
;
this
.
fid2ver
.
Text
=
this
.
FID2version
;
this
.
tcdver
.
Text
=
this
.
TCD1version
;
this
.
tcdver
.
Text
=
this
.
TCD1version
;
this
.
PCver
.
Text
=
this
.
Hmiversion
+
"/1.5.
4
"
;
this
.
PCver
.
Text
=
this
.
Hmiversion
+
"/1.5.
5
"
;
}
}
}
}
}
}
GcDevicePc/App.config
View file @
129cc874
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
configuration
>
<
configuration
>
<
configSections
>
<
configSections
>
<
section
name
=
"log4net"
type
=
"log4net.Config.Log4NetConfigurationSectionHandler, log4net"
/>
<
section
name
=
"log4net"
type
=
"log4net.Config.Log4NetConfigurationSectionHandler, log4net"
/>
</
configSections
>
</
configSections
>
<
startup
>
<
startup
>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.5"
/>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.5"
/>
</
startup
>
</
startup
>
<
runtime
>
<
runtime
>
<
legacyUnhandledExceptionPolicy
enabled
=
"true"
/>
<
legacyUnhandledExceptionPolicy
enabled
=
"true"
/>
<
assemblyBinding
xmlns
=
"urn:schemas-microsoft-com:asm.v1"
>
<
assemblyBinding
xmlns
=
"urn:schemas-microsoft-com:asm.v1"
>
<
dependentAssembly
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"System.Data.SQLite"
publicKeyToken
=
"db937bc2d44ff139"
culture
=
"neutral"
/>
<
assemblyIdentity
name
=
"System.Data.SQLite"
publicKeyToken
=
"db937bc2d44ff139"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-1.0.104.0"
newVersion
=
"1.0.104.0"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-1.0.104.0"
newVersion
=
"1.0.104.0"
/>
</
dependentAssembly
>
</
dependentAssembly
>
</
assemblyBinding
>
</
assemblyBinding
>
</
runtime
>
</
runtime
>
<
log4net
>
<
log4net
>
<
logger
name
=
"Log"
>
<
logger
name
=
"Log"
>
<
level
value
=
"INFO"
/>
<
level
value
=
"INFO"
/>
<
appender
-
ref
ref
=
"RollingLog"
/>
<
appender
-
ref
ref
=
"RollingLog"
/>
</
logger
>
</
logger
>
<
logger
name
=
"Err"
>
<
logger
name
=
"Err"
>
<
level
value
=
"ERROR"
/>
<
level
value
=
"ERROR"
/>
<
appender
-
ref
ref
=
"RollingErr"
/>
<
appender
-
ref
ref
=
"RollingErr"
/>
</
logger
>
</
logger
>
<
logger
name
=
"HmiInfo"
>
<
logger
name
=
"HmiInfo"
>
<
level
value
=
"INFO"
/>
<
level
value
=
"INFO"
/>
<
appender
-
ref
ref
=
"HmiRollingLog"
/>
<
appender
-
ref
ref
=
"HmiRollingLog"
/>
</
logger
>
</
logger
>
<
appender
name
=
"RollingLog"
type
=
"log4net.Appender.RollingFileAppender"
>
<
appender
name
=
"RollingLog"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"..\GC_User\Logs\InfoLog_"
/>
<
file
value
=
"..\GC_User\Logs\InfoLog_"
/>
<
appendToFile
value
=
"true"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyyMMdd'.txt'"
/>
<
datePattern
value
=
"yyyyMMdd'.txt'"
/>
<
staticLogFileName
value
=
"false"
/>
<
staticLogFileName
value
=
"false"
/>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
conversionPattern
value
=
"Record Time:%d Thread ID:[%thread]- Info:%m%n"
/>
<
conversionPattern
value
=
"Record Time:%d Thread ID:[%thread]- Info:%m%n"
/>
</
layout
>
</
layout
>
<
filter
type
=
"log4net.Filter.LevelRangeFilter"
>
<
filter
type
=
"log4net.Filter.LevelRangeFilter"
>
<
param
name
=
"LevelMin"
value
=
"INFO"
/>
<
param
name
=
"LevelMin"
value
=
"INFO"
/>
<
param
name
=
"LevelMax"
value
=
"INFO"
/>
<
param
name
=
"LevelMax"
value
=
"INFO"
/>
</
filter
>
</
filter
>
</
appender
>
</
appender
>
<
appender
name
=
"HmiRollingLog"
type
=
"log4net.Appender.RollingFileAppender"
>
<
appender
name
=
"HmiRollingLog"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"..\GC_User\Logs\HmiLog_"
/>
<
file
value
=
"..\GC_User\Logs\HmiLog_"
/>
<
appendToFile
value
=
"true"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyyMMdd'.txt'"
/>
<
datePattern
value
=
"yyyyMMdd'.txt'"
/>
<
staticLogFileName
value
=
"false"
/>
<
staticLogFileName
value
=
"false"
/>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
conversionPattern
value
=
"Record Time:%d Info:%m%n"
/>
<
conversionPattern
value
=
"Record Time:%d Info:%m%n"
/>
</
layout
>
</
layout
>
<
filter
type
=
"log4net.Filter.LevelRangeFilter"
>
<
filter
type
=
"log4net.Filter.LevelRangeFilter"
>
<
param
name
=
"LevelMin"
value
=
"INFO"
/>
<
param
name
=
"LevelMin"
value
=
"INFO"
/>
<
param
name
=
"LevelMax"
value
=
"INFO"
/>
<
param
name
=
"LevelMax"
value
=
"INFO"
/>
</
filter
>
</
filter
>
</
appender
>
</
appender
>
<
appender
name
=
"RollingErr"
type
=
"log4net.Appender.RollingFileAppender"
>
<
appender
name
=
"RollingErr"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"..\GC_User\Logs\ErrLog_"
/>
<
file
value
=
"..\GC_User\Logs\ErrLog_"
/>
<
appendToFile
value
=
"true"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyyMMdd'.txt'"
/>
<
datePattern
value
=
"yyyyMMdd'.txt'"
/>
<
staticLogFileName
value
=
"false"
/>
<
staticLogFileName
value
=
"false"
/>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
conversionPattern
value
=
"Record Time:%d Thread ID:[%thread]- Error:%m%n"
/>
<
conversionPattern
value
=
"Record Time:%d Thread ID:[%thread]- Error:%m%n"
/>
</
layout
>
</
layout
>
<
filter
type
=
"log4net.Filter.LevelRangeFilter"
>
<
filter
type
=
"log4net.Filter.LevelRangeFilter"
>
<
param
name
=
"LevelMin"
value
=
"ERROR"
/>
<
param
name
=
"LevelMin"
value
=
"ERROR"
/>
<
param
name
=
"LevelMax"
value
=
"ERROR"
/>
<
param
name
=
"LevelMax"
value
=
"ERROR"
/>
</
filter
>
</
filter
>
</
appender
>
</
appender
>
</
log4net
>
</
log4net
>
...
...
GcDevicePc/CK_UI/InfoBarUser.cs
View file @
129cc874
...
@@ -7,6 +7,7 @@ using System.Linq;
...
@@ -7,6 +7,7 @@ using System.Linq;
using
System.Text
;
using
System.Text
;
using
System.Windows.Forms
;
using
System.Windows.Forms
;
using
System.Diagnostics
;
using
System.Diagnostics
;
using
GcDevicePc.IniParam
;
namespace
GcDevicePc.CK_UI
namespace
GcDevicePc.CK_UI
{
{
...
@@ -28,25 +29,26 @@ namespace GcDevicePc.CK_UI
...
@@ -28,25 +29,26 @@ namespace GcDevicePc.CK_UI
//温度显示
//温度显示
Color
zcolor
=
Color
.
White
;
Color
zcolor
=
Color
.
White
;
Color
waringcolor
=
Color
.
LightGreen
;
Color
waringcolor
=
Color
.
LightGreen
;
//前进样口
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPSetTemp
==
0.0f
)
//前进样口
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16InjPortFront
==
1
)
{
{
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FP
ActualTemp
>=
1001
.0f
)
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FP
SetTemp
==
0
.0f
)
{
{
textBoxport
.
Text
=
"铂电阻断开"
;
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPActualTemp
>=
1001.0f
)
{
textBoxport
.
Text
=
"铂电阻断开"
;
}
else
{
textBoxport
.
Text
=
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPActualTemp
.
ToString
(
"#0.00"
)
+
"℃"
;
}
textBoxport
.
BackColor
=
waringcolor
;
}
}
else
else
{
textBoxport
.
Text
=
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPActualTemp
.
ToString
(
"#0.00"
)
+
"℃"
;
}
textBoxport
.
BackColor
=
waringcolor
;
}
else
{
{
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPActualTemp
>=
1001.0f
)
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPActualTemp
>=
1001.0f
)
{
{
...
@@ -60,14 +62,21 @@ namespace GcDevicePc.CK_UI
...
@@ -60,14 +62,21 @@ namespace GcDevicePc.CK_UI
if
(
Math
.
Abs
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPSetTemp
-
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPActualTemp
)
<=
0.1
)
if
(
Math
.
Abs
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPSetTemp
-
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPActualTemp
)
<=
0.1
)
{
{
textBoxport
.
BackColor
=
zcolor
;
textBoxport
.
BackColor
=
zcolor
;
}
}
else
else
textBoxport
.
BackColor
=
waringcolor
;
textBoxport
.
BackColor
=
waringcolor
;
}
}
}
else
{
textBoxport
.
Text
=
""
;
textBoxport
.
BackColor
=
Color
.
LightGray
;
}
//柱箱
//柱箱
...
...
GcDevicePc/Common/GCModbusSlave.cs
View file @
129cc874
...
@@ -88,7 +88,7 @@ namespace GcDevicePc.Common
...
@@ -88,7 +88,7 @@ namespace GcDevicePc.Common
public
void
CModbusSlaveInit
(
ushort
hstartaddr
,
ushort
hnreg
,
ushort
cstartaddr
,
ushort
cnreg
)
public
void
CModbusSlaveInit
(
ushort
hstartaddr
,
ushort
hnreg
,
ushort
cstartaddr
,
ushort
cnreg
)
{
{
//
setHoldingRegisterFunc(hstartaddr, hnreg);
setHoldingRegisterFunc
(
hstartaddr
,
hnreg
);
setCoilsRegisterFunc
(
cstartaddr
,
cnreg
);
setCoilsRegisterFunc
(
cstartaddr
,
cnreg
);
...
@@ -138,8 +138,8 @@ namespace GcDevicePc.Common
...
@@ -138,8 +138,8 @@ namespace GcDevicePc.Common
f
[
0
]
=
float
.
Parse
(
SharedSpace
.
Data
.
listValue
[
readnum
].
vale
.
ToString
());
f
[
0
]
=
float
.
Parse
(
SharedSpace
.
Data
.
listValue
[
readnum
].
vale
.
ToString
());
Buffer
.
BlockCopy
(
f
,
2
,
s
,
0
,
2
);
Buffer
.
BlockCopy
(
f
,
2
,
s
,
0
,
2
);
Buffer
.
BlockCopy
(
f
,
0
,
s
,
2
,
2
);
Buffer
.
BlockCopy
(
f
,
0
,
s
,
2
,
2
);
//
value = s[(address - baseaddress) % 2];
value
=
s
[(
address
-
baseaddress
)
%
2
];
value
=
address
;
//
value = address;
}
}
else
else
{
{
...
@@ -265,18 +265,18 @@ namespace GcDevicePc.Common
...
@@ -265,18 +265,18 @@ namespace GcDevicePc.Common
{
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16InjPortFront
==
1
)
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16InjPortFront
==
1
)
{
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetFrontType
==
0
)
//
if (CProfileDevice.m_DevParam.syspara.u16DetFrontType == 0)
{
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
fDetActualTemp
*
10
);
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
fDetActualTemp
*
10
);
}
}
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetFrontType
==
1
)
//
else if (CProfileDevice.m_DevParam.syspara.u16DetFrontType == 1)
{
//
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
fDetActualTemp
*
10
);
//
value = (ushort)(globaldata.m_dpbuffer.ShowList.showtemp.fDetActualTemp * 10);
}
//
}
else
//
else
{
//
{
value
=
0
;
//
value = 0;
}
//
}
}
}
else
else
{
{
...
@@ -288,18 +288,18 @@ namespace GcDevicePc.Common
...
@@ -288,18 +288,18 @@ namespace GcDevicePc.Common
{
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInter
==
1
)
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInter
==
1
)
{
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInterType
==
0
)
//
if (CProfileDevice.m_DevParam.syspara.u16DetInterType == 0)
{
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
iDetActualTemp
*
10
);
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
iDetActualTemp
*
10
);
}
}
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInterType
==
1
)
//
else if (CProfileDevice.m_DevParam.syspara.u16DetInterType == 1)
{
//
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
iDetActualTemp
*
10
);
//
value = (ushort)(globaldata.m_dpbuffer.ShowList.showtemp.iDetActualTemp * 10);
}
//
}
else
//
else
{
//
{
value
=
0
;
//
value = 0;
}
//
}
}
}
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16AuxHeater1
==
1
)
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16AuxHeater1
==
1
)
{
{
...
@@ -315,22 +315,23 @@ namespace GcDevicePc.Common
...
@@ -315,22 +315,23 @@ namespace GcDevicePc.Common
{
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetBehind
==
1
)
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetBehind
==
1
)
{
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetBehindType
==
0
)
//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
);
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
bDetActualTemp
*
10
);
}
}
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16AuxHeater2
==
1
)
//else if (CProfileDevice.m_DevParam.syspara.u16DetBehindType == 1)
{
//{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
AuxActualTemp2
*
10
);
// value = (ushort)(globaldata.m_dpbuffer.ShowList.showtemp.bDetActualTemp * 10);
}
//}
else
{
//else
value
=
0
;
//{
}
// value = 0;
//}
}
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16AuxHeater2
==
1
)
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
AuxActualTemp2
*
10
);
}
}
else
else
{
{
...
@@ -631,11 +632,11 @@ namespace GcDevicePc.Common
...
@@ -631,11 +632,11 @@ namespace GcDevicePc.Common
{
{
if
(
value
==
1
)
if
(
value
==
1
)
{
{
CurveDisPlay
.
curdisp
.
SetAutoAdjust
(
);
//CurveDisPlay.curdisp.SetAutoAdjust(0
);
}
}
else
if
(
value
==
0
)
else
if
(
value
==
0
)
{
{
CurveDisPlay
.
curdisp
.
StopAutoAdjust
();
//
CurveDisPlay.curdisp.StopAutoAdjust();
}
}
}
}
...
...
GcDevicePc/Common/NModbusSlave.cs
View file @
129cc874
...
@@ -67,7 +67,7 @@ namespace GcDevicePc.Common
...
@@ -67,7 +67,7 @@ namespace GcDevicePc.Common
case
ModbusDataType
.
HoldingRegister
:
case
ModbusDataType
.
HoldingRegister
:
for
(
int
i
=
0
;
i
<
e
.
Data
.
B
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
e
.
Data
.
B
.
Count
;
i
++)
{
{
slave
.
DataStore
.
HoldingRegisters
[
e
.
StartAddress
+
i
+
1
]
=
slavereadhreg
(
Convert
.
ToUInt16
(
e
.
StartAddress
+
i
+
1
));
slave
.
DataStore
.
HoldingRegisters
[
e
.
StartAddress
+
i
+
1
]
=
newslavereadhreg2
(
Convert
.
ToUInt16
(
e
.
StartAddress
+
i
+
1
));
}
}
break
;
break
;
...
@@ -97,7 +97,7 @@ namespace GcDevicePc.Common
...
@@ -97,7 +97,7 @@ namespace GcDevicePc.Common
switch
(
e
.
ModbusDataType
)
switch
(
e
.
ModbusDataType
)
{
{
case
ModbusDataType
.
HoldingRegister
:
case
ModbusDataType
.
HoldingRegister
:
slavewirtehreg
(
e
.
StartAddress
,
e
.
Data
.
B
[
e
.
StartAddress
]
);
slavewirtehreg
(
e
.
StartAddress
,
e
.
Data
.
B
.
ToArray
()
);
break
;
break
;
case
ModbusDataType
.
Coil
:
case
ModbusDataType
.
Coil
:
...
@@ -240,7 +240,8 @@ namespace GcDevicePc.Common
...
@@ -240,7 +240,8 @@ namespace GcDevicePc.Common
break
;
break
;
case
9
:
//前进样口
case
9
:
//前进样口
{
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16InjPortFront
==
1
)
//if (CProfileDevice.m_DevParam.syspara.u16InjPortFront == 1)
if
(
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16InjPortFront
==
1
)
{
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPActualTemp
*
10
);
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPActualTemp
*
10
);
}
}
...
@@ -252,7 +253,8 @@ namespace GcDevicePc.Common
...
@@ -252,7 +253,8 @@ namespace GcDevicePc.Common
break
;
break
;
case
10
:
//后进样口
case
10
:
//后进样口
{
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16InjPortBehind
==
1
)
//if (CProfileDevice.m_DevParam.syspara.u16InjPortBehind == 1)
if
(
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16InjPortBehind
==
1
)
{
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
BPActualTemp
*
10
);
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
BPActualTemp
*
10
);
}
}
...
@@ -276,75 +278,86 @@ namespace GcDevicePc.Common
...
@@ -276,75 +278,86 @@ namespace GcDevicePc.Common
break
;
break
;
case
12
:
//前检测器
case
12
:
//前检测器
{
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16InjPortFront
==
1
)
////if (CProfileDevice.m_DevParam.syspara.u16InjPortFront == 1)
{
//if (globaldata.m_hwconfig.hwconfiginfo.u16InjPortFront == 1)
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetFrontType
==
0
)
//{
{
// //if (CProfileDevice.m_DevParam.syspara.u16DetFrontType == 0)
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
fDetActualTemp
*
10
);
// if (globaldata.m_hwconfig.hwconfiginfo.u16DetFrontType == 0)
}
// {
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetFrontType
==
1
)
// value = (ushort)(globaldata.m_dpbuffer.ShowList.showtemp.fDetActualTemp * 10);
// }
// //else if (CProfileDevice.m_DevParam.syspara.u16DetFrontType == 1)
// else if (globaldata.m_hwconfig.hwconfiginfo.u16DetFrontType == 1)
{
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
fDetActualTemp
*
10
);
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
fDetActualTemp
*
10
);
}
}
else
//
else
{
//
{
value
=
0
;
//
value = 0;
}
//
}
}
//
}
else
//
else
{
//
{
value
=
0
;
//
value = 0;
}
//
}
}
}
break
;
break
;
case
13
:
//中检测器
case
13
:
//中检测器
{
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInter
==
1
)
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInter
==
1
)
{
//if (globaldata.m_hwconfig.hwconfiginfo.u16DetInter == 1)
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInterType
==
0
)
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInterType
==
0
)
//if (globaldata.m_hwconfig.hwconfiginfo.u16DetInterType == 0)
{
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
iDetActualTemp
*
10
);
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
iDetActualTemp
*
10
);
}
}
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInterType
==
1
)
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInterType
==
1
)
//else if (globaldata.m_hwconfig.hwconfiginfo.u16DetInterType == 1)
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
iDetActualTemp
*
10
);
}
else
{
value
=
0
;
}
}
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16AuxHeater1
==
1
)
//else if (globaldata.m_hwconfig.hwconfiginfo.u16AuxHeater1 == 1)
{
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
iDetActualTemp
*
10
);
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
AuxActualTemp1
*
10
);
}
}
else
else
{
{
value
=
0
;
value
=
0
;
}
}
}
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16AuxHeater1
==
1
)
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
AuxActualTemp1
*
10
);
}
else
{
value
=
0
;
}
}
}
break
;
break
;
case
14
:
//后检测器
case
14
:
//后检测器
{
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetBehind
==
1
)
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetBehind
==
1
)
//if (globaldata.m_hwconfig.hwconfiginfo.u16DetBehind == 1)
{
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetBehindType
==
0
)
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetBehindType
==
0
)
//if (globaldata.m_hwconfig.hwconfiginfo.u16DetBehindType == 0)
{
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
bDetActualTemp
*
10
);
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
bDetActualTemp
*
10
);
}
}
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetBehindType
==
1
)
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetBehindType
==
1
)
//else if (globaldata.m_hwconfig.hwconfiginfo.u16DetBehindType == 1)
{
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
bDetActualTemp
*
10
);
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
else
{
{
value
=
0
;
value
=
0
;
}
}
}
}
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16AuxHeater2
==
1
)
//else if (globaldata.m_hwconfig.hwconfiginfo.u16AuxHeater2 == 1)
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
AuxActualTemp2
*
10
);
}
else
else
{
{
value
=
0
;
value
=
0
;
...
@@ -387,23 +400,112 @@ namespace GcDevicePc.Common
...
@@ -387,23 +400,112 @@ namespace GcDevicePc.Common
}
}
static
void
slavewirtehreg
(
ushort
address
,
ushort
value
)
static
void
slavewirtehreg
(
ushort
address
,
ushort
[]
value
)
{
{
if
(
address
==
100
||
address
==
99
||
address
==
101
)
if
(
address
>=
50
&&
address
<
99
)
{
switch
(
address
)
{
case
50
:
globaldata
.
m_hmibuffer
.
gcadjust
.
setpotency
=
ushortofloat
(
value
);
CKVocAnalyzer
.
GlobalCKV
.
nongdu
=
(
int
)
globaldata
.
m_hmibuffer
.
gcadjust
.
setpotency
;
CKVocAnalyzer
.
ExteConfig
.
Instance
.
Save
();
break
;
case
52
:
//globaldata.m_hmibuffer.gcadjust.trackpotency = ushortofloat(value);
break
;
case
54
:
globaldata
.
m_hmibuffer
.
gcadjust
.
settime
=
ushortolong
(
value
);
CKVocAnalyzer
.
GlobalCKV
.
AutoTimes
=
(
int
)
globaldata
.
m_hmibuffer
.
gcadjust
.
settime
/
60
;
CKVocAnalyzer
.
ExteConfig
.
Instance
.
Save
();
break
;
case
56
:
globaldata
.
m_hmibuffer
.
gcadjust
.
executefun
=
ushortolong
(
value
);
break
;
case
58
:
globaldata
.
m_hmibuffer
.
gcadjust
.
funrun
=
ushortolong
(
value
);
executefuncation
();
break
;
case
60
:
//globaldata.m_hmibuffer.gcadjust.runtime = ushortolong(value);
//SharedSpace.MControl.zhouqi* SharedSpace.MControl.runcount <= SharedSpace.MControl.dateend
break
;
case
62
:
//globaldata.m_hmibuffer.gcadjust.executestat = ushortolong(value);
break
;
default
:
break
;
}
}
//if (address == 100 || address == 99 || address == 101)
//{
// if (value[0] == 1)
// {
// CurveDisPlay.curdisp.SetAutoAdjust(value[1]);
// }
// else if (value[0] == 0)
// {
// CurveDisPlay.curdisp.StopAutoAdjust();
// }
//}
if
(
address
==
102
)
{
{
if
(
value
==
1
)
if
(
value
[
0
]
==
1
)
{
{
CurveDisPlay
.
curdisp
.
SetAutoAdjust
()
;
globaldata
.
IsStopOs
=
true
;
}
}
else
if
(
value
==
0
)
else
if
(
value
[
0
]
==
0
)
{
{
CurveDisPlay
.
curdisp
.
StopAutoAdjust
()
;
globaldata
.
IsStopOs
=
false
;
}
}
}
}
Log
.
Info
(
"MoudbusSlave Wirte adder:"
+
address
.
ToString
()
+
" value:"
+
value
.
ToString
());
Log
.
Info
(
"MoudbusSlave Wirte adder:"
+
address
.
ToString
()
+
" value:"
+
value
.
ToString
());
}
}
public
static
void
executefuncation
()
{
if
(
globaldata
.
m_hmibuffer
.
gcadjust
.
funrun
==
1
)
{
switch
(
globaldata
.
m_hmibuffer
.
gcadjust
.
executefun
)
{
//校零
case
0x02
:
case
0x0A
:
case
0x06
:
case
0x0E
:
CurveDisPlay
.
curdisp
.
SetAutoAdjust
(
0
);
break
;
//校标
case
0x03
:
case
0x0B
:
case
0x07
:
case
0x0F
:
CurveDisPlay
.
curdisp
.
SetAutoAdjust
(
1
);
break
;
//样
case
0x00
:
case
0x08
:
case
0x04
:
case
0x0C
:
CurveDisPlay
.
curdisp
.
SetAutoAdjust
(
2
);
break
;
default
:
break
;
}
}
else
{
CurveDisPlay
.
curdisp
.
StopAutoAdjust
();
}
}
public
static
ushort
slavereadcreg
(
ushort
address
)
public
static
ushort
slavereadcreg
(
ushort
address
)
{
{
...
@@ -449,6 +551,705 @@ namespace GcDevicePc.Common
...
@@ -449,6 +551,705 @@ namespace GcDevicePc.Common
}
}
static
ushort
newslavereadhreg
(
ushort
address
)
{
try
{
ushort
value
=
0
;
ushort
signalddress
=
36
;
ushort
baseaddress
=
0
;
address
=
(
ushort
)(
address
-
1
);
int
listnum
=
SharedSpace
.
Data
.
listValue
.
Count
;
ushort
[]
s
=
new
ushort
[
2
];
float
[]
f
=
new
float
[
2
];
long
[]
l
=
new
long
[
1
];
if
(
address
<
20
&&
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
if
(
address
>=
20
&&
address
<=
35
)
{
switch
(
address
)
{
case
20
:
if
((
ushort
)
SharedSpace
.
Data
.
typesint
==
1
||
(
ushort
)
SharedSpace
.
Data
.
typesint
==
2
)
{
if
(
SharedSpace
.
MControl
.
dateend
!=
0
&&
SharedSpace
.
MControl
.
zhouqi
!=
0
)
{
value
=
(
ushort
)((
globaldata
.
m_hmibuffer
.
gcinfo
.
batruncount
*
1.0f
)
/
(
ushort
)(
SharedSpace
.
MControl
.
dateend
*
1.0f
/
SharedSpace
.
MControl
.
zhouqi
)
*
1000
);
}
else
{
value
=
0
;
}
}
else
{
value
=
0
;
}
break
;
case
21
:
if
(!
SharedSpace
.
MControl
.
SetOut
&&
!
SharedSpace
.
MControl
.
SetRun
)
{
if
((
ushort
)
SharedSpace
.
Data
.
typesint
==
3
)
value
=
5
;
else
if
((
ushort
)
SharedSpace
.
Data
.
typesint
==
4
)
value
=
6
;
else
value
=
(
ushort
)
SharedSpace
.
Data
.
typesint
;
}
else
{
value
=
(
ushort
)
SharedSpace
.
Data
.
typesint
;
}
break
;
case
22
:
value
=
SharedSpace
.
Data
.
change
==
true
?
(
ushort
)
1
:
(
ushort
)
0
;
break
;
case
23
:
value
=
globaldata
.
m_hmibuffer
.
gcinfo
.
HMIMac
[
0
];
break
;
case
24
:
value
=
globaldata
.
m_hmibuffer
.
gcinfo
.
HMIMac
[
1
];
break
;
case
25
:
value
=
globaldata
.
m_hmibuffer
.
gcinfo
.
HMIMac
[
2
];
break
;
case
26
:
value
=
(
ushort
)(
globaldata
.
m_hmibuffer
.
gcinfo
.
hmioffline
?
1
:
0
);
break
;
case
27
:
value
=
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
;
break
;
case
28
:
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16InjPortFront
==
1
)
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPActualTemp
*
10
);
}
else
{
value
=
0
;
}
break
;
case
29
:
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16InjPortBehind
==
1
)
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
BPActualTemp
*
10
);
}
else
{
value
=
0
;
}
break
;
case
30
:
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16Col
==
1
)
{
value
=
(
ushort
)(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
ColActualTemp
*
10
);
}
else
{
value
=
0
;
}
break
;
case
31
:
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
32
:
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
33
:
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
34
:
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetFrontType
==
1
)
{
value
=
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
fDetStatue
;
}
else
{
value
=
0
;
}
break
;
case
35
:
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetInterType
==
1
)
{
value
=
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
fDetStatue
;
}
else
{
value
=
0
;
}
break
;
}
}
if
(
address
>=
36
)
{
if
(
address
<
48
)
{
if
(
address
==
36
||
address
==
37
)
f
[
0
]
=
float
.
Parse
(
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
fDetValue
.
ToString
(
"0.000"
));
if
(
address
==
38
||
address
==
39
)
f
[
0
]
=
float
.
Parse
(
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
iDetValue
.
ToString
(
"0.000"
));
if
(
address
==
40
||
address
==
41
)
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
>=
48
)
{
if
(
address
==
48
||
address
==
49
)
{
switch
(
CKVocAnalyzer
.
GlobalCKV
.
adjustType
)
{
case
CKVocAnalyzer
.
GlobalCKV
.
AdjustType
.
AT_Zero
:
l
[
0
]
=
0x02
;
break
;
case
CKVocAnalyzer
.
GlobalCKV
.
AdjustType
.
AT_Biao
:
l
[
0
]
=
0x03
;
break
;
case
CKVocAnalyzer
.
GlobalCKV
.
AdjustType
.
AT_Yang
:
l
[
0
]
=
0x00
;
break
;
default
:
l
[
0
]
=
0x00
;
break
;
}
//value = (ushort)globaldata.m_hmibuffer.gcadjust.currentstate;//当前状态
//l[0] = globaldata.m_hmibuffer.gcadjust.executefun;
Buffer
.
BlockCopy
(
l
,
0
,
s
,
0
,
4
);
value
=
s
[(
address
-
48
)
%
2
];
}
//Buffer.BlockCopy(f, 2, s, 0, 2);
//Buffer.BlockCopy(f, 0, s, 2, 2);
//value = s[(address - 48) % 2];
if
(
address
>=
50
&&
address
<
54
)
{
if
(
address
==
50
||
address
==
51
)
f
[
0
]
=
float
.
Parse
(
CKVocAnalyzer
.
GlobalCKV
.
nongdu
.
ToString
(
"0.000"
));
if
(
address
==
52
||
address
==
53
)
{
foreach
(
var
item
in
CKVocAnalyzer
.
GlobalCKV
.
autoVlue
)
{
if
(
item
.
name
==
"THC"
)
{
f
[
0
]
=
float
.
Parse
(
item
.
biaozhun
.
ToString
(
"0.000"
));
}
}
}
Buffer
.
BlockCopy
(
f
,
2
,
s
,
0
,
2
);
Buffer
.
BlockCopy
(
f
,
0
,
s
,
2
,
2
);
value
=
s
[(
address
-
50
)
%
2
];
}
if
(
address
>=
54
)
{
switch
(
address
)
{
case
54
:
case
55
:
l
[
0
]
=
CKVocAnalyzer
.
GlobalCKV
.
AutoTimes
*
60
;
break
;
case
56
:
case
57
:
l
[
0
]
=
globaldata
.
m_hmibuffer
.
gcadjust
.
executefun
;
break
;
case
58
:
case
59
:
l
[
0
]
=
globaldata
.
m_hmibuffer
.
gcadjust
.
funrun
;
break
;
case
60
:
case
61
:
if
(
SharedSpace
.
MControl
.
IsEnd
||
SharedSpace
.
MControl
.
forceEnd
||
!
CKVocAnalyzer
.
GlobalCKV
.
IsAutoAdjust
)
{
l
[
0
]
=
0
;
}
else
{
l
[
0
]
=
SharedSpace
.
MControl
.
dateend
-
(
SharedSpace
.
MControl
.
zhouqi
*
SharedSpace
.
MControl
.
runcount
);
}
break
;
case
62
:
case
63
:
if
(!
CKVocAnalyzer
.
GlobalCKV
.
IsAutoAdjust
)
{
l
[
0
]
=
0
;
}
else
if
(
CKVocAnalyzer
.
GlobalCKV
.
IsAutoAdjust
||
(
SharedSpace
.
MControl
.
SetOut
&&
SharedSpace
.
MControl
.
SetRun
==
false
))
{
if
(
SharedSpace
.
MControl
.
zhouqi
*
SharedSpace
.
MControl
.
runcount
<=
SharedSpace
.
MControl
.
dateend
)
{
l
[
0
]
=
2
;
}
else
{
l
[
0
]
=
1
;
}
}
else
if
(
SharedSpace
.
MControl
.
zhouqi
*
SharedSpace
.
MControl
.
runcount
>=
SharedSpace
.
MControl
.
dateend
&&
SharedSpace
.
MControl
.
SetOut
&&
SharedSpace
.
MControl
.
SetRun
)
{
if
(!
SharedSpace
.
MControl
.
SetOut
&&
!
SharedSpace
.
MControl
.
SetRun
)
{
l
[
0
]
=
4
;
}
else
{
l
[
0
]
=
3
;
}
}
else
if
(
SharedSpace
.
MControl
.
forceEnd
)
{
l
[
0
]
=
5
;
}
//l[0] = globaldata.m_hmibuffer.gcadjust.settime;
break
;
}
Buffer
.
BlockCopy
(
l
,
0
,
s
,
0
,
4
);
value
=
s
[(
address
-
54
)
%
2
];
}
}
else
{
value
=
0
;
}
}
return
value
;
}
catch
{
return
0
;
}
}
static
ushort
newslavereadhreg2
(
ushort
address
)
{
try
{
ushort
value
=
0
;
ushort
signalddress
=
36
;
ushort
baseaddress
=
0
;
address
=
(
ushort
)(
address
-
1
);
int
listnum
=
SharedSpace
.
Data
.
listValue
.
Count
;
ushort
[]
s
=
new
ushort
[
2
];
float
[]
f
=
new
float
[
2
];
long
[]
l
=
new
long
[
1
];
if
(
address
<
40
)
{
if
(
address
<
6
&&
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
>=
8
)
{
if
(
address
==
8
||
address
==
9
)
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16InjPortFront
==
1
)
{
f
[
0
]
=
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPActualTemp
*
10
;
}
else
{
f
[
0
]
=
0
;
}
}
if
(
address
==
10
||
address
==
11
)
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16InjPortBehind
==
1
)
{
f
[
0
]
=
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
BPActualTemp
*
10
;
}
else
{
f
[
0
]
=
0
;
}
}
if
(
address
==
12
||
address
==
13
)
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16Col
==
1
)
{
f
[
0
]
=
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
ColActualTemp
*
10
;
}
else
{
f
[
0
]
=
0
;
}
}
if
(
address
==
14
||
address
==
15
)
{
//if (CProfileDevice.m_DevParam.syspara.u16InjPortFront == 1)
{
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetFrontType
==
0
)
{
f
[
0
]
=
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
fDetActualTemp
*
10
;
}
else
if
(
CProfileDevice
.
m_DevParam
.
syspara
.
u16DetFrontType
==
1
)
{
f
[
0
]
=
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
fDetActualTemp
*
10
;
}
else
{
f
[
0
]
=
0
;
}
}
//else
//{
// value = 0;
//}
}
if
(
address
==
20
||
address
==
21
)
{
f
[
0
]
=
float
.
Parse
(
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
fDetValue
.
ToString
(
"0.000"
));
}
Buffer
.
BlockCopy
(
f
,
2
,
s
,
0
,
2
);
Buffer
.
BlockCopy
(
f
,
0
,
s
,
2
,
2
);
value
=
s
[(
address
-
8
)
%
2
];
}
}
if
(
address
>=
40
&&
address
<
50
)
{
if
(
address
==
40
||
address
==
41
)
value
=
0
;
if
(
address
==
48
||
address
==
49
)
{
switch
(
CKVocAnalyzer
.
GlobalCKV
.
adjustType
)
{
case
CKVocAnalyzer
.
GlobalCKV
.
AdjustType
.
AT_Zero
:
l
[
0
]
=
0x02
;
break
;
case
CKVocAnalyzer
.
GlobalCKV
.
AdjustType
.
AT_Biao
:
l
[
0
]
=
0x03
;
break
;
case
CKVocAnalyzer
.
GlobalCKV
.
AdjustType
.
AT_Yang
:
l
[
0
]
=
0x00
;
break
;
default
:
l
[
0
]
=
0x00
;
break
;
}
Buffer
.
BlockCopy
(
l
,
0
,
s
,
0
,
4
);
value
=
s
[(
address
-
48
)
%
2
];
}
}
if
(
address
>=
50
&&
address
<
54
)
{
if
(
address
==
50
||
address
==
51
)
f
[
0
]
=
float
.
Parse
(
CKVocAnalyzer
.
GlobalCKV
.
nongdu
.
ToString
(
"0.000"
));
if
(
address
==
52
||
address
==
53
)
{
//foreach (var item in CKVocAnalyzer.GlobalCKV.autoVlue)
//{
// if (item.name == "THC")
// {
// f[0] = float.Parse(item.biaozhun.ToString("0.000"));
// }
//}
f
[
0
]
=
0
;
}
Buffer
.
BlockCopy
(
f
,
2
,
s
,
0
,
2
);
Buffer
.
BlockCopy
(
f
,
0
,
s
,
2
,
2
);
value
=
s
[(
address
-
50
)
%
2
];
}
if
(
address
>=
54
&&
address
<
64
)
{
switch
(
address
)
{
case
54
:
case
55
:
l
[
0
]
=
CKVocAnalyzer
.
GlobalCKV
.
AutoTimes
*
60
;
break
;
case
56
:
case
57
:
l
[
0
]
=
globaldata
.
m_hmibuffer
.
gcadjust
.
executefun
;
break
;
case
58
:
case
59
:
l
[
0
]
=
globaldata
.
m_hmibuffer
.
gcadjust
.
funrun
;
break
;
case
60
:
case
61
:
if
((
ushort
)
SharedSpace
.
Data
.
typesint
==
1
||
(
ushort
)
SharedSpace
.
Data
.
typesint
==
2
)
{
if
(
SharedSpace
.
MControl
.
dateend
!=
0
&&
SharedSpace
.
MControl
.
zhouqi
!=
0
)
{
l
[
0
]=
globaldata
.
m_hmibuffer
.
gcadjust
.
runtime
;
}
else
{
l
[
0
]
=
0
;
}
}
else
{
l
[
0
]
=
0
;
}
break
;
case
62
:
case
63
:
if
(!
CKVocAnalyzer
.
GlobalCKV
.
IsAutoAdjust
)
{
l
[
0
]
=
0
;
}
else
if
(
CKVocAnalyzer
.
GlobalCKV
.
IsAutoAdjust
||
(
SharedSpace
.
MControl
.
SetOut
&&
SharedSpace
.
MControl
.
SetRun
==
false
))
{
if
(
SharedSpace
.
MControl
.
zhouqi
*
SharedSpace
.
MControl
.
runcount
<=
SharedSpace
.
MControl
.
dateend
)
{
l
[
0
]
=
2
;
}
else
{
l
[
0
]
=
1
;
}
}
else
if
(
SharedSpace
.
MControl
.
zhouqi
*
SharedSpace
.
MControl
.
runcount
>=
SharedSpace
.
MControl
.
dateend
&&
SharedSpace
.
MControl
.
SetOut
&&
SharedSpace
.
MControl
.
SetRun
)
{
if
(!
SharedSpace
.
MControl
.
SetOut
&&
!
SharedSpace
.
MControl
.
SetRun
)
{
l
[
0
]
=
4
;
}
else
{
l
[
0
]
=
3
;
}
}
else
if
(
SharedSpace
.
MControl
.
forceEnd
)
{
l
[
0
]
=
5
;
}
//l[0] = globaldata.m_hmibuffer.gcadjust.settime;
break
;
}
Buffer
.
BlockCopy
(
l
,
0
,
s
,
0
,
4
);
value
=
s
[(
address
-
54
)
%
2
];
}
if
(
address
>=
1000
)
{
switch
(
address
)
{
case
1000
:
value
=
globaldata
.
m_hmibuffer
.
gcinfo
.
HMIMac
[
0
];
break
;
case
1001
:
value
=
globaldata
.
m_hmibuffer
.
gcinfo
.
HMIMac
[
1
];
break
;
case
1002
:
value
=
globaldata
.
m_hmibuffer
.
gcinfo
.
HMIMac
[
2
];
break
;
case
1003
:
if
(!
SharedSpace
.
MControl
.
SetOut
&&
!
SharedSpace
.
MControl
.
SetRun
)
{
if
((
ushort
)
SharedSpace
.
Data
.
typesint
==
3
)
value
=
5
;
else
if
((
ushort
)
SharedSpace
.
Data
.
typesint
==
4
)
value
=
6
;
else
value
=
(
ushort
)
SharedSpace
.
Data
.
typesint
;
}
else
{
value
=
(
ushort
)
SharedSpace
.
Data
.
typesint
;
}
break
;
case
1004
:
value
=
(
ushort
)(
globaldata
.
m_hmibuffer
.
gcinfo
.
hmioffline
?
1
:
0
);
break
;
case
1005
:
value
=
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
;
break
;
case
1006
:
value
=
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
fDetStatue
;
break
;
case
1007
:
value
=
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
iDetStatue
;
break
;
default
:
break
;
}
}
return
value
;
}
catch
{
return
0
;
}
}
public
struct
state
{
public
ushort
blvalve
;
//标零阀开关
public
ushort
yblvalve
;
//样气阀标零阀切换
public
ushort
biaoling
;
//零/标
public
ushort
Sample_Adjust
;
//走气/校气
public
ushort
jzgz
;
//校准/跟踪
public
ushort
jzcl_stat
;
//校准状态/测量状态
public
ushort
normal_error
;
//正常/报警
public
ushort
Long_Short_range
;
//本地/遥控指示位
}
/// <summary>
/// 设置字节指定位置的值
/// </summary>
/// <param name="data">字节</param>
/// <param name="index">位置</param>
/// <param name="flag">值</param>
void
set_bit
(
ref
byte
data
,
int
index
,
bool
flag
)
{
if
(
index
>
8
||
index
<
1
)
throw
new
ArgumentOutOfRangeException
();
int
v
=
index
<
2
?
index
:
(
2
<<
(
index
-
2
));
data
=
flag
?
(
byte
)(
data
|
v
)
:
(
byte
)(
data
&
~
v
);
}
private
static
float
ushortofloat
(
ushort
[]
us
)
{
int
intSign
,
intSignRest
,
intExponent
,
intExponentRest
;
float
faResult
,
faDigit
;
intSign
=
us
[
0
]
/
32768
;
intSignRest
=
us
[
0
]
%
32768
;
intExponent
=
intSignRest
/
128
;
intExponentRest
=
intSignRest
%
128
;
faDigit
=
(
float
)(
intExponentRest
*
65536
+
us
[
1
])
/
8388608
;
return
faResult
=
(
float
)
Math
.
Pow
(-
1
,
intSign
)
*
(
float
)
Math
.
Pow
(
2
,
intExponent
-
127
)
*
(
faDigit
+
1
);
}
private
static
long
ushortolong
(
ushort
[]
us
)
{
for
(
int
i
=
0
;
i
<
us
.
Length
;
i
++)
{
if
(
us
[
i
]
!=
0
)
{
return
us
[
i
];
}
}
return
0
;
}
}
}
}
}
GcDevicePc/ConfigMethod/MethodMain.cs
View file @
129cc874
...
@@ -435,7 +435,7 @@ namespace GcDevicePc.ConfigMethod
...
@@ -435,7 +435,7 @@ namespace GcDevicePc.ConfigMethod
}
}
SignalDataToHw
.
methodconfig
=
this
.
gcmethodconfig
;
SignalDataToHw
.
methodconfig
=
this
.
gcmethodconfig
;
SendDataToZB
.
methodconfig
=
this
.
gcmethodconfig
;
//
SendDataToZB.methodconfig = this.gcmethodconfig;
//string message = "提交成功!";
//string message = "提交成功!";
//MessageBox.Show(message, "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
//MessageBox.Show(message, "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
...
...
GcDevicePc/ConfigMethod/injectionport/IPPIP.Designer.cs
View file @
129cc874
...
@@ -48,6 +48,7 @@
...
@@ -48,6 +48,7 @@
this
.
label3
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label3
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
textBox1
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
textBox1
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label5
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label5
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label6
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
//
//
// label1
// label1
...
@@ -73,13 +74,16 @@
...
@@ -73,13 +74,16 @@
// cbHeater
// cbHeater
//
//
this
.
cbHeater
.
AutoSize
=
true
;
this
.
cbHeater
.
AutoSize
=
true
;
this
.
cbHeater
.
Checked
=
true
;
this
.
cbHeater
.
CheckState
=
System
.
Windows
.
Forms
.
CheckState
.
Checked
;
this
.
cbHeater
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
11F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
cbHeater
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
11F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
cbHeater
.
Location
=
new
System
.
Drawing
.
Point
(
169
,
155
);
this
.
cbHeater
.
Location
=
new
System
.
Drawing
.
Point
(
67
,
153
);
this
.
cbHeater
.
Name
=
"cbHeater"
;
this
.
cbHeater
.
Name
=
"cbHeater"
;
this
.
cbHeater
.
Size
=
new
System
.
Drawing
.
Size
(
71
,
19
);
this
.
cbHeater
.
Size
=
new
System
.
Drawing
.
Size
(
71
,
19
);
this
.
cbHeater
.
TabIndex
=
3
;
this
.
cbHeater
.
TabIndex
=
3
;
this
.
cbHeater
.
Text
=
"加热器"
;
this
.
cbHeater
.
Text
=
"加热器"
;
this
.
cbHeater
.
UseVisualStyleBackColor
=
true
;
this
.
cbHeater
.
UseVisualStyleBackColor
=
true
;
this
.
cbHeater
.
Visible
=
false
;
//
//
// txtHeater
// txtHeater
//
//
...
@@ -237,10 +241,12 @@
...
@@ -237,10 +241,12 @@
//
//
// textBox1
// textBox1
//
//
this
.
textBox1
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
None
;
this
.
textBox1
.
Enabled
=
false
;
this
.
textBox1
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
11F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
textBox1
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
11F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
textBox1
.
Location
=
new
System
.
Drawing
.
Point
(
367
,
58
);
this
.
textBox1
.
Location
=
new
System
.
Drawing
.
Point
(
367
,
58
);
this
.
textBox1
.
Name
=
"textBox1"
;
this
.
textBox1
.
Name
=
"textBox1"
;
this
.
textBox1
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
24
);
this
.
textBox1
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
17
);
this
.
textBox1
.
TabIndex
=
4
;
this
.
textBox1
.
TabIndex
=
4
;
//
//
// label5
// label5
...
@@ -253,12 +259,23 @@
...
@@ -253,12 +259,23 @@
this
.
label5
.
TabIndex
=
16
;
this
.
label5
.
TabIndex
=
16
;
this
.
label5
.
Text
=
"℃"
;
this
.
label5
.
Text
=
"℃"
;
//
//
// label6
//
this
.
label6
.
AutoSize
=
true
;
this
.
label6
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
11F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label6
.
Location
=
new
System
.
Drawing
.
Point
(
188
,
159
);
this
.
label6
.
Name
=
"label6"
;
this
.
label6
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
15
);
this
.
label6
.
TabIndex
=
31
;
this
.
label6
.
Text
=
"温度:"
;
//
// IPPIP
// IPPIP
//
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
592
,
332
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
592
,
332
);
this
.
Controls
.
Add
(
this
.
label6
);
this
.
Controls
.
Add
(
this
.
label3
);
this
.
Controls
.
Add
(
this
.
label3
);
this
.
Controls
.
Add
(
this
.
combSampleCarrierGas
);
this
.
Controls
.
Add
(
this
.
combSampleCarrierGas
);
this
.
Controls
.
Add
(
this
.
label21
);
this
.
Controls
.
Add
(
this
.
label21
);
...
@@ -309,5 +326,6 @@
...
@@ -309,5 +326,6 @@
private
System
.
Windows
.
Forms
.
Label
label3
;
private
System
.
Windows
.
Forms
.
Label
label3
;
private
System
.
Windows
.
Forms
.
TextBox
textBox1
;
private
System
.
Windows
.
Forms
.
TextBox
textBox1
;
private
System
.
Windows
.
Forms
.
Label
label5
;
private
System
.
Windows
.
Forms
.
Label
label5
;
private
System
.
Windows
.
Forms
.
Label
label6
;
}
}
}
}
\ No newline at end of file
GcDevicePc/ConfigMethod/injectionport/IPPIP.cs
View file @
129cc874
...
@@ -48,7 +48,7 @@ namespace GcDevicePc.ConfigMethod.injectionport
...
@@ -48,7 +48,7 @@ namespace GcDevicePc.ConfigMethod.injectionport
txtHeater
.
Text
=
this
.
methodconfig
.
port
[
index
].
HeaterTmpActual
.
ToString
();
txtHeater
.
Text
=
this
.
methodconfig
.
port
[
index
].
HeaterTmpActual
.
ToString
();
textBox1
.
Text
=
configTemp
.
ToString
();
if
(
this
.
hwconfig
.
hwconfiginfo
.
u16StartType
==
1
||
this
.
hwconfig
.
hwconfiginfo
.
u16StartType
==
3
)
if
(
this
.
hwconfig
.
hwconfiginfo
.
u16StartType
==
1
||
this
.
hwconfig
.
hwconfiginfo
.
u16StartType
==
3
)
{
{
...
@@ -227,6 +227,8 @@ namespace GcDevicePc.ConfigMethod.injectionport
...
@@ -227,6 +227,8 @@ namespace GcDevicePc.ConfigMethod.injectionport
txtSeptumBlowingflow
.
Enabled
=
false
;
txtSeptumBlowingflow
.
Enabled
=
false
;
}
}
textBox1
.
Text
=
configTemp
.
ToString
();
//txtFlow.Text = this.methodconfig.auxs[index].pipFlowActual.ToString();
//txtFlow.Text = this.methodconfig.auxs[index].pipFlowActual.ToString();
txtHeater
.
Text
=
this
.
methodconfig
.
auxs
[
index
].
HeaterTmpActual
.
ToString
();
txtHeater
.
Text
=
this
.
methodconfig
.
auxs
[
index
].
HeaterTmpActual
.
ToString
();
//txtPressure.Text = this.methodconfig.auxs[index].pipPressureActual.ToString();
//txtPressure.Text = this.methodconfig.auxs[index].pipPressureActual.ToString();
...
@@ -324,7 +326,6 @@ namespace GcDevicePc.ConfigMethod.injectionport
...
@@ -324,7 +326,6 @@ namespace GcDevicePc.ConfigMethod.injectionport
this
.
methodconfig
.
port
[
index
].
pipSeptumBlowFlow
=
1
;
this
.
methodconfig
.
port
[
index
].
pipSeptumBlowFlow
=
1
;
#
region
旧代码
#
region
旧代码
//int index;
//int index;
...
...
GcDevicePc/Controls/PrompBox.cs
View file @
129cc874
...
@@ -35,7 +35,7 @@ namespace GcDevicePc.Controls
...
@@ -35,7 +35,7 @@ namespace GcDevicePc.Controls
PictureBox
pictureBox_Loading
=
new
PictureBox
();
PictureBox
pictureBox_Loading
=
new
PictureBox
();
pictureBox_Loading
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
pictureBox_Loading
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
pictureBox_Loading
.
Image
=
Image
.
FromFile
(
"C:\\Users\\24042\\Pictures\\052124596426732.gif"
);
//
pictureBox_Loading.Image = Image.FromFile("C:\\Users\\24042\\Pictures\\052124596426732.gif");
pictureBox_Loading
.
Name
=
"pictureBox_Loading"
;
pictureBox_Loading
.
Name
=
"pictureBox_Loading"
;
pictureBox_Loading
.
Size
=
new
System
.
Drawing
.
Size
(
48
,
48
);
pictureBox_Loading
.
Size
=
new
System
.
Drawing
.
Size
(
48
,
48
);
pictureBox_Loading
.
SizeMode
=
System
.
Windows
.
Forms
.
PictureBoxSizeMode
.
AutoSize
;
pictureBox_Loading
.
SizeMode
=
System
.
Windows
.
Forms
.
PictureBoxSizeMode
.
AutoSize
;
...
...
GcDevicePc/DataState.cs
View file @
129cc874
...
@@ -1200,8 +1200,8 @@ namespace GcDevicePc
...
@@ -1200,8 +1200,8 @@ namespace GcDevicePc
{
{
tempshow
=
new
ListViewItem
();
tempshow
=
new
ListViewItem
();
tempshow
.
Text
=
"前进样口"
;
tempshow
.
Text
=
"前进样口"
;
//
tempshow.SubItems.Add(IsException(globaldata.m_dpbuffer.ShowList.showtemp.FPActualTemp) + " / " + globaldata.m_dpbuffer.ShowList.showtemp.FPSetTemp.ToString("0"));
tempshow
.
SubItems
.
Add
(
IsException
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPActualTemp
)
+
" / "
+
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPSetTemp
.
ToString
(
"0"
));
tempshow
.
SubItems
.
Add
(
IsException
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPActualTemp
)
+
" / "
+
CProfileDevice
.
m_DevParam
.
port
[
0
].
fHeaterSetTemp
.
ToString
(
"0"
));
//
tempshow.SubItems.Add(IsException(globaldata.m_dpbuffer.ShowList.showtemp.FPActualTemp) + " / " + CProfileDevice.m_DevParam.port[0].fHeaterSetTemp.ToString("0"));
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPActualTemp
<
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16InjPortFPTemp
+
1
)
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
FPActualTemp
<
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16InjPortFPTemp
+
1
)
{
{
...
@@ -1252,8 +1252,8 @@ namespace GcDevicePc
...
@@ -1252,8 +1252,8 @@ namespace GcDevicePc
{
{
tempshow
=
new
ListViewItem
();
tempshow
=
new
ListViewItem
();
tempshow
.
Text
=
"后进样口"
;
tempshow
.
Text
=
"后进样口"
;
tempshow
.
SubItems
.
Add
(
IsException
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
BPActualTemp
)
+
" / "
+
CProfileDevice
.
m_DevParam
.
port
[
1
].
fHeaterSetTemp
.
ToString
(
"0"
));
//
tempshow.SubItems.Add(IsException(globaldata.m_dpbuffer.ShowList.showtemp.BPActualTemp) + " / " + CProfileDevice.m_DevParam.port[1].fHeaterSetTemp.ToString("0"));
//
tempshow.SubItems.Add(IsException(globaldata.m_dpbuffer.ShowList.showtemp.BPActualTemp) + " / " + globaldata.m_dpbuffer.ShowList.showtemp.BPSetTemp.ToString("0"));
tempshow
.
SubItems
.
Add
(
IsException
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
BPActualTemp
)
+
" / "
+
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
BPSetTemp
.
ToString
(
"0"
));
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
BPActualTemp
<
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16InjPortBPTemp
+
1
)
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showtemp
.
BPActualTemp
<
globaldata
.
m_hwconfig
.
hwconfiginfo
.
u16InjPortBPTemp
+
1
)
{
{
...
...
GcDevicePc/DeviceConfigUI/Auxiliary.cs
View file @
129cc874
...
@@ -53,7 +53,10 @@ namespace GcDevicePc.DeviceConfigUI
...
@@ -53,7 +53,10 @@ namespace GcDevicePc.DeviceConfigUI
{
{
if
(
this
.
hWConfig
!=
null
)
if
(
this
.
hWConfig
!=
null
)
{
{
//this.hWConfig.hwconfiginfo.u16AuxHeaterNum = this.AuxHeaterNum.SelectedIndex;
//this.hWConfig.hwconfiginfo.u16AuxHeaterNum = this.AuxHeaterNum.SelectedIndex;.
this
.
hWConfig
.
hwconfiginfo
.
u16AuxHeater
=
this
.
AuxHeater1
.
Checked
||
this
.
AuxHeater2
.
Checked
?
1
:
0
;
this
.
hWConfig
.
hwconfiginfo
.
u16AuxHeaterNum
=
(
this
.
AuxHeater1
.
Checked
?
1
:
0
)
+
(
this
.
AuxHeater2
.
Checked
?
1
:
0
);
this
.
hWConfig
.
hwconfiginfo
.
u16AuxHeaterNum
=
(
this
.
AuxHeater1
.
Checked
?
1
:
0
)
+
(
this
.
AuxHeater2
.
Checked
?
1
:
0
);
this
.
hWConfig
.
hwconfiginfo
.
u16AuxHeater1
=
this
.
AuxHeater1
.
Checked
?
1
:
0
;
this
.
hWConfig
.
hwconfiginfo
.
u16AuxHeater1
=
this
.
AuxHeater1
.
Checked
?
1
:
0
;
...
...
GcDevicePc/DeviceConfigUI/ConfigDevice.cs
View file @
129cc874
...
@@ -516,7 +516,6 @@ namespace GcDevicePc.DeviceConfigUI
...
@@ -516,7 +516,6 @@ namespace GcDevicePc.DeviceConfigUI
//DialogResult dr = saveDialog.ShowDialog();
//DialogResult dr = saveDialog.ShowDialog();
//if (dr == DialogResult.OK)
//if (dr == DialogResult.OK)
try
try
{
{
...
@@ -537,6 +536,8 @@ namespace GcDevicePc.DeviceConfigUI
...
@@ -537,6 +536,8 @@ namespace GcDevicePc.DeviceConfigUI
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
==
false
)
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
==
false
)
{
{
savebtn
.
Enabled
=
false
;
SCclient
.
WtClientInit
(
ip
,
globaldata
.
fileserverport
);
SCclient
.
WtClientInit
(
ip
,
globaldata
.
fileserverport
);
SCclient
.
WtClientCopytoServer
(
"DevStatus.ini"
,
sendfilename
,
globaldata
.
remoteFolder
+
"仪器状态\\"
);
SCclient
.
WtClientCopytoServer
(
"DevStatus.ini"
,
sendfilename
,
globaldata
.
remoteFolder
+
"仪器状态\\"
);
//MessageBox.Show("更新配置完成!");
//MessageBox.Show("更新配置完成!");
...
@@ -549,7 +550,7 @@ namespace GcDevicePc.DeviceConfigUI
...
@@ -549,7 +550,7 @@ namespace GcDevicePc.DeviceConfigUI
ret
=
SCclient
.
WtHMIRunPro
(
"GcDevice.exe"
,
globaldata
.
exeremoteFolder
);
ret
=
SCclient
.
WtHMIRunPro
(
"GcDevice.exe"
,
globaldata
.
exeremoteFolder
);
if
(
ret
==
1
)
if
(
ret
==
1
)
{
{
savebtn
.
Enabled
=
true
;
DialogResult
result
=
MessageBox
.
Show
(
"HMI自重启成功,是否重启PC软件以同步?"
,
"提示信息"
,
MessageBoxButtons
.
OKCancel
,
MessageBoxIcon
.
None
,
MessageBoxDefaultButton
.
Button1
,
MessageBoxOptions
.
ServiceNotification
);
DialogResult
result
=
MessageBox
.
Show
(
"HMI自重启成功,是否重启PC软件以同步?"
,
"提示信息"
,
MessageBoxButtons
.
OKCancel
,
MessageBoxIcon
.
None
,
MessageBoxDefaultButton
.
Button1
,
MessageBoxOptions
.
ServiceNotification
);
if
(
result
==
DialogResult
.
OK
)
if
(
result
==
DialogResult
.
OK
)
{
{
...
...
GcDevicePc/FormUser.Designer.cs
View file @
129cc874
...
@@ -103,6 +103,5 @@
...
@@ -103,6 +103,5 @@
private
System
.
Windows
.
Forms
.
Button
buttonFID
;
private
System
.
Windows
.
Forms
.
Button
buttonFID
;
private
System
.
Windows
.
Forms
.
Button
buttonauto
;
private
System
.
Windows
.
Forms
.
Button
buttonauto
;
private
CK_UI
.
InfoBarUser
infoBarUser1
;
private
CK_UI
.
InfoBarUser
infoBarUser1
;
}
}
}
}
\ No newline at end of file
GcDevicePc/FormUser.cs
View file @
129cc874
...
@@ -37,23 +37,23 @@ namespace GcDevicePc
...
@@ -37,23 +37,23 @@ namespace GcDevicePc
// MessageBox.Show("停用");
// MessageBox.Show("停用");
Console
.
WriteLine
(
"停用"
);
Console
.
WriteLine
(
"停用"
);
}
}
public
bool
isFire
;
//
public bool isFire;
public
double
time
;
//
public double time;
public
event
Fireport
autofire
;
public
event
Fireport
autofire
;
//点火操作
//点火操作
private
void
buttonFID_Click
(
object
sender
,
EventArgs
e
)
private
void
buttonFID_Click
(
object
sender
,
EventArgs
e
)
{
{
if
(
isFire
)
//
if (isFire)
{
{
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
fDetStatue
!=
2
)
if
(
globaldata
.
m_dpbuffer
.
ShowList
.
showDet
.
fDetStatue
!=
2
)
autofire
(
0
,
10
,
5
);
autofire
(
0
,
10
,
5
);
else
else
MessageBox
.
Show
(
"点火操作禁止,FID已经点火成功"
);
MessageBox
.
Show
(
"点火操作禁止,FID已经点火成功"
);
}
}
else
//
else
{
//
{
MessageBox
.
Show
(
"请"
+
time
+
"分钟后在点火"
);
//
MessageBox.Show("请"+ time + "分钟后在点火");
}
//
}
//if (globaldata.m_dpbuffer.ShowList.showDet.fDetStatue != 2)
//if (globaldata.m_dpbuffer.ShowList.showDet.fDetStatue != 2)
// autofire(0, 10, 5);
// autofire(0, 10, 5);
//else
//else
...
@@ -63,25 +63,27 @@ namespace GcDevicePc
...
@@ -63,25 +63,27 @@ namespace GcDevicePc
//自动校准
//自动校准
private
void
buttonauto_Click
(
object
sender
,
EventArgs
e
)
private
void
buttonauto_Click
(
object
sender
,
EventArgs
e
)
{
{
DialogResult
dr
=
new
CK_UI
.
LandIn
(
"calibration"
,
DateTime
.
Now
.
ToString
(
"HHmm"
)).
ShowDialog
();
//
DialogResult dr = new CK_UI.LandIn("calibration", DateTime.Now.ToString("HHmm")).ShowDialog();
if
(
dr
==
DialogResult
.
OK
)
//
if (dr == DialogResult.OK)
{
//
{
if
(
CK_UI
.
LandIn
.
Island
)
//
if (CK_UI.LandIn.Island)
{
{
//CKVocAnalyzer.CtrlUserAdjust auto = new CKVocAnalyzer.CtrlUserAdjust(CKVocAnalyzer.CtrlUserAdjust.AdjustType.AT_Yang);
CKVocAnalyzer
.
AutoAdjust
auto
=
new
CKVocAnalyzer
.
AutoAdjust
();
CKVocAnalyzer
.
AutoAdjust
auto
=
new
CKVocAnalyzer
.
AutoAdjust
();
auto
.
Show
();
auto
.
Show
();
Trace
.
WriteLine
(
string
.
Format
(
"用户{0},进入自动校准模式"
,
"calibration"
),
"sys"
);
//Trace.WriteLine(string.Format("用户{0},进入自动校准模式", "calibration"), "sys");
}
else
{
MessageBox
.
Show
(
"无权限操作!!!!"
);
}
}
}
//else
// {
// MessageBox.Show("无权限操作!!!!");
// }
//}
if
(
dr
==
DialogResult
.
No
)
//
if (dr == DialogResult.No)
{
//
{
// MessageBox.Show("无权限操作!!!!");
//
// MessageBox.Show("无权限操作!!!!");
}
//
}
}
}
...
...
GcDevicePc/GCBuffer/GCMethodConfig.cs
View file @
129cc874
...
@@ -1105,7 +1105,6 @@ namespace GcDevicePc.GCBuffer
...
@@ -1105,7 +1105,6 @@ namespace GcDevicePc.GCBuffer
savemethodconfig
.
WriteProfileInt
(
strKey
,
"控制方式"
,
auxs
[
cFront
].
ControlMode
);
savemethodconfig
.
WriteProfileInt
(
strKey
,
"控制方式"
,
auxs
[
cFront
].
ControlMode
);
savemethodconfig
.
WriteProfileInt
(
strKey
,
"加热器开关"
,
auxs
[
cFront
].
Heater
);
savemethodconfig
.
WriteProfileInt
(
strKey
,
"加热器开关"
,
auxs
[
cFront
].
Heater
);
savemethodconfig
.
WriteProfileInt
(
"辅助"
,
"辅助加热区1"
,
auxs
[
cFront
].
Heater
);
savemethodconfig
.
WriteProfileInt
(
"辅助"
,
"辅助加热区1"
,
auxs
[
cFront
].
Heater
);
savemethodconfig
.
WriteProfileInt
(
"辅助"
,
"加热开关"
,
auxs
[
cFront
].
Heater
);
savemethodconfig
.
WriteProfileFloat
(
"辅助"
,
"辅助加热区1设定温度"
,
auxs
[
cFront
].
HeaterTmpSet
);
savemethodconfig
.
WriteProfileFloat
(
"辅助"
,
"辅助加热区1设定温度"
,
auxs
[
cFront
].
HeaterTmpSet
);
savemethodconfig
.
WriteProfileFloat
(
strKey
,
"压力值"
,
auxs
[
cFront
].
pipPressureSet
);
savemethodconfig
.
WriteProfileFloat
(
strKey
,
"压力值"
,
auxs
[
cFront
].
pipPressureSet
);
savemethodconfig
.
WriteProfileFloat
(
strKey
,
"流量值"
,
auxs
[
cFront
].
pipFlowSet
);
savemethodconfig
.
WriteProfileFloat
(
strKey
,
"流量值"
,
auxs
[
cFront
].
pipFlowSet
);
...
@@ -1128,6 +1127,16 @@ namespace GcDevicePc.GCBuffer
...
@@ -1128,6 +1127,16 @@ namespace GcDevicePc.GCBuffer
savemethodconfig
.
WriteProfileInt
(
strKey
,
"隔垫吹扫流量开关"
,
auxs
[
cBehind
].
pipSeptumBlowFlow
);
savemethodconfig
.
WriteProfileInt
(
strKey
,
"隔垫吹扫流量开关"
,
auxs
[
cBehind
].
pipSeptumBlowFlow
);
savemethodconfig
.
WriteProfileFloat
(
strKey
,
"隔垫吹扫流量值"
,
auxs
[
cBehind
].
pipSeptumBlowFlowSet
);
savemethodconfig
.
WriteProfileFloat
(
strKey
,
"隔垫吹扫流量值"
,
auxs
[
cBehind
].
pipSeptumBlowFlowSet
);
if
(
auxs
[
cFront
].
Heater
==
1
||
auxs
[
cBehind
].
Heater
==
1
)
{
savemethodconfig
.
WriteProfileInt
(
"辅助"
,
"加热开关"
,
1
);
}
else
{
savemethodconfig
.
WriteProfileInt
(
"辅助"
,
"加热开关"
,
0
);
}
...
...
GcDevicePc/GCBuffer/HMIBuffer.cs
View file @
129cc874
...
@@ -56,6 +56,21 @@ namespace GcDevicePc.GCBuffer
...
@@ -56,6 +56,21 @@ namespace GcDevicePc.GCBuffer
public
hmiinfo
gcinfo
=
new
hmiinfo
();
public
hmiinfo
gcinfo
=
new
hmiinfo
();
public
struct
adjust
{
public
float
setpotency
;
//设定浓度
public
float
trackpotency
;
//跟踪浓度
public
long
settime
;
//设定时间
public
long
executefun
;
//执行功能
public
long
funrun
;
//功能启停
public
long
runtime
;
//运行时间
public
long
executestat
;
//执行状态
//
public
int
currentstate
;
//当前状态
}
public
adjust
gcadjust
=
new
adjust
();
public
HMIBuffer
()
public
HMIBuffer
()
{
{
gcinfo
.
batno
=
0
;
gcinfo
.
batno
=
0
;
...
@@ -66,14 +81,23 @@ namespace GcDevicePc.GCBuffer
...
@@ -66,14 +81,23 @@ namespace GcDevicePc.GCBuffer
gcinfo
.
waitstart
=
0
;
gcinfo
.
waitstart
=
0
;
gcinfo
.
hmistatus
=
0
;
gcinfo
.
hmistatus
=
0
;
gcinfo
.
runtime
=
0
;
gcinfo
.
runtime
=
0
;
gcinfo
.
TenRelay
=
new
byte
[
1
0
];
gcinfo
.
TenRelay
=
new
byte
[
1
2
];
gcinfo
.
FireStatus
=
new
ushort
[
4
]
{
0
,
0
,
0
,
0
};
gcinfo
.
FireStatus
=
new
ushort
[
4
]
{
0
,
0
,
0
,
0
};
gcinfo
.
DACStatus
=
new
ushort
[
6
]
{
0
,
0
,
0
,
0
,
0
,
0
};
gcinfo
.
DACStatus
=
new
ushort
[
6
]
{
0
,
0
,
0
,
0
,
0
,
0
};
gcinfo
.
ErrorStatus
=
new
byte
[
9
];
gcinfo
.
ErrorStatus
=
new
byte
[
9
];
gcinfo
.
hmioffline
=
false
;
gcinfo
.
hmioffline
=
false
;
gcinfo
.
HMIMac
=
new
ushort
[
3
]
{
0
,
0
,
0
};
gcinfo
.
HMIMac
=
new
ushort
[
3
]
{
0
,
0
,
0
};
gcinfo
.
EPCStatus
=
new
ushort
[
16
]
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
gcinfo
.
EPCStatus
=
new
ushort
[
16
]
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
gcinfo
.
HmiAbnormal
=
new
ushort
[
3
]
{
0
,
0
,
0
};
gcinfo
.
HmiAbnormal
=
new
ushort
[
3
]
{
0
,
0
,
0
};
gcadjust
.
executefun
=
0
;
gcadjust
.
executestat
=
0
;
gcadjust
.
runtime
=
0
;
gcadjust
.
funrun
=
0
;
gcadjust
.
setpotency
=
0
;
gcadjust
.
settime
=
1800
;
gcadjust
.
trackpotency
=
0
;
gcadjust
.
currentstate
=
0
;
}
}
~
HMIBuffer
()
~
HMIBuffer
()
...
...
GcDevicePc/MDIBase.Designer.cs
View file @
129cc874
...
@@ -337,7 +337,7 @@
...
@@ -337,7 +337,7 @@
// timerWorker
// timerWorker
//
//
this
.
timerWorker
.
Enabled
=
true
;
this
.
timerWorker
.
Enabled
=
true
;
this
.
timerWorker
.
Interval
=
5
000
;
this
.
timerWorker
.
Interval
=
1
000
;
this
.
timerWorker
.
Tick
+=
new
System
.
EventHandler
(
this
.
timerWorker_Tick
);
this
.
timerWorker
.
Tick
+=
new
System
.
EventHandler
(
this
.
timerWorker_Tick
);
//
//
// toolStripStatusLabelusertime
// toolStripStatusLabelusertime
...
...
GcDevicePc/MDIBase.cs
View file @
129cc874
using
GcDevicePc.CK_UI
;
using
System
;
using
System.ComponentModel
;
using
System.Windows.Forms
;
using
System.Diagnostics
;
using
System.IO
;
using
GcDevicePc.ProThread
;
using
GcDevicePc.Common
;
using
GcDevicePc.Common
;
using
System.Threading
;
using
GcDevicePc.CK_UI
;
using
Ini.Net
;
using
System.Runtime.InteropServices
;
using
GcDevicePc.ConfigMethod
;
using
GcDevicePc.ConfigMethod
;
using
GcDevicePc.Controls
;
using
GcDevicePc.Controls
;
using
GcDevicePc.GCBuffer
;
using
GcDevicePc.GCBuffer
;
using
GcDevicePc.IniParam
;
using
GcDevicePc.IniParam
;
using
GcDevicePc.ProThread
;
using
Ini.Net
;
using
System
;
using
System.ComponentModel
;
using
System.Diagnostics
;
using
System.Drawing
;
using
System.Drawing
;
using
System.IO
;
using
System.Runtime.InteropServices
;
using
System.Threading
;
using
System.Windows.Forms
;
namespace
GcDevicePc
namespace
GcDevicePc
{
{
...
@@ -21,7 +21,7 @@ namespace GcDevicePc
...
@@ -21,7 +21,7 @@ namespace GcDevicePc
{
{
#
region
相关变量
#
region
相关变量
//private int childFormNumber = 0;
//private int childFormNumber = 0;
private
static
FormUser
_userForm
;
//用户界面
private
static
FormUser
_userForm
;
//用户界面
private
static
Formdebug
_debugForm
;
//调试界面
private
static
Formdebug
_debugForm
;
//调试界面
private
static
EPCTips
_EPCTipsForm
;
//EPC报警界面
private
static
EPCTips
_EPCTipsForm
;
//EPC报警界面
...
@@ -34,7 +34,7 @@ namespace GcDevicePc
...
@@ -34,7 +34,7 @@ namespace GcDevicePc
private
string
Formstr
;
//窗口名称
private
string
Formstr
;
//窗口名称
private
string
statestr
;
//状态信息
private
string
statestr
;
//状态信息
// private Color stateColor=new Color();//状态颜色;
// private Color stateColor=new Color();//状态颜色;
private
bool
IsStateColor
=
false
;
private
bool
IsStateColor
=
false
;
System
.
DateTime
startTime
;
//系统启动时间
System
.
DateTime
startTime
;
//系统启动时间
TimeSpan
timespan
;
TimeSpan
timespan
;
...
@@ -85,7 +85,7 @@ namespace GcDevicePc
...
@@ -85,7 +85,7 @@ namespace GcDevicePc
private
DataOutput
wtd624xOutput
=
new
DataOutput
();
private
DataOutput
wtd624xOutput
=
new
DataOutput
();
private
SignalDataToHw
signalDataTohw
=
new
SignalDataToHw
();
private
SignalDataToHw
signalDataTohw
=
new
SignalDataToHw
();
private
SendDataToZB
signalDataTozb
=
new
SendDataToZB
();
//
private SendDataToZB signalDataTozb = new SendDataToZB();
#
endregion
#
endregion
#
region
Author
by
zjx
#
region
Author
by
zjx
...
@@ -106,9 +106,9 @@ namespace GcDevicePc
...
@@ -106,9 +106,9 @@ namespace GcDevicePc
CKVocAnalyzer
.
Config
.
Instance
.
ReadAxisRange
();
CKVocAnalyzer
.
Config
.
Instance
.
ReadAxisRange
();
LogOperate
.
LogInit
.
Instance
.
path
=
CKVocAnalyzer
.
GlobalCKV
.
FolderLog
;
LogOperate
.
LogInit
.
Instance
.
path
=
CKVocAnalyzer
.
GlobalCKV
.
FolderLog
;
LogOperate
.
LogInit
.
Instance
.
Init
();
LogOperate
.
LogInit
.
Instance
.
Init
();
CKVocAnalyzer
.
GlobalCKV
.
tcpservice
.
tcpStart
(
CKVocAnalyzer
.
GlobalCKV
.
hostadd
,
CKVocAnalyzer
.
GlobalCKV
.
tcpport
);
CKVocAnalyzer
.
GlobalCKV
.
tcpservice
.
tcpStart
(
CKVocAnalyzer
.
GlobalCKV
.
hostadd
,
CKVocAnalyzer
.
GlobalCKV
.
tcpport
);
//自动删除
//自动删除
SpaceM
.
SpaceThread
sthread
=
new
SpaceM
.
SpaceThread
(
CKVocAnalyzer
.
GlobalCKV
.
HistDataPath
,
CKVocAnalyzer
.
GlobalCKV
.
SpaceSize
,
CKVocAnalyzer
.
GlobalCKV
.
SpaceTimes
);
SpaceM
.
SpaceThread
sthread
=
new
SpaceM
.
SpaceThread
(
CKVocAnalyzer
.
GlobalCKV
.
HistDataPath
,
CKVocAnalyzer
.
GlobalCKV
.
SpaceSize
,
CKVocAnalyzer
.
GlobalCKV
.
SpaceTimes
);
sthread
.
SpaceStart
();
sthread
.
SpaceStart
();
Log
.
Info
(
"System Init Success"
);
Log
.
Info
(
"System Init Success"
);
...
@@ -330,14 +330,14 @@ namespace GcDevicePc
...
@@ -330,14 +330,14 @@ namespace GcDevicePc
_EPCTipsForm
=
new
EPCTips
();
_EPCTipsForm
=
new
EPCTips
();
_EPCTipsForm
.
MdiParent
=
this
;
_EPCTipsForm
.
MdiParent
=
this
;
_EPCTipsForm
.
Location
=
new
Point
(
0
,
ClientSize
.
Height
-
_EPCTipsForm
.
Height
);
_EPCTipsForm
.
Location
=
new
Point
(
0
,
ClientSize
.
Height
-
_EPCTipsForm
.
Height
);
_EPCTipsForm
.
Hide
();
_EPCTipsForm
.
Hide
();
// debugForm.Show();
// debugForm.Show();
Formstr
=
"用户界面"
;
Formstr
=
"用户界面"
;
startTime
=
DateTime
.
Now
;
startTime
=
DateTime
.
Now
;
// toolStripStatusLabeSystme.Text = string.Format("状态:{0}", Formstr);
// toolStripStatusLabeSystme.Text = string.Format("状态:{0}", Formstr);
timespan
=
DateTime
.
Now
-
startTime
;
timespan
=
DateTime
.
Now
-
startTime
;
toolStripStatusLabelusertime
.
Text
=
String
.
Format
(
"运行时间:{0}"
,
timespan
.
Days
.
ToString
()
+
"天"
+
timespan
.
Hours
.
ToString
()
+
"时"
+
timespan
.
Minutes
.
ToString
()
+
"分"
+
timespan
.
Seconds
.
ToString
()
+
"秒"
);
toolStripStatusLabelusertime
.
Text
=
String
.
Format
(
"运行时间:{0}"
,
timespan
.
Days
.
ToString
()
+
"天"
+
timespan
.
Hours
.
ToString
()
+
"时"
+
timespan
.
Minutes
.
ToString
()
+
"分"
+
timespan
.
Seconds
.
ToString
()
+
"秒"
);
...
@@ -351,7 +351,7 @@ namespace GcDevicePc
...
@@ -351,7 +351,7 @@ namespace GcDevicePc
{
{
SetMainFormMethodName
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_MethodName
.
Substring
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_MethodName
.
LastIndexOf
(
"\\"
)
+
1
));
SetMainFormMethodName
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_MethodName
.
Substring
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_MethodName
.
LastIndexOf
(
"\\"
)
+
1
));
}
}
title
.
Width
=
this
.
ClientSize
.
Width
-
5
;
title
.
Width
=
this
.
ClientSize
.
Width
-
5
;
title
.
Location
=
new
Point
(
0
,
0
);
title
.
Location
=
new
Point
(
0
,
0
);
...
@@ -367,7 +367,7 @@ namespace GcDevicePc
...
@@ -367,7 +367,7 @@ namespace GcDevicePc
autopensys
();
autopensys
();
this
.
SizeChanged
+=
new
EventHandler
(
this
.
MDIBase_SizeChanged
);
this
.
SizeChanged
+=
new
EventHandler
(
this
.
MDIBase_SizeChanged
);
(
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMOrdBtnClicked
+=
PictureMenu1_PMOrdBtnClicked
;
(
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMOrdBtnClicked
+=
PictureMenu1_PMOrdBtnClicked
;
(
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMOptBtnClicked
+=
PictureMenu1_PMOptBtnClicked
;
(
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMOptBtnClicked
+=
PictureMenu1_PMOptBtnClicked
;
(
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMSysBtnClicked
+=
PictureMenu1_PMSysBtnClicked
;
(
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMSysBtnClicked
+=
PictureMenu1_PMSysBtnClicked
;
...
@@ -376,7 +376,7 @@ namespace GcDevicePc
...
@@ -376,7 +376,7 @@ namespace GcDevicePc
//pictureMenu1.PMSysBtnClicked += PictureMenu1_PMSysBtnClicked;
//pictureMenu1.PMSysBtnClicked += PictureMenu1_PMSysBtnClicked;
//点火接口
//点火接口
_userForm
.
autofire
+=
new
Fireport
(
fireupopt
);
_userForm
.
autofire
+=
new
Fireport
(
fireupopt
);
//this.a = false;
//this.a = false;
epcs
=
false
;
epcs
=
false
;
timer2
.
Start
();
timer2
.
Start
();
...
@@ -522,7 +522,7 @@ namespace GcDevicePc
...
@@ -522,7 +522,7 @@ namespace GcDevicePc
LMessageBox
dialog
=
new
LMessageBox
(
this
.
Location
,
this
.
Size
,
true
,
"停止系统"
,
"确定停止系统吗?"
,
LMessageBox
.
MessageBoxPosition
.
MBP_Center
);
LMessageBox
dialog
=
new
LMessageBox
(
this
.
Location
,
this
.
Size
,
true
,
"停止系统"
,
"确定停止系统吗?"
,
LMessageBox
.
MessageBoxPosition
.
MBP_Center
);
//if (dialog.ShowDialog() == DialogResult.OK)
//if (dialog.ShowDialog() == DialogResult.OK)
//{
//{
//}
//}
//DialogResult dr = MessageBox.Show("确定停止系统吗?", "停止系统", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2, MessageBoxOptions.DefaultDesktopOnly);
//DialogResult dr = MessageBox.Show("确定停止系统吗?", "停止系统", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2, MessageBoxOptions.DefaultDesktopOnly);
...
@@ -651,7 +651,7 @@ namespace GcDevicePc
...
@@ -651,7 +651,7 @@ namespace GcDevicePc
globaldata
.
starttimer
=
0x7FFFFFFF
;
globaldata
.
starttimer
=
0x7FFFFFFF
;
IniFile
IniParser
=
new
IniFile
(
tmpfile
);
IniFile
IniParser
=
new
IniFile
(
tmpfile
);
if
(
IniParser
.
KeyExists
(
"StartUp"
,
"打开系统"
))
if
(
IniParser
.
KeyExists
(
"StartUp"
,
"打开系统"
))
opensys
=
IniParser
.
ReadInteger
(
"StartUp"
,
"打开系统"
);
opensys
=
IniParser
.
ReadInteger
(
"StartUp"
,
"打开系统"
);
if
((
opensys
==
1
&&
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
==
0
)
||
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
!=
0
)
if
((
opensys
==
1
&&
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
==
0
)
||
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
!=
0
)
...
@@ -665,7 +665,7 @@ namespace GcDevicePc
...
@@ -665,7 +665,7 @@ namespace GcDevicePc
// hmistatus_opensys();
// hmistatus_opensys();
//}
//}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
Log
.
Error
(
ex
.
Message
);
Log
.
Error
(
ex
.
Message
);
}
}
...
@@ -759,12 +759,12 @@ namespace GcDevicePc
...
@@ -759,12 +759,12 @@ namespace GcDevicePc
}
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
Log
.
Error
(
ex
.
Message
);
Log
.
Error
(
ex
.
Message
);
}
}
}
}
/// <summary>
/// <summary>
/// 更新显示栏信息
/// 更新显示栏信息
/// </summary>
/// </summary>
...
@@ -773,7 +773,7 @@ namespace GcDevicePc
...
@@ -773,7 +773,7 @@ namespace GcDevicePc
/// 1.0.2.3 添加了周期完成后,重新绘图功能
/// 1.0.2.3 添加了周期完成后,重新绘图功能
private
void
timer1_Tick
(
object
sender
,
EventArgs
e
)
private
void
timer1_Tick
(
object
sender
,
EventArgs
e
)
{
{
this
.
Text
=
String
.
Format
(
"Tetchrom色谱工作站-1.5.
4
{0}"
,
Formstr
);
this
.
Text
=
String
.
Format
(
"Tetchrom色谱工作站-1.5.
5
{0}"
,
Formstr
);
//if (LandIn.Island)
//if (LandIn.Island)
//{
//{
// HmiStatus.Text = String.Format("状态:{0}", statestr);
// HmiStatus.Text = String.Format("状态:{0}", statestr);
...
@@ -794,17 +794,17 @@ namespace GcDevicePc
...
@@ -794,17 +794,17 @@ namespace GcDevicePc
HmiStatus
.
Text
=
String
.
Format
(
"状态:{0}"
,
statestr
);
HmiStatus
.
Text
=
String
.
Format
(
"状态:{0}"
,
statestr
);
timespan
=
System
.
DateTime
.
Now
-
startTime
;
timespan
=
System
.
DateTime
.
Now
-
startTime
;
toolStripStatusLabelusertime
.
Text
=
String
.
Format
(
"运行时间:{0}"
,
toolStripStatusLabelusertime
.
Text
=
String
.
Format
(
"运行时间:{0}"
,
timespan
.
Days
.
ToString
()
+
"天"
+
timespan
.
Hours
.
ToString
()
+
"时"
+
timespan
.
Minutes
.
ToString
()
+
"分"
+
timespan
.
Seconds
.
ToString
()
+
"秒"
);
timespan
.
Days
.
ToString
()
+
"天"
+
timespan
.
Hours
.
ToString
()
+
"时"
+
timespan
.
Minutes
.
ToString
()
+
"分"
+
timespan
.
Seconds
.
ToString
()
+
"秒"
);
// Trace.WriteLine(string.Format("时间{0},状态{1}", getIdleTick(),LandIn.Island),"sys");
// Trace.WriteLine(string.Format("时间{0},状态{1}", getIdleTick(),LandIn.Island),"sys");
//Console.WriteLine(t2.ToString());
//Console.WriteLine(t2.ToString());
//监视界面活动
//监视界面活动
if
(
getIdleTick
()
>
60
*
30
&&
LandIn
.
Island
)
if
(
getIdleTick
()
>
60
*
30
&&
LandIn
.
Island
)
{
{
if
(
_userForm
!=
null
)
if
(
_userForm
!=
null
)
{
{
Formstr
=
"用户窗口"
;
Formstr
=
"用户窗口"
;
...
@@ -813,7 +813,7 @@ namespace GcDevicePc
...
@@ -813,7 +813,7 @@ namespace GcDevicePc
}
}
LandIn
.
Island
=
false
;
LandIn
.
Island
=
false
;
SetMenu
(
LandIn
.
Island
);
SetMenu
(
LandIn
.
Island
);
Trace
.
WriteLine
(
"进入自动销户"
,
"sys"
);
Trace
.
WriteLine
(
"进入自动销户"
,
"sys"
);
}
}
}
}
[
StructLayout
(
LayoutKind
.
Sequential
)]
[
StructLayout
(
LayoutKind
.
Sequential
)]
...
@@ -836,7 +836,7 @@ namespace GcDevicePc
...
@@ -836,7 +836,7 @@ namespace GcDevicePc
LASTINPUTINFO
vLastInputInfo
=
new
LASTINPUTINFO
();
LASTINPUTINFO
vLastInputInfo
=
new
LASTINPUTINFO
();
vLastInputInfo
.
cbSize
=
Marshal
.
SizeOf
(
vLastInputInfo
);
vLastInputInfo
.
cbSize
=
Marshal
.
SizeOf
(
vLastInputInfo
);
if
(!
GetLastInputInfo
(
ref
vLastInputInfo
))
return
0
;
if
(!
GetLastInputInfo
(
ref
vLastInputInfo
))
return
0
;
return
(
Environment
.
TickCount
-
(
long
)
vLastInputInfo
.
dwTime
)
/
1000
;
return
(
Environment
.
TickCount
-
(
long
)
vLastInputInfo
.
dwTime
)
/
1000
;
}
}
public
void
SendPCCMD
(
bool
flag
)
public
void
SendPCCMD
(
bool
flag
)
...
@@ -981,7 +981,7 @@ namespace GcDevicePc
...
@@ -981,7 +981,7 @@ namespace GcDevicePc
catch
catch
{
{
}
}
}
}
private
void
backgroundWorker1_RunWorkerCompleted
(
object
sender
,
RunWorkerCompletedEventArgs
e
)
private
void
backgroundWorker1_RunWorkerCompleted
(
object
sender
,
RunWorkerCompletedEventArgs
e
)
...
@@ -991,11 +991,11 @@ namespace GcDevicePc
...
@@ -991,11 +991,11 @@ namespace GcDevicePc
this
.
workProgress
.
Visible
=
false
;
this
.
workProgress
.
Visible
=
false
;
autoResetEvent
.
Set
();
autoResetEvent
.
Set
();
}
}
catch
catch
{
{
}
}
}
}
private
void
WaitHMIFree
()
private
void
WaitHMIFree
()
...
@@ -1006,7 +1006,7 @@ namespace GcDevicePc
...
@@ -1006,7 +1006,7 @@ namespace GcDevicePc
this
.
workProgress
.
Value
=
0
;
this
.
workProgress
.
Value
=
0
;
this
.
backgroundWorker1
.
RunWorkerAsync
();
this
.
backgroundWorker1
.
RunWorkerAsync
();
}
}
}
}
private
void
backgroundWorker2_DoWork
(
object
sender
,
DoWorkEventArgs
e
)
private
void
backgroundWorker2_DoWork
(
object
sender
,
DoWorkEventArgs
e
)
...
@@ -1074,7 +1074,7 @@ namespace GcDevicePc
...
@@ -1074,7 +1074,7 @@ namespace GcDevicePc
catch
catch
{
{
}
}
}
}
private
void
backgroundWorker2_RunWorkerCompleted
(
object
sender
,
RunWorkerCompletedEventArgs
e
)
private
void
backgroundWorker2_RunWorkerCompleted
(
object
sender
,
RunWorkerCompletedEventArgs
e
)
...
@@ -1087,7 +1087,7 @@ namespace GcDevicePc
...
@@ -1087,7 +1087,7 @@ namespace GcDevicePc
catch
catch
{
{
}
}
}
}
private
void
WaitHMIWork
()
private
void
WaitHMIWork
()
...
@@ -1099,12 +1099,12 @@ namespace GcDevicePc
...
@@ -1099,12 +1099,12 @@ namespace GcDevicePc
this
.
backgroundWorker2
.
RunWorkerAsync
();
this
.
backgroundWorker2
.
RunWorkerAsync
();
}
}
}
}
private
void
backgroundWorker1_ProgressChanged
(
object
sender
,
ProgressChangedEventArgs
e
)
private
void
backgroundWorker1_ProgressChanged
(
object
sender
,
ProgressChangedEventArgs
e
)
{
{
this
.
workProgress
.
Value
=
e
.
ProgressPercentage
;
this
.
workProgress
.
Value
=
e
.
ProgressPercentage
;
}
}
private
void
backgroundWorker2_ProgressChanged
(
object
sender
,
ProgressChangedEventArgs
e
)
private
void
backgroundWorker2_ProgressChanged
(
object
sender
,
ProgressChangedEventArgs
e
)
{
{
this
.
workProgress
.
Value
=
e
.
ProgressPercentage
;
this
.
workProgress
.
Value
=
e
.
ProgressPercentage
;
...
@@ -1196,7 +1196,7 @@ namespace GcDevicePc
...
@@ -1196,7 +1196,7 @@ namespace GcDevicePc
SetMainFormMethodName
(
tmpname
);
SetMainFormMethodName
(
tmpname
);
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_MethodName
=
Path
.
Combine
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfolderinfo
.
MethodFolder
,
tmpname
.
ToString
());
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_MethodName
=
Path
.
Combine
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfolderinfo
.
MethodFolder
,
tmpname
.
ToString
());
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
2
)
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
2
)
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_BATMethodName
=
Path
.
Combine
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfolderinfo
.
MethodFolder
,
tmpname
.
ToString
());
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_BATMethodName
=
Path
.
Combine
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfolderinfo
.
MethodFolder
,
tmpname
.
ToString
());
globaldata
.
m_profileMethod
.
SetMethodFullName
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_MethodName
);
globaldata
.
m_profileMethod
.
SetMethodFullName
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_MethodName
);
...
@@ -1207,7 +1207,7 @@ namespace GcDevicePc
...
@@ -1207,7 +1207,7 @@ namespace GcDevicePc
globaldata
.
m_profileMethod
.
GetColTableElseAllPara
();
globaldata
.
m_profileMethod
.
GetColTableElseAllPara
();
globaldata
.
m_profileMethod
.
GetFidAllPara
();
globaldata
.
m_profileMethod
.
GetFidAllPara
();
globaldata
.
m_profileMethod
.
GetTcdAllPara
();
globaldata
.
m_profileMethod
.
GetTcdAllPara
();
globaldata
.
m_profileMethod
.
GetAuxiliaryAllPara
();
globaldata
.
m_profileMethod
.
GetAuxiliaryAllPara
();
}
}
else
else
{
{
...
@@ -1217,15 +1217,15 @@ namespace GcDevicePc
...
@@ -1217,15 +1217,15 @@ namespace GcDevicePc
catch
catch
{
{
Log
.
Error
(
"System Init Failed"
);
Log
.
Error
(
"System Init Failed"
);
}
}
statestr
=
"设备联机"
;
statestr
=
"设备联机"
;
IsStateColor
=
true
;
IsStateColor
=
true
;
hmiopt
=
new
HMIControl
(
globaldata
.
connection_ip
,
globaldata
.
datamodbusport
);
hmiopt
=
new
HMIControl
(
globaldata
.
connection_ip
,
globaldata
.
datamodbusport
);
mymodbus
=
new
GcDataTh
(
globaldata
.
connection_ip
,
globaldata
.
datamodbusport
);
mymodbus
=
new
GcDataTh
(
globaldata
.
connection_ip
,
globaldata
.
datamodbusport
);
...
@@ -1234,7 +1234,7 @@ namespace GcDevicePc
...
@@ -1234,7 +1234,7 @@ namespace GcDevicePc
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
sendtohw
)
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
sendtohw
)
{
{
signalDataTohw
.
DataToHwStart
();
signalDataTohw
.
DataToHwStart
();
signalDataTozb
.
DataToZBStart
();
//
signalDataTozb.DataToZBStart();
}
}
try
try
...
@@ -1252,7 +1252,7 @@ namespace GcDevicePc
...
@@ -1252,7 +1252,7 @@ namespace GcDevicePc
Slave485test
=
new
GCModbusSlave485
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
outputinfo
.
port
,
9600
);
Slave485test
=
new
GCModbusSlave485
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
outputinfo
.
port
,
9600
);
Slave485test
.
CModbusSlave485Init
(
1
,
2
,
3
,
5
);
Slave485test
.
CModbusSlave485Init
(
1
,
2
,
3
,
5
);
}
}
}
}
catch
(
Exception
e
)
catch
(
Exception
e
)
{
{
...
@@ -1265,7 +1265,7 @@ namespace GcDevicePc
...
@@ -1265,7 +1265,7 @@ namespace GcDevicePc
IsStateColor
=
false
;
IsStateColor
=
false
;
}
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
Log
.
Error
(
ex
.
Message
);
Log
.
Error
(
ex
.
Message
);
}
}
...
@@ -1456,6 +1456,21 @@ namespace GcDevicePc
...
@@ -1456,6 +1456,21 @@ namespace GcDevicePc
//tips_Show();
//tips_Show();
if
(
globaldata
.
IsStopOs
)
{
//if (!globaldata.OS_STOP)
{
globaldata
.
IsStopOs
=
!
globaldata
.
IsStopOs
;
globaldata
.
OS_STOP
=
true
;
hmiopt
.
WriteEndVal
();
WaitHMIFree
();
(
this
.
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMOptbtnstatus
=
0
;
(
this
.
title
.
Controls
.
Find
(
"pictureMenu1"
,
true
)[
0
]
as
PictureMenu
).
PMSysbtnstatus
=
0
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
=
false
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
work_Statue
=
0
;
}
}
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
2
)
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
2
)
{
{
...
@@ -1518,7 +1533,7 @@ namespace GcDevicePc
...
@@ -1518,7 +1533,7 @@ namespace GcDevicePc
case
4
:
case
4
:
case
5
:
case
5
:
//if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.work_Statue == 0)
//if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.work_Statue == 0)
// startbtn();
// startbtn();
break
;
break
;
case
6
:
case
6
:
case
7
:
case
7
:
...
@@ -1592,7 +1607,7 @@ namespace GcDevicePc
...
@@ -1592,7 +1607,7 @@ namespace GcDevicePc
bool
color_flag
=
true
;
bool
color_flag
=
true
;
switch
(
flag
)
switch
(
flag
)
{
{
//
case 0:
case
0
:
case
1
:
case
1
:
status_text
=
"空闲中..."
;
status_text
=
"空闲中..."
;
this
.
HmiStatus
.
BackColor
=
Color
.
LightGreen
;
this
.
HmiStatus
.
BackColor
=
Color
.
LightGreen
;
...
@@ -1663,29 +1678,16 @@ namespace GcDevicePc
...
@@ -1663,29 +1678,16 @@ namespace GcDevicePc
break
;
break
;
default
:
default
:
status_text
=
"设备连接"
;
//
status_text = "设备连接";
this
.
HmiStatus
.
BackColor
=
Color
.
LightGreen
;
//
this.HmiStatus.BackColor = Color.LightGreen;
break
;
break
;
}
}
statestr
=
status_text
;
statestr
=
status_text
;
IsStateColor
=
color_flag
;
IsStateColor
=
color_flag
;
Console
.
WriteLine
(
flag
.
ToString
());
//Console.WriteLine(flag.ToString());
//Console.WriteLine(""+ globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.work_Statue);
//if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.RunType == 0)
//{
// (this.title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMOptbtnstatus = 3;
//}
//else if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.RunType == 1)
//{
// (this.title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMOptbtnstatus = 4;
//}
//else if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.RunType == 2)
//{
// (this.title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMOptbtnstatus = 0;
//}
if
(
flag
!=
10
&&
flag
!=
0
)
if
(
flag
!=
10
&&
flag
!=
0
)
{
{
OSflag
=
true
;
OSflag
=
true
;
...
@@ -1719,7 +1721,7 @@ namespace GcDevicePc
...
@@ -1719,7 +1721,7 @@ namespace GcDevicePc
if
(
data
[
0
]
==
1
)
if
(
data
[
0
]
==
1
)
{
{
tips
+=
"检测器通道一报警,报警码:"
+
data
[
1
].
ToString
();
tips
+=
"检测器通道一报警,报警码:"
+
data
[
1
].
ToString
();
}
}
if
(
data
[
2
]
==
1
)
if
(
data
[
2
]
==
1
)
{
{
...
@@ -1756,7 +1758,7 @@ namespace GcDevicePc
...
@@ -1756,7 +1758,7 @@ namespace GcDevicePc
_EPCTipsForm
.
MyProperty
=
tips
;
_EPCTipsForm
.
MyProperty
=
tips
;
_EPCTipsForm
.
Show
();
_EPCTipsForm
.
Show
();
}
}
}
}
void
Common_HeadInfo
()
void
Common_HeadInfo
()
...
@@ -1772,7 +1774,7 @@ namespace GcDevicePc
...
@@ -1772,7 +1774,7 @@ namespace GcDevicePc
string
tmpFileName
;
string
tmpFileName
;
tmpFileName
=
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_MethodName
;
tmpFileName
=
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_MethodName
;
SetMainFormMethodNameTH
(
tmpFileName
.
Substring
(
tmpFileName
.
LastIndexOf
(
"\\"
)
+
1
)
+
" 单次运行"
);
SetMainFormMethodNameTH
(
tmpFileName
.
Substring
(
tmpFileName
.
LastIndexOf
(
"\\"
)
+
1
)
+
" 单次运行"
);
}
}
void
QuickRun_HeadInfo
()
void
QuickRun_HeadInfo
()
...
@@ -1810,23 +1812,23 @@ namespace GcDevicePc
...
@@ -1810,23 +1812,23 @@ namespace GcDevicePc
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_BATMethodName
=
System
.
IO
.
Path
.
Combine
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfolderinfo
.
MethodFolder
,
runtable
.
INIGetStringValue
(
"运行表"
,
key
[
num
],
"无"
));
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_BATMethodName
=
System
.
IO
.
Path
.
Combine
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfolderinfo
.
MethodFolder
,
runtable
.
INIGetStringValue
(
"运行表"
,
key
[
num
],
"无"
));
}
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
Trace
.
Write
(
ex
);
Trace
.
Write
(
ex
);
}
}
}
}
private
void
MDIBase_FormClosing
(
object
sender
,
FormClosingEventArgs
e
)
private
void
MDIBase_FormClosing
(
object
sender
,
FormClosingEventArgs
e
)
{
{
DialogResult
dr
=
new
QuitForm
().
ShowDialog
();
DialogResult
dr
=
new
QuitForm
().
ShowDialog
();
uint
ret
=
0
;
uint
ret
=
0
;
uint
count
=
0
;
uint
count
=
0
;
if
(
dr
==
DialogResult
.
OK
)
//停止系统并退出
if
(
dr
==
DialogResult
.
OK
)
//停止系统并退出
{
{
...
@@ -1879,8 +1881,8 @@ namespace GcDevicePc
...
@@ -1879,8 +1881,8 @@ namespace GcDevicePc
// }
// }
//}
//}
}
}
try
try
...
@@ -1964,10 +1966,10 @@ namespace GcDevicePc
...
@@ -1964,10 +1966,10 @@ namespace GcDevicePc
try
try
{
{
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
)
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
)
{
{
MessageBox
.
Show
(
"系统开启中......"
);
MessageBox
.
Show
(
"系统开启中......"
);
return
;
return
;
}
}
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
...
@@ -2040,9 +2042,9 @@ namespace GcDevicePc
...
@@ -2040,9 +2042,9 @@ namespace GcDevicePc
}
}
}
}
Console
.
WriteLine
(
""
+
OSflag
);
Console
.
WriteLine
(
""
+
OSflag
);
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
Trace
.
Write
(
ex
);
Trace
.
Write
(
ex
);
}
}
...
@@ -2083,7 +2085,7 @@ namespace GcDevicePc
...
@@ -2083,7 +2085,7 @@ namespace GcDevicePc
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
{
{
FileServerClient
rtclient
=
new
FileServerClient
();
FileServerClient
rtclient
=
new
FileServerClient
();
initret
=
rtclient
.
WtClientInit
(
globaldata
.
connection_ip
,
globaldata
.
fileserverport
);
initret
=
rtclient
.
WtClientInit
(
globaldata
.
connection_ip
,
globaldata
.
fileserverport
);
if
(
initret
==
1
)
if
(
initret
==
1
)
{
{
...
@@ -2130,7 +2132,7 @@ namespace GcDevicePc
...
@@ -2130,7 +2132,7 @@ namespace GcDevicePc
rtclient
.
WtClientClose
();
rtclient
.
WtClientClose
();
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_RunTab
=
Path
.
Combine
(
folder
,
runtablename
);
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
cur_RunTab
=
Path
.
Combine
(
folder
,
runtablename
);
}
}
}
}
return
ret
;
return
ret
;
}
}
...
@@ -2144,7 +2146,7 @@ namespace GcDevicePc
...
@@ -2144,7 +2146,7 @@ namespace GcDevicePc
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
if
(!
String
.
IsNullOrEmpty
(
globaldata
.
connection_ip
))
{
{
hmiopt
.
SetBatCount
(
count
);
hmiopt
.
SetBatCount
(
count
);
SendSTDCMD
();
SendSTDCMD
();
}
}
}
}
...
@@ -2170,7 +2172,7 @@ namespace GcDevicePc
...
@@ -2170,7 +2172,7 @@ namespace GcDevicePc
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
=
false
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
system_Statue
=
false
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
work_Statue
=
0
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
work_Statue
=
0
;
}
}
Console
.
WriteLine
(
""
+
OSflag
);
Console
.
WriteLine
(
""
+
OSflag
);
}
}
/// <summary>
/// <summary>
...
@@ -2185,7 +2187,10 @@ namespace GcDevicePc
...
@@ -2185,7 +2187,10 @@ namespace GcDevicePc
hmiopt
.
HAirSwitch
(
val
);
hmiopt
.
HAirSwitch
(
val
);
}
}
public
void
adjust_sw
(
int
val
)
{
hmiopt
.
AdjustSwitch
(
val
);
}
private
void
UserLoginMenu_Click
(
object
sender
,
EventArgs
e
)
private
void
UserLoginMenu_Click
(
object
sender
,
EventArgs
e
)
{
{
string
lgpwd
=
DateTime
.
Now
.
ToString
(
"HHmm"
);
string
lgpwd
=
DateTime
.
Now
.
ToString
(
"HHmm"
);
...
@@ -2289,7 +2294,7 @@ namespace GcDevicePc
...
@@ -2289,7 +2294,7 @@ namespace GcDevicePc
f_auxtool
.
sfupdatefirm
+=
new
StopForUpdateFirm
(
stopforupdatefirm
);
f_auxtool
.
sfupdatefirm
+=
new
StopForUpdateFirm
(
stopforupdatefirm
);
f_auxtool
.
updatefirm
+=
new
UpdateFirmCMD
(
startupdatefirm
);
f_auxtool
.
updatefirm
+=
new
UpdateFirmCMD
(
startupdatefirm
);
f_auxtool
.
hairsw
+=
new
HAir_SW
(
hair_sw
);
f_auxtool
.
hairsw
+=
new
HAir_SW
(
hair_sw
);
f_auxtool
.
adsw
+=
new
Adjust_SW
(
adjust_sw
);
f_auxtool
.
gctcd_setdac
+=
new
TCD_SetDAC
(
tcd_setdac
);
f_auxtool
.
gctcd_setdac
+=
new
TCD_SetDAC
(
tcd_setdac
);
f_auxtool
.
gctcd_sw
+=
new
TCD_SW
(
tcd_sw
);
f_auxtool
.
gctcd_sw
+=
new
TCD_SW
(
tcd_sw
);
...
@@ -2305,7 +2310,7 @@ namespace GcDevicePc
...
@@ -2305,7 +2310,7 @@ namespace GcDevicePc
f_auxtool
.
sfupdatefirm
+=
new
StopForUpdateFirm
(
stopforupdatefirm
);
f_auxtool
.
sfupdatefirm
+=
new
StopForUpdateFirm
(
stopforupdatefirm
);
f_auxtool
.
updatefirm
+=
new
UpdateFirmCMD
(
startupdatefirm
);
f_auxtool
.
updatefirm
+=
new
UpdateFirmCMD
(
startupdatefirm
);
f_auxtool
.
hairsw
+=
new
HAir_SW
(
hair_sw
);
f_auxtool
.
hairsw
+=
new
HAir_SW
(
hair_sw
);
f_auxtool
.
adsw
+=
new
Adjust_SW
(
adjust_sw
);
f_auxtool
.
gctcd_setdac
+=
new
TCD_SetDAC
(
tcd_setdac
);
f_auxtool
.
gctcd_setdac
+=
new
TCD_SetDAC
(
tcd_setdac
);
f_auxtool
.
gctcd_sw
+=
new
TCD_SW
(
tcd_sw
);
f_auxtool
.
gctcd_sw
+=
new
TCD_SW
(
tcd_sw
);
...
@@ -2353,7 +2358,7 @@ namespace GcDevicePc
...
@@ -2353,7 +2358,7 @@ namespace GcDevicePc
// f_auxtool.Show();
// f_auxtool.Show();
// }
// }
//}
//}
}
}
UserConfig
confu
;
UserConfig
confu
;
...
@@ -2374,7 +2379,7 @@ namespace GcDevicePc
...
@@ -2374,7 +2379,7 @@ namespace GcDevicePc
{
{
confu
.
Activate
();
confu
.
Activate
();
}
}
}
}
RunTables
f_runtablef
;
RunTables
f_runtablef
;
private
void
MethodBatMenu_Click
(
object
sender
,
EventArgs
e
)
private
void
MethodBatMenu_Click
(
object
sender
,
EventArgs
e
)
...
@@ -2517,7 +2522,7 @@ namespace GcDevicePc
...
@@ -2517,7 +2522,7 @@ namespace GcDevicePc
}
}
}
}
MethodMain
myformbb
;
MethodMain
myformbb
;
private
void
MethodBrowseMenuItem_Click
(
object
sender
,
EventArgs
e
)
private
void
MethodBrowseMenuItem_Click
(
object
sender
,
EventArgs
e
)
...
@@ -2594,7 +2599,7 @@ namespace GcDevicePc
...
@@ -2594,7 +2599,7 @@ namespace GcDevicePc
}
}
}
}
Console
.
WriteLine
(
" 后 "
+
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
);
Console
.
WriteLine
(
" 后 "
+
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
);
}
}
WaveTotalForm
total
;
WaveTotalForm
total
;
...
@@ -2675,7 +2680,7 @@ namespace GcDevicePc
...
@@ -2675,7 +2680,7 @@ namespace GcDevicePc
{
{
hist
.
Activate
();
hist
.
Activate
();
}
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
...
@@ -2761,7 +2766,7 @@ namespace GcDevicePc
...
@@ -2761,7 +2766,7 @@ namespace GcDevicePc
{
{
showConfig
.
Activate
();
showConfig
.
Activate
();
}
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
...
@@ -2942,7 +2947,7 @@ namespace GcDevicePc
...
@@ -2942,7 +2947,7 @@ namespace GcDevicePc
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
0
)
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
RunType
==
0
)
{
{
hmiopt
.
WriteOpenVal
();
hmiopt
.
WriteOpenVal
();
//(this.title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMOptbtnstatus = 4;
//(this.title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMOptbtnstatus = 4;
}
}
cancelbtn
();
cancelbtn
();
...
@@ -2986,14 +2991,13 @@ namespace GcDevicePc
...
@@ -2986,14 +2991,13 @@ namespace GcDevicePc
/// <param name="boolrun"></param>
/// <param name="boolrun"></param>
private
void
AutoAdjustRun
(
bool
boolrun
)
private
void
AutoAdjustRun
(
bool
boolrun
)
{
{
if
(
boolrun
)
if
(
boolrun
)
{
{
CurveDisPlay
.
curdisp
.
SetAutoAdjust
();
//
CurveDisPlay.curdisp.SetAutoAdjust();
}
}
else
else
{
{
CurveDisPlay
.
curdisp
.
StopAutoAdjust
();
//
CurveDisPlay.curdisp.StopAutoAdjust();
}
}
}
}
...
@@ -3012,12 +3016,10 @@ namespace GcDevicePc
...
@@ -3012,12 +3016,10 @@ namespace GcDevicePc
{
{
SharedSpace
.
MControl
.
errstr
=
null
;
SharedSpace
.
MControl
.
errstr
=
null
;
SharedSpace
.
MControl
.
zhouqi
=
globaldata
.
m_dpbuffer
.
ShowList
.
showtime
.
alltime
;
SharedSpace
.
MControl
.
zhouqi
=
globaldata
.
m_dpbuffer
.
ShowList
.
showtime
.
alltime
;
if
(
SharedSpace
.
MControl
.
zhouqi
*
SharedSpace
.
MControl
.
runcount
<=
SharedSpace
.
MControl
.
dateend
)
if
(
SharedSpace
.
MControl
.
zhouqi
*
SharedSpace
.
MControl
.
runcount
<=
SharedSpace
.
MControl
.
dateend
)
{
{
if
(
RunTableOpt
(
SharedSpace
.
MControl
.
path
,
SharedSpace
.
MControl
.
Name
)==
1
&&
SharedSpace
.
MControl
.
MethodType
==
1
)
if
(
RunTableOpt
(
SharedSpace
.
MControl
.
path
,
SharedSpace
.
MControl
.
Name
)
==
1
&&
SharedSpace
.
MControl
.
MethodType
==
1
)
{
{
Trace
.
WriteLine
(
string
.
Format
(
"开始校准{0},{1}"
,
SharedSpace
.
MControl
.
zhouqi
,
SharedSpace
.
MControl
.
runcount
),
"sys"
);
Trace
.
WriteLine
(
string
.
Format
(
"开始校准{0},{1}"
,
SharedSpace
.
MControl
.
zhouqi
,
SharedSpace
.
MControl
.
runcount
),
"sys"
);
SharedSpace
.
MControl
.
SetRun
=
true
;
//仪器进入校准环境
SharedSpace
.
MControl
.
SetRun
=
true
;
//仪器进入校准环境
...
@@ -3032,13 +3034,32 @@ namespace GcDevicePc
...
@@ -3032,13 +3034,32 @@ namespace GcDevicePc
AutoAdjust
=
DateTime
.
Now
.
AddSeconds
(
SharedSpace
.
MControl
.
dateend
);
AutoAdjust
=
DateTime
.
Now
.
AddSeconds
(
SharedSpace
.
MControl
.
dateend
);
}
}
//switch (CKVocAnalyzer.GlobalCKV.adjustType)
//{
// case CKVocAnalyzer.GlobalCKV.AdjustType.AT_Zero:
// //hmiopt.Sw_RelayAdiust(0);
// //hmiopt.Sw_Samplegas((ushort)65280);
// hmiopt.Adjust_ling_biao(0, (ushort)65280);
// break;
// case CKVocAnalyzer.GlobalCKV.AdjustType.AT_Biao:
// //hmiopt.Sw_RelayAdiust(1);
// //hmiopt.Sw_Samplegas((ushort)65280);
// hmiopt.Adjust_ling_biao(1, (ushort)65280);
// break;
// case CKVocAnalyzer.GlobalCKV.AdjustType.AT_Yang:
// hmiopt.Adjust_ling_biao(0, 0);
// break;
// default:
// break;
//}
}
}
else
else
{
{
SharedSpace
.
MControl
.
errstr
=
"校准时间不够"
;
SharedSpace
.
MControl
.
errstr
=
"校准时间不够"
;
SharedSpace
.
MControl
.
SetOut
=
false
;
SharedSpace
.
MControl
.
SetOut
=
false
;
SharedSpace
.
MControl
.
SetRun
=
false
;
SharedSpace
.
MControl
.
SetRun
=
false
;
}
}
}
}
//else if (SharedSpace.MControl.SetRun == false)
//else if (SharedSpace.MControl.SetRun == false)
...
@@ -3051,7 +3072,6 @@ namespace GcDevicePc
...
@@ -3051,7 +3072,6 @@ namespace GcDevicePc
{
{
SharedSpace
.
MControl
.
IsEnd
=
true
;
SharedSpace
.
MControl
.
IsEnd
=
true
;
if
(
RunTableOpt
(
SharedSpace
.
MControl
.
defaultPath
,
SharedSpace
.
MControl
.
defaultName
)
==
1
&&
SharedSpace
.
MControl
.
MethodType
==
1
)
if
(
RunTableOpt
(
SharedSpace
.
MControl
.
defaultPath
,
SharedSpace
.
MControl
.
defaultName
)
==
1
&&
SharedSpace
.
MControl
.
MethodType
==
1
)
{
{
SharedSpace
.
MControl
.
SetOut
=
false
;
SharedSpace
.
MControl
.
SetOut
=
false
;
...
@@ -3072,14 +3092,17 @@ namespace GcDevicePc
...
@@ -3072,14 +3092,17 @@ namespace GcDevicePc
}
}
Trace
.
WriteLine
(
"校准结束"
,
"sys"
);
Trace
.
WriteLine
(
"校准结束"
,
"sys"
);
}
}
if
(
CKVocAnalyzer
.
GlobalCKV
.
adjustType
==
CKVocAnalyzer
.
GlobalCKV
.
AdjustType
.
AT_Yang
)
{
//hmiopt.Adjust_ling_biao(0, 0);
}
}
}
if
(
SharedSpace
.
MControl
.
forceEnd
&&
SharedSpace
.
MControl
.
SetOut
&&
SharedSpace
.
MControl
.
SetRun
)
if
(
SharedSpace
.
MControl
.
forceEnd
&&
SharedSpace
.
MControl
.
SetOut
&&
SharedSpace
.
MControl
.
SetRun
)
{
{
SharedSpace
.
MControl
.
IsEnd
=
false
;
SharedSpace
.
MControl
.
IsEnd
=
false
;
if
(
RunTableOpt
(
SharedSpace
.
MControl
.
defaultPath
,
SharedSpace
.
MControl
.
defaultName
)
==
1
&&
SharedSpace
.
MControl
.
MethodType
==
1
)
if
(
RunTableOpt
(
SharedSpace
.
MControl
.
defaultPath
,
SharedSpace
.
MControl
.
defaultName
)
==
1
&&
SharedSpace
.
MControl
.
MethodType
==
1
)
{
{
SharedSpace
.
MControl
.
SetOut
=
false
;
SharedSpace
.
MControl
.
SetOut
=
false
;
SharedSpace
.
MControl
.
SetRun
=
false
;
SharedSpace
.
MControl
.
SetRun
=
false
;
...
@@ -3093,8 +3116,12 @@ namespace GcDevicePc
...
@@ -3093,8 +3116,12 @@ namespace GcDevicePc
SharedSpace
.
Data
.
typesint
=
0
;
SharedSpace
.
Data
.
typesint
=
0
;
Trace
.
WriteLine
(
"强制校准结束"
,
"sys"
);
Trace
.
WriteLine
(
"强制校准结束"
,
"sys"
);
}
}
if
(
CKVocAnalyzer
.
GlobalCKV
.
adjustType
==
CKVocAnalyzer
.
GlobalCKV
.
AdjustType
.
AT_Yang
)
{
//hmiopt.Adjust_ling_biao(0, 0);
}
}
}
globaldata
.
m_hmibuffer
.
gcadjust
.
runtime
=
(
long
)(
AutoAdjust
-
DateTime
.
Now
).
TotalSeconds
<
0
?
0
:
(
long
)(
AutoAdjust
-
DateTime
.
Now
).
TotalSeconds
;
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
...
@@ -3109,7 +3136,7 @@ namespace GcDevicePc
...
@@ -3109,7 +3136,7 @@ namespace GcDevicePc
private
void
timer2_Tick
(
object
sender
,
EventArgs
e
)
private
void
timer2_Tick
(
object
sender
,
EventArgs
e
)
{
{
epct
++;
epct
++;
if
(
epct
>
20
)
if
(
epct
>
20
)
{
{
if
(
epcs
==
true
)
if
(
epcs
==
true
)
{
{
...
@@ -3125,7 +3152,7 @@ namespace GcDevicePc
...
@@ -3125,7 +3152,7 @@ namespace GcDevicePc
tips_Show
(
globaldata
.
m_hmibuffer
.
gcinfo
.
EPCStatus
);
tips_Show
(
globaldata
.
m_hmibuffer
.
gcinfo
.
EPCStatus
);
}
}
}
}
}
}
private
void
changeVsi_Click
(
object
sender
,
EventArgs
e
)
private
void
changeVsi_Click
(
object
sender
,
EventArgs
e
)
...
...
GcDevicePc/MainForm.Designer.cs
View file @
129cc874
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1008
,
730
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1008
,
730
);
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
Name
=
"MainForm"
;
this
.
Name
=
"MainForm"
;
this
.
Text
=
"Tetchrom色谱工作站-1.5.
4
用户界面"
;
this
.
Text
=
"Tetchrom色谱工作站-1.5.
5
用户界面"
;
this
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
this
.
PerformLayout
();
this
.
PerformLayout
();
...
...
GcDevicePc/ProThread/GcDataTh.cs
View file @
129cc874
...
@@ -612,7 +612,7 @@ namespace GcDevicePc.ProThread
...
@@ -612,7 +612,7 @@ namespace GcDevicePc.ProThread
private
bool
GetALLSWState
(
ref
byte
[]
state
)
private
bool
GetALLSWState
(
ref
byte
[]
state
)
{
{
int
ret
=
-
1
;
int
ret
=
-
1
;
ret
=
GetCState
(
16
,
1
0
,
ref
state
);
ret
=
GetCState
(
16
,
1
2
,
ref
state
);
return
ret
==
0
?
true
:
false
;
return
ret
==
0
?
true
:
false
;
}
}
...
@@ -785,7 +785,7 @@ namespace GcDevicePc.ProThread
...
@@ -785,7 +785,7 @@ namespace GcDevicePc.ProThread
if
(
GetALLSWState
(
ref
tenstate
))
if
(
GetALLSWState
(
ref
tenstate
))
{
{
for
(
int
i
=
0
;
i
<
1
0
;
i
++)
for
(
int
i
=
0
;
i
<
1
2
;
i
++)
{
{
if
(
i
<
8
)
if
(
i
<
8
)
globaldata
.
m_hmibuffer
.
gcinfo
.
TenRelay
[
i
]
=
(
byte
)((((
tenstate
[
0
]
>>
i
)
&
0x1
)
==
1
)
?
1
:
0
);
globaldata
.
m_hmibuffer
.
gcinfo
.
TenRelay
[
i
]
=
(
byte
)((((
tenstate
[
0
]
>>
i
)
&
0x1
)
==
1
)
?
1
:
0
);
...
...
GcDevicePc/ProThread/HMIControl.cs
View file @
129cc874
...
@@ -23,6 +23,7 @@ namespace GcDevicePc.ProThread
...
@@ -23,6 +23,7 @@ namespace GcDevicePc.ProThread
this
.
strIP
=
ip
;
this
.
strIP
=
ip
;
this
.
netPost
=
post
;
this
.
netPost
=
post
;
this
.
setflag
=
true
;
this
.
setflag
=
true
;
Monitorr1112Start
();
}
}
else
else
{
{
...
@@ -170,7 +171,7 @@ namespace GcDevicePc.ProThread
...
@@ -170,7 +171,7 @@ namespace GcDevicePc.ProThread
break
;
break
;
}
}
if
(
ret
==
0
)
if
(
ret
==
0
)
{
{
if
(
nowdata
[
0
]
==
0
)
if
(
nowdata
[
0
]
==
0
)
{
{
...
@@ -195,24 +196,267 @@ namespace GcDevicePc.ProThread
...
@@ -195,24 +196,267 @@ namespace GcDevicePc.ProThread
{
{
}
}
}
}
public
void
AdjustSwitch
(
int
val
)
{
if
(
this
.
setflag
)
{
switch
(
val
)
{
case
0
:
adjust_ling
();
break
;
case
1
:
adjust_biao
();
break
;
default
:
break
;
}
}
else
{
}
}
public
void
adjust_ling
()
{
int
ret
;
ushort
writestatue
=
0
;
byte
[]
nowdata
=
new
byte
[
1
];
int
count
=
0
;
if
(
this
.
setflag
)
{
ret
=
m_modbus
.
ReadCoilStatus
(
27
,
1
,
this
.
strIP
,
this
.
netPost
,
ref
nowdata
);
while
(
ret
!=
0
)
{
count
++;
ret
=
m_modbus
.
ReadCoilStatus
(
27
,
1
,
this
.
strIP
,
this
.
netPost
,
ref
nowdata
);
Thread
.
Sleep
(
200
);
if
(
count
==
3
)
break
;
}
if
(
ret
==
0
)
{
if
(
nowdata
[
0
]
==
0
)
{
writestatue
=
(
ushort
)
65280
;
}
else
{
writestatue
=
0
;
}
ret
=
m_modbus
.
WriteSingleCoil
(
26
,
writestatue
,
this
.
strIP
,
this
.
netPost
);
while
(
ret
!=
0
)
{
count
++;
ret
=
m_modbus
.
WriteSingleCoil
(
26
,
writestatue
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
ret
=
m_modbus
.
WriteSingleCoil
(
27
,
writestatue
,
this
.
strIP
,
this
.
netPost
);
while
(
ret
!=
0
)
{
count
++;
ret
=
m_modbus
.
WriteSingleCoil
(
27
,
writestatue
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
}
}
}
public
void
adjust_biao
()
{
int
ret
;
ushort
writestatue
=
0
;
byte
[]
nowdata
=
new
byte
[
1
];
int
count
=
0
;
if
(
this
.
setflag
)
{
ret
=
m_modbus
.
ReadCoilStatus
(
26
,
1
,
this
.
strIP
,
this
.
netPost
,
ref
nowdata
);
while
(
ret
!=
0
)
{
count
++;
ret
=
m_modbus
.
ReadCoilStatus
(
26
,
1
,
this
.
strIP
,
this
.
netPost
,
ref
nowdata
);
Thread
.
Sleep
(
200
);
if
(
count
==
3
)
break
;
}
if
(
ret
==
0
)
{
if
(
nowdata
[
0
]
==
0
)
{
writestatue
=
(
ushort
)
65280
;
}
else
{
writestatue
=
0
;
}
ret
=
m_modbus
.
WriteSingleCoil
(
26
,
writestatue
,
this
.
strIP
,
this
.
netPost
);
while
(
ret
!=
0
)
{
count
++;
ret
=
m_modbus
.
WriteSingleCoil
(
26
,
writestatue
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
ret
=
m_modbus
.
WriteSingleCoil
(
27
,
0
,
this
.
strIP
,
this
.
netPost
);
while
(
ret
!=
0
)
{
count
++;
ret
=
m_modbus
.
WriteSingleCoil
(
27
,
0
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
}
}
}
public
void
Adjust_ling_biao
(
int
type
,
ushort
oc
)
{
int
lret
;
int
bret
;
int
count
=
0
;
if
(
type
==
0
)
{
bret
=
m_modbus
.
WriteSingleCoil
(
26
,
oc
,
this
.
strIP
,
this
.
netPost
);
while
(
bret
!=
0
)
{
count
++;
bret
=
m_modbus
.
WriteSingleCoil
(
26
,
oc
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
lret
=
m_modbus
.
WriteSingleCoil
(
27
,
oc
,
this
.
strIP
,
this
.
netPost
);
while
(
lret
!=
0
)
{
count
++;
lret
=
m_modbus
.
WriteSingleCoil
(
27
,
oc
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
if
(
getrelaystat
(
26
)
!=
oc
)
{
bret
=
m_modbus
.
WriteSingleCoil
(
26
,
oc
,
this
.
strIP
,
this
.
netPost
);
while
(
bret
!=
0
)
{
count
++;
bret
=
m_modbus
.
WriteSingleCoil
(
26
,
oc
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
}
if
(
getrelaystat
(
27
)
!=
oc
)
{
bret
=
m_modbus
.
WriteSingleCoil
(
27
,
oc
,
this
.
strIP
,
this
.
netPost
);
while
(
bret
!=
0
)
{
count
++;
bret
=
m_modbus
.
WriteSingleCoil
(
27
,
oc
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
}
}
else
if
(
type
==
1
)
{
bret
=
m_modbus
.
WriteSingleCoil
(
27
,
oc
,
this
.
strIP
,
this
.
netPost
);
while
(
bret
!=
0
)
{
count
++;
bret
=
m_modbus
.
WriteSingleCoil
(
27
,
oc
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
lret
=
m_modbus
.
WriteSingleCoil
(
26
,
0
,
this
.
strIP
,
this
.
netPost
);
while
(
lret
!=
0
)
{
count
++;
lret
=
m_modbus
.
WriteSingleCoil
(
26
,
0
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
if
(
getrelaystat
(
27
)
!=
oc
)
{
bret
=
m_modbus
.
WriteSingleCoil
(
27
,
oc
,
this
.
strIP
,
this
.
netPost
);
while
(
bret
!=
0
)
{
count
++;
bret
=
m_modbus
.
WriteSingleCoil
(
27
,
oc
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
}
if
(
getrelaystat
(
26
)
!=
0
)
{
bret
=
m_modbus
.
WriteSingleCoil
(
26
,
0
,
this
.
strIP
,
this
.
netPost
);
while
(
bret
!=
0
)
{
count
++;
bret
=
m_modbus
.
WriteSingleCoil
(
26
,
0
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
}
}
}
}
}
public
void
testr12
(
ushort
addr
,
ushort
statue
)
private
ushort
getrelaystat
(
ushort
index
)
{
{
int
ret
;
int
ret
;
byte
[]
nowdata
=
new
byte
[
1
];
int
count
=
0
;
int
count
=
0
;
ret
=
m_modbus
.
WriteSingleCoil
(
addr
,
statue
,
this
.
strIP
,
this
.
netPost
);
ret
=
m_modbus
.
ReadCoilStatus
(
index
,
1
,
this
.
strIP
,
this
.
netPost
,
ref
nowdata
);
while
(
ret
!=
0
)
while
(
ret
!=
0
)
{
{
count
++;
count
++;
ret
=
m_modbus
.
WriteSingleCoil
(
addr
,
statue
,
this
.
strIP
,
this
.
netPost
);
ret
=
m_modbus
.
ReadCoilStatus
(
index
,
1
,
this
.
strIP
,
this
.
netPost
,
ref
nowdata
);
Thread
.
Sleep
(
1
00
);
Thread
.
Sleep
(
2
00
);
if
(
count
==
3
)
if
(
count
==
3
)
break
;
break
;
}
}
if
(
nowdata
[
0
]
==
0
)
{
return
0
;
}
else
{
return
(
ushort
)
65280
;
}
}
}
/// <summary>
/// <summary>
...
@@ -337,6 +581,114 @@ namespace GcDevicePc.ProThread
...
@@ -337,6 +581,114 @@ namespace GcDevicePc.ProThread
}
}
}
}
public
void
Sw_Samplegas
(
ushort
statue
)
{
int
ret
;
ushort
switchaddr
=
19
;
//ushort writestatue = 0;
byte
[]
nowdata
=
new
byte
[
1
];
int
count
=
0
;
////ret = m_modbus.ReadCoilStatus(switchaddr, 1, this.strIP, this.netPost, ref nowdata);
////while (ret != 0)
////{
//// count++;
//// ret = m_modbus.ReadCoilStatus(switchaddr, 1, this.strIP, this.netPost, ref nowdata);
//// Thread.Sleep(200);
//// if (count == 3)
//// break;
////}
////if (ret == 0)
{
//ret = m_modbus.WriteSingleCoil(switchaddr, statue, this.strIP, this.netPost);
//while (ret != 0)
//{
// count++;
// ret = m_modbus.WriteSingleCoil(switchaddr, statue, this.strIP, this.netPost);
// Thread.Sleep(100);
// if (count == 3)
// break;
//}
}
}
public
void
Sw_RelayAdiust
(
int
type
)
{
int
ret
;
//ushort switchaddr = 19;
//ushort writestatue = 0;
byte
[]
nowdata
=
new
byte
[
1
];
int
count
=
0
;
if
(
type
==
0
)
{
//零
ret
=
m_modbus
.
WriteSingleCoil
(
28
,
(
ushort
)
65280
,
this
.
strIP
,
this
.
netPost
);
while
(
ret
!=
0
)
{
count
++;
ret
=
m_modbus
.
WriteSingleCoil
(
28
,
(
ushort
)
65280
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
ret
=
m_modbus
.
WriteSingleCoil
(
29
,
0
,
this
.
strIP
,
this
.
netPost
);
while
(
ret
!=
0
)
{
count
++;
ret
=
m_modbus
.
WriteSingleCoil
(
29
,
0
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
}
else
if
(
type
==
1
)
{
//标
ret
=
m_modbus
.
WriteSingleCoil
(
29
,
(
ushort
)
65280
,
this
.
strIP
,
this
.
netPost
);
while
(
ret
!=
0
)
{
count
++;
ret
=
m_modbus
.
WriteSingleCoil
(
29
,
(
ushort
)
65280
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
ret
=
m_modbus
.
WriteSingleCoil
(
28
,
0
,
this
.
strIP
,
this
.
netPost
);
while
(
ret
!=
0
)
{
count
++;
ret
=
m_modbus
.
WriteSingleCoil
(
28
,
0
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
}
else
if
(
type
==
2
)
{
//样
ret
=
m_modbus
.
WriteSingleCoil
(
29
,
0
,
this
.
strIP
,
this
.
netPost
);
while
(
ret
!=
0
)
{
count
++;
ret
=
m_modbus
.
WriteSingleCoil
(
29
,
0
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
ret
=
m_modbus
.
WriteSingleCoil
(
28
,
0
,
this
.
strIP
,
this
.
netPost
);
while
(
ret
!=
0
)
{
count
++;
ret
=
m_modbus
.
WriteSingleCoil
(
28
,
0
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
}
}
public
bool
TCD_Switch
(
ushort
port
)
public
bool
TCD_Switch
(
ushort
port
)
{
{
int
ret
=
0
;
int
ret
=
0
;
...
@@ -463,5 +815,126 @@ namespace GcDevicePc.ProThread
...
@@ -463,5 +815,126 @@ namespace GcDevicePc.ProThread
return
(
ret
==
0
)
?
true
:
false
;
return
(
ret
==
0
)
?
true
:
false
;
}
}
ManualResetEvent
ctrr1112
=
new
ManualResetEvent
(
false
);
Thread
t_ctrr1112
;
public
void
Monitorr1112Start
()
{
if
(
ctrr1112
!=
null
)
{
ctrr1112
.
Reset
();
}
t_ctrr1112
=
new
Thread
(
Monitor_Ctl_R1112
);
t_ctrr1112
.
IsBackground
=
true
;
t_ctrr1112
.
Start
();
}
public
void
DataToHwStop
()
{
ctrr1112
.
Set
();
}
private
void
Monitor_Ctl_R1112
()
{
while
(!
ctrr1112
.
WaitOne
(
1000
))
{
int
lret
;
int
bret
;
int
count
=
0
;
switch
(
CKVocAnalyzer
.
GlobalCKV
.
adjustType
)
{
case
CKVocAnalyzer
.
GlobalCKV
.
AdjustType
.
AT_Zero
:
if
(
getrelaystat
(
26
)
==
0
)
{
bret
=
m_modbus
.
WriteSingleCoil
(
26
,
(
ushort
)
65280
,
this
.
strIP
,
this
.
netPost
);
while
(
bret
!=
0
)
{
count
++;
bret
=
m_modbus
.
WriteSingleCoil
(
26
,
(
ushort
)
65280
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
}
if
(
getrelaystat
(
27
)
==
0
)
{
lret
=
m_modbus
.
WriteSingleCoil
(
27
,
(
ushort
)
65280
,
this
.
strIP
,
this
.
netPost
);
while
(
lret
!=
0
)
{
count
++;
lret
=
m_modbus
.
WriteSingleCoil
(
27
,
(
ushort
)
65280
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
}
break
;
case
CKVocAnalyzer
.
GlobalCKV
.
AdjustType
.
AT_Biao
:
if
(
getrelaystat
(
26
)
!=
0
)
{
bret
=
m_modbus
.
WriteSingleCoil
(
26
,
0
,
this
.
strIP
,
this
.
netPost
);
while
(
bret
!=
0
)
{
count
++;
bret
=
m_modbus
.
WriteSingleCoil
(
26
,
0
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
}
if
(
getrelaystat
(
27
)
==
0
)
{
lret
=
m_modbus
.
WriteSingleCoil
(
27
,
(
ushort
)
65280
,
this
.
strIP
,
this
.
netPost
);
while
(
lret
!=
0
)
{
count
++;
lret
=
m_modbus
.
WriteSingleCoil
(
27
,
(
ushort
)
65280
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
}
break
;
case
CKVocAnalyzer
.
GlobalCKV
.
AdjustType
.
AT_Yang
:
if
(
getrelaystat
(
26
)
!=
0
)
{
bret
=
m_modbus
.
WriteSingleCoil
(
26
,
0
,
this
.
strIP
,
this
.
netPost
);
while
(
bret
!=
0
)
{
count
++;
bret
=
m_modbus
.
WriteSingleCoil
(
26
,
0
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
}
if
(
getrelaystat
(
27
)
!=
0
)
{
lret
=
m_modbus
.
WriteSingleCoil
(
27
,
0
,
this
.
strIP
,
this
.
netPost
);
while
(
lret
!=
0
)
{
count
++;
lret
=
m_modbus
.
WriteSingleCoil
(
27
,
0
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
}
break
;
default
:
break
;
}
}
}
}
}
}
}
GcDevicePc/ProThread/SignalDataToHw.cs
View file @
129cc874
...
@@ -11,7 +11,7 @@ namespace GcDevicePc.ProThread
...
@@ -11,7 +11,7 @@ namespace GcDevicePc.ProThread
{
{
class
SignalDataToHw
class
SignalDataToHw
{
{
[
DllImport
(
@"HWSendData.dll"
)]
[
DllImport
(
@"HWSendData.dll"
,
EntryPoint
=
"SendDataToHW"
)]
public
static
extern
void
GCSendDataToHW
(
Int32
data1
,
Int32
data2
,
Int32
data3
);
public
static
extern
void
GCSendDataToHW
(
Int32
data1
,
Int32
data2
,
Int32
data3
);
#
region
私有变量
#
region
私有变量
ManualResetEvent
datamre
=
new
ManualResetEvent
(
false
);
ManualResetEvent
datamre
=
new
ManualResetEvent
(
false
);
...
...
GcDevicePc/Program.cs
View file @
129cc874
using
System
;
using
System
;
using
System.Linq
;
using
System.Windows.Forms
;
using
System.Windows.Forms
;
namespace
GcDevicePc
namespace
GcDevicePc
...
@@ -15,36 +14,22 @@ namespace GcDevicePc
...
@@ -15,36 +14,22 @@ namespace GcDevicePc
bool
createNew
;
bool
createNew
;
//Application.Run(new TestForm());
//Application.Run(new TestForm());
{
{
int
num
=
System
.
Diagnostics
.
Process
.
GetProcessesByName
(
Application
.
ProductName
).
ToList
().
Count
;
using
(
System
.
Threading
.
Mutex
mutex
=
new
System
.
Threading
.
Mutex
(
true
,
Application
.
ProductName
,
out
createNew
))
if
(
num
>
2
)
{
{
MessageBox
.
Show
(
"应用程序已多开..."
);
if
(
createNew
)
System
.
Threading
.
Thread
.
Sleep
(
1000
);
Application
.
Exit
();
System
.
Diagnostics
.
Process
.
GetCurrentProcess
().
Kill
();
// System.Environment.Exit(1);
}
else
{
//存在
using
(
System
.
Threading
.
Mutex
mutex
=
new
System
.
Threading
.
Mutex
(
true
,
Application
.
ProductName
,
out
createNew
))
{
{
//if (createNew)
//{
Application
.
Run
(
new
StartForm
());
Application
.
Run
(
new
StartForm
());
mutex
.
ReleaseMutex
();
mutex
.
ReleaseMutex
();
//}
}
//else
else
//{
{
// MessageBox.Show("应用程序已经在运行中...");
MessageBox
.
Show
(
"应用程序已经在运行中..."
);
// System.Threading.Thread.Sleep(1000);
System
.
Threading
.
Thread
.
Sleep
(
1000
);
// Application.Exit();
Application
.
Exit
();
// System.Diagnostics.Process.GetCurrentProcess().Kill();
System
.
Diagnostics
.
Process
.
GetCurrentProcess
().
Kill
();
// // System.Environment.Exit(1);
// System.Environment.Exit(1);
//}
}
}
}
}
}
}
}
}
}
}
...
...
GcDevicePc/Properties/Settings.Designer.cs
View file @
129cc874
...
@@ -12,7 +12,7 @@ namespace GcDevicePc.Properties {
...
@@ -12,7 +12,7 @@ namespace GcDevicePc.Properties {
[
global
::
System
.
Runtime
.
CompilerServices
.
CompilerGeneratedAttribute
()]
[
global
::
System
.
Runtime
.
CompilerServices
.
CompilerGeneratedAttribute
()]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator"
,
"1
6.1
.0.0"
)]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator"
,
"1
2.0
.0.0"
)]
internal
sealed
partial
class
Settings
:
global
::
System
.
Configuration
.
ApplicationSettingsBase
{
internal
sealed
partial
class
Settings
:
global
::
System
.
Configuration
.
ApplicationSettingsBase
{
private
static
Settings
defaultInstance
=
((
Settings
)(
global
::
System
.
Configuration
.
ApplicationSettingsBase
.
Synchronized
(
new
Settings
())));
private
static
Settings
defaultInstance
=
((
Settings
)(
global
::
System
.
Configuration
.
ApplicationSettingsBase
.
Synchronized
(
new
Settings
())));
...
...
GcDevicePc/RunTables.Designer.cs
View file @
129cc874
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
//
//
// tabrun
// tabrun
//
//
this
.
tabrun
.
Location
=
new
System
.
Drawing
.
Point
(
539
,
316
);
this
.
tabrun
.
Location
=
new
System
.
Drawing
.
Point
(
362
,
316
);
this
.
tabrun
.
Name
=
"tabrun"
;
this
.
tabrun
.
Name
=
"tabrun"
;
this
.
tabrun
.
Size
=
new
System
.
Drawing
.
Size
(
93
,
23
);
this
.
tabrun
.
Size
=
new
System
.
Drawing
.
Size
(
93
,
23
);
this
.
tabrun
.
TabIndex
=
1
;
this
.
tabrun
.
TabIndex
=
1
;
...
@@ -100,7 +100,6 @@
...
@@ -100,7 +100,6 @@
//
//
// groupBox2
// groupBox2
//
//
this
.
groupBox2
.
Controls
.
Add
(
this
.
updategv
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
rdbox
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
rdbox
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label3
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label3
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
rcbox
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
rcbox
);
...
@@ -117,7 +116,7 @@
...
@@ -117,7 +116,7 @@
//
//
// updategv
// updategv
//
//
this
.
updategv
.
Location
=
new
System
.
Drawing
.
Point
(
320
,
235
);
this
.
updategv
.
Location
=
new
System
.
Drawing
.
Point
(
514
,
316
);
this
.
updategv
.
Name
=
"updategv"
;
this
.
updategv
.
Name
=
"updategv"
;
this
.
updategv
.
Size
=
new
System
.
Drawing
.
Size
(
56
,
23
);
this
.
updategv
.
Size
=
new
System
.
Drawing
.
Size
(
56
,
23
);
this
.
updategv
.
TabIndex
=
7
;
this
.
updategv
.
TabIndex
=
7
;
...
@@ -127,7 +126,7 @@
...
@@ -127,7 +126,7 @@
//
//
// rdbox
// rdbox
//
//
this
.
rdbox
.
Location
=
new
System
.
Drawing
.
Point
(
272
,
237
);
this
.
rdbox
.
Location
=
new
System
.
Drawing
.
Point
(
340
,
237
);
this
.
rdbox
.
Name
=
"rdbox"
;
this
.
rdbox
.
Name
=
"rdbox"
;
this
.
rdbox
.
Size
=
new
System
.
Drawing
.
Size
(
30
,
21
);
this
.
rdbox
.
Size
=
new
System
.
Drawing
.
Size
(
30
,
21
);
this
.
rdbox
.
TabIndex
=
6
;
this
.
rdbox
.
TabIndex
=
6
;
...
@@ -135,7 +134,7 @@
...
@@ -135,7 +134,7 @@
// label3
// label3
//
//
this
.
label3
.
AutoSize
=
true
;
this
.
label3
.
AutoSize
=
true
;
this
.
label3
.
Location
=
new
System
.
Drawing
.
Point
(
2
11
,
240
);
this
.
label3
.
Location
=
new
System
.
Drawing
.
Point
(
2
79
,
240
);
this
.
label3
.
Name
=
"label3"
;
this
.
label3
.
Name
=
"label3"
;
this
.
label3
.
Size
=
new
System
.
Drawing
.
Size
(
65
,
12
);
this
.
label3
.
Size
=
new
System
.
Drawing
.
Size
(
65
,
12
);
this
.
label3
.
TabIndex
=
5
;
this
.
label3
.
TabIndex
=
5
;
...
@@ -143,7 +142,7 @@
...
@@ -143,7 +142,7 @@
//
//
// rcbox
// rcbox
//
//
this
.
rcbox
.
Location
=
new
System
.
Drawing
.
Point
(
168
,
237
);
this
.
rcbox
.
Location
=
new
System
.
Drawing
.
Point
(
209
,
237
);
this
.
rcbox
.
Name
=
"rcbox"
;
this
.
rcbox
.
Name
=
"rcbox"
;
this
.
rcbox
.
Size
=
new
System
.
Drawing
.
Size
(
37
,
21
);
this
.
rcbox
.
Size
=
new
System
.
Drawing
.
Size
(
37
,
21
);
this
.
rcbox
.
TabIndex
=
4
;
this
.
rcbox
.
TabIndex
=
4
;
...
@@ -151,7 +150,7 @@
...
@@ -151,7 +150,7 @@
// label2
// label2
//
//
this
.
label2
.
AutoSize
=
true
;
this
.
label2
.
AutoSize
=
true
;
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
97
,
240
);
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
138
,
240
);
this
.
label2
.
Name
=
"label2"
;
this
.
label2
.
Name
=
"label2"
;
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
65
,
12
);
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
65
,
12
);
this
.
label2
.
TabIndex
=
3
;
this
.
label2
.
TabIndex
=
3
;
...
@@ -159,7 +158,7 @@
...
@@ -159,7 +158,7 @@
//
//
// rtbox
// rtbox
//
//
this
.
rtbox
.
Location
=
new
System
.
Drawing
.
Point
(
63
,
237
);
this
.
rtbox
.
Location
=
new
System
.
Drawing
.
Point
(
77
,
237
);
this
.
rtbox
.
Name
=
"rtbox"
;
this
.
rtbox
.
Name
=
"rtbox"
;
this
.
rtbox
.
Size
=
new
System
.
Drawing
.
Size
(
28
,
21
);
this
.
rtbox
.
Size
=
new
System
.
Drawing
.
Size
(
28
,
21
);
this
.
rtbox
.
TabIndex
=
2
;
this
.
rtbox
.
TabIndex
=
2
;
...
@@ -167,7 +166,7 @@
...
@@ -167,7 +166,7 @@
// label1
// label1
//
//
this
.
label1
.
AutoSize
=
true
;
this
.
label1
.
AutoSize
=
true
;
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
240
);
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
20
,
240
);
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
65
,
12
);
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
65
,
12
);
this
.
label1
.
TabIndex
=
1
;
this
.
label1
.
TabIndex
=
1
;
...
@@ -196,11 +195,11 @@
...
@@ -196,11 +195,11 @@
//
//
// AddMethodbtn
// AddMethodbtn
//
//
this
.
AddMethodbtn
.
Location
=
new
System
.
Drawing
.
Point
(
3
57
,
316
);
this
.
AddMethodbtn
.
Location
=
new
System
.
Drawing
.
Point
(
3
08
,
92
);
this
.
AddMethodbtn
.
Name
=
"AddMethodbtn"
;
this
.
AddMethodbtn
.
Name
=
"AddMethodbtn"
;
this
.
AddMethodbtn
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
AddMethodbtn
.
Size
=
new
System
.
Drawing
.
Size
(
37
,
30
);
this
.
AddMethodbtn
.
TabIndex
=
4
;
this
.
AddMethodbtn
.
TabIndex
=
4
;
this
.
AddMethodbtn
.
Text
=
"
添加
"
;
this
.
AddMethodbtn
.
Text
=
"
>>>
"
;
this
.
AddMethodbtn
.
UseVisualStyleBackColor
=
true
;
this
.
AddMethodbtn
.
UseVisualStyleBackColor
=
true
;
this
.
AddMethodbtn
.
Click
+=
new
System
.
EventHandler
(
this
.
AddMethodbtn_Click
);
this
.
AddMethodbtn
.
Click
+=
new
System
.
EventHandler
(
this
.
AddMethodbtn_Click
);
//
//
...
@@ -250,9 +249,9 @@
...
@@ -250,9 +249,9 @@
//
//
// stopbat
// stopbat
//
//
this
.
stopbat
.
Location
=
new
System
.
Drawing
.
Point
(
6
48
,
316
);
this
.
stopbat
.
Location
=
new
System
.
Drawing
.
Point
(
6
21
,
316
);
this
.
stopbat
.
Name
=
"stopbat"
;
this
.
stopbat
.
Name
=
"stopbat"
;
this
.
stopbat
.
Size
=
new
System
.
Drawing
.
Size
(
85
,
23
);
this
.
stopbat
.
Size
=
new
System
.
Drawing
.
Size
(
104
,
23
);
this
.
stopbat
.
TabIndex
=
5
;
this
.
stopbat
.
TabIndex
=
5
;
this
.
stopbat
.
Text
=
"停止批处理"
;
this
.
stopbat
.
Text
=
"停止批处理"
;
this
.
stopbat
.
UseVisualStyleBackColor
=
true
;
this
.
stopbat
.
UseVisualStyleBackColor
=
true
;
...
@@ -322,6 +321,7 @@
...
@@ -322,6 +321,7 @@
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
750
,
380
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
750
,
380
);
this
.
Controls
.
Add
(
this
.
updategv
);
this
.
Controls
.
Add
(
this
.
label4
);
this
.
Controls
.
Add
(
this
.
label4
);
this
.
Controls
.
Add
(
this
.
addRunTable
);
this
.
Controls
.
Add
(
this
.
addRunTable
);
this
.
Controls
.
Add
(
this
.
delRunTable
);
this
.
Controls
.
Add
(
this
.
delRunTable
);
...
...
GcDevicePc/StartForm.cs
View file @
129cc874
...
@@ -109,7 +109,6 @@ namespace GcDevicePc
...
@@ -109,7 +109,6 @@ namespace GcDevicePc
_opacityTimer
.
Interval
=
30
;
_opacityTimer
.
Interval
=
30
;
_opacityTimer
.
Elapsed
+=
new
System
.
Timers
.
ElapsedEventHandler
(
OpacityTimerProcOpen
);
_opacityTimer
.
Elapsed
+=
new
System
.
Timers
.
ElapsedEventHandler
(
OpacityTimerProcOpen
);
_opacityTimer
.
Start
();
_opacityTimer
.
Start
();
//globaldata.ProgramCount = num;
}
}
private
void
MainFrmStartProc
()
private
void
MainFrmStartProc
()
...
...
GcDevicePc/TestForm.Designer.cs
View file @
129cc874
...
@@ -28,28 +28,30 @@
...
@@ -28,28 +28,30 @@
/// </summary>
/// </summary>
private
void
InitializeComponent
()
private
void
InitializeComponent
()
{
{
this
.
components
=
new
System
.
ComponentModel
.
Container
();
this
.
button1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button2
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button2
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
gcTitle1
=
new
GcDevicePc
.
Controls
.
GCTitle
();
this
.
gcTitle1
=
new
GcDevicePc
.
Controls
.
GCTitle
();
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
button3
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button3
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button4
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button4
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
textBox1
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
button5
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
textBox2
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
button6
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
//
//
// button1
// button1
//
//
this
.
button1
.
Location
=
new
System
.
Drawing
.
Point
(
331
,
364
);
this
.
button1
.
Location
=
new
System
.
Drawing
.
Point
(
110
,
156
);
this
.
button1
.
Name
=
"button1"
;
this
.
button1
.
Name
=
"button1"
;
this
.
button1
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
button1
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
button1
.
TabIndex
=
0
;
this
.
button1
.
TabIndex
=
0
;
this
.
button1
.
Text
=
"
button1
"
;
this
.
button1
.
Text
=
"
24
"
;
this
.
button1
.
UseVisualStyleBackColor
=
true
;
this
.
button1
.
UseVisualStyleBackColor
=
true
;
this
.
button1
.
Click
+=
new
System
.
EventHandler
(
this
.
btnShow_Click
);
this
.
button1
.
Click
+=
new
System
.
EventHandler
(
this
.
btnShow_Click
);
//
//
// button2
// button2
//
//
this
.
button2
.
Location
=
new
System
.
Drawing
.
Point
(
2
41
,
318
);
this
.
button2
.
Location
=
new
System
.
Drawing
.
Point
(
2
50
,
364
);
this
.
button2
.
Name
=
"button2"
;
this
.
button2
.
Name
=
"button2"
;
this
.
button2
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
button2
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
button2
.
TabIndex
=
1
;
this
.
button2
.
TabIndex
=
1
;
...
@@ -65,47 +67,54 @@
...
@@ -65,47 +67,54 @@
this
.
gcTitle1
.
Size
=
new
System
.
Drawing
.
Size
(
800
,
20
);
this
.
gcTitle1
.
Size
=
new
System
.
Drawing
.
Size
(
800
,
20
);
this
.
gcTitle1
.
TabIndex
=
2
;
this
.
gcTitle1
.
TabIndex
=
2
;
//
//
// timer1
//
this
.
timer1
.
Interval
=
5000
;
this
.
timer1
.
Tick
+=
new
System
.
EventHandler
(
this
.
Timer1_Tick
);
//
// button3
// button3
//
//
this
.
button3
.
Location
=
new
System
.
Drawing
.
Point
(
440
,
364
);
this
.
button3
.
Location
=
new
System
.
Drawing
.
Point
(
191
,
156
);
this
.
button3
.
Name
=
"button3"
;
this
.
button3
.
Name
=
"button3"
;
this
.
button3
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
button3
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
button3
.
TabIndex
=
3
;
this
.
button3
.
TabIndex
=
3
;
this
.
button3
.
Text
=
"
button3
"
;
this
.
button3
.
Text
=
"
25
"
;
this
.
button3
.
UseVisualStyleBackColor
=
true
;
this
.
button3
.
UseVisualStyleBackColor
=
true
;
this
.
button3
.
Click
+=
new
System
.
EventHandler
(
this
.
Button3_Click
);
//
//
// button4
// button4
//
//
this
.
button4
.
Location
=
new
System
.
Drawing
.
Point
(
544
,
364
);
this
.
button4
.
Location
=
new
System
.
Drawing
.
Point
(
272
,
156
);
this
.
button4
.
Name
=
"button4"
;
this
.
button4
.
Name
=
"button4"
;
this
.
button4
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
button4
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
button4
.
TabIndex
=
4
;
this
.
button4
.
TabIndex
=
3
;
this
.
button4
.
Text
=
"button
4
"
;
this
.
button4
.
Text
=
"button
3
"
;
this
.
button4
.
UseVisualStyleBackColor
=
true
;
this
.
button4
.
UseVisualStyleBackColor
=
true
;
this
.
button4
.
Click
+=
new
System
.
EventHandler
(
this
.
Button4_Click
);
//
//
//
textBox1
//
button5
//
//
this
.
textBox1
.
Location
=
new
System
.
Drawing
.
Point
(
241
,
274
);
this
.
button5
.
Location
=
new
System
.
Drawing
.
Point
(
353
,
156
);
this
.
textBox1
.
Name
=
"textBox1"
;
this
.
button5
.
Name
=
"button5"
;
this
.
textBox1
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
21
);
this
.
button5
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
textBox1
.
TabIndex
=
5
;
this
.
button5
.
TabIndex
=
3
;
this
.
button5
.
Text
=
"button3"
;
this
.
button5
.
UseVisualStyleBackColor
=
true
;
//
//
//
textBox2
//
button6
//
//
this
.
textBox2
.
Location
=
new
System
.
Drawing
.
Point
(
357
,
274
);
this
.
button6
.
Location
=
new
System
.
Drawing
.
Point
(
434
,
156
);
this
.
textBox2
.
Name
=
"textBox2"
;
this
.
button6
.
Name
=
"button6"
;
this
.
textBox2
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
21
);
this
.
button6
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
textBox2
.
TabIndex
=
5
;
this
.
button6
.
TabIndex
=
3
;
this
.
button6
.
Text
=
"button3"
;
this
.
button6
.
UseVisualStyleBackColor
=
true
;
//
//
// TestForm
// TestForm
//
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
800
,
583
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
800
,
583
);
this
.
Controls
.
Add
(
this
.
textBox2
);
this
.
Controls
.
Add
(
this
.
button6
);
this
.
Controls
.
Add
(
this
.
textBox1
);
this
.
Controls
.
Add
(
this
.
button5
);
this
.
Controls
.
Add
(
this
.
button4
);
this
.
Controls
.
Add
(
this
.
button4
);
this
.
Controls
.
Add
(
this
.
button3
);
this
.
Controls
.
Add
(
this
.
button3
);
this
.
Controls
.
Add
(
this
.
gcTitle1
);
this
.
Controls
.
Add
(
this
.
gcTitle1
);
...
@@ -114,7 +123,6 @@
...
@@ -114,7 +123,6 @@
this
.
Name
=
"TestForm"
;
this
.
Name
=
"TestForm"
;
this
.
Text
=
"TestForm"
;
this
.
Text
=
"TestForm"
;
this
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
this
.
PerformLayout
();
}
}
...
@@ -123,9 +131,10 @@
...
@@ -123,9 +131,10 @@
private
System
.
Windows
.
Forms
.
Button
button1
;
private
System
.
Windows
.
Forms
.
Button
button1
;
private
System
.
Windows
.
Forms
.
Button
button2
;
private
System
.
Windows
.
Forms
.
Button
button2
;
private
Controls
.
GCTitle
gcTitle1
;
private
Controls
.
GCTitle
gcTitle1
;
private
System
.
Windows
.
Forms
.
Timer
timer1
;
private
System
.
Windows
.
Forms
.
Button
button3
;
private
System
.
Windows
.
Forms
.
Button
button3
;
private
System
.
Windows
.
Forms
.
Button
button4
;
private
System
.
Windows
.
Forms
.
Button
button4
;
private
System
.
Windows
.
Forms
.
TextBox
textBox1
;
private
System
.
Windows
.
Forms
.
Button
button5
;
private
System
.
Windows
.
Forms
.
TextBox
textBox2
;
private
System
.
Windows
.
Forms
.
Button
button6
;
}
}
}
}
\ No newline at end of file
GcDevicePc/TestForm.cs
View file @
129cc874
using
GcDevicePc.Common
;
using
GcDevicePc.Common
;
using
GcDevicePc.ConfigMethod
;
using
GcDevicePc.ConfigMethod
;
using
GcDevicePc.Controls
;
using
GcDevicePc.Controls
;
using
GcDevicePc.ProThread
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.ComponentModel
;
...
@@ -81,7 +80,6 @@ namespace GcDevicePc
...
@@ -81,7 +80,6 @@ namespace GcDevicePc
private
void
btnShow_Click
(
object
sender
,
EventArgs
e
)
private
void
btnShow_Click
(
object
sender
,
EventArgs
e
)
{
{
//loadingCtl.TipsInfo = "提示信息";
//loadingCtl.TipsInfo = "提示信息";
////显示加载动画
////显示加载动画
//loadingCtl.ShowLoading(this);
//loadingCtl.ShowLoading(this);
...
@@ -114,9 +112,12 @@ namespace GcDevicePc
...
@@ -114,9 +112,12 @@ namespace GcDevicePc
//twfile.TW_Close(0);
//twfile.TW_Close(0);
//int i = 100 % 1;
//timer1.Enabled = true;
}
}
HMIControl
hMI
=
new
HMIControl
(
"172.16.1.58"
,
502
);
private
void
button2_Click
(
object
sender
,
EventArgs
e
)
private
void
button2_Click
(
object
sender
,
EventArgs
e
)
{
{
//MessageBox.Show("asd");
//MessageBox.Show("asd");
...
@@ -127,18 +128,13 @@ namespace GcDevicePc
...
@@ -127,18 +128,13 @@ namespace GcDevicePc
//LMessageBox box = new LMessageBox();
//LMessageBox box = new LMessageBox();
//box.Show(100, 100, this.Location, true, "1230", "3214", LMessageBox.MessageBoxType.MBT_ButtonOK);
//box.Show(100, 100, this.Location, true, "1230", "3214", LMessageBox.MessageBoxType.MBT_ButtonOK);
NModbusSlave
N
=
new
NModbusSlave
();
hMI
.
testr12
(
Convert
.
ToUInt16
(
textBox1
.
Text
),
Convert
.
ToUInt16
(
textBox2
.
Text
));
}
}
int
i
=
0
;
private
void
Button3_Click
(
object
sender
,
EventArgs
e
)
private
void
Timer1_Tick
(
object
sender
,
EventArgs
e
)
{
}
private
void
Button4_Click
(
object
sender
,
EventArgs
e
)
{
{
i
++;
}
}
}
}
...
...
GcDevicePc/TestForm.resx
View file @
129cc874
...
@@ -117,4 +117,7 @@
...
@@ -117,4 +117,7 @@
<resheader
name=
"writer"
>
<resheader
name=
"writer"
>
<value>
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
</value>
<value>
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
</value>
</resheader>
</resheader>
<metadata
name=
"timer1.TrayLocation"
type=
"System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>
<value>
17, 17
</value>
</metadata>
</root>
</root>
\ No newline at end of file
GcDevicePc/auxtool.Designer.cs
View file @
129cc874
...
@@ -64,20 +64,23 @@
...
@@ -64,20 +64,23 @@
this
.
hair_a1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
hair_a1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
hair_h1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
hair_h1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox5
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox5
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
pictureBox1
=
new
System
.
Windows
.
Forms
.
PictureBox
();
this
.
tcd2_sw
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
label13
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label13
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
tcd3_sw
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
label12
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label12
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
tcd1_sw
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
tcddac3
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
tcddac3
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
tcddac2
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
tcddac2
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label11
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label11
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label10
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label10
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label9
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label9
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label8
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label8
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
tcd2_sw
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
tcd3_sw
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
tcd1_sw
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
tcddac1
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
tcddac1
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
fidfire
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
fidfire
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
pictureBox1
=
new
System
.
Windows
.
Forms
.
PictureBox
();
this
.
groupBox6
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
button2
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
this
.
groupBox3
.
SuspendLayout
();
this
.
groupBox3
.
SuspendLayout
();
...
@@ -85,6 +88,7 @@
...
@@ -85,6 +88,7 @@
this
.
groupBox8
.
SuspendLayout
();
this
.
groupBox8
.
SuspendLayout
();
this
.
groupBox5
.
SuspendLayout
();
this
.
groupBox5
.
SuspendLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
pictureBox1
)).
BeginInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
pictureBox1
)).
BeginInit
();
this
.
groupBox6
.
SuspendLayout
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
//
//
// groupBox1
// groupBox1
...
@@ -367,14 +371,14 @@
...
@@ -367,14 +371,14 @@
this
.
groupBox8
.
Controls
.
Add
(
this
.
hair_h1
);
this
.
groupBox8
.
Controls
.
Add
(
this
.
hair_h1
);
this
.
groupBox8
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
495
);
this
.
groupBox8
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
495
);
this
.
groupBox8
.
Name
=
"groupBox8"
;
this
.
groupBox8
.
Name
=
"groupBox8"
;
this
.
groupBox8
.
Size
=
new
System
.
Drawing
.
Size
(
495
,
72
);
this
.
groupBox8
.
Size
=
new
System
.
Drawing
.
Size
(
269
,
83
);
this
.
groupBox8
.
TabIndex
=
6
;
this
.
groupBox8
.
TabIndex
=
6
;
this
.
groupBox8
.
TabStop
=
false
;
this
.
groupBox8
.
TabStop
=
false
;
this
.
groupBox8
.
Text
=
"氢空阀测试"
;
this
.
groupBox8
.
Text
=
"氢空阀测试"
;
//
//
// hair_a2
// hair_a2
//
//
this
.
hair_a2
.
Location
=
new
System
.
Drawing
.
Point
(
370
,
29
);
this
.
hair_a2
.
Location
=
new
System
.
Drawing
.
Point
(
151
,
54
);
this
.
hair_a2
.
Name
=
"hair_a2"
;
this
.
hair_a2
.
Name
=
"hair_a2"
;
this
.
hair_a2
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
hair_a2
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
hair_a2
.
TabIndex
=
3
;
this
.
hair_a2
.
TabIndex
=
3
;
...
@@ -384,7 +388,7 @@
...
@@ -384,7 +388,7 @@
//
//
// hair_h2
// hair_h2
//
//
this
.
hair_h2
.
Location
=
new
System
.
Drawing
.
Point
(
27
8
,
29
);
this
.
hair_h2
.
Location
=
new
System
.
Drawing
.
Point
(
27
,
52
);
this
.
hair_h2
.
Name
=
"hair_h2"
;
this
.
hair_h2
.
Name
=
"hair_h2"
;
this
.
hair_h2
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
hair_h2
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
hair_h2
.
TabIndex
=
2
;
this
.
hair_h2
.
TabIndex
=
2
;
...
@@ -394,7 +398,7 @@
...
@@ -394,7 +398,7 @@
//
//
// hair_a1
// hair_a1
//
//
this
.
hair_a1
.
Location
=
new
System
.
Drawing
.
Point
(
1
20
,
29
);
this
.
hair_a1
.
Location
=
new
System
.
Drawing
.
Point
(
1
51
,
20
);
this
.
hair_a1
.
Name
=
"hair_a1"
;
this
.
hair_a1
.
Name
=
"hair_a1"
;
this
.
hair_a1
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
hair_a1
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
hair_a1
.
TabIndex
=
1
;
this
.
hair_a1
.
TabIndex
=
1
;
...
@@ -404,7 +408,7 @@
...
@@ -404,7 +408,7 @@
//
//
// hair_h1
// hair_h1
//
//
this
.
hair_h1
.
Location
=
new
System
.
Drawing
.
Point
(
27
,
2
9
);
this
.
hair_h1
.
Location
=
new
System
.
Drawing
.
Point
(
27
,
2
0
);
this
.
hair_h1
.
Name
=
"hair_h1"
;
this
.
hair_h1
.
Name
=
"hair_h1"
;
this
.
hair_h1
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
hair_h1
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
hair_h1
.
TabIndex
=
0
;
this
.
hair_h1
.
TabIndex
=
0
;
...
@@ -434,6 +438,27 @@
...
@@ -434,6 +438,27 @@
this
.
groupBox5
.
TabStop
=
false
;
this
.
groupBox5
.
TabStop
=
false
;
this
.
groupBox5
.
Text
=
"TCD设置"
;
this
.
groupBox5
.
Text
=
"TCD设置"
;
//
//
// pictureBox1
//
this
.
pictureBox1
.
Image
=
global
::
GcDevicePc
.
Properties
.
Resources
.
色谱
3
;
this
.
pictureBox1
.
Location
=
new
System
.
Drawing
.
Point
(
335
,
12
);
this
.
pictureBox1
.
Name
=
"pictureBox1"
;
this
.
pictureBox1
.
Size
=
new
System
.
Drawing
.
Size
(
139
,
114
);
this
.
pictureBox1
.
SizeMode
=
System
.
Windows
.
Forms
.
PictureBoxSizeMode
.
StretchImage
;
this
.
pictureBox1
.
TabIndex
=
11
;
this
.
pictureBox1
.
TabStop
=
false
;
this
.
pictureBox1
.
Visible
=
false
;
//
// tcd2_sw
//
this
.
tcd2_sw
.
Location
=
new
System
.
Drawing
.
Point
(
212
,
61
);
this
.
tcd2_sw
.
Name
=
"tcd2_sw"
;
this
.
tcd2_sw
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
tcd2_sw
.
TabIndex
=
2
;
this
.
tcd2_sw
.
Text
=
"中TCD(关)"
;
this
.
tcd2_sw
.
UseVisualStyleBackColor
=
true
;
this
.
tcd2_sw
.
Click
+=
new
System
.
EventHandler
(
this
.
tcd2_sw_Click
);
//
// label13
// label13
//
//
this
.
label13
.
AutoSize
=
true
;
this
.
label13
.
AutoSize
=
true
;
...
@@ -443,6 +468,16 @@
...
@@ -443,6 +468,16 @@
this
.
label13
.
TabIndex
=
10
;
this
.
label13
.
TabIndex
=
10
;
this
.
label13
.
Text
=
"mA"
;
this
.
label13
.
Text
=
"mA"
;
//
//
// tcd3_sw
//
this
.
tcd3_sw
.
Location
=
new
System
.
Drawing
.
Point
(
212
,
92
);
this
.
tcd3_sw
.
Name
=
"tcd3_sw"
;
this
.
tcd3_sw
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
tcd3_sw
.
TabIndex
=
1
;
this
.
tcd3_sw
.
Text
=
"后TCD(关)"
;
this
.
tcd3_sw
.
UseVisualStyleBackColor
=
true
;
this
.
tcd3_sw
.
Click
+=
new
System
.
EventHandler
(
this
.
tcd3_sw_Click
);
//
// label12
// label12
//
//
this
.
label12
.
AutoSize
=
true
;
this
.
label12
.
AutoSize
=
true
;
...
@@ -452,6 +487,16 @@
...
@@ -452,6 +487,16 @@
this
.
label12
.
TabIndex
=
9
;
this
.
label12
.
TabIndex
=
9
;
this
.
label12
.
Text
=
"mA"
;
this
.
label12
.
Text
=
"mA"
;
//
//
// tcd1_sw
//
this
.
tcd1_sw
.
Location
=
new
System
.
Drawing
.
Point
(
212
,
27
);
this
.
tcd1_sw
.
Name
=
"tcd1_sw"
;
this
.
tcd1_sw
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
tcd1_sw
.
TabIndex
=
0
;
this
.
tcd1_sw
.
Text
=
"前TCD(关)"
;
this
.
tcd1_sw
.
UseVisualStyleBackColor
=
true
;
this
.
tcd1_sw
.
Click
+=
new
System
.
EventHandler
(
this
.
tcd1_sw_Click
);
//
// tcddac3
// tcddac3
//
//
this
.
tcddac3
.
Location
=
new
System
.
Drawing
.
Point
(
85
,
93
);
this
.
tcddac3
.
Location
=
new
System
.
Drawing
.
Point
(
85
,
93
);
...
@@ -502,36 +547,6 @@
...
@@ -502,36 +547,6 @@
this
.
label8
.
TabIndex
=
3
;
this
.
label8
.
TabIndex
=
3
;
this
.
label8
.
Text
=
"TCD(前):"
;
this
.
label8
.
Text
=
"TCD(前):"
;
//
//
// tcd2_sw
//
this
.
tcd2_sw
.
Location
=
new
System
.
Drawing
.
Point
(
212
,
61
);
this
.
tcd2_sw
.
Name
=
"tcd2_sw"
;
this
.
tcd2_sw
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
tcd2_sw
.
TabIndex
=
2
;
this
.
tcd2_sw
.
Text
=
"中TCD(关)"
;
this
.
tcd2_sw
.
UseVisualStyleBackColor
=
true
;
this
.
tcd2_sw
.
Click
+=
new
System
.
EventHandler
(
this
.
tcd2_sw_Click
);
//
// tcd3_sw
//
this
.
tcd3_sw
.
Location
=
new
System
.
Drawing
.
Point
(
212
,
92
);
this
.
tcd3_sw
.
Name
=
"tcd3_sw"
;
this
.
tcd3_sw
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
tcd3_sw
.
TabIndex
=
1
;
this
.
tcd3_sw
.
Text
=
"后TCD(关)"
;
this
.
tcd3_sw
.
UseVisualStyleBackColor
=
true
;
this
.
tcd3_sw
.
Click
+=
new
System
.
EventHandler
(
this
.
tcd3_sw_Click
);
//
// tcd1_sw
//
this
.
tcd1_sw
.
Location
=
new
System
.
Drawing
.
Point
(
212
,
27
);
this
.
tcd1_sw
.
Name
=
"tcd1_sw"
;
this
.
tcd1_sw
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
tcd1_sw
.
TabIndex
=
0
;
this
.
tcd1_sw
.
Text
=
"前TCD(关)"
;
this
.
tcd1_sw
.
UseVisualStyleBackColor
=
true
;
this
.
tcd1_sw
.
Click
+=
new
System
.
EventHandler
(
this
.
tcd1_sw_Click
);
//
// tcddac1
// tcddac1
//
//
this
.
tcddac1
.
Location
=
new
System
.
Drawing
.
Point
(
85
,
29
);
this
.
tcddac1
.
Location
=
new
System
.
Drawing
.
Point
(
85
,
29
);
...
@@ -544,21 +559,43 @@
...
@@ -544,21 +559,43 @@
this
.
fidfire
.
Interval
=
1000
;
this
.
fidfire
.
Interval
=
1000
;
this
.
fidfire
.
Tick
+=
new
System
.
EventHandler
(
this
.
fidfire_Tick
);
this
.
fidfire
.
Tick
+=
new
System
.
EventHandler
(
this
.
fidfire_Tick
);
//
//
// pictureBox1
// groupBox6
//
//
this
.
pictureBox1
.
Image
=
global
::
GcDevicePc
.
Properties
.
Resources
.
色谱
3
;
this
.
groupBox6
.
Controls
.
Add
(
this
.
button2
);
this
.
pictureBox1
.
Location
=
new
System
.
Drawing
.
Point
(
335
,
12
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
button1
);
this
.
pictureBox1
.
Name
=
"pictureBox1"
;
this
.
groupBox6
.
Location
=
new
System
.
Drawing
.
Point
(
290
,
495
);
this
.
pictureBox1
.
Size
=
new
System
.
Drawing
.
Size
(
139
,
114
);
this
.
groupBox6
.
Name
=
"groupBox6"
;
this
.
pictureBox1
.
SizeMode
=
System
.
Windows
.
Forms
.
PictureBoxSizeMode
.
StretchImage
;
this
.
groupBox6
.
Size
=
new
System
.
Drawing
.
Size
(
200
,
83
);
this
.
pictureBox1
.
TabIndex
=
11
;
this
.
groupBox6
.
TabIndex
=
8
;
this
.
pictureBox1
.
TabStop
=
false
;
this
.
groupBox6
.
TabStop
=
false
;
this
.
groupBox6
.
Text
=
"校准阀"
;
//
// button2
//
this
.
button2
.
Location
=
new
System
.
Drawing
.
Point
(
108
,
41
);
this
.
button2
.
Name
=
"button2"
;
this
.
button2
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
button2
.
TabIndex
=
0
;
this
.
button2
.
Text
=
"校零阀"
;
this
.
button2
.
UseVisualStyleBackColor
=
true
;
this
.
button2
.
Click
+=
new
System
.
EventHandler
(
this
.
Button2_Click
);
//
// button1
//
this
.
button1
.
Location
=
new
System
.
Drawing
.
Point
(
19
,
41
);
this
.
button1
.
Name
=
"button1"
;
this
.
button1
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
button1
.
TabIndex
=
0
;
this
.
button1
.
Text
=
"校标阀"
;
this
.
button1
.
UseVisualStyleBackColor
=
true
;
this
.
button1
.
Click
+=
new
System
.
EventHandler
(
this
.
Button1_Click
);
//
//
// auxtool
// auxtool
//
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
519
,
572
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
519
,
582
);
this
.
Controls
.
Add
(
this
.
groupBox6
);
this
.
Controls
.
Add
(
this
.
groupBox5
);
this
.
Controls
.
Add
(
this
.
groupBox5
);
this
.
Controls
.
Add
(
this
.
groupBox8
);
this
.
Controls
.
Add
(
this
.
groupBox8
);
this
.
Controls
.
Add
(
this
.
groupBox4
);
this
.
Controls
.
Add
(
this
.
groupBox4
);
...
@@ -585,6 +622,7 @@
...
@@ -585,6 +622,7 @@
this
.
groupBox5
.
ResumeLayout
(
false
);
this
.
groupBox5
.
ResumeLayout
(
false
);
this
.
groupBox5
.
PerformLayout
();
this
.
groupBox5
.
PerformLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
pictureBox1
)).
EndInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
pictureBox1
)).
EndInit
();
this
.
groupBox6
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
}
}
...
@@ -639,5 +677,8 @@
...
@@ -639,5 +677,8 @@
private
System
.
Windows
.
Forms
.
Button
fireupbtnI
;
private
System
.
Windows
.
Forms
.
Button
fireupbtnI
;
private
System
.
Windows
.
Forms
.
Timer
fidfire
;
private
System
.
Windows
.
Forms
.
Timer
fidfire
;
private
System
.
Windows
.
Forms
.
PictureBox
pictureBox1
;
private
System
.
Windows
.
Forms
.
PictureBox
pictureBox1
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox6
;
private
System
.
Windows
.
Forms
.
Button
button2
;
private
System
.
Windows
.
Forms
.
Button
button1
;
}
}
}
}
\ No newline at end of file
GcDevicePc/auxtool.cs
View file @
129cc874
...
@@ -22,7 +22,7 @@ namespace GcDevicePc
...
@@ -22,7 +22,7 @@ namespace GcDevicePc
public
delegate
void
TCD_SetDAC
(
ushort
port
,
ushort
val
);
public
delegate
void
TCD_SetDAC
(
ushort
port
,
ushort
val
);
public
delegate
void
HAir_SW
(
int
val
);
public
delegate
void
HAir_SW
(
int
val
);
public
delegate
void
Adjust_SW
(
int
val
);
public
partial
class
auxtool
:
Form
public
partial
class
auxtool
:
Form
{
{
private
string
HmiIP
=
null
;
private
string
HmiIP
=
null
;
...
@@ -747,6 +747,17 @@ namespace GcDevicePc
...
@@ -747,6 +747,17 @@ namespace GcDevicePc
fidfire
.
Stop
();
fidfire
.
Stop
();
}
}
public
event
Adjust_SW
adsw
;
private
void
Button1_Click
(
object
sender
,
EventArgs
e
)
{
adsw
(
1
);
}
private
void
Button2_Click
(
object
sender
,
EventArgs
e
)
{
adsw
(
0
);
}
//private void fireupbtnb_Click(object sender, EventArgs e)
//private void fireupbtnb_Click(object sender, EventArgs e)
//{
//{
// if (String.IsNullOrEmpty(fireuptime.Text) || String.IsNullOrEmpty(hvalvetime.Text))
// if (String.IsNullOrEmpty(fireuptime.Text) || String.IsNullOrEmpty(hvalvetime.Text))
...
...
GcDevicePc/globaldata.cs
View file @
129cc874
...
@@ -95,7 +95,7 @@ namespace GcDevicePc
...
@@ -95,7 +95,7 @@ namespace GcDevicePc
public
static
PCBuffer
m_pcbuffer
=
new
PCBuffer
();
public
static
PCBuffer
m_pcbuffer
=
new
PCBuffer
();
public
static
SignalBuffer
m_signalbuffer
=
new
SignalBuffer
();
public
static
SignalBuffer
m_signalbuffer
=
new
SignalBuffer
();
//public static int ProgramCount = 0;
//
//
public
static
HWConfig
m_hwconfig
=
new
HWConfig
();
public
static
HWConfig
m_hwconfig
=
new
HWConfig
();
...
@@ -117,7 +117,8 @@ namespace GcDevicePc
...
@@ -117,7 +117,8 @@ namespace GcDevicePc
public
static
bool
OS_STOP
=
false
;
public
static
bool
OS_STOP
=
false
;
public
static
int
check_link
=
0
;
public
static
int
check_link
=
0
;
public
static
bool
IsStopOs
=
false
;
///////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////
//public static CProfileDevice open_profileMethod = new CProfileDevice();
//public static CProfileDevice open_profileMethod = new CProfileDevice();
//public static MethodConfig open_configDlg = new MethodConfig();
//public static MethodConfig open_configDlg = new MethodConfig();
...
...
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