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
d87268a7
Commit
d87268a7
authored
Aug 28, 2019
by
liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改方法配置文件极性键值,解决后处理和空闲中状态变换问题
parent
d0bb5a63
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
73 additions
and
19 deletions
+73
-19
AppInit.cs
GcDevicePc/AppInit.cs
+1
-1
MethodMain.cs
GcDevicePc/ConfigMethod/MethodMain.cs
+3
-0
GCMethodConfig.cs
GcDevicePc/GCBuffer/GCMethodConfig.cs
+12
-0
PCBuffer.cs
GcDevicePc/GCBuffer/PCBuffer.cs
+3
-2
MDIBase.Designer.cs
GcDevicePc/MDIBase.Designer.cs
+14
-4
MDIBase.cs
GcDevicePc/MDIBase.cs
+22
-9
CKvocUpdata.cs
GcDevicePc/ProThread/CKvocUpdata.cs
+0
-2
GcDataTh.cs
GcDevicePc/ProThread/GcDataTh.cs
+1
-1
HMIControl.cs
GcDevicePc/ProThread/HMIControl.cs
+17
-0
No files found.
GcDevicePc/AppInit.cs
View file @
d87268a7
...
@@ -761,7 +761,7 @@ namespace GcDevicePc
...
@@ -761,7 +761,7 @@ namespace GcDevicePc
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
show_MethodName
=
"SingleAnal.ini"
;
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcfileinfo
.
show_MethodName
=
"SingleAnal.ini"
;
}
}
//
SignalDataToHw.methodconfig = InitGetConfig(tmpfile);
SignalDataToHw
.
methodconfig
=
InitGetConfig
(
tmpfile
);
SendDataToZB
.
methodconfig
=
InitGetConfig
(
tmpfile
);
SendDataToZB
.
methodconfig
=
InitGetConfig
(
tmpfile
);
}
}
else
else
...
...
GcDevicePc/ConfigMethod/MethodMain.cs
View file @
d87268a7
...
@@ -18,6 +18,7 @@ namespace GcDevicePc.ConfigMethod
...
@@ -18,6 +18,7 @@ namespace GcDevicePc.ConfigMethod
{
{
public
delegate
void
SendUpdateCMD
(
bool
flag
);
public
delegate
void
SendUpdateCMD
(
bool
flag
);
public
delegate
void
Up_MethodMain
();
private
Point
dwPoint
;
private
Point
dwPoint
;
private
bool
moveFlag
;
private
bool
moveFlag
;
...
@@ -367,6 +368,7 @@ namespace GcDevicePc.ConfigMethod
...
@@ -367,6 +368,7 @@ namespace GcDevicePc.ConfigMethod
}
}
public
event
Up_MethodMain
upmethod
;
public
event
SendUpdateCMD
sendupdatecmd
;
public
event
SendUpdateCMD
sendupdatecmd
;
private
void
savebth_Click
(
object
sender
,
EventArgs
e
)
private
void
savebth_Click
(
object
sender
,
EventArgs
e
)
...
@@ -383,6 +385,7 @@ namespace GcDevicePc.ConfigMethod
...
@@ -383,6 +385,7 @@ namespace GcDevicePc.ConfigMethod
if
(
this
.
updateflag
)
if
(
this
.
updateflag
)
{
{
upmethod
();
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
work_Statue
==
1
)
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
work_Statue
==
1
)
{
{
string
message
=
"方法运行中,请先停止后再提交"
;
string
message
=
"方法运行中,请先停止后再提交"
;
...
...
GcDevicePc/GCBuffer/GCMethodConfig.cs
View file @
d87268a7
...
@@ -1482,6 +1482,7 @@ namespace GcDevicePc.GCBuffer
...
@@ -1482,6 +1482,7 @@ namespace GcDevicePc.GCBuffer
tcd
[
cFront
].
sTcdLoc
=
methodconfigini
.
GetProfileString
(
sAppName
,
"TCD"
);
tcd
[
cFront
].
sTcdLoc
=
methodconfigini
.
GetProfileString
(
sAppName
,
"TCD"
);
//tcd[cFront].fSigValve = methodconfigini.GetProfileFloat(sAppName, "信号值", fDefault);
//tcd[cFront].fSigValve = methodconfigini.GetProfileFloat(sAppName, "信号值", fDefault);
//tcd[cFront].u16Electric = methodconfigini.GetProfileInt(sAppName, "桥电路", iDefault);
//tcd[cFront].u16Electric = methodconfigini.GetProfileInt(sAppName, "桥电路", iDefault);
tcd
[
cFront
].
u16Polarity
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"极性设定值"
,
iDefault
);
tcd
[
cFront
].
u16Polarity
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"极性"
,
iDefault
);
tcd
[
cFront
].
u16Polarity
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"极性"
,
iDefault
);
//tcd[cFront].u16AutoZeroSet = methodconfigini.GetProfileInt(sAppName, "自动调零", iDefault);
//tcd[cFront].u16AutoZeroSet = methodconfigini.GetProfileInt(sAppName, "自动调零", iDefault);
tcd
[
cFront
].
fHeaterTempSet
=
methodconfigini
.
GetProfileFloat
(
sAppName
,
"加热器设定温度"
,
fDefault
);
tcd
[
cFront
].
fHeaterTempSet
=
methodconfigini
.
GetProfileFloat
(
sAppName
,
"加热器设定温度"
,
fDefault
);
...
@@ -1496,6 +1497,7 @@ namespace GcDevicePc.GCBuffer
...
@@ -1496,6 +1497,7 @@ namespace GcDevicePc.GCBuffer
tcd
[
cInter
].
sTcdLoc
=
methodconfigini
.
GetProfileString
(
sAppName
,
"TCD"
);
tcd
[
cInter
].
sTcdLoc
=
methodconfigini
.
GetProfileString
(
sAppName
,
"TCD"
);
//tcd[cInter].fSigValve = methodconfigini.GetProfileFloat(sAppName, "信号值", fDefault);
//tcd[cInter].fSigValve = methodconfigini.GetProfileFloat(sAppName, "信号值", fDefault);
//tcd[cInter].u16Electric = methodconfigini.GetProfileInt(sAppName, "桥电路", iDefault);
//tcd[cInter].u16Electric = methodconfigini.GetProfileInt(sAppName, "桥电路", iDefault);
tcd
[
cInter
].
u16Polarity
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"极性设定值"
,
iDefault
);
tcd
[
cInter
].
u16Polarity
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"极性"
,
iDefault
);
tcd
[
cInter
].
u16Polarity
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"极性"
,
iDefault
);
//tcd[cInter].u16AutoZeroSet = methodconfigini.GetProfileInt(sAppName, "自动调零", iDefault);
//tcd[cInter].u16AutoZeroSet = methodconfigini.GetProfileInt(sAppName, "自动调零", iDefault);
tcd
[
cInter
].
fHeaterTempSet
=
methodconfigini
.
GetProfileFloat
(
sAppName
,
"加热器设定温度"
,
fDefault
);
tcd
[
cInter
].
fHeaterTempSet
=
methodconfigini
.
GetProfileFloat
(
sAppName
,
"加热器设定温度"
,
fDefault
);
...
@@ -1510,6 +1512,7 @@ namespace GcDevicePc.GCBuffer
...
@@ -1510,6 +1512,7 @@ namespace GcDevicePc.GCBuffer
tcd
[
cBehind
].
sTcdLoc
=
methodconfigini
.
GetProfileString
(
sAppName
,
"TCD"
);
tcd
[
cBehind
].
sTcdLoc
=
methodconfigini
.
GetProfileString
(
sAppName
,
"TCD"
);
//tcd[cBehind].fSigValve = methodconfigini.GetProfileFloat(sAppName, "信号值", fDefault);
//tcd[cBehind].fSigValve = methodconfigini.GetProfileFloat(sAppName, "信号值", fDefault);
//tcd[cBehind].u16Electric = methodconfigini.GetProfileInt(sAppName, "桥电路", iDefault);
//tcd[cBehind].u16Electric = methodconfigini.GetProfileInt(sAppName, "桥电路", iDefault);
tcd
[
cBehind
].
u16Polarity
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"极性设定值"
,
iDefault
);
tcd
[
cBehind
].
u16Polarity
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"极性"
,
iDefault
);
tcd
[
cBehind
].
u16Polarity
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"极性"
,
iDefault
);
//tcd[cBehind].u16AutoZeroSet = methodconfigini.GetProfileInt(sAppName, "自动调零", iDefault);
//tcd[cBehind].u16AutoZeroSet = methodconfigini.GetProfileInt(sAppName, "自动调零", iDefault);
tcd
[
cBehind
].
fHeaterTempSet
=
methodconfigini
.
GetProfileFloat
(
sAppName
,
"加热器设定温度"
,
fDefault
);
tcd
[
cBehind
].
fHeaterTempSet
=
methodconfigini
.
GetProfileFloat
(
sAppName
,
"加热器设定温度"
,
fDefault
);
...
@@ -1541,6 +1544,7 @@ namespace GcDevicePc.GCBuffer
...
@@ -1541,6 +1544,7 @@ namespace GcDevicePc.GCBuffer
savemethodconfig
.
WriteProfileString
(
sAppName
,
"TCD"
,
tcd
[
cFront
].
sTcdLoc
);
savemethodconfig
.
WriteProfileString
(
sAppName
,
"TCD"
,
tcd
[
cFront
].
sTcdLoc
);
//savemethodconfig.WriteProfileFloat(sAppName, "信号值", tcd[cFront].fSigValve);
//savemethodconfig.WriteProfileFloat(sAppName, "信号值", tcd[cFront].fSigValve);
//savemethodconfig.WriteProfileInt(sAppName, "桥电路", tcd[cFront].u16Electric);
//savemethodconfig.WriteProfileInt(sAppName, "桥电路", tcd[cFront].u16Electric);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"极性设定值"
,
tcd
[
cFront
].
u16Polarity
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"极性"
,
tcd
[
cFront
].
u16Polarity
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"极性"
,
tcd
[
cFront
].
u16Polarity
);
//savemethodconfig.WriteProfileInt(sAppName, "自动调零", tcd[cFront].u16AutoZeroSet);
//savemethodconfig.WriteProfileInt(sAppName, "自动调零", tcd[cFront].u16AutoZeroSet);
savemethodconfig
.
WriteProfileFloat
(
sAppName
,
"加热器设定温度"
,
tcd
[
cFront
].
fHeaterTempSet
);
savemethodconfig
.
WriteProfileFloat
(
sAppName
,
"加热器设定温度"
,
tcd
[
cFront
].
fHeaterTempSet
);
...
@@ -1555,6 +1559,7 @@ namespace GcDevicePc.GCBuffer
...
@@ -1555,6 +1559,7 @@ namespace GcDevicePc.GCBuffer
savemethodconfig
.
WriteProfileString
(
sAppName
,
"TCD"
,
tcd
[
cInter
].
sTcdLoc
);
savemethodconfig
.
WriteProfileString
(
sAppName
,
"TCD"
,
tcd
[
cInter
].
sTcdLoc
);
//savemethodconfig.WriteProfileFloat(sAppName, "信号值", tcd[cInter].fSigValve);
//savemethodconfig.WriteProfileFloat(sAppName, "信号值", tcd[cInter].fSigValve);
//savemethodconfig.WriteProfileInt(sAppName, "桥电路", tcd[cInter].u16Electric);
//savemethodconfig.WriteProfileInt(sAppName, "桥电路", tcd[cInter].u16Electric);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"极性设定值"
,
tcd
[
cInter
].
u16Polarity
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"极性"
,
tcd
[
cInter
].
u16Polarity
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"极性"
,
tcd
[
cInter
].
u16Polarity
);
//savemethodconfig.WriteProfileInt(sAppName, "自动调零", tcd[cInter].u16AutoZeroSet);
//savemethodconfig.WriteProfileInt(sAppName, "自动调零", tcd[cInter].u16AutoZeroSet);
savemethodconfig
.
WriteProfileFloat
(
sAppName
,
"加热器设定温度"
,
tcd
[
cInter
].
fHeaterTempSet
);
savemethodconfig
.
WriteProfileFloat
(
sAppName
,
"加热器设定温度"
,
tcd
[
cInter
].
fHeaterTempSet
);
...
@@ -1569,6 +1574,7 @@ namespace GcDevicePc.GCBuffer
...
@@ -1569,6 +1574,7 @@ namespace GcDevicePc.GCBuffer
savemethodconfig
.
WriteProfileString
(
sAppName
,
"TCD"
,
tcd
[
cBehind
].
sTcdLoc
);
savemethodconfig
.
WriteProfileString
(
sAppName
,
"TCD"
,
tcd
[
cBehind
].
sTcdLoc
);
//savemethodconfig.WriteProfileFloat(sAppName, "信号值",tcd[cBehind].fSigValve);
//savemethodconfig.WriteProfileFloat(sAppName, "信号值",tcd[cBehind].fSigValve);
//savemethodconfig.WriteProfileInt(sAppName, "桥电路",tcd[cBehind].u16Electric);
//savemethodconfig.WriteProfileInt(sAppName, "桥电路",tcd[cBehind].u16Electric);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"极性设定值"
,
tcd
[
cBehind
].
u16Polarity
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"极性"
,
tcd
[
cBehind
].
u16Polarity
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"极性"
,
tcd
[
cBehind
].
u16Polarity
);
//savemethodconfig.WriteProfileInt(sAppName, "自动调零", tcd[cBehind].u16AutoZeroSet);
//savemethodconfig.WriteProfileInt(sAppName, "自动调零", tcd[cBehind].u16AutoZeroSet);
savemethodconfig
.
WriteProfileFloat
(
sAppName
,
"加热器设定温度"
,
tcd
[
cBehind
].
fHeaterTempSet
);
savemethodconfig
.
WriteProfileFloat
(
sAppName
,
"加热器设定温度"
,
tcd
[
cBehind
].
fHeaterTempSet
);
...
@@ -1598,6 +1604,7 @@ namespace GcDevicePc.GCBuffer
...
@@ -1598,6 +1604,7 @@ namespace GcDevicePc.GCBuffer
//fid[cFront].sFid = methodconfigini.GetProfileString(sAppName, "检测器位置");
//fid[cFront].sFid = methodconfigini.GetProfileString(sAppName, "检测器位置");
fid
[
cFront
].
u16KeyFire
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"自动点火"
,
iDefault
);
fid
[
cFront
].
u16KeyFire
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"自动点火"
,
iDefault
);
fid
[
cFront
].
u16Zero
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"归零"
,
iDefault
);
fid
[
cFront
].
u16Zero
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"归零"
,
iDefault
);
fid
[
cFront
].
u16Polarity
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"极性设定值"
,
iDefault
);
fid
[
cFront
].
u16Polarity
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"极性"
,
iDefault
);
fid
[
cFront
].
u16Polarity
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"极性"
,
iDefault
);
fid
[
cFront
].
u16Sensitive
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"灵敏度"
,
iDefault
);
fid
[
cFront
].
u16Sensitive
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"灵敏度"
,
iDefault
);
fid
[
cFront
].
u16KeyHeater
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"加热器开关"
,
iDefault
);
fid
[
cFront
].
u16KeyHeater
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"加热器开关"
,
iDefault
);
...
@@ -1616,6 +1623,7 @@ namespace GcDevicePc.GCBuffer
...
@@ -1616,6 +1623,7 @@ namespace GcDevicePc.GCBuffer
//fid[cInter].sFid = methodconfigini.GetProfileString(sAppName, "检测器位置");
//fid[cInter].sFid = methodconfigini.GetProfileString(sAppName, "检测器位置");
fid
[
cInter
].
u16KeyFire
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"自动点火"
,
iDefault
);
fid
[
cInter
].
u16KeyFire
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"自动点火"
,
iDefault
);
fid
[
cInter
].
u16Zero
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"归零"
,
iDefault
);
fid
[
cInter
].
u16Zero
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"归零"
,
iDefault
);
fid
[
cInter
].
u16Polarity
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"极性设定值"
,
iDefault
);
fid
[
cInter
].
u16Polarity
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"极性"
,
iDefault
);
fid
[
cInter
].
u16Polarity
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"极性"
,
iDefault
);
fid
[
cInter
].
u16Sensitive
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"灵敏度"
,
iDefault
);
fid
[
cInter
].
u16Sensitive
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"灵敏度"
,
iDefault
);
fid
[
cInter
].
u16KeyHeater
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"加热器开关"
,
iDefault
);
fid
[
cInter
].
u16KeyHeater
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"加热器开关"
,
iDefault
);
...
@@ -1634,6 +1642,7 @@ namespace GcDevicePc.GCBuffer
...
@@ -1634,6 +1642,7 @@ namespace GcDevicePc.GCBuffer
//fid[cBehind].sFid = methodconfigini.GetProfileString(sAppName, "检测器位置");
//fid[cBehind].sFid = methodconfigini.GetProfileString(sAppName, "检测器位置");
fid
[
cBehind
].
u16KeyFire
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"自动点火"
,
iDefault
);
fid
[
cBehind
].
u16KeyFire
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"自动点火"
,
iDefault
);
fid
[
cBehind
].
u16Zero
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"归零"
,
iDefault
);
fid
[
cBehind
].
u16Zero
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"归零"
,
iDefault
);
fid
[
cBehind
].
u16Polarity
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"极性设定值"
,
iDefault
);
fid
[
cBehind
].
u16Polarity
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"极性"
,
iDefault
);
fid
[
cBehind
].
u16Polarity
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"极性"
,
iDefault
);
fid
[
cBehind
].
u16Sensitive
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"灵敏度"
,
iDefault
);
fid
[
cBehind
].
u16Sensitive
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"灵敏度"
,
iDefault
);
fid
[
cBehind
].
u16KeyHeater
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"加热器开关"
,
iDefault
);
fid
[
cBehind
].
u16KeyHeater
=
methodconfigini
.
GetProfileInt
(
sAppName
,
"加热器开关"
,
iDefault
);
...
@@ -1665,6 +1674,7 @@ namespace GcDevicePc.GCBuffer
...
@@ -1665,6 +1674,7 @@ namespace GcDevicePc.GCBuffer
//savemethodconfig.WriteProfileString(sAppName, "检测器位置", fid[cFront].sFid);
//savemethodconfig.WriteProfileString(sAppName, "检测器位置", fid[cFront].sFid);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"自动点火"
,
fid
[
cFront
].
u16KeyFire
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"自动点火"
,
fid
[
cFront
].
u16KeyFire
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"归零"
,
fid
[
cFront
].
u16Zero
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"归零"
,
fid
[
cFront
].
u16Zero
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"极性设定值"
,
fid
[
cFront
].
u16Polarity
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"极性"
,
fid
[
cFront
].
u16Polarity
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"极性"
,
fid
[
cFront
].
u16Polarity
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"灵敏度"
,
fid
[
cFront
].
u16Sensitive
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"灵敏度"
,
fid
[
cFront
].
u16Sensitive
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"加热器开关"
,
fid
[
cFront
].
u16KeyHeater
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"加热器开关"
,
fid
[
cFront
].
u16KeyHeater
);
...
@@ -1683,6 +1693,7 @@ namespace GcDevicePc.GCBuffer
...
@@ -1683,6 +1693,7 @@ namespace GcDevicePc.GCBuffer
//savemethodconfig.WriteProfileString(sAppName, "检测器位置",fid[cInter].sFid);
//savemethodconfig.WriteProfileString(sAppName, "检测器位置",fid[cInter].sFid);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"自动点火"
,
fid
[
cInter
].
u16KeyFire
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"自动点火"
,
fid
[
cInter
].
u16KeyFire
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"归零"
,
fid
[
cInter
].
u16Zero
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"归零"
,
fid
[
cInter
].
u16Zero
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"极性设定值"
,
fid
[
cInter
].
u16Polarity
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"极性"
,
fid
[
cInter
].
u16Polarity
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"极性"
,
fid
[
cInter
].
u16Polarity
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"灵敏度"
,
fid
[
cInter
].
u16Sensitive
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"灵敏度"
,
fid
[
cInter
].
u16Sensitive
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"加热器开关"
,
fid
[
cInter
].
u16KeyHeater
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"加热器开关"
,
fid
[
cInter
].
u16KeyHeater
);
...
@@ -1701,6 +1712,7 @@ namespace GcDevicePc.GCBuffer
...
@@ -1701,6 +1712,7 @@ namespace GcDevicePc.GCBuffer
//savemethodconfig.WriteProfileString(sAppName, "检测器位置", fid[cBehind].sFid);
//savemethodconfig.WriteProfileString(sAppName, "检测器位置", fid[cBehind].sFid);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"自动点火"
,
fid
[
cBehind
].
u16KeyFire
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"自动点火"
,
fid
[
cBehind
].
u16KeyFire
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"归零"
,
fid
[
cBehind
].
u16Zero
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"归零"
,
fid
[
cBehind
].
u16Zero
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"极性设定值"
,
fid
[
cBehind
].
u16Polarity
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"极性"
,
fid
[
cBehind
].
u16Polarity
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"极性"
,
fid
[
cBehind
].
u16Polarity
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"灵敏度"
,
fid
[
cBehind
].
u16Sensitive
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"灵敏度"
,
fid
[
cBehind
].
u16Sensitive
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"加热器开关"
,
fid
[
cBehind
].
u16KeyHeater
);
savemethodconfig
.
WriteProfileInt
(
sAppName
,
"加热器开关"
,
fid
[
cBehind
].
u16KeyHeater
);
...
...
GcDevicePc/GCBuffer/PCBuffer.cs
View file @
d87268a7
...
@@ -122,7 +122,8 @@ namespace GcDevicePc.GCBuffer
...
@@ -122,7 +122,8 @@ namespace GcDevicePc.GCBuffer
gcpcinfo
.
pcworkinfo
.
info_log
=
false
;
gcpcinfo
.
pcworkinfo
.
info_log
=
false
;
gcpcinfo
.
pcworkinfo
.
error_log
=
false
;
gcpcinfo
.
pcworkinfo
.
error_log
=
false
;
gcpcinfo
.
pcworkinfo
.
hmi_log
=
false
;
gcpcinfo
.
pcworkinfo
.
hmi_log
=
false
;
gcpcinfo
.
pcworkinfo
.
sendtoZb
=
false
;
gcpcinfo
.
pcworkinfo
.
sendtohw
=
false
;
gcpcinfo
.
moduleinfo
.
ip
=
""
;
gcpcinfo
.
moduleinfo
.
ip
=
""
;
gcpcinfo
.
outputinfo
.
port
=
0
;
gcpcinfo
.
outputinfo
.
port
=
0
;
...
...
GcDevicePc/MDIBase.Designer.cs
View file @
d87268a7
...
@@ -74,6 +74,7 @@
...
@@ -74,6 +74,7 @@
this
.
AdjustStat
=
new
System
.
Windows
.
Forms
.
ToolStripStatusLabel
();
this
.
AdjustStat
=
new
System
.
Windows
.
Forms
.
ToolStripStatusLabel
();
this
.
workProgress
=
new
System
.
Windows
.
Forms
.
ToolStripProgressBar
();
this
.
workProgress
=
new
System
.
Windows
.
Forms
.
ToolStripProgressBar
();
this
.
timer2
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
timer2
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
数据路径
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
menuStrip
.
SuspendLayout
();
this
.
menuStrip
.
SuspendLayout
();
this
.
statusStrip
.
SuspendLayout
();
this
.
statusStrip
.
SuspendLayout
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
...
@@ -233,7 +234,8 @@
...
@@ -233,7 +234,8 @@
this
.
DataMainMenu
.
DropDownItems
.
AddRange
(
new
System
.
Windows
.
Forms
.
ToolStripItem
[]
{
this
.
DataMainMenu
.
DropDownItems
.
AddRange
(
new
System
.
Windows
.
Forms
.
ToolStripItem
[]
{
this
.
HistoryDataMenu
,
this
.
HistoryDataMenu
,
this
.
CalibrationMenu
,
this
.
CalibrationMenu
,
this
.
HistoryPicMenu
});
this
.
HistoryPicMenu
,
this
.
数据路径
ToolStripMenuItem
});
this
.
DataMainMenu
.
Font
=
new
System
.
Drawing
.
Font
(
"Microsoft YaHei UI"
,
12F
);
this
.
DataMainMenu
.
Font
=
new
System
.
Drawing
.
Font
(
"Microsoft YaHei UI"
,
12F
);
this
.
DataMainMenu
.
Name
=
"DataMainMenu"
;
this
.
DataMainMenu
.
Name
=
"DataMainMenu"
;
this
.
DataMainMenu
.
Size
=
new
System
.
Drawing
.
Size
(
86
,
25
);
this
.
DataMainMenu
.
Size
=
new
System
.
Drawing
.
Size
(
86
,
25
);
...
@@ -242,21 +244,21 @@
...
@@ -242,21 +244,21 @@
// HistoryDataMenu
// HistoryDataMenu
//
//
this
.
HistoryDataMenu
.
Name
=
"HistoryDataMenu"
;
this
.
HistoryDataMenu
.
Name
=
"HistoryDataMenu"
;
this
.
HistoryDataMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
HistoryDataMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
HistoryDataMenu
.
Text
=
"数据查询"
;
this
.
HistoryDataMenu
.
Text
=
"数据查询"
;
this
.
HistoryDataMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
HistoryDataMenu_Click
);
this
.
HistoryDataMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
HistoryDataMenu_Click
);
//
//
// CalibrationMenu
// CalibrationMenu
//
//
this
.
CalibrationMenu
.
Name
=
"CalibrationMenu"
;
this
.
CalibrationMenu
.
Name
=
"CalibrationMenu"
;
this
.
CalibrationMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
CalibrationMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
CalibrationMenu
.
Text
=
"数据校准"
;
this
.
CalibrationMenu
.
Text
=
"数据校准"
;
this
.
CalibrationMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
CalibrationMenu_Click
);
this
.
CalibrationMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
CalibrationMenu_Click
);
//
//
// HistoryPicMenu
// HistoryPicMenu
//
//
this
.
HistoryPicMenu
.
Name
=
"HistoryPicMenu"
;
this
.
HistoryPicMenu
.
Name
=
"HistoryPicMenu"
;
this
.
HistoryPicMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
HistoryPicMenu
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
HistoryPicMenu
.
Text
=
"历史谱图"
;
this
.
HistoryPicMenu
.
Text
=
"历史谱图"
;
this
.
HistoryPicMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
HistoryPicMenu_Click
);
this
.
HistoryPicMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
HistoryPicMenu_Click
);
//
//
...
@@ -437,6 +439,13 @@
...
@@ -437,6 +439,13 @@
this
.
timer2
.
Interval
=
1000
;
this
.
timer2
.
Interval
=
1000
;
this
.
timer2
.
Tick
+=
new
System
.
EventHandler
(
this
.
timer2_Tick
);
this
.
timer2
.
Tick
+=
new
System
.
EventHandler
(
this
.
timer2_Tick
);
//
//
// 数据路径ToolStripMenuItem
//
this
.
数据路径
ToolStripMenuItem
.
Name
=
"数据路径ToolStripMenuItem"
;
this
.
数据路径
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
180
,
26
);
this
.
数据路径
ToolStripMenuItem
.
Text
=
"数据路径"
;
this
.
数据路径
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
数据路径
ToolStripMenuItem_Click
);
//
// MDIBase
// MDIBase
//
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
...
@@ -507,6 +516,7 @@
...
@@ -507,6 +516,7 @@
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
单位换算
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
单位换算
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
自动校准
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
自动校准
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
testToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
testToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
数据路径
ToolStripMenuItem
;
}
}
}
}
...
...
GcDevicePc/MDIBase.cs
View file @
d87268a7
...
@@ -82,7 +82,7 @@ namespace GcDevicePc
...
@@ -82,7 +82,7 @@ namespace GcDevicePc
CKvocUpdata2
dataVoc2
=
new
CKvocUpdata2
();
CKvocUpdata2
dataVoc2
=
new
CKvocUpdata2
();
CKvocUpdata3
dataVoc3
=
new
CKvocUpdata3
();
CKvocUpdata3
dataVoc3
=
new
CKvocUpdata3
();
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
();
...
@@ -947,7 +947,7 @@ namespace GcDevicePc
...
@@ -947,7 +947,7 @@ namespace GcDevicePc
BackgroundWorker
worker
=
sender
as
BackgroundWorker
;
BackgroundWorker
worker
=
sender
as
BackgroundWorker
;
for
(
int
i
=
0
;
i
<
100
;
i
++)
for
(
int
i
=
0
;
i
<
100
;
i
++)
{
{
if
(
globaldata
.
m_hmibuffer
.
gcinfo
.
hmistatus
==
0
)
if
(
globaldata
.
m_hmibuffer
.
gcinfo
.
hmistatus
==
0
||
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
==
0
||
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
==
7
||
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
==
2
||
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
==
3
)
{
{
if
(
globaldata
.
OS_STOP
)
if
(
globaldata
.
OS_STOP
)
{
{
...
@@ -1252,9 +1252,9 @@ namespace GcDevicePc
...
@@ -1252,9 +1252,9 @@ namespace GcDevicePc
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
sendtohw
)
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
sendtohw
)
{
{
//
signalDataTohw.DataToHwStart();
signalDataTohw
.
DataToHwStart
();
signalDataTozb
.
DataToZBStart
();
//
signalDataTozb.DataToZBStart();
}
}
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
sendtoZb
)
if
(
globaldata
.
m_pcbuffer
.
gcpcinfo
.
pcworkinfo
.
sendtoZb
)
{
{
...
@@ -2089,6 +2089,11 @@ namespace GcDevicePc
...
@@ -2089,6 +2089,11 @@ namespace GcDevicePc
hmiopt
.
TCD_Switch
(
port
);
hmiopt
.
TCD_Switch
(
port
);
}
}
private
void
upMethodMain
()
{
hmiopt
.
WriteStopVal
();
}
/// <summary>
/// <summary>
/// 调试运行表接口
/// 调试运行表接口
/// </summary>
/// </summary>
...
@@ -2511,6 +2516,7 @@ namespace GcDevicePc
...
@@ -2511,6 +2516,7 @@ namespace GcDevicePc
myformb
=
new
MethodMain
(
true
);
myformb
=
new
MethodMain
(
true
);
myformb
.
sendupdatecmd
+=
new
MethodMain
.
SendUpdateCMD
(
SendPCCMD
);
myformb
.
sendupdatecmd
+=
new
MethodMain
.
SendUpdateCMD
(
SendPCCMD
);
myformb
.
upmethod
+=
new
MethodMain
.
Up_MethodMain
(
upMethodMain
);
myformb
.
SetGCConfig
(
globaldata
.
m_hwconfig
,
methodconfig
);
myformb
.
SetGCConfig
(
globaldata
.
m_hwconfig
,
methodconfig
);
myformb
.
Show
();
myformb
.
Show
();
...
@@ -2521,6 +2527,8 @@ namespace GcDevicePc
...
@@ -2521,6 +2527,8 @@ namespace GcDevicePc
myformb
=
new
MethodMain
(
true
);
myformb
=
new
MethodMain
(
true
);
myformb
.
sendupdatecmd
+=
new
MethodMain
.
SendUpdateCMD
(
SendPCCMD
);
myformb
.
sendupdatecmd
+=
new
MethodMain
.
SendUpdateCMD
(
SendPCCMD
);
myformb
.
upmethod
+=
new
MethodMain
.
Up_MethodMain
(
upMethodMain
);
myformb
.
SetGCConfig
(
globaldata
.
m_hwconfig
,
methodconfig
);
myformb
.
SetGCConfig
(
globaldata
.
m_hwconfig
,
methodconfig
);
myformb
.
Show
();
myformb
.
Show
();
}
}
...
@@ -2564,7 +2572,7 @@ namespace GcDevicePc
...
@@ -2564,7 +2572,7 @@ namespace GcDevicePc
//MethodMain myform = new MethodMain(true, false);
//MethodMain myform = new MethodMain(true, false);
//myform.SetGCConfig(globaldata.m_hwconfig, methodconfig);
//myform.SetGCConfig(globaldata.m_hwconfig, methodconfig);
//myform.Show();
//myform.Show();
Console
.
WriteLine
(
"前 "
+
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
);
//
Console.WriteLine("前 " + globaldata.m_hmibuffer.gcinfo.methodstatus);
if
(
myformbb
==
null
)
if
(
myformbb
==
null
)
{
{
myformbb
=
new
MethodMain
(
true
,
false
);
myformbb
=
new
MethodMain
(
true
,
false
);
...
@@ -2622,7 +2630,7 @@ namespace GcDevicePc
...
@@ -2622,7 +2630,7 @@ namespace GcDevicePc
}
}
}
}
Console
.
WriteLine
(
" 后 "
+
globaldata
.
m_hmibuffer
.
gcinfo
.
methodstatus
);
//
Console.WriteLine(" 后 "+ globaldata.m_hmibuffer.gcinfo.methodstatus);
}
}
WaveTotalForm
total
;
WaveTotalForm
total
;
...
@@ -3255,6 +3263,7 @@ namespace GcDevicePc
...
@@ -3255,6 +3263,7 @@ namespace GcDevicePc
{
{
string
file
=
Path
.
Combine
(
Path
.
GetDirectoryName
(
System
.
Windows
.
Forms
.
Application
.
StartupPath
),
"GC_Config\\GC_Set\\启动参数\\startup.ini"
);
string
file
=
Path
.
Combine
(
Path
.
GetDirectoryName
(
System
.
Windows
.
Forms
.
Application
.
StartupPath
),
"GC_Config\\GC_Set\\启动参数\\startup.ini"
);
IniFile
iniFile
=
new
IniFile
(
file
);
IniFile
iniFile
=
new
IniFile
(
file
);
//iniFile.ReadSection("").
//iniFile.ReadSection("").
if
(
iniFile
.
ReadString
(
"Version"
,
"VersionType"
)
==
"0"
)
if
(
iniFile
.
ReadString
(
"Version"
,
"VersionType"
)
==
"0"
)
{
{
...
@@ -3326,11 +3335,15 @@ namespace GcDevicePc
...
@@ -3326,11 +3335,15 @@ namespace GcDevicePc
testsjshow
.
Show
();
testsjshow
.
Show
();
}
}
private
void
数据路径
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
}
//private void debugSubMenu_Click(object sender, EventArgs e)
//private void debugSubMenu_Click(object sender, EventArgs e)
//{
// try
// try
// {
// {
// _424XTest test = new _424XTest()
;
// _424XTest test = new _424XTest()
;
// test.Show();
// test.Show();
// }
// }
// catch (Exception ex)
// catch (Exception ex)
...
...
GcDevicePc/ProThread/CKvocUpdata.cs
View file @
d87268a7
...
@@ -65,8 +65,6 @@ namespace GcDevicePc.ProThread
...
@@ -65,8 +65,6 @@ namespace GcDevicePc.ProThread
time
=
0
;
time
=
0
;
globaldata
.
startclear1
=
false
;
globaldata
.
startclear1
=
false
;
}
}
else
else
{
{
...
...
GcDevicePc/ProThread/GcDataTh.cs
View file @
d87268a7
...
@@ -1026,7 +1026,7 @@ namespace GcDevicePc.ProThread
...
@@ -1026,7 +1026,7 @@ namespace GcDevicePc.ProThread
int
ret
=
-
1
;
int
ret
=
-
1
;
try
try
{
{
ret
=
GetHmiPowerHoldingReg
(
115
1
,
6
,
ref
hmipower
);
ret
=
GetHmiPowerHoldingReg
(
115
0
,
6
,
ref
hmipower
);
}
}
catch
(
Exception
e
)
catch
(
Exception
e
)
{
{
...
...
GcDevicePc/ProThread/HMIControl.cs
View file @
d87268a7
...
@@ -108,9 +108,26 @@ namespace GcDevicePc.ProThread
...
@@ -108,9 +108,26 @@ namespace GcDevicePc.ProThread
public
int
WriteStopVal
()
public
int
WriteStopVal
()
{
{
int
ret
=
-
1
;
int
ret
=
-
1
;
int
count
=
0
;
if
(
this
.
setflag
)
if
(
this
.
setflag
)
{
//ret = m_modbus.WriteSingleCoil(31, (ushort)65280, this.strIP, this.netPost);
//Console.WriteLine("0");
ret
=
m_modbus
.
WriteSingleCoil
(
31
,
(
ushort
)
65280
,
this
.
strIP
,
this
.
netPost
);
while
(
ret
!=
0
)
{
count
++;
ret
=
m_modbus
.
WriteSingleCoil
(
31
,
(
ushort
)
65280
,
this
.
strIP
,
this
.
netPost
);
ret
=
m_modbus
.
WriteSingleCoil
(
31
,
(
ushort
)
65280
,
this
.
strIP
,
this
.
netPost
);
Thread
.
Sleep
(
100
);
if
(
count
==
3
)
break
;
}
}
return
ret
;
return
ret
;
}
}
public
int
WriteEndVal
()
public
int
WriteEndVal
()
...
...
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