01-16-2019 10:41 AM
Hi
I would like to find out how I could implement some buttons within my sequence. I am taking a measurement, if that measurement fails I want the user to be prompted to either 'continue through the sequence' or 'repeat the step' or 'terminate the sequence'.
I have set up my 'if statement' and the three button options 'continue', 'repeat' and terminate', now I need some help to discover how to execute the buttons to do what is mentioned above.
Thanks
01-17-2019 02:36 AM
Hi,
I think a possible approach would be to use a model callback. This KnowledgeBase article includes some useful steps to get you started:
Programmatically Abort Execution upon Step Failure
Best regards,
// Marcus Bengths
01-17-2019 03:55 AM
Hi Marcus
The article is useful for terminating on each failure. Please see attached, I want to implement these button for one step in my sequence and they should execute depending on what the user selects.
Thanks
01-17-2019 08:52 AM
Hi Bilalm,
I might not be understanding this correctly, but it sounds like you just want to programmatically know which button the operator selected? If so, then Step.Result.ButtonHit will have a numeric value representing the button selected by the operator. Set a local variable to this value, and use the local value in your IF/ELSEIF/ELSE statement.
I hope this helps.
-Jack
01-17-2019 10:18 AM
So if I understand you correctly, once a step fails you would like the user to be prompted with a dialog box with three buttons. Depending on what button the user selects the sequence will either continue stepping, terminate the sequence, or repeat the step that failed.
You should be able to achieve these features by adding a SequenceFilePostStepFailure callback. This callback sequence will run every time a step in the sequence file fails.
The KnowledgeBase Article I linked before is good as a reference:
Programmatically Abort Execution upon Step Failure
Cheers!
//Marcus Bengths