Download Print this page

Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual page 1028

Instructions, standard functions/function blocks
Hide thumbs Also See for MELSEC iQ-F FX5:

Advertisement

• RIGHT(_E)
These functions output the data for the specified number of characters from the right of a character string input to (s) from (d).
The value input to (n) specifies the number of characters to be extracted.
Ex.
When the value input to (n) is 5
"ABCDEF12345"
High-order byte Low-order byte
+0
42H (B)
41H (A)
+1
44H (D)
43H (C)
+2
46H (F)
45H (E)
+3
32H (2)
31H (1)
+4
34H (4)
33H (3)
+5
00H
35H (5)
(1): Number of characters to be extracted (L): 5
• A value input to (s) is the STRING type data value and within the range from 0 to 255 byte(s).
• A value input to (n) is the INT type data value and within the range from 0 to 255. (However, the value must be within the
number of characters of the character string to be input to (s).)
■Operation result
1.
Function without EN/ENO
The operation processing is executed. The operation output value is output from (d).
2.
Function with EN/ENO
The following table lists the execution conditions and operation results.
Execution condition
EN
TRUE (Executes operation)
FALSE (Stops operation)
*1 When FALSE is output from ENO, data output from (d) is undefined. In that case, modify a program so that the data output from (d) is
not used.
Operation error
There is no operation error.
25 CHARACTER STRING FUNCTIONS
1026
25.2 Extracting Character String Data from the Left/Right
"12345"
High-order byte Low-order byte
32H (2)
34H (4)
00H
(1)
Operation result
ENO
TRUE
*1
FALSE
31H (1)
+0
33H (3)
+1
35H (5)
+2
(d)
Operation output value
Indefinite value

Hide quick links:

Advertisement

loading