Delta Electronics DOP-AS Series Network Card User Manual


 
Chapter 4 Macro Function|ScrEdit Software User Manual
Revision Apr. 30th, 2007, 2007PDD23000002 4-21
$2 = F100H
$4 = NOT $2
Store the result of $4 in 0EFFH
<< Operand
Bit Shift-left operation
Equation: V1 = V2 << V3
Shift V2 (WORD/DWORD) data to left (number of bit is V3). The result of this calculation is
stored in V1.
Example:
$2 = F100H
$1 = $2 << 4
$2 shift-left 4 bits and the result (1000H) is stored in $1.
$2 = 11111000
$1 = $2 << 3
$2 shift-left 3 bits and the result (11111000000) is stored in $1.
>> Operand
Bit Shift-right operation
Equation: V1 = V2 >> V3
Shift V2 (WORD/DWORD) data to right (number of bit is V3). The result of this calculation is
stored in V1. If the shift number of bit is more than the address itself, the excess part will be
ignored.
Example:
$2 = F100H
$1 = $2 >> 4
$2 shift-right 4 bits and the result (0F10H) is stored in $1.
$2 = 00011111
$1 = $2 >> 3
$2 shift-right 3 bits and the result (00000011) is stored in $1.
Data Transfer
There are five commands for data transfer, including =, BMOV, FILL, CHR and FMOV. Please refer to
following table 4.3.3 and examples below for more information.
Command Equation: Description Remark
=
V1 = V2
Transfer data
V1 only can be PLC address
or internal memory.