SEMA block

Short summary

Name

SEMA

→POU type

→function block

Category

IEC-block, BistableEnh

Conform to →IEC-standard

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/add.svg not defined in IEC-standard

Graphical interface

images/download/thumbnails/414780696/SEMA-version-4-modificationdate-1689062094038-api-v2.png

Available since

version 1.27.0 (for logi.CAD 3)

Functionality

The block represents a semaphore.

If input CLAIM is →turned on, output BUSY returns value TRUE (or an equivalent) starting with the next executed cycle. If input RELEASE is turned on, output BUSY returns value FALSE (or an equivalent) .

In-/outputs


Identifier

→Data type

Description

Inputs:

CLAIM

BOOL

set (dominant)

RELEASE

BOOL

reset

Outputs:

BUSY

BOOL


Input EN and output ENO are available when →calling the block. See "Execution control: EN, ENO" for information on input EN and output ENO.

Example for usage within ST-editor

PROGRAM Test
VAR
mySEMA : SEMA;
TriggerC : BOOL;
TriggerR : BOOL;
Out : BOOL;
END_VAR
mySEMA(CLAIM := TriggerC, RELEASE := TriggerR, BUSY => Out);
(* Instance of block 'SEMA' is called. *)
(* Input 'CLAIM' gets value from 'TriggerC' variable. Input 'RELEASE' gets value from 'TriggerR' variable.*)
(* Output 'BUSY' returns TRUE, if 'TriggerC' is TRUE. Output 'BUSY' returns FALSE, if 'TriggerR' is TRUE and 'TriggerC' is FALSE. *)
(* Variable 'Out' accesses the output 'BUSY'. *)
END_PROGRAM

When creating your application within the ST-editor, enter a call of a block by typing the text as requested by the syntax or use Content Assist.