Ny-Series Instructions Reference Manual (W560 - Omron NY532-5400 Reference Manual

Ny-series
Hide thumbs Also See for NY532-5400:
Table of Contents

Advertisement

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'.
LD
'ABCDEF'
UINT#3
UINT#2
In
'ABCDEF'
Three characters are extracted starting from second character.
'BCD'
Out=abc
Precautions for Correct Use
• 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 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.

NY-series Instructions Reference Manual (W560)

MID
EN
ENO
abc
In
L
P
ST
abc:=MID('ABCDEF', UINT#3, UINT#2);
2 Instruction Descriptions
2
2-553

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents