beautypg.com

Delta Electronics Human Machine Interface DOP-A Series User Manual

Page 245

background image

Chapter 4 Macro Function|ScrEdit Software User Manual

4-24

Revision Apr. 30th, 2007, 2007PDD23000002

Command

Equation

Description

MAX

V1 = MAX(V2, V3)

Get Maximum value

MIN

V1 = MIN(V2, V3)

Get Minimum value

A2H

V1 = A2H(V2)

Convert ASCII code to 4-digit integer

H2A

V1= H2A (V2)

Convert hexadecimal integer to ASCII code

FCNV

V1= FCNV (V2)

Convert integer to floating point value

ICNV

V1= ICNV (V2)

Convert floating point value to integer

Table 4.3.4 Data conversion command table

„

BCD

Convert BIN Data into BCD value

Equation: V1 = BCD(V2)

The binary data in V2 is converted into BCD value, and stored in V1.

Example:

The binary data in $4 is 5564. After executing BCD command, the binary data in $5 is converted to

5564H.

$4 = 5564

$5 = BCD($4)

„

BIN

Converts BCD Data into BIN value

Equation: V1 = BIN(V2)

The BCD data in V2 is converted into BCD value, and stored in V1.

Example:

The BCD (hexadecimal) data in $4 is 5564H. After executing BIN command, the BCD data in $5 is

converted to 5564.

$4 = 5564H

$5 = BIN($4)

„

W2D

Convert WORD to DWORD

Equation: V1 = W2D(V2)

The WORD value in V2 is converted into DWORD value, and stored in V1.

Example:

The WORD value in decimal format in $4 is -10. After executing W2D command, the value in $7 is

converted to -10 in Double Word format. As it is in DWORD format, it indicates that the value has

occupied $7 and $8 these two addresses.

This manual is related to the following products: