TO_TOD 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.65.0 (for Neuron Power Engineer) |
Functionality
The blocks serves for explicitly converting the value connected to input IN
into a value of data type TOD
(= TIME_OF_DAY
).
If the connected value is within the range of values overlapping for the data type of the input and for the result value TOD
, the blocks returns this value. The conversion of the connected value is based on seconds, relative to the lower limit TOD#00:00:00
of TOD
(see under "Example for usage within ST-editor" and "Range of values for conversions" for lower and upper limits per data type).
Explicit conversion according to IEC-standard
The IEC-standard defines an explicit conversion of the following data types to TOD
:
LDATE_AND_TIME, DATE_AND_TIME, LTIME_OF_DAY
The data type LDATE_AND_TIME
and LTIME_OF_DAY
are 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. The output ENO
of the block is set to value FALSE
(or an equivalent), in case of the data type DATE_AND_TIME
with a date part outside of the the valid range of values (analogously to the TO_DATE block).
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.
Range of values for conversions
The range of values for the conversions is determined by the lower and upper of the data types. This lower and upper limit per data type is listed under "Supported data types (in ST)".Keep the following in mind: Input values out of the quoted range of values are interpreted as seconds according to the table and return a return value < TOD#00:00:00
or ≥ TOD#24:00:00
.
Data type for IN |
Lower limit |
Upper limit | ||
---|---|---|---|---|
Literal for |
Return value |
Literal for |
Return value |
|
|
|
|
|
|
|
|
|
|
|
|
any value |
|
any value |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TO_DATE
TO_DT