Description

The Sequence component is used to manage the programming of sequential loops (definition of steps and conditions triggering the passage of these steps).

The component allows the creation of condition triggered secondary sequences.


Implementation

  • Choose the number of conditions used by the sequence with the SetStepCount action
  • Choose the number of exits from the sequence with the SetExitCount action
  • Set the types of sequence transitions or sequence exits for each entry from the ConditionTypeX and ExitConditionTypeX slots
  • For each sequence exit set which steps can occur and at which step the return is effected from the ExitOnStepsX and ExitReturnStepX slots
  • Link the conditions of transition to the higher level of the sequence to the corresponding ConditionX entries
  • Link the exit conditions of the sequence to the corresponding entries, (ExitConditionX slots)
  • Link the activationBoucleX slots to the SequenceActive slots of the secondary loops.
  • Link the Init action of the secondary loops to the return action of their primary loop.
  • The ActivationOnlnit property must be set to false if the sequence is a secondary loop.

Note: There is nothing to prevent nesting secondary loops in secondary loops and thus creating cascades of sequences.


Properties

  • Enable: This Boolean property defines whether the loop is active or not, i.e. whether the change of condition entry is taken into account.
  • ActivationOnlnit: This Boolean property defines whether the loop is active when it is initialized. This initialization takes place following an Init action, following the restart of the station or when the sequence returns to a state of rest (zero).

          The main loop must have this property set to true, the secondary loops must have this property to false.

  • DelayOn: This Boolean property indicates whether a transition delay is active from one step to another in the sequence (delay condition).
  • ReturnStep: If a secondary loop is active, this property stores the step of the sequence that will be activated when returning to the main loop.
  • CurrentStep: This numeric property indicates which step in the sequence is active. The zero state means the sequence is idle.
  • StepMaxCount: Stores the number of steps in the sequence.
  • ExitMaxCount: Stores the number of exits of the sequence.
  • ActiveStepX: These properties define which step of the sequence is active in Boolean format.
  • ConditionX: The ConditionX property is used to know whether the sequence should go to step X.

          The last condition is used to return to the state of rest (zero). Thus, if the sequence has 3 conditions, the Condition3 slot is used to define a return to the state of rest.

          Transition to the step of the upper sequence depends on the condition type held in the ConditionTypeX property corresponding to the condition entry.

  • In the case of a delay condition, the state of the corresponding ConditionX entry has no effect.
  • ConditionTypeX: Sets the type of condition allowing transition to step X of the sequence. This transition can take place:

          -   if the corresponding condition entry (ConditionX) is true or false,

          -   if the corresponding condition entry (ConditionX) has a rising edge or a falling edge

          -   after a delay set by the TimerX property (in this case, the state of the condition entry has no effect).

  • TimerX: Defines the time used in case of a delay condition for transition to step X of the sequence. This delay is 15s by default.
  • ExitConditionX: The ExitConditionX property is used to know whether an exit condition for the sequence has occurred.

          The exit from the sequence depends on the type of condition held in the ExitConditionTypeX property and whether the active step of the sequence is set in the ExitOnStepsX property.

          The first exit condition encountered has priority (if the exit conditions of loop 1 and loop 2 are respected, that of loop 1 will be activated).

  • ExitConditionTypeX: Sets the condition type to exit the sequence. This exit can take place:

          -   if the corresponding condition entry (ExitConditionX) is true or false,

          -   if the corresponding condition entry (ExitConditionX) has a rising edge or a falling edge

          -   the loop exit is out of time.

          The main sequence is disabled while the secondary sequences / loops are active.

  • ExitOnStepsX: This text property is used to define which steps in the sequence the loop X exit can take place. Specify the desired sequence steps separated by semicolons.

          Example: "1;2" indicates that exit from the sequence of loop X is activated in steps 1 and 2.

  • ExitReturnStepX: This property indicates which step of the sequence will be re-enabled when the secondary loop / sequence activated by ExitSequenceEnableX is completed.
  • ExitSequenceEnableX: Indicates that the loop / secondary sequence X is activated after checking the condition of loop X for the step of the current sequence.

          This property must be linked to the Enable slot of the corresponding secondary sequence.


Actions

  • Init: Initialization of the sequence. The exit states of the sequence are set to false or zero depending on the case. This happens when the station is restarted or when the sequence returns to rest.

          The Init action of the loops / secondary sequences is linked to the ExitReturn action of their main sequence.

  • ExitReturn: This action tells the component that a secondary sequence return is occurring. The step saved in the ReturnStep property is then enabled.

          The Init action of the loops / secondary sequences is linked to the ExitReturn action of their main sequence.

  • Set Step Count: Sets the number of conditions (and therefore steps) of the sequence. Creates or destroys the ActiveStepX, ConditionX, ConditionTypeX, and TimerX slots accordingly.
  • Set Exit Count: Defines the number of exit conditions from the sequence (and therefore the number of associated loops / secondary sequences). Creates or destroys the ExitConditionX, ExitConditionTypeX, ExitOnStepsX, ExitReturnStepX, and ExitSequenceEnable slots accordingly.



Training

You can follow this e-learning course to practice