TcOpenGroup / TcOpen

Application framework for industrial automation built on top of TwinCAT3 and .NET.

Home Page:https://docs.tcopengroup.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[NEW-FEATURE] Vision Inspector

mhareznik opened this issue · comments

The customer is requesting an operator's decision after a vision check produces a MARGINAL result. This means that the result from the Vision system is neither OK nor NOK, but the Vision system provides a third option for which a decision needs to be made at the manual Audit station.

I would like to introduce a new type of inspection called 'Vision Inspector.' During this inspection, a dialog window will always be displayed with an image from the Vision system (provided the path to the picture) and three buttons for the operator's decision: OK, NOK, and I DON'T KNOW.

If the operator selects 'OK' and the required status is true, the result will be marked as 'Passed.'
If the operator selects 'NOK' and the required status is true, the result will be marked as 'Failed.'
If the operator selects 'I DON'T KNOW' and the required status is true, the result will be marked as 'Unknown.'

'Unknown' is a new type of inspection result, but it is necessary to have this information for next logic.

@mhareznik This feature might be covered by TcoCustomizedDialog and Standard Inspectors

Here is example.

_dialogCustomized : TcoCore.TcoCustomizedDialog(THIS^);

...

_dialogCustomized.Show()
         .WithType(eDialogType.Info)
         .WithOption1('This is Option1=>retry')
 		  .WithOption2('This is Option2=>first step')
 		    .WithOption3('This is Option3 =>continue')
 			  .WithOption4('This is Option4=>stop sequence')
         .WithCaption('Hey')
         .WithText('What we are going to do.');
         
 		 IF (_dialogCustomized.Answer = TcoCore.eCustomizedDialogAnswer.Option1) THEN
 			_state := 50;
 		END_IF;
 
 		IF (_dialogCustomized.Answer = TcoCore.eCustomizedDialogAnswer.Option2) THEN
 			_state := 0;
 		END_IF;
 
 		IF (_dialogCustomized.Answer = TcoCore.eCustomizedDialogAnswer.Option3) THEN
 			_state := 51;
 		END_IF;
 
 		IF (_dialogCustomized.Answer = TcoCore.eCustomizedDialogAnswer.Option4) THEN
 			_state := 0;
 			_invokeCustomizedDiaglog := FALSE;
 			_invokeDiaglog1 := FALSE;
 		END_IF;