TRUNC block
Short summary
Name |
|
→POU type |
|
Category |
|
Conform to →IEC-standard |
not defined in IEC-standard |
Graphical interface |
|
Available since |
|
Functionality
The mathematical function trunc is called:
The decimal portion of the floating-point number connected to input IN
is truncated (there is no rounding). The block returns the integer value as a REAL
or LREAL
value.
The non-overlapping value range is not considered to be an error. The return value of the block depends on the compiler and target system (see "Effects of the compiler settings on the execution" for details).
Compare: TRUNC
blocks according to IEC-standard (listed under "Convert").
Inputs, return value
|
Identifier |
Description |
|
---|---|---|---|
Inputs: |
|
|
value to truncate |
Return 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:
-
"Blocks for safe logic" whether this block is supported for developing safety-relevant applications.
-
"Highlighting safe logic in the FBD-editor" for the effects when using the block as a block for safe logic.
Example for usage within ST-editor
|
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.