Skip to main content

current

Short summary

This property returns the current step of the cycle manager. Proposed use is as CASE control.

Purpose and usage

This property provides the current step number of the cycle manager for implementing step-based control logic. It is primarily used in CASE statements to execute different actions based on the current step.

The property is read-only and returns the current step as a DINT value.

return DINT: Current step number of the cycle manager

Typical usage patterns

  1. CASE control structure: Main usage in CASE statements for step-based execution
  2. Step monitoring: Reading current step for HMI display or logging
  3. Conditional logic: Checking current step for specific conditions

When to use

  • In every cycle manager implementation for step-based control
  • When you need to display current step status
  • For debugging and logging purposes
  • When implementing conditional logic based on current step

Example:

CASE cyclemanager.steps.current OF
DefaultSteps.STEP.IDLE:
// Initialize sequence
;
DefaultSteps.STEP.INIT:
// Perform initialization
;
2:
// Custom step - move to position
;
3:
// Custom step - perform operation
;
4:
// Custom step - finalize
;
DefaultSteps.STEP.SUCCESS:
// Sequence completed successfully
;
DefaultSteps.STEP.ERROR:
// Handle error conditions
;
DefaultSteps.STEP.ABORT:
// Handle abort conditions
;
ELSE
// Handle unexpected steps
;
END_CASE

// Usage for monitoring
currentStepForHMI := cyclemanager.steps.current;
  • Type: DINT
  • Getter: public

Code

Declaration

PROPERTY current :DINT