# SmokeDetector

## `SmokeDetector` (FB)

FUNCTION\_BLOCK SmokeDetector

### Short description

> Evaluation of the signals of a smoke detector

### Representation

<figure><img src="https://2592874069-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQR4vCFzt6ixgsqlR3pdR%2Fuploads%2Fgit-blob-3e17930ef2798fc265e85c25ba061a6a9b99d710%2FSmokeDetector_FB.png?alt=media" alt=""><figcaption></figcaption></figure>

### Function description

#### Alarm - output *xAlarm*

| *xAlarmIn* | *xService* | *xAlarm* | Notes                   |
| ---------- | ---------- | -------- | ----------------------- |
| FALSE      | FALSE      | FALSE    | no fault active         |
| TRUE       | X          | TRUE     | Input *xAlarmIn* active |
| X          | TRUE       | TRUE     | Input *xService* active |

Legend: X = any

### CODESYS

InOut:

| Scope  | Name       | Type   |
| ------ | ---------- | ------ |
| Input  | `xAlarmIn` | `BOOL` |
| Input  | `xService` | `BOOL` |
| Output | `xAlarm`   | `BOOL` |
