17.03.2014 Views

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>DVP</strong>-<strong>ES2</strong>/<strong>EX2</strong>/<strong>SS2</strong>/<strong>SA2</strong>/<strong>SX2</strong>/SE <strong>Operation</strong> <strong>Manual</strong> - Programming<br />

Points to note:<br />

1. Operand n sets the number of total digits for the converted floating value. Max 8 digits are<br />

applicable and the value over n digit will be omitted. For example, n = K6, data string<br />

“123.45678” will be converted to “123.456”.<br />

2. When there are characters other than numbers 0~9 or the decimal point in the source data<br />

string, the character before the decimal point will be regarded as 0, and the value after the<br />

decimal point will be regarded as the ETX.<br />

3. If the source data string contains no decimal point, the converted value will be displayed<br />

by a n-digit floating point value automatically.<br />

The conversion will be performed in the following rule:<br />

Hi-byte Lo-byte<br />

S+0<br />

‘1’<br />

S+1<br />

‘2’<br />

S+2<br />

S+3<br />

S+4<br />

‘3’<br />

‘.’<br />

‘4’<br />

D+0<br />

D+1<br />

32-bit Floating value<br />

123.456<br />

S+5<br />

‘5’<br />

S+6<br />

‘6’<br />

S+7<br />

0x00<br />

K19: Convert floating point value to data string<br />

Explanations:<br />

The system converts the floating point value in the source device S to data string with<br />

specified length n (decimal point is not included).<br />

Points to note:<br />

1. Operand n sets the number of total digits for the floating point value to be converted. Max<br />

8 digits are applicable and the value over n digit will be omitted. For example, n = K6,<br />

floating value F123.45678 will be converted to data string “123.456”.<br />

2. When the digits of source value are more than the specified n digits, only the n digits from<br />

the left will be converted. For example, source value F123456.78 with n=K4 will be<br />

converted as data string "1234”.<br />

3. If the source value is a decimal value without integers, e.g. 0.1234, the converted data<br />

string will be “.1234” where the first digit is the decimal point.<br />

3-178

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!