5 Categories and Use of Basic Application Instructions Operands: S : Source device (binary floating value) D : Operation result Explanations: 1. ATAN value = TAN -1 . ATAN instruction performs arc tangent operation on S and stores the result in D 2. F refers to floating point input. Be sure to add a decimal point when using it. 3. Only 32-bit instructions DATAN and DATANP are applicable. 4. See the figure below for the relation between the input and the result: R S 5. If operation result in D is 0, zero flag will be ON. 6. Flags: Program Example:
When X0 = ON, DATAN instruction performs arc tangent operation on the binary floating value in (D1, D0) and stores the ATAN value in (D11, D10) in binary floating format.. Binary floating point D 1 D 0 ATAN value binary floating point D 10 D 11 Points to note: For floating point operations, see “5.3 Numeric Values for Data Processing”. DVP-PM Operation Instruction 5-118 API Mnemonic Operands Function Controllers 20PM 10PM 135 D ATAN P Arc Tangent Type OP Bit Devices Word Devices Program Steps X Y M S F H KnX KnY KnM KnS T C D V Z D S * * D * 2 S: Entered data (ta R: ATAN value (rad 0 - 2 OX O100 Zero flag M1808 M1968 X DATAN D0 D10