Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Thick-Common
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
潘栩锋
Thick-Common
Commits
2f082f8e
Commit
2f082f8e
authored
May 22, 2020
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加 样品标定 添加 取样失败时的报警
parent
a0379ce5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
10 deletions
+23
-10
GetSample.cs
Project.FLY.Thick.Base/FLY.Thick.Base/Server/GetSample.cs
+23
-10
No files found.
Project.FLY.Thick.Base/FLY.Thick.Base/Server/GetSample.cs
View file @
2f082f8e
...
...
@@ -20,6 +20,12 @@ namespace FLY.Thick.Base.Server
[
JsonObject
(
MemberSerialization
.
OptIn
)]
public
class
GSample
:
IGetSampleService
{
/// <summary>
/// 报警测试
/// </summary>
public
static
FLY
.
OBJComponents
.
Common
.
ERRNO
SAMPLE_ERRNO_Failure
=
new
FLY
.
OBJComponents
.
Common
.
ERRNO
()
{
Code
=
60
,
Descrption
=
"样品取样出错"
};
#
region
IGetSampleService
接口
/// <summary>
...
...
@@ -92,7 +98,7 @@ namespace FLY.Thick.Base.Server
TempFilter2
[]
tempFilters
;
DIRECTION
[]
directions
;
IGageInfoService
mGageInfo
;
OBJComponents
.
Server
.
WarningSystem
warningSystem
;
FlyAD7
flyad
;
public
event
SampleChangedEventHandler
SampleChangedEvent
;
...
...
@@ -156,9 +162,12 @@ namespace FLY.Thick.Base.Server
Load
();
}
public
void
Init
(
IGageInfoService
gageInfo
)
public
void
Init
(
IGageInfoService
gageInfo
,
OBJComponents
.
Server
.
WarningSystem
warningSystem
)
{
this
.
mGageInfo
=
gageInfo
;
this
.
warningSystem
=
warningSystem
;
}
public
bool
Load
()
...
...
@@ -359,7 +368,7 @@ namespace FLY.Thick.Base.Server
//取样结果,isFailure=true, 取样失败,全部复位!!!
bool
isFailure
=
false
;
if
(
CheckParamIsValid
()
==
false
)
if
(
CheckParamIsValid
()
==
false
)
return
;
int
grid_offset
=
0
;
//经过相识性计算后的偏移量
...
...
@@ -419,15 +428,15 @@ namespace FLY.Thick.Base.Server
}
}
_corr_end
:
_corr_end
:
int
ad
=
-
1
;
for
(
int
i
=
0
;
i
<
Samples
.
Count
();
i
++)
{
SampleCell
sample
=
Samples
[
i
]
as
SampleCell
;
var
tempre
=
tempFilters
[
i
];
if
((
directions
[
i
]
==
direction
)
&&
(
sample
.
Enable
)
)
if
((
directions
[
i
]
==
direction
)
&&
(
sample
.
Enable
))
{
ad
=
-
1
;
ad
=
-
1
;
if
(!
isFailure
)
//不修要位置修正
{
//获取grid 数据
...
...
@@ -461,13 +470,13 @@ namespace FLY.Thick.Base.Server
{
isFailure
=
true
;
}
else
if
(
diff
/
ad
>=
ErrPercent
*
0.01
)
//大于2% 异常
else
if
(
diff
/
ad
>=
ErrPercent
*
0.01
)
//大于2% 异常
{
isFailure
=
true
;
}
}
else
{
if
(
diff
>=
ErrValue
)
if
(
diff
>=
ErrValue
)
{
isFailure
=
true
;
}
...
...
@@ -490,8 +499,12 @@ namespace FLY.Thick.Base.Server
if
(
isFailure
)
//样品获取失败,下次继续!!!
return
;
{
this
.
warningSystem
.
Add
(
SAMPLE_ERRNO_Failure
.
Code
,
SAMPLE_ERRNO_Failure
.
Descrption
,
OBJComponents
.
Common
.
ERR_STATE
.
ON
);
}
}
/// <summary>
...
...
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