5.1 Type Conversion Functions
5.1.3
Bit type
→
word (unsigned)/16-bit string, double word (unsigned)/32-bit string type conversion
5-7
5
APPLICATION
FUNCTIONS
BOOL_TO_WORD(_E),
BOOL_TO_DWORD(_E)
BOOL_TO_WORD(_E), BOOL_TO_DWORD(_E)
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)
Function
Operation processing
(1) BOOL_TO_WORD, BOOL_TO_WORD_E
Converts bit type data input to into word (unsigned)/16-bit string type data, and outputs
the operation result from .
When the input value is FALSE, 0H is output in word (unsigned)/16-bit string type data.
When the input value is TRUE, 1H is output in word (unsigned)/16-bit string type data.
BOOL_TO_WORD(_E)
BOOL_TO_DWORD(_E)
_E: With EN/ENO
indicates any of the following
functions.
BOOL_TO_WORD BOOL_TO_WORD_E
BOOL_TO_DWORD
BOOL_TO_DWORD_E
Input argument, EN:
Executing condition (TRUE: Execution, FALSE: Stop) :Bit
s:
Input :Bit
Output argument, ENO:
Output status (TRUE: Normal, FALSE: Error) :Bit
d:
Output :Word (unsigned)/16-bit string, double word
(unsigned)/32-bit string
Universal
UD
High
Performance
EN ENO
ds
BOOL_TO_DWORD_E
(EN, s, d);ENO:=
Structured ladder
ST
BOOL_TO_DWORD_E
s
d
Bit type
TRUE
FALSE
Word (unsigned)/16-bit string type
1
H
0H