TO_STRING block
Short summary
Name |
|
→POU type |
|
Category |
|
Conform to →IEC-standard |
currently restricted and more possible than defined in IEC-standard; see "Explicit conversion according to IEC-standard" |
Graphical interface |
|
Available since |
version 1.90.0 (for Neuron Power Engineer) |
Functionality
The blocks serves for explicitly converting the value connected to input IN
into a value of data type STRING
.
If the connected value is within the range of values overlapping for the data type of the input and for the result value STRING
, the blocks returns this value. The format depends on the data type of the input:
Data type of input |
Format of return value |
String length |
---|---|---|
|
|
|
|
decimal value |
|
|
floating point or exponential value |
maximum length |
|
as the input value |
as the input value |
|
Duration units (such as |
length |
|
The duration unit |
length |
|
|
length |
|
|
length |
|
|
length |
|
|
length |
Note: The format YYYY-MM-DD
is only possible within the range 1970-01-01
to 2038-01-19
(0
- 24.855
days, 0
- 2.147.483.647
seconds).
Explicit conversion according to IEC-standard
The IEC-standard defines an explicit conversion of the following data types to STRING
:
WSTRING, CHAR
The data type WSTRING
is currently not supported in Neuron Power Engineer.
Inputs, return value
|
Identifier |
Description |
|
---|---|---|---|
Inputs: |
|
|
value to be converted |
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.
Internal error diagnostic for block
The block checks the data type of the value connected to input IN
and the return value respectively, before the block is executed. If the return value cannot be mapped in the available memory (the return value is too large), the output ENO
of the block is set to value FALSE
(or an equivalent). When you are using nested blocks with STRING
values, observe that the memory for STRING
values is restricted (see "In case of nested string blocks: How can the return value be entirely mapped ?" for details and examples).
Example for usage within ST-editor
The calculated values are evaluated by using the Assert
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.