> 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/variable-declaration-standard-structure.md).

# Variable declaration standard structure

**Variable declaration** When defining steps and zones, the required variables are automatically declared.

↓ Generated declaration

Copy

```
PROGRAM Sequence1
VAR
   {attribute 'symbol' := 'none'}
   aMatrix: ARRAY[0..48] OF BOOL;
   {attribute 'symbol' := 'none'}
   aTemp: ARRAY[0..48] OF BOOL;
   {attribute 'symbol' := 'none'}
   aStep: ARRAY[0..48] OF BOOL;
   aPb: ARRAY[0..19] OF BOOL;
   aCmz: ARRAY[0..5] OF BOOL;
   aEocSteps: ARRAY[0..7] OF INT;
   aZ1: ARRAY[1..16] OF eZoneOperand;
   aZ2: ARRAY[1..16] OF eZoneOperand;
   aZ3: ARRAY[1..16] OF eZoneOperand;
   aZ4: ARRAY[1..16] OF eZoneOperand;
   aZ5: ARRAY[1..16] OF eZoneOperand;
   aZ6: ARRAY[1..16] OF eZoneOperand;
   aZ7: ARRAY[1..16] OF eZoneOperand;
   aZ8: ARRAY[1..16] OF eZoneOperand;
   aZ9: ARRAY[1..16] OF eZoneOperand;
   aZ10: ARRAY[1..16] OF eZoneOperand;
   aZ11: ARRAY[1..16] OF eZoneOperand;
   aZ12: ARRAY[1..16] OF eZoneOperand;
   aZ13: ARRAY[1..16] OF eZoneOperand;
   aZ14: ARRAY[1..16] OF eZoneOperand;
   aZ15: ARRAY[1..16] OF eZoneOperand;
   aZ16: ARRAY[1..16] OF eZoneOperand;
   aZ17: ARRAY[1..16] OF eZoneOperand;
   aZ18: ARRAY[1..16] OF eZoneOperand;
   aZ19: ARRAY[1..16] OF eZoneOperand;
   {attribute 'symbol' := 'none'}
   fbCmzFault: FB_CmzFault;
   fbStandardBegin: FB_SeqStandardBegin;
   {attribute 'symbol' := 'none'}
   fbStandardEnd: FB_SeqStandardEnd;
   {attribute 'symbol' := 'none'}
   aStepMonitoringFb: ARRAY[1..16] OF stStepMonitoringFB;
   {attribute 'symbol' := 'none'}
   fbZone1: FB_Zone;
   {attribute 'symbol' := 'none'}
   fbZone2: FB_Zone;
   {attribute 'symbol' := 'none'}
   fbZone3: FB_Zone;
   {attribute 'symbol' := 'none'}
   fbZone4: FB_Zone;
   {attribute 'symbol' := 'none'}
   fbZone5: FB_Zone;
   {attribute 'symbol' := 'none'}
   fbZone6: FB_Zone;
   {attribute 'symbol' := 'none'}
   fbZone7: FB_Zone;
   {attribute 'symbol' := 'none'}
   fbZone8: FB_Zone;
   {attribute 'symbol' := 'none'}
   fbZone9: FB_Zone;
   {attribute 'symbol' := 'none'}
   fbZone10: FB_Zone;
   {attribute 'symbol' := 'none'}
   fbZone11: FB_Zone;
   {attribute 'symbol' := 'none'}
   fbZone12: FB_Zone;
   {attribute 'symbol' := 'none'}
   fbZone13: FB_Zone;
   {attribute 'symbol' := 'none'}
   fbZone14: FB_Zone;
   {attribute 'symbol' := 'none'}
   fbZone15: FB_Zone;
   {attribute 'symbol' := 'none'}
   fbZone16: FB_Zone;
   {attribute 'symbol' := 'none'}
   fbZone17: FB_Zone;
   {attribute 'symbol' := 'none'}
   fbZone18: FB_Zone;
   {attribute 'symbol' := 'none'}
   fbZone19: FB_Zone;
   nHmiStoredLoopCounter: INT;
   fbTon2: TON;
   {attribute 'symbol' := 'none'}
   aCrossZone1: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCondZone1: ARRAY[0..0] OF BOOL := [0(TRUE)];
   {attribute 'symbol' := 'none'}
   aPaircheckZone1: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCrossZone2: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCondZone2: ARRAY[0..0] OF BOOL := [0(TRUE)];
   {attribute 'symbol' := 'none'}
   aPaircheckZone2: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCrossZone3: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCondZone3: ARRAY[0..0] OF BOOL := [0(TRUE)];
   {attribute 'symbol' := 'none'}
   aPaircheckZone3: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCrossZone4: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCondZone4: ARRAY[0..0] OF BOOL := [0(TRUE)];
   {attribute 'symbol' := 'none'}
   aPaircheckZone4: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCrossZone5: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCondZone5: ARRAY[0..0] OF BOOL := [0(TRUE)];
   {attribute 'symbol' := 'none'}
   aPaircheckZone5: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCrossZone6: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCondZone6: ARRAY[0..0] OF BOOL := [0(TRUE)];
   {attribute 'symbol' := 'none'}
   aPaircheckZone6: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCrossZone7: ARRAY[0..1] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCondZone7: ARRAY[0..0] OF BOOL := [0(TRUE)];
   {attribute 'symbol' := 'none'}
   aPaircheckZone7: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCrossZone8: ARRAY[0..1] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCondZone8: ARRAY[0..0] OF BOOL := [0(TRUE)];
   {attribute 'symbol' := 'none'}
   aPaircheckZone8: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCrossZone9: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCondZone9: ARRAY[0..0] OF BOOL := [0(TRUE)];
   {attribute 'symbol' := 'none'}
   aPaircheckZone9: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCrossZone10: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCondZone10: ARRAY[0..0] OF BOOL := [0(TRUE)];
   {attribute 'symbol' := 'none'}
   aPaircheckZone10: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCondZone11: ARRAY[0..0] OF BOOL := [0(TRUE)];
   {attribute 'symbol' := 'none'}
   aCondZone12: ARRAY[0..0] OF BOOL := [0(TRUE)];
   {attribute 'symbol' := 'none'}
   aCrossZone13: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCondZone13: ARRAY[0..0] OF BOOL := [0(TRUE)];
   {attribute 'symbol' := 'none'}
   aPaircheckZone13: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCrossZone14: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCondZone14: ARRAY[0..0] OF BOOL := [0(TRUE)];
   {attribute 'symbol' := 'none'}
   aPaircheckZone14: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCrossZone15: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCondZone15: ARRAY[0..0] OF BOOL := [0(TRUE)];
   {attribute 'symbol' := 'none'}
   aPaircheckZone15: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCrossZone16: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCondZone16: ARRAY[0..0] OF BOOL := [0(TRUE)];
   {attribute 'symbol' := 'none'}
   aPaircheckZone16: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCrossZone17: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCondZone17: ARRAY[0..0] OF BOOL := [0(TRUE)];
   {attribute 'symbol' := 'none'}
   aPaircheckZone17: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCrossZone18: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCondZone18: ARRAY[0..0] OF BOOL := [0(TRUE)];
   {attribute 'symbol' := 'none'}
   aPaircheckZone18: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCrossZone19: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   aCondZone19: ARRAY[0..0] OF BOOL := [0(TRUE)];
   {attribute 'symbol' := 'none'}
   aPaircheckZone19: ARRAY[0..0] OF BOOL;
   {attribute 'symbol' := 'none'}
   fbErrorSetCtrl0: FB_ErrorSetCtrl;
   {attribute 'symbol' := 'none'}
   fbErrorSetCtrl1: FB_ErrorSetCtrl;
   {attribute 'symbol' := 'none'}
   fbErrorSetCtrl2: FB_ErrorSetCtrl;
   {attribute 'symbol' := 'none'}
   fbErrorSetCtrl3: FB_ErrorSetCtrl;
   {attribute 'symbol' := 'none'}
   fbErrorSetCtrl4: FB_ErrorSetCtrl;
   {attribute 'symbol' := 'none'}
   fbErrorSetCtrl5: FB_ErrorSetCtrl;
END_VAR
```

**HMI buttons** In this section the [HMI manual buttons](https://selmo-technology-gmbh.gitbook.io/selmo-solution/02-selmo-standard/04-selmo-plc-code/contents#221783-gvl_sequence1_hmi) of the zones of the push-button matrix are assigned. This enables manual operation of the zone when it has been activated as an HMI button in the Studio.

Copy

```
// --------------------------- HMI buttons ---------------------------
   aPb[8] := GVL_<Sequence_name>_HMI.xManBtn_Zone_9;
   aPb[9] := GVL_<Sequence_name>_HMI.xManBtn_Zone_10;
   aPb[10] := GVL_<Sequence_name>_HMI.xManBtn_Zone_11;
   aPb[11] := GVL_<Sequence_name>_HMI.xManBtn_Zone_12;
```

**End-of-cycle steps** In this section the end-of-cycle steps that were defined in the Studio in the logic layer are assigned. These are then passed to the **Standard Beginning**function block.

Copy

```
	aEocSteps[0] := 3;
	aEocSteps[1] := 7;
	aEocSteps[2] := 13;
	aEocSteps[3] := 29;
	aEocSteps[4] := 36;
	aEocSteps[5] := 42;
	aEocSteps[6] := 49;
	aEocSteps[7] := 56;
```


---

# 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/variable-declaration-standard-structure.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.
