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

# Sequence CMZ

A “Constantly Monitored Zone” (CMZ) at machines is an area or zone in a machine that is continuously monitored by sensors or other monitoring mechanisms. These zones contain, for example, critical components or processes of a machine where the occurrence of a fault or malfunction can have severe consequences. The monitoring of these zones is done by various types of sensors, for example temperature or pressure sensors. These continuously measure the values in the zone and transmit them to the machine's control system. The control system initiates appropriate measures in case of deviations from normal values to avoid or minimize potential problems.

**fbErrorSetCtr**\* The function block enables setting and resetting of CMZs fbErrorSetCtrl\*.**P\_timErrorDelay** allows delaying a fault, i.e. it must be active for at least this time before the fault is set fbErrorSetCtrl\*.**P\_xAutoReset** allows automatically acknowledging a fault as soon as it has been resolved fbErrorSetCtrl\*.M\_ErrorSet(**xError**)here the variable, the CMZ previously defined in the Studio, is assigned "[NOT GVL\_\<Sequence\_name>\_CMZ.xCMZ\_1](https://selmo-technology-gmbh.gitbook.io/selmo-solution/02-selmo-standard/04-selmo-plc-code/contents#221782-gvl_sequence1_cmz)" fbErrorSetCtrl\*.M\_ErrorSet(**xReset**)Global or sequence-related reset of the CMZ "[GVL\_Global.stGlobalIf.xFaultReset](https://selmo-technology-gmbh.gitbook.io/selmo-solution/02-selmo-standard/04-selmo-plc-code/contents#22141-stglobalinterface) ; [GVL\_\<Sequence\_name>\_HMI.stHmiIf.xHmiPbFaultReset](https://selmo-technology-gmbh.gitbook.io/selmo-solution/02-selmo-standard/04-selmo-plc-code/contents#221783-gvl_sequence1_hmi)" (stHmiSequence)

**fbCmzFault** The function block checks the corresponding arrays to see if a fault has occurred. fbCmzFault(**aFaultMatrix**) [array of the entire CMZ](https://selmo-technology-gmbh.gitbook.io/selmo-solution/02-selmo-standard/04-selmo-plc-code/contents#221786-sequence1) (variable declaration) summarized fbCmzFault(**xFaultActive**)variable for collective faults of the CMZ "[GVL\_\<Sequence\_name>.stSeqIf.xSeqCmzFault](https://selmo-technology-gmbh.gitbook.io/selmo-solution/02-selmo-standard/04-selmo-plc-code/contents#221781-gvl_sequence1)" (stSequenceInterface)

Copy

```
// ########################### SEQUENCE CMZ ###########################
   {region "Description Sequence CMZ"}
   (*
   The Sequence Constantly Monitored Zone (or ‘CMZ’) is similar to the TCMZ but
   will contain only machine unsafe / fatal faults related to the individual step sequence.
   *)
   {endregion}

   // Hardware Zone Fatal Fault (TCMZ)
   fbErrorSetCtrl0.P_xAutoReset := TRUE;
   aCmz[0] := fbErrorSetCtrl0.M_ErrorSet(xError := GVL_HwZone1.stHwzIf.xFatalFault, xReset:= GVL_Global.stGlobalIf.xFaultReset OR GVL_Sequence1_HMI.stHmiIf.xHmiPbFaultReset);

   // Hardware Zone Gate Fortress Fault (TCMZ)
   fbErrorSetCtrl1.P_xAutoReset := TRUE;
   aCmz[1] := fbErrorSetCtrl1.M_ErrorSet(xError := GVL_HwZone1.stHwzIf.xGateFortressFaultTcmz, xReset:= GVL_Global.stGlobalIf.xFaultReset OR GVL_Sequence1_HMI.stHmiIf.xHmiPbFaultReset);

   // CMZ: xCMZ_1 | CMZ 1
   fbErrorSetCtrl2.P_xAutoReset := TRUE;
   fbErrorSetCtrl2.P_timErrorDelay := T#1500MS;
   aCmz[2] := fbErrorSetCtrl2.M_ErrorSet(xError := NOT GVL_Sequence1_CMZ.xCMZ_1, xReset:= GVL_Global.stGlobalIf.xFaultReset OR GVL_Sequence1_HMI.stHmiIf.xHmiPbFaultReset);


   fbCmzFault(aFaultMatrix:= aCmz, xFaultActive => GVL_Sequence1.stSeqIf.xSeqCmzFault);
   GVL_Sequence1.stSeqIf.xNoCMZFault := NOT GVL_Sequence1.stSeqIf.xSeqCmzFault;
```

<br>


---

# 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/sequence-cmz.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.
