> 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/hardware-zonen-control/less-than-hwzone_name-greater-than/less-than-hwzone_name-greater-than_control/t.c.m.z-fault.md).

# T.C.M.Z Fault

Der T.C.M.Z.-Fehlerausgang wird aktiviert, wenn ein schwerwiegender Fehler oder ein Gate/Fortress-Fehler vorliegt.

```
// TCMZ Fault Detect
   {region "Description TCMZ Fault Detect"}
   (*
   The TCMZ Fault output is activated when a Fatal Fault or Gate/Fortress Fault Exists. 
   *)
   {endregion}
    
   GVL_<HwZone_name>.stHwzIf.xTcmzFault := GVL_<HwZone_name>.stHwzIf.xFatalFault OR GVL_<HwZone_name>.stHwzIf.xGateFortressFault;
```

<\*\*\*>Variablen Name, Kommentar und Datentyp werden aus dem Studio automatisch übernommen

**TCMZ**

***

Eine Total constantly monitored Zone (TCMZ) in Hardware Zonen bezieht sich auf einen bestimmten Bereich in der Industrieanlage, der ständig überwacht wird, um sicherzustellen, dass die Maschine oder das System ordnungsgemäß funktioniert. Dies kann mithilfe von Sensoren oder anderen Überwachungstechnologien erfolgen, die im Bereich installiert sind und Daten über den Betrieb der Maschine sammeln. Die Überwachung der TCMZ kann dazu beitragen, mögliche Probleme frühzeitig zu erkennen und zu beheben, bevor sie zu Ausfällen oder Schäden führen, und somit die Betriebssicherheit und Zuverlässigkeit der Maschine erhöhen.

Jedes TCMZ ist in 3 definierte Bereiche unterteilt: Fatal Fault, Gate/Fortress Fault und Warning Fault.

**2.2.1.7.7.1. \<HwZone\_name>\_TCMZ**

***

```
PROGRAM HwZone1_TCMZ
VAR
   {attribute 'symbol' := 'none'}
   fbFatalFault: FB_CMZFault;
   aFatalFault: ARRAY[0..1] OF BOOL;
   {attribute 'symbol' := 'none'}
   fbGateFortressFault: FB_CMZFault;
   aGateFortressFault: ARRAY[0..2] OF BOOL;
   {attribute 'symbol' := 'none'}
   fbWarningFault: FB_CMZFault;
   aWarningFault: ARRAY[0..3] OF BOOL;
   {attribute 'symbol' := 'none'}
   fbFatalFaultCtrl1: FB_ErrorSetCtrl;
   {attribute 'symbol' := 'none'}
   fbGateFortressFaultCtrl1: FB_ErrorSetCtrl;
   {attribute 'symbol' := 'none'}
   fbGateFortressFaultCtrl2: FB_ErrorSetCtrl;
   {attribute 'symbol' := 'none'}
   fbWarningFaultCtrl1: FB_ErrorSetCtrl;
   {attribute 'symbol' := 'none'}
   fbWarningFaultCtrl2: FB_ErrorSetCtrl;
   {attribute 'symbol' := 'none'}
   fbWarningFaultCtrl3: FB_ErrorSetCtrl;
END_VAR
```

**Fatal Fault** Das Fatal Fault Flag ist ein SPS-Ausgang, der den Status des Bereichs für schwerwiegende Fehler in der TCMZ-Matrix der Hardwarezone überwacht, so dass jedes Bit für schwerwiegende Fehler zu einer Aktivierung des Ausgangs führt. Dieses Flag wird in allen Step-Sequence-Fehlermatrizen verwendet, um einen CMZ-Fehler auszulösen und die automatische/manuelle Freigabe in jeder Sequenz innerhalb der Hardwarezone zu verhindern. Ein Standard-Index in jeder Sequenzfehlermatrix ist für diesen Fehler reserviert. Der schwerwiegende Fehler muss behoben werden, bevor eine automatische oder manuelle Freigabe möglich ist. Fatale Fehler können nicht übersteuert werden.

```
// ###################### Fatal Faults ######################

   // Global Fatal Fault
   aFatalFault[0] := GVL_Global.stGlobalIf.xFatalFault;

   // TCMZ: xCMZ_1 | CMZ 1
   aFatalFault[1] := fbFatalFaultCtrl1.M_ErrorSet(xError := GVL_<HwZone_name>_FatalFaults.<xCMZ_name>, xReset:= GVL_Global.stGlobalIf.xFaultReset);

   // TCMZ call
   fbFatalFault(aFaultMatrix := aFatalFault, xFaultActive => GVL_<HwZone_name>.stHwzIf.xFatalFault);
```

<\*\*\*> Variablen Name od. Kommentar wird aus dem Studio automatisch übernommen

**Gate/Fortress Fault** Das Gate/Fortress-Fault Flag ist ein SPS-Ausgang, der den Status des Gate/Fortress Fault-Bereichs der TCMZ-Matrix der Hardwarezone überwacht, so dass jedes aktivierte Gate/Fortress Fault-Bit zum Aktivieren des Gate/Fortress Fault Flag Ausgangs führt. Dieses Flag wird in allen Step Sequence-Fehlermatrizen verwendet, um einen CMZ-Fehler zu verursachen und die automatische/manuelle Freigabe in jeder Sequenz innerhalb der Hardware-Zone zu verhindern.

```
// ###################### Gate / Fortress Faults ######################

   // Global Gate Fortress Fault
   aGateFortressFault[0] := GVL_Global.stGlobalIf.xGateFortressFault;

   // TCMZ: xCMZ_1 | CMZ 1
   aGateFortressFault[1] := fbGateFortressFaultCtrl1.M_ErrorSet(xError := GVL_<HwZone_name>_GateFortressFaults.<xCMZ_name>, xReset:= GVL_Global.stGlobalIf.xFaultReset);

   // TCMZ: xCMZ_2 | CMZ 2
   aGateFortressFault[2] := fbGateFortressFaultCtrl2.M_ErrorSet(xError := GVL_<HwZone_name>_GateFortressFaults.<xCMZ_name>, xReset:= GVL_Global.stGlobalIf.xFaultReset);

   // TCMZ call
   fbGateFortressFault(aFaultMatrix := aGateFortressFault, xFaultActive => GVL_<HwZone_name>.stHwzIf.xGateFortressFault);
```

<\*\*\*> Variablen Name od. Kommentar wird aus dem Studio automatisch übernommen

**Warning Fault** Für jede Hardwarezone gibt es eine zugehörige Warning Fault Matrix. Die Warning Fault haben keinen Einfluss auf den Maschinenbetrieb. Der Status der Warning Fault Matrix wird jedoch ständig von der "HMI" überwacht, die alle aktiven Warnmeldungen anzeigt.

```
// ###################### Warning Faults ######################

   // Global Warning Fault
   aWarningFault[0] := GVL_Global.stGlobalIf.xWarningFault;

   // TCMZ: xCMZ_1 | CMZ 1
   fbWarningFaultCtrl1.P_xAutoReset := TRUE;
   aWarningFault[1] := fbWarningFaultCtrl1.M_ErrorSet(xError := GVL_<HwZone_name>_WarningFaults.<xCMZ_1, xReset:= GVL_Global.stGlobalIf.xFaultReset);

   // TCMZ: xCMZ_2 | CMZ 2
   fbWarningFaultCtrl2.P_xAutoReset := TRUE;
   aWarningFault[2] := fbWarningFaultCtrl2.M_ErrorSet(xError := GVL_<HwZone_name>_WarningFaults.<xCMZ_2, xReset:= GVL_Global.stGlobalIf.xFaultReset);

   // TCMZ: xCMZ_3 | CMZ 3
   fbWarningFaultCtrl3.P_xAutoReset := TRUE;
   aWarningFault[3] := fbWarningFaultCtrl3.M_ErrorSet(xError := GVL_<HwZone_name>_WarningFaults.<xCMZ_3, xReset:= GVL_Global.stGlobalIf.xFaultReset);

   // TCMZ call
   fbWarningFault(aFaultMatrix := aWarningFault, xFaultActive => GVL_<HwZone_name>.stHwzIf.xWarningFault);
```

<\*\*\*> Variablen Name od. Kommentar wird aus dem Studio automatisch übernommen


---

# 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/hardware-zonen-control/less-than-hwzone_name-greater-than/less-than-hwzone_name-greater-than_control/t.c.m.z-fault.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.
