beautypg.com

Delta Electronics Human Machine Interface DOP-A Series User Manual

Page 253

background image

Chapter 4 Macro Function|ScrEdit Software User Manual

4-32

Revision Apr. 30th, 2007, 2007PDD23000002

End command is used to end the macro program. Statements2 will not be executed after Statemenets1

is executed. The program will execute from the command of the first line next time. Please note that

END means finishing executing macro. If END command is used in sub-macro, it indicates the

program is end here. If the user wants to return to the original macro program, please use RET

command.

Example:

$1 = 10

$1 = $1 + 1

END

$1 = $1 + 1

After the operation, the result is $1 = 11, not $1 = 12 as the END command has ended the macro

program.

„

Bit Settings

Please refer to the following table for the commands of Bit Settings.

Command

Equation

Description

SETB

SETB V1

Set V1 Bit to be ON

CLRBL

CLRB V1

Set V1 Bit to be OFF

INVB

INVB V1

Set V1 Bit to be inversed

GETB

V1 = GETB V2

Get V2 Bit value and store in V1

Table 4.3.6 Bit setting command table

„

SETB

Set specific bit to be ON.

Equation: SETB V1

Set V1 Bit to be ON

Example:

Set the value of 5th Bit within the internal memory $1 to be ON.

$1 = 0000000000000000B

SETB $1.5

The result is $1 = 0000000000010000B

„

CLRB

Set specific bit to be OFF.

Equation: CLRB V1

Set V1 Bit to be OFF

Example:

Set the value of 15th Bit within the internal memory $2 to be OFF.

This manual is related to the following products: