Conditinal Jumps

Conditional Jumps sind Anweisungen in einem SPS Programm, die die Ausführung des Programms an eine andere Stelle verzweigen lassen, abhängig von einer bestimmten Bedingung. Sie werden auch als "bedingte Verzweigungen" oder "bedingte Sprünge" bezeichnet.

Copy

// --------------------------- Conditional jumps ---------------------------
     GVL_Sequence1.stSeqIf.xJump := FALSE;

   IF GVL_Sequence1.stSeqIf.xSeqAutomaticReleased AND GVL_Sequence1.iStepCounter = 7 AND (GVL_Sequence1_IOs.i_xDecision_1_Path2) THEN
      GVL_Sequence1.iStepCounter := 2;
      GVL_Sequence1.stSeqIf.xJump := TRUE; // Block step increment for one cycle
   END_IF

   IF GVL_Sequence1.stSeqIf.xSeqAutomaticReleased AND GVL_Sequence1.iStepCounter = 10 AND (GVL_Sequence1_IOs.i_xDecision_1_Path2) THEN
      GVL_Sequence1.iStepCounter := 2;
      GVL_Sequence1.stSeqIf.xJump := TRUE; // Block step increment for one cycle
   END_IF

Zuletzt aktualisiert

War das hilfreich?