beautypg.com

Delta Electronics DELTA DUP-B User Manual

Page 363

background image

Chapter 3 Creating and Editing Screens

FCNV (Convert Integer to Floating Point Value)

Equation
Var1 = FCNV (Var2)

Explanation
Convert an integer in Var2 to floating point value and store in Var1.

Remark

The calculation result can be stored as signed DWORD.

Var1 can be internal memory only. Var2 can be internal memory or constant.

Example
Convert an integer in $0 to floating point value and store in $2 (this is an operation
of signed 32-bit data).
If $0 = 100, $2 = 100.0 after executing FCNV command.

ICNV (Convert Floating Point Value to Integer)

Equation
Var1 = ICNV (Var2)

Explanation
Convert a floating point value in Var2 to an integer and store in Var1.

Remark

The calculation result can be stored as signed DWORD.

Var1 can be internal memory only. Var2 can be internal memory or constant.

Example
Convert a floating point value in $0 to an integer and store in $2 (this is an operation
of signed 32-bit data).

3-342

Revision May, 2010