> 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/gvl_less-than-sequence_name-greater-than.md).

# GVL\_\<Sequence\_name>

**GVL\_\<Sequence\_name>**

Copy

```
VAR_GLOBAL
   ///Sequence interface
   stSeqIf: stSequenceInterface := (iNumberOfInputs := 5 ,iNumberOfOutputs := 3 ,iSeqEndOfCycleStep := 13);
   aStepMonitoringMatrix: ARRAY[1..13] OF stStepMonitoringMatrix := [
(timStepTimeoutSet := T#300000MS, timStepTimeoutAdd := T#5000MS, xDisableTimeout := TRUE), (timStepTimeoutSet := T#300000MS, timStepTimeoutAdd := T#5000MS, xDisableTimeout := TRUE), (timStepTimeoutSet := T#300000MS, timStepTimeoutAdd := T#5000MS, xDisableTimeout := TRUE), (timStepTimeoutSet := T#300000MS, timStepTimeoutAdd := T#5000MS, xDisableTimeout := TRUE), (timStepTimeoutSet := T#300000MS, timStepTimeoutAdd := T#5000MS, xDisableTimeout := TRUE), (timStepTimeoutSet := T#300000MS, timStepTimeoutAdd := T#5000MS, xDisableTimeout := TRUE), (timStepTimeoutSet := T#300000MS, timStepTimeoutAdd := T#5000MS, xDisableTimeout := TRUE), (timStepTimeoutSet := T#300000MS, timStepTimeoutAdd := T#5000MS, xDisableTimeout := TRUE), (timStepTimeoutSet := T#300000MS, timStepTimeoutAdd := T#5000MS, xDisableTimeout := TRUE), (timStepTimeoutSet := T#300000MS, timStepTimeoutAdd := T#5000MS, xDisableTimeout := TRUE), (timStepTimeoutSet := T#300000MS, timStepTimeoutAdd := T#5000MS, xDisableTimeout := TRUE), (timStepTimeoutSet := T#300000MS, timStepTimeoutAdd := T#5000MS, xDisableTimeout := TRUE), (timStepTimeoutSet := T#300000MS, timStepTimeoutAdd := T#5000MS, xDisableTimeout := TRUE)];
END_VAR

{attribute 'qualified_only'}
VAR_GLOBAL PERSISTENT
   ///current step
   iStepcounter: INT := 1;
   ///last cycle step
   iStepcounterLastCycle: INT := 1;
END_VAR

{attribute 'qualified_only'}
VAR_GLOBAL CONSTANT
   ///last step
   iEndStep: INT := 13;
END_VAR
```

<\*\*\*> Variable name, comment and data type are automatically taken from the Studio

**stSequenceInterface**

Copy

```
TYPE stSequenceInterface :
STRUCT
   /// output: cmz fault active
   xSeqCmzFault                :BOOL;   
   /// output: automatic mode selected
   xSeqAutomaticModeSelected       :BOOL;   
   /// output: manual mode selected
   xSeqManualModeSelected          :BOOL;   
   /// output: automatic mode released
   xSeqAutomaticReleased          :BOOL;   
   /// output: manual mode released
   xSeqManualReleased             :BOOL;   
   /// output: no push button pressed
   xSeqNoPBpressed             :BOOL;   
   /// output: single step on trigger event
   xSeqSingleStepOnTrigEvent       :BOOL;
   /// output: end of cycle step reached   
   xSeqEndOfCycleReached          :BOOL;   
   /// output: interlock fault present
   xSeqInterlockFault            :BOOL;    
   /// output: no interlock fault present
   xSeqNoInterlockFault          :BOOL;
   /// output: matrix is currently not zero
   xSeqMatrixNoZero             :BOOL;
   /// output: no cmz fault active
   xNoCMZFault                  :BOOL;
   /// output: step timeout active 
   xSeqStepTimeout               :BOOL;
   /// output: step timeout teach mode on
   xSeqStepTimeTeachModeOn         :BOOL;
   /// output: step timeout teach mode off 
   xSeqStepTimeTeachModeOff      :BOOL;
   /// input: step timeout Number of cycles for the calculation 
   uiSeqStepTimeNoOfCycles         :UINT :=5 ;
   /// output: step timeout actual Number of cycles for the calculation 
   uiSeqStepTimeActNoOfCycles      :UINT ;
   /// input: step number of end of cycle 
   iSeqEndOfCycleStep             :INT;    
   /// output: actual number of inputs
   iNumberOfInputs               :INT;
   /// output: actual number of outputs
   iNumberOfOutputs            :INT;
   /// output: Jump active               
   xJump                     :BOOL;
   /// output: Decision active               
   xDecision                  :BOOL;
   /// output: ghost mode released
   xSeqGhostModeReleased               :BOOL;
END_STRUCT
END_TYPE
```

**stStepMonitoringMatrix**

Copy

```
TYPE stStepMonitoringMatrix :
STRUCT
   /// output: current step time
   timStepTimeActual    :TIME;
   /// output: maximum step time occurred
   timStepTimeMax       :TIME;
   /// output: average step time of 5 step cycles
   timStepTimeAvg       :TIME;
   /// output: minimum step time occurred
   timStepTimeMin       :TIME;
   /// output: last determined step time
   timStepTimeLast      :TIME;
   /// output: counter for step timeout events
   diStepTimeoutCount    :DINT;
   /// input: calculated or manually set setpoint of the timeout for the step  
   timStepTimeoutSet    :TIME :=T#300S;
   /// input: additional value for the calculated timeout
   timStepTimeoutAdd   :TIME :=T#5S;
   /// input: disable timeout watchdog for step
   xDisableTimeout      :BOOL;
   /// output: timeout occurred
   xTimeoutOccurred   :BOOL;
END_STRUCT
END_TYPE
```

**2.2.1.7.8.2. GVL\_\<Sequence\_name>\_CMZ**

***

Copy

```
VAR_GLOBAL
   ///CMZ 1
   <xCMZ_name>: BOOL;
END_VAR
```

<\*\*\*> Variable name, comment and data type are automatically taken from the Studio

**2.2.1.7.8.3. GVL\_\<Sequence\_name>\_HMI**

***

Copy

```
VAR_GLOBAL
   ///Hmi interface structure
   stHmiIf: stHmiSequence;
   ///Bit array, it is generated in SELMOstudio
   aHmi: ARRAY[0..10] OF BOOL;
   ///Bit array, it is generated in SELMOstudio
   aHmiStored: ARRAY[0..10] OF BOOL;
   ///Bit array, it is generated in SELMOstudio
   aHmiMon: ARRAY[0..10] OF BOOL;
   ///Bit monitoring buffer array, it is generated in SELMOstudio
   aHmiMonBuffer: ARRAY[0..0] OF stMonitoring;
   ///This variable disables the button 'Single Step Mode'
   xDisableSingleStepOn: BOOL;
   ///This variable disables the button 'Step Increment'
   xDisableStepIncrement: BOOL;
   ///This variable disables the button 'Step Reset'
   xDisableStepReset: BOOL;
   ///This variable disables the button 'Sequence Automatic Release'
   xDisableAutomaticRelease: BOOL;
   ///This variable disables the button to open Manual Mode Panel
   xDisableManualModePanel: BOOL;
   ///This variable disables the button to open Parameter Panel
   xDisableParameterPanel: BOOL;
   ///This variable disables the button to open 'Step Time Monitoring' Panel
   xDisableStepTimeMonitoringPanel: BOOL;
   ///This variable disables the button to open 'Diagnose' Panel
   xDisableDiagnosePanel: BOOL;
END_VAR
```

<\*\*\*> Variable name, comment and data type are automatically taken from the Studio

**stHmiSequence**

Copy

```
TYPE stHmiSequence :
STRUCT
   /// HMI Button: automatic release
   xHmiPbAutomaticRelease: BOOL; 
   /// HMI Display: message automatic released
   xHmiMsgAutomaticReleased: BOOL; 
   /// HMI Button: reset step counter
   xHmiPbReset: BOOL;   
   /// HMI Button: step increment
   xHmiPbStepIncrement: BOOL; 
   /// HMI Button: step decrement
   xHmiPbStepDecrement: BOOL; 
   /// HMI Button: step search
   xHmiPbStepSearch: BOOL; 
   /// HMI Button: single step on
   xHmiPbSingleStepOn: BOOL;
   /// HMI Button: single step 
   xHmiPbSingleStep: BOOL;
   /// HMI Display: interlock fault
   xHmiMsgInterlockFault: BOOL;
   /// HMI Button: reset fault
   xHmiPbFaultReset: BOOL;
   /// HMI Button: teach mode
   xHmiPbStepTimeTeachMode: BOOL;
   /// HMI Display: step time teach mode on
   xHmiMsgStepTimeTeachModeOn: BOOL;
   /// HMI Display: step expired
   xHmiMsgStepTimeout: BOOL;
   /// HMI Display: step timeout stored 
   xHmiMsgStepTimeoutStored: BOOL;
   /// HMI Display: actual step count
   iHmiMsgStepCounter: INT;
   /// HMI Display: actual sequence cycle count
   uiHmiMsgSequenceCycleCounter: UINT;
   /// HMI Button: ghost mode release
   xHmiPbGhostModeRelease: BOOL;
END_STRUCT
END_TYPE
```

**stMonitoring**

Copy

```
TYPE stMonitoring :
STRUCT
   /// output: Buffer already allocated
   xActive   :BOOL;
   /// output: Saved zone number at which the monitoring check was triggered
   iZoneNo   :INT;
   /// output: Stored step number at which the monitoring check was triggered
   iStepNo   :INT;
   /// output: Stored timestamp at which the monitoring check was triggered
   aTimeStamp :stMonitoringTimeStamp;
END_STRUCT
END_TYPE
```

**stMonitoringTimeStamp**

Copy

```
TYPE stMonitoringTimeStamp :
STRUCT
   /// Date Time of timestamp
   dtTimeStamp : DT;
   /// Time of Day of timestamp
   todTimeStamp : TIME_OF_DAY;
   /// Date of timestamp
   datTimeStamp : DATE;
END_STRUCT
END_TYPE
```

**2.2.1.7.8.4. GVL\_\<Sequence\_name>\_IOs**

***

Copy

```
VAR_GLOBAL
   ///Input: no description
   <i_xDecision__name_Path1>: <BOOL>;
   ///Input: no description
   <i_xDecision__name_Path2>: <BOOL>;
   ///Output: no description
   <o_xZone_name>: <BOOL>;
   ///Output: no description
   <o_xZone_7RepeaterIteration1>: <BOOL>;
   ///Output: no description
   <o_xZone_9RepeaterIteration2>: <BOOL>;
END_VAR
```

<\*\*\*> Variable name, comment and data type are automatically taken from the Studio

**2.2.1.7.8.5. GVL\_\<Sequence\_name>\_Parameters**

***

Copy

```
VAR_GLOBAL PERSISTENT
   ///<Parameter name>
   <iParameter_name>: <INT>;
   ///<Parameter name>
   <iParameter_name>: <INT>;
END_VAR

VAR_GLOBAL
   /// Empty VAR_GLOBAL | Workaround for PersistentVars limitations
   _placeholder: BOOL;
END_VAR
```

<\*\*\*> Variable name, comment and data type are automatically taken from the Studio


---

# 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/gvl_less-than-sequence_name-greater-than.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.
