Block that performs the conversion of a DWORD value into a LREAL value.
Ladder Representation
![]()
Block Structure
Variable Type |
Name |
Data Type |
Description |
VAR_INPUT |
EN |
BOOL |
Block enabling |
Value |
DWORD UDINT DINT |
Value in DWORD |
|
VAR_OUTPUT |
ENO |
BOOL |
End of operation |
Result |
LREAL |
Value in LREAL |
Operation
When this block has a TRUE value in EN, it interprets the Value value as DWORD and converts it into LREAL, storing in Result.
When EN has FALSE value, Result remains unchanged.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart

Example in Ladder

The examples above converts variable VALUE, in BYTE, to a value in LREAL, writting the result in RESULT. The block successfully ends and the output ENO is enabled.
Example in ST
The example below displays the instructions for applying the example above in the ST language.
VAR VALUE : DINT := 123954851; RESULT : LREAL; END_VAR
RESULT := FB_DWORD_TO_LREAL(VALUE);
|
|---|