Delta Electronics — 6.16.2 Explanation of Floating-point Number Instructions

AS Series Programming Manual Example When X0.0 is ON, the BIN instruction converts the binary-coded decimal value in X1.15–X1.0 into the binary value, and stores the conversion result in D0. The FLT instruction converts the binary value in D0 into a floating-point number, and stores the conversion result in (D11, D10). The FRAD instruction converts a floating-point number in (D11, D10) into radians, and stores the conversion result in (D21, D20). The FCOS instruction finds the cosine of the radian value in (D21, D20) and stores it in (D31, D30). The cosine value is a floating-point number.

_6 BIN X1.15~X1.0 D0 D11~D10 R360 360 FLT Binary-coded decimal value Binary value Floating-point number FRAD R6.283185 D21~D20 FCOS R1 D31~D30 Floating-point number Floating-point number Additional remarks 1. If the value in S exceeds the range of values that can be represented by floating-point numbers, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#2013. 2. If SM695 is ON, and the value in S is not between 1–360, the instruction is not executed, SM0 is ON, and the error code is 16#2003. 6-460 0 3 6 0