Skip to content

Commit f5b84d4

Browse files
Merge pull request #4 from Inxton/3-_BUG_Inspector_Group_evaluate
[BUG]Inspector Group evaluate
2 parents c654e87 + ad938c3 commit f5b84d4

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

src/TcoInspectors/src/XAE/XAE/TcoInspectors/POUs/TcoInspectionGroup/TcoInspectionGroup.TcPOU

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,6 @@ END_IF
249249
250250
IF (THIS^.Done) THEN
251251
IF (THIS^._currentRunResult.Result = eOverallResult.Failed) THEN
252-
IF (__ISVALIDREF(_refOverallResult)) THEN
253-
_refOverallResult := _originalOverallResult;
254-
END_IF
255252
256253
IF inFailMode = eTcoInspectorFailMode.CarryOn THEN
257254
_coordinator.MoveNext();
@@ -263,19 +260,34 @@ IF (THIS^.Done) THEN
263260
IF OverInspected THEN
264261
_coordinator.MoveNext();
265262
ELSE
263+
IF (__ISVALIDREF(_refOverallResult)) THEN
264+
_refOverallResult := _originalOverallResult;
265+
END_IF
266+
267+
ClearResult(_currentRunResult);
266268
_coordinator.Retry(inFromState);
267269
END_IF;
268270
ELSIF inFailMode = eTcoInspectorFailMode.RetryThenJumpTo THEN
269271
IF OverInspected THEN
270272
_coordinator.Retry(inToState);
271273
ELSE
274+
IF (__ISVALIDREF(_refOverallResult)) THEN
275+
_refOverallResult := _originalOverallResult;
276+
END_IF
277+
278+
ClearResult(_currentRunResult);
272279
_coordinator.Retry(inFromState);
273280
END_IF;
274281
275282
ELSIF inFailMode = eTcoInspectorFailMode.RetryThenTeminate THEN
276283
IF OverInspected THEN
277284
_coordinator.Terminate();
278285
ELSE
286+
IF (__ISVALIDREF(_refOverallResult)) THEN
287+
_refOverallResult := _originalOverallResult;
288+
END_IF
289+
290+
ClearResult(_currentRunResult);
279291
_coordinator.Retry(inFromState);
280292
END_IF;
281293
@@ -440,16 +452,18 @@ END_IF
440452
441453
IF (THIS^.Done) THEN
442454
IF (THIS^._currentRunResult.Result = eOverallResult.Failed) THEN
443-
IF (__ISVALIDREF(_refOverallResult)) THEN
444-
_refOverallResult := _originalOverallResult;
445-
END_IF
446455
447-
ClearResult(_currentRunResult);
448456
IF OverInspected THEN
449457
_coordinator.Terminate();
450458
ELSE
459+
IF (__ISVALIDREF(_refOverallResult)) THEN
460+
_refOverallResult := _originalOverallResult;
461+
END_IF
462+
463+
ClearResult(_currentRunResult);
464+
451465
_coordinator.Retry(inFromState);
452-
END_IF;
466+
END_IF
453467
ELSE
454468
_coordinator.MoveNext();
455469
END_IF;

0 commit comments

Comments
 (0)