EasyManuals Logo

Delta Electronics DVP15MC11T User Manual

Delta Electronics DVP15MC11T
601 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #198 background imageLoading...
Page #198 background image
Chapter 8 Logic Instructions
8_
Function Explanation
SHR is used to shift all bits of the value of In by the number of bits specified by Num to the right and
the result is output to Out.
When Num=2, all bits of the value of In are shifted by two bits to the right and Bit0~Bit1 of In are
discarded and the value of Bit6~Bit7 are supplemented with 0 as shown in the following figure.
Precautions for Correct Use
The input variables are not allowed to omit. An error will occur during the compiling of the software if
any input variable is omitted. But the output variable is allowed to omit.
When the value of Num is 0, the value of Out is the same as In.
Programming Example
The data types of SHR_In and SHR_Num are UINT and USINT respectively and their values are
300 and 3 respectively. The data type of Out1 is UINT and the value of Out1 is 37 when SHR_EN is
TRUE.
The variable table and program
Variable name
Data type
Current value
SHR_EN
BOOL
TRUE
SHR_In
UINT
300
SHR_Num
USINT
3
Out1
UINT
37
Illustration of the example
10101101
10110100
Bit0Bit7
In
Out
Discarded
Fill 0
Num=2, shifted by two bits toward the right
1
SHR
EN ENO
In Out
SHR_EN
SHR_In Out1
Num
SHR_Num
0
1
0
1
1
0
00
1
Bit0Bit15
SHR_In
Out1
3 bits discarded
SHR_ Num =3,
shi fted by 3 bi ts righ t
1
0000000
01
00000 0 00 10000
0 for3 supp lementary bits
Bit0Bit15
8-127

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Delta Electronics DVP15MC11T and is the answer not in the manual?

Delta Electronics DVP15MC11T Specifications

General IconGeneral
BrandDelta Electronics
ModelDVP15MC11T
CategoryController
LanguageEnglish

Related product manuals