Skip to main content

isInErrorStep

Short summary​

This property returns TRUE if the step was reached by evaluating an error.

Purpose and usage​

This property provides status information about how the current step was reached. It indicates whether the cycle manager arrived at the current step as a result of an error evaluation, which is crucial for implementing context-aware error handling and recovery logic.

The property is read-only and returns a boolean value indicating error context.

return BOOL: TRUE if current step was reached by error evaluation, FALSE if reached through normal flow

Typical usage patterns​

  1. Conditional error handling: Different behavior based on how step was reached
  2. Recovery decision making: Determine appropriate recovery actions
  3. Error logging: Log additional context about error conditions
  4. UI feedback: Show different information based on error context

When to use​

  • In error handling steps to determine recovery strategy
  • When implementing different behaviors for error vs. normal flow
  • For logging and audit trail purposes
  • In HMI displays to show appropriate error context

Behaviour details​

  • Returns TRUE when step was reached via error evaluation (e.g., command returned ERROR state)
  • Returns FALSE when step was reached through normal progression
  • Useful for implementing smart error recovery logic
  • Context is maintained until step changes or error is acknowledged

Example:

// Context-aware error handling
ERROR_STEP:
IF cyclemanager.errors.isInErrorStep THEN
// This step was reached due to an error
display_error_message := 'Process failed - manual intervention required';
allow_retry := TRUE;
ELSE
// This step was reached through normal flow
display_error_message := 'Manual error step - check process conditions';
allow_retry := FALSE;
END_IF;

// Different recovery strategies based on context
RECOVERY_STEP:
IF cyclemanager.errors.isInErrorStep THEN
// Automatic retry for error-triggered steps
IF retry_count \< MAX_RETRIES THEN
cyclemanager.errors.acknowledge(); // Try again
ELSE
cyclemanager.steps.next := ABORT_STEP; // Give up
END_IF;
ELSE
// Manual step - wait for operator decision
cyclemanager.waitFor(operator_continue_signal);
END_IF;

// Error logging with context
IF log_step_entry THEN
IF cyclemanager.errors.isInErrorStep THEN
logger.logError('Entered step due to error condition');
ELSE
logger.logInfo('Entered step through normal flow');
END_IF;
log_step_entry := FALSE;
END_IF;
- **Type:** `BOOL`
- **Getter:** `public`

## Code
### `Declaration`
```structuredtext
PROPERTY isInErrorStep : BOOL