DVP15MC11T Operation Manual
_8
Function Explanation
The LEFT/RIGHT instruction extracts a specified-length string from the string
In
and the extracted
string is output to
Out
. The LEFT instruction extracts characters from the left of the string
In
and the
RIGHT instruction extracts characters from the right of the string. The way of extracting characters is
illustrated as below.
Precautions for Correct Use
The input variables are not allowed to omit. An error will occur during the compiling of the software if
the input variables are omitted. But the output variable is allowed to omit.
Programming Example
When the LEFT_In string is ’AaBbCcDd’, LEFT_L=2 and LEFT_EN is TRUE, Out1 is ’Aa’ as shown
in the following table 1. When the RIGHT_In string is ’AaBbCcDd’, RIGHT_L=2 and RIGHT_EN is
TRUE, Out1 is ’Dd’ as shown in the following table 2.
The variable table and program 1
Variable name
Data type
Current value
LEFT_EN
BOOL
TRUE
LEFT_In
STRING
‘AaBbCcDd’
LEFT_L
UINT
2
Out1
STRING
‘Aa’
The variable table and program 2
Variable name
Data type
Current value
RIGHT_EN
BOOL
TRUE
RIGHT_In
STRING
‘AaBbCcDd’
RIGHT_L
UINT
2
Out1
STRING
‘Dd’
In =ABCDEFGH
LEFT
Out : ABCD
ABCDEFGH
E xt ract 4 cha ract ers
f rom t he lef t of th e string
LEFT
L=4
Out : EFGH
ABCDEFGH
Ext ract 4 ch aract ers
from t he righ t of the st ring
RIGHT
RIGHT
1
L EFT
EN
ENO
In
Ou t
L EFT_E N
LEFT_ In
O ut1
L
LEFT_L
1
RIG HT
E N
ENO
In
O ut
RIG HT_ EN
RI GHT_In
Out 1
L
RIGHT_L
8-194
Summary of Contents for DVP15MC11T
Page 9: ...Memo viii...
Page 15: ...DVP15MC11T Operation Manual _2 MEMO 2 4...
Page 71: ...DVP15MC11T Operation Manual _7 Memo 7 10...
Page 81: ...DVP15MC11T Operation Manual _8 Timing Chart F_TRG_CLK F_TRG_Q 8 10...
Page 158: ...Chapter 8 Logic Instructions 8_ The program 1 ASIN EN ENO In Out ASIN_EN ASIN_In Out1 8 87...
Page 249: ...DVP15MC11T Operation Manual _8 8 178...
Page 285: ...DVP15MC11T Operation Manual _8 Memo 8 214...
Page 323: ...DVP15MC11T Operation Manual 10 MEMO 10 34...
Page 549: ...DVP15MC11T Operation Manual A MEMO A 16...