Timer zone

The timer element enables the modeling of time-dependent steps. A timer step can only transition to the next step after a certain amount of time has elapsed. This time is defined by a timer parameter. An example would be a time-controlled stirring operation in a tank where the step only proceeds to the next step when the predefined stirring time has elapsed. In this code section, the function block fbTon2 is called for the timer step and the time configured for it is passed.

Copy

// --------------------------- TIMER CALLS ---------------------------
      fbTon2(IN:= GVL_Sequence1.iStepCounter = 2 AND GVL_Sequence1.stSeqIf.xSeqAutomaticReleased, PT:= T#5000MS);

   // --------------------------- ZONE 1 | Step 2 Timer ---------------------------

      // Zone Condition Assigns
      aCondZone1[0] := TRUE;
      aPaircheckZone1[0] := FALSE;

      fbZone1.P_iIndexOfLamp := 11;
      fbZone1.P_xInputPolarity := eInputPolarity.Active_High;
      fbZone1.P_xManualRelease := GVL_Sequence1.stSeqIf.xSeqManualReleased;
      fbZone1.P_xFeedbackInput := fbTon2.Q;
      fbZone1.P_xManualPB := FALSE;
      fbZone1.P_timFeedbackInput := T#0MS;
      fbZone1.P_xNoPBPressed := GVL_Sequence1.stSeqIf.xSeqNoPBpressed;
      fbZone1.P_xAutomaticRelease := GVL_Sequence1.stSeqIf.xSeqAutomaticReleased;
      fbZone1.P_iActualStepCounter := GVL_Sequence1.iStepCounter;
      fbZone1.P_xIsSystemZone := TRUE;

      fbZone1( // Step 2 Timer
         aZone := aZ1,
         aLampMatrix := aMatrix,
         aTempMatrix := aTemp,
         aMonMatrix := GVL_Sequence1_HMI.aHmiMon,
         aMonBuffer := GVL_Sequence1_HMI.aHmiMonBuffer,
         aStepMatrix := aStep);

      GVL_Sequence1_IOs.o_xZone_1 := fbZone1.M_InOutput(
         aCross := aCrossZone1,
         aCond := aCondZone1,
         aFeedbackPairCheckInput := aPaircheckZone1);

      // Feedback state
      xFeedbackStateZone1 := fbZone1.P_xFeedbackState;

Last updated

Was this helpful?