afterSuccessfulStep
Short summary
Sets the stop request behavior to execute after successful step completion for the current step.
Purpose and usage
This method configures the current step to process stop requests only after the step has completed successfully. This setting overrides the sequence default for this specific step. When this mode is active, stop requests received during step execution will be deferred until the step completes with success.
This ensures that the specific step completes successfully before the cycle is stopped, maintaining data integrity and process consistency for critical operations.
typical usage patterns
- Critical steps: Ensure specific steps complete before stopping
- Transaction steps: Finish data transactions cleanly
- Safety operations: Complete safety-critical steps
- Production steps: Avoid partial operations on key steps
When to use
- For steps that must complete successfully before stopping
- When specific operations should not be interrupted
- For data consistency in critical steps
- To override sequence defaults for important steps
Example
// Configure specific step for safe stopping
cycleManager.configuration.configuration.step
.stopRequest
.afterSuccess();
// Apply to critical step during configuration
CASE cycleManager.steps.current OF
MySteps.INIT:
// Configure next critical step
cycleManager.configuration.configuration.step
.timeout := T#10S;
cycleManager.configuration.configuration.step
.stopRequest.afterSuccess();
cycleManager.steps.next := MySteps.CRITICAL_WRITE;
MySteps.CRITICAL_WRITE:
// This step will complete before stop is processed
IF writeCriticalData() THEN
cycleManager.steps.next := MySteps.NEXT_STEP;
END_IF;
END_CASE
Parameters
none
Code
Declaration
METHOD afterSuccessfulStep
Implementation
THIS^.cycleManager.currentStopRequestMode := CNM_CycleManagerInterfaces.StepStopRequestMode.AFTER_SUCCESSFUL_STEP;