Delta AH500 Programming Manual page 250

Hide thumbs Also See for AH500:
Table of Contents

Advertisement

AH 5 00 Pr ogr am m ing Ma n ua l
API
Instruction code
0204
D
INT
Device X
Y
M
S
D
Symbol:
Explanation:
1.
The single-precision floating-point number in the register specified by S is converted into the
binary integer. The binary floating-point number is rounded down to the nearest whole digit,
and becomes the bianry integer. The binary integer is stored in the register specified by D.
2.
The source device S used in the instruction INT occupies two registers, and D used in INT
occupies one register.
3.
The source device S used in the instruction DINT occupies two registers, and D used in DINT
also occupies two registers.
4.
The operand D used in the instruction INT can not be the 32-bit counter.
5.
The instruction INT is the opposite of the instruction FLT.
6.
When the conversion result is zero, SM600 is ON.
7.
During the conversion, if the floating-point number is rounded down to the nearest whole digit,
SM601 will be ON.
8.
When the conversion result exceeds the range, SM602 is ON.
9.
For the instruction INT/IINTP, the range of conversion results is between -32,768 and 32,767.
10. For the instruction DINT/DINTP, the range of conversion results is between -2,147,483,648
and 2,147,483,647.
Example:
1.
When X0.0 is ON, the single-precision floating-point number in (D1, D0) is converted into the
binary integer, and the conversion result is stored in D10. The binay floating-point number is
rounded down to the nearest whole digit.
2.
When X0.1 is ON, the single-precision floating-point number in (D21, D20) is converted into
the binary integer, and the conversion result is stored in (D31, D30). The binary floating-point
number is rounded down to the nearest whole digit.
6 - 8 2
Operand
S, D
P
S
T
C
HC
D
Pulse instruction 16-bit instruction (5 steps) 32-bit instruction (5 steps)
AH500
S : Source device
D : Conversion result
Converting the 32-bit floating-point
number into the binary integer
L
SM SR
E
PR
AH500
Double word
Word/Double word
Function
K
16# "$"
DF
AH500

Advertisement

Table of Contents
loading

Table of Contents