Acquisition From Start Position Of Character String - Mitsubishi MELSEC-q Programming Manual

Melsec q series; melsec l series
Hide thumbs Also See for MELSEC-q:
Table of Contents

Advertisement

6 IEC FUNCTIONS

6.10.2 Acquisition from start position of character string

The specified n characters of character string is acquired, starting at the left of the specified character string
(head of the character string).
Function definition
Function definition
6 - 70
STRING LEFT ( 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 := LEFT ( s_ary2, i_data1 ); LD
BOOL LEFT _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 left of the character
(*
string data stored in sData, and stored into Result.
M0 := LEFT_E( X0, sData, iData, Result ) ;
LEFT
LEFT_E
Data to be acquired (character string data)
Number of characters to be acquired (BIN 16-bit data)
Description
ST Program
LEFT s_ary2 s_ary1 i_data1
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
Conversion Result
SM400
LD,LEFT
Description
Used Instruction
*)
*)
*)
6 - 70

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-l

Table of Contents