Acquisition From End Of Character String - Mitsubishi Electric MELSEC Q Series Programming Manual

Structured text
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

6 IEC FUNCTIONS

6.10.3 Acquisition from end of character string

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
Function definition
6 - 71
STRING RIGHT ( STRING S1, INT n );
Argument
Argument Name
IN/OUT
S1
IN
n
IN
Return value
Return Value
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
STRING
s_ary1 := RIGHT( s_ary2,
i_data1 );
BOOL RIGHT _E( BOOL EN, STRING S1, INT n, STRING D1 );
Argument
Argument Name
IN/OUT
EN
IN
S1
IN
n
IN
D1
OUT
Return value
Return Value
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 ) ;
RIGHT
RIGHT_E
Data to be acquired (character string data)
Number of characters to be acquired (BIN 16-bit data)
ST Program
Conversion Result
LD
RIGHT
Execution condition (Function is executed only when the result is TRUE)
Data to be acquired (character string data)
Number of characters to be acquired (BIN 16-bit data)
Acquisition result (character string data)
Description
Description
Used Instruction
SM400
LD,RIGHT
s_ary2
s_ary1
i_data1
Description
Description
*)
*)
*)
6 - 71

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents