Delta DVP-ES2 — 3.8 Detailed Instruction Explanation

DVP-ES2/EX2/SS2/SA2/SX2/SE&TP Operation Manual - Programming K19: Convert floating point value to data string Explanations: The system converts the floating point value in the source device S to data string with specified length n (decimal point is not included). Points to note: 1. Operand n sets the number of total digits for the floating point value to be converted. Max 8 digits are applicable and the value over n digit will be omitted. For example, n = K6, floating value F123.45678 will be converted to data string “123.456”. 2. When the digits of source value are more than the specified n digits, only the n digits from the left will be converted.

For example, source value F123456.78 with n =K4 will be converted as data string "1234”. 3. If the source value is a decimal value without integers, e.g. 0.1234, the converted data string will be “.1234” where the first digit is the decimal point. The conversion will be performed in the following rule: D+0 D+0 Hi-byte Lo-byte Hi-byte Lo-byte D+1 D+1 D+2 D+2 32-bit Floating value S+0 S+1 32-bit Floating value S+0 S+1 123.45678 123.45678 n = k6 n = k6 D+3 D+3 D+4 D+4 D+5 D+6 D+5 D+6 D+7 D+7 K30: Swap 16-bit data Swat the Bit data stored in S1~S1+(N-1) to S2~S2+(N-1). The movement of BIT SWAP: BIT15  BIT0, BIT14  BIT1, BIT13  BIT2 and so on. Example:

DTM D0 D10 K30 K8 3-188 ‘1’ ‘2’ ‘3’ ‘.’ ‘4’ ‘5’ ‘6’ 0x00 D0 = 0x0001 D10 = 0x8000 D1 = 0x0002 D11 = 0x4000 D2 = 0x0004 D12 = 0x2000 D3 = 0x0008 D13 = 0x1000 D4 = 0x0010 D14 = 0x0800 D5 = 0x0020 D15 = 0x0400 D6 = 0x0040 D16 = 0x0200 D7 = 0x0080 D17 = 0x0100