> 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/globalutilities.md).

# GlobalUtilities

```
<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.15">
  <POU Name="GlobalUtilities" Id="{01834e58-5140-45dd-96a3-2b2f31b9ef4b}" SpecialFunc="None">
    <Declaration><![CDATA[///copyright SELMO Technology GmbH by SELMOstudio
///2025.7.12.13000
///This function has been automatically generated.
{attribute 'symbol' := 'none'}
PROGRAM GlobalUtilities
VAR
	{attribute 'symbol' := 'none'}
	iIndex: INT;
	{attribute 'symbol' := 'none'}
	aStartUpSirenMatrix: ARRAY[0..0] OF BOOL;
	{attribute 'symbol' := 'none'}
	aLampTestMatrix: ARRAY[0..1] OF BOOL;
	{attribute 'symbol' := 'none'}
	aAutoRelMatrix: ARRAY[0..1] OF BOOL;
	{attribute 'symbol' := 'none'}
	aResetMatrix: ARRAY[0..1] OF BOOL;
	{attribute 'symbol' := 'none'}
	fbFlashOn: TOF;
	{attribute 'symbol' := 'none'}
	fbFlashOff: TON;
END_VAR
]]></Declaration>
    <Implementation>
      <ST><![CDATA[//---------------------------------------------------------------------- Global Flasher Output -----------------------------------------------------------------------
    {region "Description Global Flasher Output"}
    (*
    This PLC code is programmed to provide a Flash Output for use within any sequence.
    The Timer block(fbFlashOn) provides the time for which the Flash Output is ON, the second(fbFlashOff) for the time it is OFF.
    Together they have the effect of a ‘flip - flop’ circuit to create an on / off effect.
    *)
    {endregion}
fbFlashOff(IN:= NOT fbFlashOn.Q, PT:= T#1S);
    fbFlashOn(IN:= fbFlashOff.Q, PT:= T#1S , Q=>GVL_Global.stGlobalIf.xFlashOutput);

//----------------------------------------------------------------------- Global Startup Siren -----------------------------------------------------------------------
    {region "Description Global Startup Siren"}
    (*
    When any sequence is ready to start from any zone in which a gate has been opened,
    the start - up siren output is activated when the release pushbutton is pressed.
    *)
    {endregion}
    aStartUpSirenMatrix[0] := GVL_Station20.stHwzIf.xStartUpAlarm;
    
    FOR iIndex := 0 TO 0 BY 1 DO
        IF aStartUpSirenMatrix[iIndex] THEN
            GVL_Global.stGlobalIf.xStartUpSiren := TRUE;
            EXIT;
        ELSE
            GVL_Global.stGlobalIf.xStartUpSiren := FALSE;
        END_IF
    END_FOR;
GVL_Global.stGlobalIf.timGlobalPresetDelay := T#3000MS;

//------------------------------------------------------------------------- Global Lamp Test -------------------------------------------------------------------------
    {region "Description Lamp Test"}
    (*
    The lamp test function is implemented via a pushbutton on the HMI or a hardware Button.
    Pressing this button activates the Lamp Test output in any sequence.
    This output is then used to test the lamp outputs wherever necessary.
    *)
    {endregion}
    aLampTestMatrix[0] := GVL_Global_HMI.stHmiIf.xHmiLampTest;
    
    FOR iIndex := 0 TO 0 BY 1 DO
        IF aLampTestMatrix[iIndex] THEN
            GVL_Global.stGlobalIf.xLampTest := TRUE;
            EXIT;
        ELSE
            GVL_Global.stGlobalIf.xLampTest := FALSE;
        END_IF
    END_FOR;

//--------------------------------------------------------------------- Global Automatic Release ---------------------------------------------------------------------
    {region "Description Global Automatic Release"}
    (*
    The PLC code sums together the release Push Button pressed Flag from all Hardware Zone.
    This allows all sequences in all zones to be started in automatic simultaneously by employing
    the Global Release Push Button pressed Output in every Hardware Zone Automatic Release network.
    *)
    {endregion}
    aAutoRelMatrix[0] := GVL_Global_HMI.stHmiIf.xHmiAutomaticRelease;
    aAutoRelMatrix[1] := GVL_Station20.stHwzIf.xReleasePbPressed;
    
    FOR iIndex := 0 TO 1 BY 1 DO
        IF aAutoRelMatrix[iIndex] THEN
            GVL_Global.stGlobalIf.xRelease := TRUE;
            EXIT;
        ELSE
            GVL_Global.stGlobalIf.xRelease := FALSE;
        END_IF
    END_FOR;

//------------------------------------------------------------------------ Global Fault Reset ------------------------------------------------------------------------
        {region "Description Global Fault Reset"}
        (*
        The PLC code below sums the fault reset flags from all Hardware Zone.
        This allows a common fault reset to all zones when any zone fault reset Push Button is pressed.
        *)
        {endregion}
        aResetMatrix[0] := GVL_Global_HMI.stHmiIf.xHmiFaultReset;
        aResetMatrix[1] := GVL_Station20.stHwzIf.xFaultResetPbPressed;
    
        FOR iIndex := 0 TO 0 BY 1 DO
            IF aResetMatrix[iIndex] THEN
                GVL_Global.stGlobalIf.xFaultReset := TRUE;
                EXIT;
            ELSE
                GVL_Global.stGlobalIf.xFaultReset := FALSE;
            END_IF
        END_FOR;
]]></ST>
    </Implementation>
    <LineIds Name="GlobalUtilities">
      <LineId Id="3" Count="86" />
      <LineId Id="2" Count="0" />
    </LineIds>
  </POU>
</TcPlcObject>
```


---

# 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/globalutilities.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.
