6 - 71 6 - 71
6 IEC FUNCTIONS
6.10.3 Acquisition from end of character string RIGHT
RIGHT_E
The specified n characters of character string is acquired, starting at the right of the specified character string
(end of the character string).
Function definition
STRING RIGHT ( STRING S1, INT n );
Argument
Argument Name
IN/OUT
Description
S1
IN
Data to be acquired (character string data)
n
IN
Number of characters to be acquired (BIN 16-bit data)
Return value
Return Value
Description
STRING
Acquisition result (character string data)
Remarks: This function cannot be used with the Basic model QCPU.
Secure the area of n+1 characters as the data area that will store the
acquired character string data.
Example of use
Argument Type
ST Program
Conversion Result
Used Instruction
STRING
s_ary1 := RIGHT( s_ary2,
i_data1 );
LD SM400
RIGHT s_ary2
s_ary1
i_data1
LD,RIGHT
Function definition
BOOL RIGHT _E( BOOL EN, STRING S1, INT n, STRING D1 );
Argument
Argument Name
IN/OUT
Description
EN
IN
Execution condition (Function is executed only when the result is TRUE)
S1
IN
Data to be acquired (character string data)
n
IN
Number of characters to be acquired (BIN 16-bit data)
D1
OUT
Acquisition result (character string data)
Return value
Return Value
Description
BOOL Execution
condition
Example of use
(*
(*
(*
When execution condition X0 turns ON, the character string of the number of
characters specified in iData is acquired, starting at the right of the character
string stored in sData, and stored into Result.
M0 := RIGHT_E( X0, sData, iData, Result ) ;
*)
*)
*)
Summary of Contents for MELSEC L series
Page 1: ...Programming Manual Structured Text ...
Page 2: ......
Page 73: ...4 33 4 33 4 ST PROGRAM EXPRESSIONS MEMO ...
Page 297: ......