DVP-15MC Series Motion Controller Operation Manual 
8-288 
  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 
 
  The variable table and program 2 
Variable name  Data type  Current value 
RIGHT_EN
BOOL
TRUE
2 
 
 
   
In =ABCDEFGH
LEFT
Out :
ABCD
ABCDEFGH
Extract 4 characters
from the left of the string
LEFT
L=4
Out : EFGH
ABCDEFGH
Extract 4 ch aracters
from the right of the string
RIGHT
RIGHT
1
LEFT
EN ENO
In Out
LEFT_EN
LEFT_In Out1
LLEFT_L
1
RIGHT
EN ENO
In Out
RIGHT_EN
RIGHT_In Out1
L
RIGHT_L