Delta DVP-ES2 — 3.8 Detailed Instruction Explanation

3. Instruction Set Operands: S : Source device (0° ≦ S < 360°) D : Operation result Explanations: 1. TAN instruction performs tangent operation on S and stores the result in D . 2. The value in S can be set as radian or degree by flag M1018. 3. M1018 = OFF, radian mode. RAD = degree Чπ/180. 4. M1018 = ON, degree mode. Degree range: 0° degree ≦ < 360°. 5. Flag: M1018 (Flag for Radian/Degree) 6. See the figure below for the relation between the radian and the operation result R S: Radian R: Result (TAN value) S -2 7. If operation result in D is 0, Zero flag M1020 = ON. Program Example 1: M1018 = OFF, radian mode.

When X0 = ON, DTAN instruction performs tangent operation on the radian value in (D1, D0) and stores the TAN value in (D11, D10) in binary floating format. M1002 X0 DTAN 3-343 API Mnemonic Operands Function Controllers 132 D TAN P Tangent ES2/EX2 SS2 SA2 SX2 SE Typ e OP Bit Devices X Y M S Word devices Program Steps Y M S K H KnX KnY KnM KnS T C D E F DTAN, DTANP: 9 steps S * * * D * 16-bit 32-bit SA2 SA2 SA2 SS2 SX2 ES2/EX2 SS2 SX2 ES2/EX2 SS2 SX2 SE SE SE 1 -3 -2 - 2 2 -1 0 3 2 2 2 RST M1018 D0 D10