> For the complete documentation index, see [llms.txt](https://infosys.selmotech.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://infosys.selmotech.com/selmo-struktur-und-standard/selmo-technischer-standard-und-struktur/beschreibung-selmo-plc-code/sequence-logic/less-than-sequence_name-greater-than/struktur-less-than-sequence_name-greater-than/sequence-logic-control/zone-call/zonen-methoden-call/decision-zone.md).

# Decision Zone

Der Decision-Schritt dient der Entscheidung über den weiteren Ablauf. Die Auswahl des zu verwendenden Pfads erfolgt anhand der Erfüllung bestimmter Kriterien. Dabei stehen stets zwei Pfade zur Verfügung.

Copy

```
   // --------------------------- ZONE 2 | Decision 1 Path 1 ---------------------------

      // Zone Condition Assigns
      aCondZone2[0] := TRUE;
      aPaircheckZone2[0] := FALSE;

      fbZone2.P_iIndexOfLamp := 13;
      fbZone2.P_iIndexOfPaircheckLamp := 14;
      fbZone2.P_xInputPolarity := eInputPolarity.Active_High;
      fbZone2.P_xFeedbackInput := GVL_Sequence1_IOs.i_xDecision_1_Path1;
      fbZone2.P_timFeedbackInput := T#0MS;
      fbZone2.P_xManualRelease := GVL_Sequence1.stSeqIf.xSeqManualReleased;
      fbZone2.P_xNoPBPressed := GVL_Sequence1.stSeqIf.xSeqNoPBpressed;
      fbZone2.P_xAutomaticRelease := GVL_Sequence1.stSeqIf.xSeqAutomaticReleased;
      fbZone2.P_iActualStepCounter := GVL_Sequence1.iStepCounter;
      fbZone2.P_xGhostModeEnable := FALSE;
      fbZone2.P_timGhostMode := T#0MS;
      fbZone2.P_xGhostModeReleased := GVL_Sequence1_HMI.stHmiIf.xHmiPbGhostModeRelease;
      fbZone2.P_xIsSystemZone := TRUE;

      fbZone2( // Decision 1 Path 1
         aZone := aZ2,
         aLampMatrix := aMatrix,
         aTempMatrix := aTemp,
         aMonMatrix := GVL_Sequence1_HMI.aHmiMon,
         aMonBuffer := GVL_Sequence1_HMI.aHmiMonBuffer,
         aStepMatrix := aStep);
      
      fbZone2.M_Input(
         aCross := aCrossZone2,
         aFeedbackPairCheckInput := aPaircheckZone2);

      // Feedback state
      xFeedbackStateZone2 := fbZone2.P_xFeedbackState;

   // --------------------------- ZONE 3 | Decision 1 Path 1 Inv ---------------------------

      // Zone Condition Assigns
      aCondZone3[0] := TRUE;
      aPaircheckZone3[0] := FALSE;

      fbZone3.P_iIndexOfLamp := 15;
      fbZone3.P_iIndexOfPaircheckLamp := 16;
      fbZone3.P_xInputPolarity := eInputPolarity.Active_Low;
      fbZone3.P_xFeedbackInput := GVL_Sequence1_IOs.i_xDecision_1_Path1;
      fbZone3.P_timFeedbackInput := T#0MS;
      fbZone3.P_xManualRelease := GVL_Sequence1.stSeqIf.xSeqManualReleased;
      fbZone3.P_xNoPBPressed := GVL_Sequence1.stSeqIf.xSeqNoPBpressed;
      fbZone3.P_xAutomaticRelease := GVL_Sequence1.stSeqIf.xSeqAutomaticReleased;
      fbZone3.P_iActualStepCounter := GVL_Sequence1.iStepCounter;
      fbZone3.P_xGhostModeEnable := FALSE;
      fbZone3.P_timGhostMode := T#0MS;
      fbZone3.P_xGhostModeReleased := GVL_Sequence1_HMI.stHmiIf.xHmiPbGhostModeRelease;
      fbZone3.P_xIsSystemZone := TRUE;

      fbZone3( // Decision 1 Path 1 Inv
         aZone := aZ3,
         aLampMatrix := aMatrix,
         aTempMatrix := aTemp,
         aMonMatrix := GVL_Sequence1_HMI.aHmiMon,
         aMonBuffer := GVL_Sequence1_HMI.aHmiMonBuffer,
         aStepMatrix := aStep);
      
      fbZone3.M_Input(
         aCross := aCrossZone3,
         aFeedbackPairCheckInput := aPaircheckZone3);

      // Feedback state
      xFeedbackStateZone3 := fbZone3.P_xFeedbackState;

   // --------------------------- ZONE 4 | Decision 1 Path 2 ---------------------------

      // Zone Condition Assigns
      aCondZone4[0] := TRUE;
      aPaircheckZone4[0] := FALSE;

      fbZone4.P_iIndexOfLamp := 17;
      fbZone4.P_iIndexOfPaircheckLamp := 18;
      fbZone4.P_xInputPolarity := eInputPolarity.Active_High;
      fbZone4.P_xFeedbackInput := GVL_Sequence1_IOs.i_xDecision_1_Path2;
      fbZone4.P_timFeedbackInput := T#0MS;
      fbZone4.P_xManualRelease := GVL_Sequence1.stSeqIf.xSeqManualReleased;
      fbZone4.P_xNoPBPressed := GVL_Sequence1.stSeqIf.xSeqNoPBpressed;
      fbZone4.P_xAutomaticRelease := GVL_Sequence1.stSeqIf.xSeqAutomaticReleased;
      fbZone4.P_iActualStepCounter := GVL_Sequence1.iStepCounter;
      fbZone4.P_xGhostModeEnable := FALSE;
      fbZone4.P_timGhostMode := T#0MS;
      fbZone4.P_xGhostModeReleased := GVL_Sequence1_HMI.stHmiIf.xHmiPbGhostModeRelease;
      fbZone4.P_xIsSystemZone := TRUE;

      fbZone4( // Decision 1 Path 2
         aZone := aZ4,
         aLampMatrix := aMatrix,
         aTempMatrix := aTemp,
         aMonMatrix := GVL_Sequence1_HMI.aHmiMon,
         aMonBuffer := GVL_Sequence1_HMI.aHmiMonBuffer,
         aStepMatrix := aStep);
      
      fbZone4.M_Input(
         aCross := aCrossZone4,
         aFeedbackPairCheckInput := aPaircheckZone4);

      // Feedback state
      xFeedbackStateZone4 := fbZone4.P_xFeedbackState;

   // --------------------------- ZONE 5 | Decision 1 Path 2 Inv ---------------------------

      // Zone Condition Assigns
      aCondZone5[0] := TRUE;
      aPaircheckZone5[0] := FALSE;

      fbZone5.P_iIndexOfLamp := 19;
      fbZone5.P_iIndexOfPaircheckLamp := 20;
      fbZone5.P_xInputPolarity := eInputPolarity.Active_Low;
      fbZone5.P_xFeedbackInput := GVL_Sequence1_IOs.i_xDecision_1_Path2;
      fbZone5.P_timFeedbackInput := T#0MS;
      fbZone5.P_xManualRelease := GVL_Sequence1.stSeqIf.xSeqManualReleased;
      fbZone5.P_xNoPBPressed := GVL_Sequence1.stSeqIf.xSeqNoPBpressed;
      fbZone5.P_xAutomaticRelease := GVL_Sequence1.stSeqIf.xSeqAutomaticReleased;
      fbZone5.P_iActualStepCounter := GVL_Sequence1.iStepCounter;
      fbZone5.P_xGhostModeEnable := FALSE;
      fbZone5.P_timGhostMode := T#0MS;
      fbZone5.P_xGhostModeReleased := GVL_Sequence1_HMI.stHmiIf.xHmiPbGhostModeRelease;
      fbZone5.P_xIsSystemZone := TRUE;

      fbZone5( // Decision 1 Path 2 Inv
         aZone := aZ5,
         aLampMatrix := aMatrix,
         aTempMatrix := aTemp,
         aMonMatrix := GVL_Sequence1_HMI.aHmiMon,
         aMonBuffer := GVL_Sequence1_HMI.aHmiMonBuffer,
         aStepMatrix := aStep);
      
      fbZone5.M_Input(
         aCross := aCrossZone5,
         aFeedbackPairCheckInput := aPaircheckZone5);

      // Feedback state
      xFeedbackStateZone5 := fbZone5.P_xFeedbackState;

   // --------------------------- ZONE 6 | Decision 1 XOR ---------------------------

      // Zone Condition Assigns
      aCondZone6[0] := TRUE;
      aPaircheckZone6[0] := FALSE;

      fbZone6.P_iIndexOfLamp := 21;
      fbZone6.P_iIndexOfPaircheckLamp := 22;
      fbZone6.P_xInputPolarity := eInputPolarity.Active_High;
      fbZone6.P_xIsSystemZone := TRUE;
      fbZone6.P_xFeedbackInput := GVL_Sequence1_IOs.i_xDecision_1_Path1 XOR GVL_Sequence1_IOs.i_xDecision_1_Path2;
      fbZone6.P_timFeedbackInput := T#0MS;
      fbZone6.P_xManualRelease := GVL_Sequence1.stSeqIf.xSeqManualReleased;
      fbZone6.P_xNoPBPressed := GVL_Sequence1.stSeqIf.xSeqNoPBpressed;
      fbZone6.P_xAutomaticRelease := GVL_Sequence1.stSeqIf.xSeqAutomaticReleased;
      fbZone6.P_iActualStepCounter := GVL_Sequence1.iStepCounter;

      fbZone6( // Decision 1 XOR
         aZone := aZ6,
         aLampMatrix := aMatrix,
         aTempMatrix := aTemp,
         aMonMatrix := GVL_Sequence1_HMI.aHmiMon,
         aMonBuffer := GVL_Sequence1_HMI.aHmiMonBuffer,
         aStepMatrix := aStep);
      
      fbZone6.M_Input(
         aCross := aCrossZone6,
         aFeedbackPairCheckInput := aPaircheckZone6);

      // Feedback state
      xFeedbackStateZone6 := fbZone6.P_xFeedbackState;
```

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://infosys.selmotech.com/selmo-struktur-und-standard/selmo-technischer-standard-und-struktur/beschreibung-selmo-plc-code/sequence-logic/less-than-sequence_name-greater-than/struktur-less-than-sequence_name-greater-than/sequence-logic-control/zone-call/zonen-methoden-call/decision-zone.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
