2 Standard Functions
2 - 18
NX-series Safety Control Unit Instructions Reference Manual (Z931)
WORD_TO_INT
This function converts a WORD variable to an INT variable.
If you omit an input or output parameter, a building error will occur.
This function converts WORD data
In
to INT data
Out
.
Example When Value of
Out
Is Positive (INT#0 to INT#32767)
• The value of
Out
is INT#0 to INT#32767 according to the value of
In
(WORD#16#0000 to
WORD#16#7FFF).
Example When Value of
Out
Is Negative (INT#
−
32768 to INT#
−
1)
• If the value of
In
is WORD#16#8000 (1000 0000 0000 0000 binary), the value of
Out
is INT#32768,
which is INT#
−
32768 as a 2-byte expression.
• If the value of
In
is WORD#16#FFFF (1111 1111 1111 1111 binary), the value of
Out
is INT#65535,
which is INT#
−
1 as a 2-byte expression.
To convert INT data to WORD data, refer to INT_TO_WORD.
Instruction
Name
FB/FUN
Graphic expression
WORD_TO_INT
Convert WORD
to INT
FUN
Variables
Name
I/O
Description
Valid range
Default
In
Data to con-
vert
Input
Data to con-
vert
WORD#16#0000 to FFFF WORD#16#0000
Out
Conversion
result
Output
Conversion
result
INT#
−
32768 to 32767
INT#0
Boolean
Bit strings
Integers
Durations
BOOL
SAFEBOOL
BYTE
SAFEBYTE
WO
RD
SAFEWORD
DWORD
SAFEDWORD
INT
SAFEINT
DINT
SAFEDINT
TI
ME
SAFETIME
In
OK
OK
Out
OK
OK
Function
Additional Information
WORD_TO_INT
Содержание NX-SL series
Страница 8: ...CONTENTS 6 NX series Safety Control Unit Instructions Reference Manual Z931 ...
Страница 14: ...Terms and Conditions Agreement 12 NX series Safety Control Unit Instructions Reference Manual Z931 ...
Страница 28: ...Sections in this Manual 26 NX series Safety Control Unit Instructions Reference Manual Z931 ...
Страница 98: ...2 Standard Functions 2 64 NX series Safety Control Unit Instructions Reference Manual Z931 ...
Страница 104: ...2 Standard Functions 2 70 NX series Safety Control Unit Instructions Reference Manual Z931 ...
Страница 110: ...2 Standard Functions 2 76 NX series Safety Control Unit Instructions Reference Manual Z931 ...
Страница 130: ...3 Safety Standard Function Blocks 3 20 NX series Safety Control Unit Instructions Reference Manual Z931 ...
Страница 265: ...I 1 I NX series Safety Control Unit Instructions Reference Manual Z931 Index ...
Страница 268: ...I 4 NX series Safety Control Unit Instructions Reference Manual Z931 Index ...
Страница 269: ......