EasyManua.ls Logo

Omron NJ501-1500

Omron NJ501-1500
990 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
2-525
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Text String Instructions
2
MID
The following example is for when In is ‘ABCDEF’, L is UINT#3, and P is UINT#2. The value of variable
abc will be ‘BCD’.
If the value of L is 0, an error does not occur and only the NULL character is assigned to Out.
Multi-byte characters are counted as one character each.
An error occurs in the following cases. ENO will be FALSE, and Out will not change.
In does not end in a NULL character.
In results in a character code error.
In does not have enough characters for the number of characters specified by L from the position
specified by P.
The value of P is 0.
The execution result exceeds the size of Out.
Precautions for Correct Use
abc:=MID(‘ABCDEF’, UINT#3, UINT#2);
LD ST
abc
‘ABCDEF’
UINT#3
UINT#2
MID
EN ENO
In
L
P
‘BCD’
Out=abc
‘ABCDEF’
In
Three characters are extracted starting from second character.

Table of Contents

Related product manuals