next
Short summary
This property sets the next step of the cycle manager.
Purpose and usage
This property sets the next step that the cycle manager should execute after completing the current step. It provides explicit control over the sequence flow, allowing for conditional branching, error handling, and custom step sequencing.
The property is write-only and accepts a DINT value representing the target step number.
Typical usage patterns
- Conditional branching: Setting different next steps based on conditions
- Error handling: Directing flow to error or recovery steps
- Sequential control: Explicitly controlling step progression
- Skip operations: Jumping over steps that are not needed
When to use
- When you need to control step progression explicitly
- For conditional branching based on process conditions
- In error handling to redirect to error steps
- When implementing complex sequence logic with jumps
- For skipping steps that are not required in current context
Parameter validation
- Step number should be a valid step in your sequence
- Negative step numbers are typically reserved for system steps
- Use DefaultSteps.STEP constants for standard steps (IDLE, INIT, SUCCESS, ERROR, ABORT)
Example:
// Conditional branching
MY_STEP:
IF process_complete THEN
cyclemanager.steps.next := SUCCESS_STEP;
ELSE
cyclemanager.steps.next := CONTINUE_PROCESS_STEP;
END_IF;
cyclemanager.executeCommand(finalizeProcess);
// Error handling
PROCESS_STEP:
IF error_detected THEN
cyclemanager.steps.next := DefaultSteps.STEP.ERROR;
ELSE
cyclemanager.steps.next := NEXT_PROCESS_STEP;
END_IF;
// Skip operation based on condition
OPTIONAL_STEP_CHECK:
IF skip_calibration THEN
cyclemanager.steps.next := MAIN_OPERATION_STEP; // Skip calibration
ELSE
cyclemanager.steps.next := CALIBRATION_STEP; // Perform calibration
END_IF;
- Type:
DINT - Getter:
public - Setter:
public
Code
Declaration
PROPERTY next :DINT