5-8
5.1 Type Conversion Functions
5.1.3
Bit type
→
word (unsigned)/16-bit string, double word (unsigned)/32-bit string type conversion
BOOL_TO_WORD(_E), BOOL_TO_DWORD(_E)
(2) BOOL_TO_DWORD, BOOL_TO_DWORD_E
Converts bit type data input to into double word (unsigned)/32-bit string type data, and
outputs the operation result from .
When the input value is FALSE, 0
H is output in double word (unsigned)/32-bit string type
data.
When the input value is TRUE, 1
H is output in double word (unsigned)/32-bit string type
data.
Operation result
(1) Function without EN/ENO
An operation is executed and the operation value is output from .
(2) Function with EN/ENO
The following table shows the executing conditions and operation results.
*1 When FALSE is output from ENO, the data output from is undefined.
In this case, create a program so that the data output from is not used.
EN ENO
TRUE (Operation execution) TRUE Operation output value
FALSE (Operation stop)
FALSE
*1
Undefined value
s
d
Bit type
TRUE
FALSE
Double word (unsigned)/32-bit string type
1
H
0H
d
d
d
d