Repeater zone

The repeater enables the repeated execution of specific steps that were previously modeled. To do this, it copies the steps defined in the loop up to the specified number of repeater iterations. This is a finite sequence of iterations and not a conventional loop programming. The repeater also offers the possibility to end the loop processing before reaching the maximum iteration by using an abort variable.

Copy

   // --------------------------- ZONE 15 | Repeater 8 Iteration 1 ---------------------------

      // Zone Condition Assigns
      aCondZone15[0] := TRUE;
      aPaircheckZone15[0] := FALSE;

      fbZone15.P_iIndexOfLamp := 39;
      fbZone15.P_xInputPolarity := eInputPolarity.Active_High;
      fbZone15.P_xIsSystemZone := TRUE;

      fbZone15( // Repeater 8 Iteration 1
         xNoPBPressed := GVL_<Sequence_name>.stSeqIf.xSeqNoPBpressed, 
         xAutomaticRelease := GVL_<Sequence_name>.stSeqIf.xSeqAutomaticReleased, 
         iActualStepCounter := GVL_<Sequence_name>.iStepCounter, 
         aZone := aZ15, 
         aLampMatrix := aMatrix, 
         aTempMatrix := aTemp,
         aMonMatrix := GVL_<Sequence_name>_HMI.aHmiMon,
         aMonBuffer := GVL_<Sequence_name>_HMI.aHmiMonBuffer, 
         aStepMatrix := aStep);

      IF fbZone15.M_InOutput(
         xManualRelease := GVL_<Sequence_name>.stSeqIf.xSeqManualReleased, 
         xFeedbackInput := GVL_<Sequence_name>_IOs.o_xZone_15RepeaterIteration1, 
         xManualPB := FALSE, 
         timFeedbackInput := T#0MS, 
         aCross := aCrossZone15, 
         aCond := aCondZone15, 
         aFeedbackPairCheckInput := aPaircheckZone15) THEN
         GVL_<Sequence_name>_IOs.o_xZone_15RepeaterIteration1 := TRUE;
      END_IF

   // --------------------------- ZONE 16 | Repeater 8 Iteration 1 Inv ---------------------------

      // Zone Condition Assigns
      aCondZone16[0] := TRUE;
      aPaircheckZone16[0] := FALSE;

      fbZone16.P_iIndexOfLamp := 41;
      fbZone16.P_xInputPolarity := eInputPolarity.Active_Low;
      fbZone16.P_xIsSystemZone := TRUE;

      fbZone16( // Repeater 8 Iteration 1 Inv
         xNoPBPressed := GVL_<Sequence_name>.stSeqIf.xSeqNoPBpressed, 
         xAutomaticRelease := GVL_<Sequence_name>.stSeqIf.xSeqAutomaticReleased, 
         iActualStepCounter := GVL_<Sequence_name>.iStepCounter, 
         aZone := aZ16, 
         aLampMatrix := aMatrix, 
         aTempMatrix := aTemp,
         aMonMatrix := GVL_<Sequence_name>_HMI.aHmiMon,
         aMonBuffer := GVL_<Sequence_name>_HMI.aHmiMonBuffer,  
         aStepMatrix := aStep);

      IF fbZone16.M_InOutput(
         xManualRelease := GVL_<Sequence_name>.stSeqIf.xSeqManualReleased, 
         xFeedbackInput := GVL_<Sequence_name>_IOs.o_xZone_15RepeaterIteration1, 
         xManualPB := FALSE, 
         timFeedbackInput := T#0MS, 
         aCross := aCrossZone16, 
         aCond := aCondZone16, 
         aFeedbackPairCheckInput := aPaircheckZone16) OR (NOT GVL_<Sequence_name>.stSeqIf.xSeqAutomaticModeSelected AND GVL_<Sequence_name>_HMI.stHmiIf.xHmiPbReset) THEN
         GVL_<Sequence_name>_IOs.o_xZone_15RepeaterIteration1 := FALSE;
      END_IF

   // --------------------------- ZONE 17 | Repeater 8 Iteration 2 ---------------------------

      // Zone Condition Assigns
      aCondZone17[0] := TRUE;
      aPaircheckZone17[0] := FALSE;

      fbZone17.P_iIndexOfLamp := 43;
      fbZone17.P_xInputPolarity := eInputPolarity.Active_High;
      fbZone17.P_xIsSystemZone := TRUE;

      fbZone17( // Repeater 8 Iteration 2
         xNoPBPressed := GVL_<Sequence_name>.stSeqIf.xSeqNoPBpressed, 
         xAutomaticRelease := GVL_<Sequence_name>.stSeqIf.xSeqAutomaticReleased, 
         iActualStepCounter := GVL_<Sequence_name>.iStepCounter, 
         aZone := aZ17, 
         aLampMatrix := aMatrix, 
         aTempMatrix := aTemp,
         aMonMatrix := GVL_<Sequence_name>_HMI.aHmiMon,
         aMonBuffer := GVL_<Sequence_name>_HMI.aHmiMonBuffer, 
         aStepMatrix := aStep);

      IF fbZone17.M_InOutput(
         xManualRelease := GVL_<Sequence_name>.stSeqIf.xSeqManualReleased, 
         xFeedbackInput := GVL_<Sequence_name>_IOs.o_xZone_17RepeaterIteration2, 
         xManualPB := FALSE, 
         timFeedbackInput := T#0MS, 
         aCross := aCrossZone17, 
         aCond := aCondZone17, 
         aFeedbackPairCheckInput := aPaircheckZone17) THEN
         GVL_<Sequence_name>_IOs.o_xZone_17RepeaterIteration2 := TRUE;
      END_IF

   // --------------------------- ZONE 18 | Repeater 8 Iteration 2 Inv ---------------------------

      // Zone Condition Assigns
      aCondZone18[0] := TRUE;
      aPaircheckZone18[0] := FALSE;

      fbZone18.P_iIndexOfLamp := 45;
      fbZone18.P_xInputPolarity := eInputPolarity.Active_Low;
      fbZone18.P_xIsSystemZone := TRUE;

      fbZone18( // Repeater 8 Iteration 2 Inv
         xNoPBPressed := GVL_<Sequence_name>.stSeqIf.xSeqNoPBpressed, 
         xAutomaticRelease := GVL_<Sequence_name>.stSeqIf.xSeqAutomaticReleased, 
         iActualStepCounter := GVL_<Sequence_name>.iStepCounter, 
         aZone := aZ18, 
         aLampMatrix := aMatrix, 
         aTempMatrix := aTemp,
         aMonMatrix := GVL_<Sequence_name>_HMI.aHmiMon,
         aMonBuffer := GVL_<Sequence_name>_HMI.aHmiMonBuffer,  
         aStepMatrix := aStep);

      IF fbZone18.M_InOutput(
         xManualRelease := GVL_<Sequence_name>.stSeqIf.xSeqManualReleased, 
         xFeedbackInput := GVL_<Sequence_name>_IOs.o_xZone_17RepeaterIteration2, 
         xManualPB := FALSE, 
         timFeedbackInput := T#0MS, 
         aCross := aCrossZone18, 
         aCond := aCondZone18, 
         aFeedbackPairCheckInput := aPaircheckZone18) OR (NOT GVL_<Sequence_name>.stSeqIf.xSeqAutomaticModeSelected AND GVL_<Sequence_name>_HMI.stHmiIf.xHmiPbReset) THEN
         GVL_<Sequence_name>_IOs.o_xZone_17RepeaterIteration2 := FALSE;
      END_IF

Last updated

Was this helpful?