> 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-solution/selmo-solution-en/selmo-structure-and-standard/selmo-technical-standard-and-structure/description-selmo-plc-code/sequence-logic/less-than-sequence_name-greater-than/structure-less-than-sequence_name-greater-than/sequence-logic-control/zone-call/zone-methods-call/mem-zone.md).

# Mem zone

The implementation of a storage element that can be set and reset is carried out by the automatic insertion of two zones. Setting and resetting are each done with the operands "S", while querying the memory is possible with the operands "I". This can be performed for both the normal zone (query for logical 1) and the inverted zone (query for logical 0).

Copy

```
// --------------------------- ZONE 10 | Zone Mem 10 ---------------------------

      // Zone Condition Assigns
      aCondZone10[0] := TRUE;

      fbZone10.P_iIndexOfLamp := 29;
      fbZone10.P_iIndexOfPaircheckLamp := 30;
      fbZone10.P_xInputPolarity := eInputPolarity.Active_High;
      fbZone10.P_xOutputOpposite := FALSE;
      fbZone10.P_xManualRelease := GVL_Sequence1.stSeqIf.xSeqManualReleased;
      fbZone10.P_xFeedbackInput := GVL_Sequence1_IOs.o_xZoneMem10;
      fbZone10.P_xManualPB := FALSE;
      fbZone10.P_timFeedbackInput := T#0MS;
      fbZone10.P_xNoPBPressed := GVL_Sequence1.stSeqIf.xSeqNoPBpressed;
      fbZone10.P_xAutomaticRelease := GVL_Sequence1.stSeqIf.xSeqAutomaticReleased;
      fbZone10.P_iActualStepCounter := GVL_Sequence1.iStepCounter;
      
      fbZone10( // Zone Mem 10
         aZone := aZ10,
         aLampMatrix := aMatrix,
         aTempMatrix := aTemp,
         aMonMatrix := GVL_Sequence1_HMI.aHmiMon,
         aMonBuffer := GVL_Sequence1_HMI.aHmiMonBuffer,
         aStepMatrix := aStep);
      
      xOutputTempZ10 := fbZone10.M_InOutput(
         aCross := aCrossZone10,
         aCond := aCondZone10,
         aFeedbackPairCheckInput := aPaircheckZone10);

      GVL_Sequence1_IOs.o_xZoneMem10 S= xOutputTempZ10;

      // Feedback state
      xFeedbackStateZone10 := fbZone10.P_xFeedbackState;

   // --------------------------- ZONE 11 | Zone Mem 10 ---------------------------

      // Zone Condition Assigns
      aCondZone11[0] := TRUE;

      fbZone11.P_iIndexOfLamp := 31;
      fbZone11.P_iIndexOfPaircheckLamp := 32;
      fbZone11.P_xInputPolarity := eInputPolarity.Active_Low;
      fbZone11.P_xOutputOpposite := FALSE;
      fbZone11.P_xManualRelease := GVL_Sequence1.stSeqIf.xSeqManualReleased;
      fbZone11.P_xFeedbackInput := GVL_Sequence1_IOs.o_xZoneMem10;
      fbZone11.P_xManualPB := FALSE;
      fbZone11.P_timFeedbackInput := T#0MS;
      fbZone11.P_xNoPBPressed := GVL_Sequence1.stSeqIf.xSeqNoPBpressed;
      fbZone11.P_xAutomaticRelease := GVL_Sequence1.stSeqIf.xSeqAutomaticReleased;
      fbZone11.P_iActualStepCounter := GVL_Sequence1.iStepCounter;
      
      fbZone11( // Zone Mem 10
         aZone := aZ11,
         aLampMatrix := aMatrix,
         aTempMatrix := aTemp,
         aMonMatrix := GVL_Sequence1_HMI.aHmiMon,
         aMonBuffer := GVL_Sequence1_HMI.aHmiMonBuffer,
         aStepMatrix := aStep);

      xOutputTempZ11 := fbZone11.M_InOutput(
         aCross := aCrossZone11,
         aCond := aCondZone11,
         aFeedbackPairCheckInput := aPaircheckZone11);

      GVL_Sequence1_IOs.o_xZoneMem10 R= xOutputTempZ11 OR (GVL_Sequence1_HMI.stHmiIf.xHmiPbReset AND NOT GVL_Sequence1.stSeqIf.xSeqAutomaticReleased);

      // Feedback state
      xFeedbackStateZone11 := fbZone11.P_xFeedbackState;
```


---

# 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-solution/selmo-solution-en/selmo-structure-and-standard/selmo-technical-standard-and-structure/description-selmo-plc-code/sequence-logic/less-than-sequence_name-greater-than/structure-less-than-sequence_name-greater-than/sequence-logic-control/zone-call/zone-methods-call/mem-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.
