FORCEMRK block

Short summary

Name

FORCEMRK

→POU type

→function block

Category

IEC-block, SelectEnh

Conform to →IEC-standard

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

Graphical interface

images/download/thumbnails/414782264/FORCEMRK-version-1-modificationdate-1535099188837-api-v2.png

Available since

  • version 1.52.0 (for logi.CAD 3) – initial variant

  • version 2.0.11 (for library Standard) – additional data types for IN and OUT (STRING, CHAR, user-defined data types; FVAL und FSW provided as local, retentive variables (instead of inputs)
    Variables of FORCEMRK instances can be displayed e.g. in the Values of Variables view only, if the target system uses a communication via →Gateway.

Functionality

The block makes a selection to change the returned output value (to →force a value).

If the local, →retentive variable FSW (= the force switch) is set to value FALSE (or an equivalent), the block returns the value of input IN. If the local, retentive variable FSW (= the force switch) is set to value TRUE (or an equivalent), the block returns the value of the local, retentive variable FVAL.

Special case: If a STRING value is connected to the input , logi.CAD 3 uses the fixed length of 128 for the input and the output. However, if the connected STRING value is longer, the output ENO of the embracing →POU is set to value FALSE (or an equivalent).

Restrictions

The following restrictions apply to the usage of overloadable function block instances:

  • The declaration is limited to local variables.

  • The usage as array base type is not allowed.

  • The usage as structure element is not allowed.

  • Instance data can be displayed or changed only, if the target system uses a communication via →Gateway. The instance data are displayed e.g. within the Values of Variables view or within →OLT-fields.

Good to know

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/lightbulb.svg Use an →OLT-field for a force marker inserted within the FBD-editor in order to toggle the force marker between the value of the input and the force value. Details: See "Creating or editing OLT-fields in FBD".

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/lightbulb.svg Use the Force Markers view in order to enter force values for several force markers from within a central point of logi.CAD 3 and to activate their force switch in one go. Details: See "Writing a force value for force marker onto the PLC".

In-/outputs


Identifier

→Data type

Description

Inputs:

IN

REAL, LREAL, USINT, UINT, UDINT, ULINT, SINT, INT, DINT, LINT, TIME, BOOL, BYTE, WORD, DWORD, LWORD, STRING, CHAR, DATE_AND_TIME, DATE or TIME_OF_DAY or a →user-defined data type
Restriction: In case of →array data types, only one-dimensional arrays are allowed.

input value

Outputs:

OUT

REAL, LREAL, USINT, UINT, UDINT, ULINT, SINT, INT, DINT, LINT, TIME, BOOL, BYTE, WORD, DWORD, LWORD, STRING, CHAR, DATE_AND_TIME, DATE or TIME_OF_DAY or a →user-defined data type
Restriction: In case of →array data types, only one-dimensional arrays are allowed.

output value

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

See:

Example for usage within ST-editor

The calculated values are evaluated by using the Assert block .

FUNCTION_BLOCK ExampleForceMrk
VAR
iForceMrk1 : FORCEMRK;
OUT1 : INT;
END_VAR
iForceMrk1(IN := 3, OUT => OUT1);
Assert(OUT1 = 3);
END_FUNCTION_BLOCK

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.