104
APPX
Appendix 11 Outputting any characters from a decoded character string
On a programmable controller side
When specifying an output range of a character string on a programmable controller side, the range can be specified by
creating a program using the MIDR instruction.
The specifications and operation examples when using the MIDR instruction in MELSEC iQ-R series CPU modules are
shown bellow.
For details on the MIDR instruction, check in the manual of the CPU module used.
Extracting the specified string data MIDR(P)
These instructions extract data at any position in string data, and store the extracted data in the device number specified by
(d) and later.
■
Execution condition
Setting data
■
Description, range, data type
■
Applicable devices
Ladder
ST
ENO:=MIDR(EN,s1,s2,d);
ENO:=MIDRP(EN,s1,s2,d);
FBD/LD
Instruction
Execution condition
MIDR
MIDRP
Operand
Description
Rang
e
Data type
Data type (label)
(s1)
Character string or the start device containing the character
string
Character string
ANYSTRING_SINGLE
(d)
Start device for storing the character string data of the operation
result
Character string
ANYSTRING_SINGLE
(s2)
Start device for storing the location of the start character and
the number of characters
(s2): Location of start character, (s2)+1: Number of characters
16-bit signed binary
ANY16_ARRAY
(Number of elements: 2)
EN
Execution condition
Bit
BOOL
ENO
Execution result
Bit
BOOL
Operand
Bit
Word
Double word
Indirect
specifica
tion
Constant
Others
X, Y, M, L, SM,
F, B, SB, FX,
FY
J
\
T, ST, C, D,
W, SD, SW,
FD, R, ZR,
RD
U
\G
,
J
\
,
U3E
\(H)G
Z
LT, LST,
LC
LZ
K,
H
E
$
(s1)
(d)
(s2)
(s1)
(d)
(s2)
EN
ENO
d
s1
s2
Summary of Contents for Melsensor CF26-LR
Page 2: ......
Page 11: ...1 OVERVIEW 1 1 Overview of DataMan Setup Tool for MELSENSOR 9 1 MEMO ...
Page 13: ...2 SetupTool INSTALLATION 2 1 Installation 11 2 MEMO ...
Page 15: ...3 CODE READER SETUP FLOW CHART 3 1 Setup Flow Chart 13 3 MEMO ...
Page 17: ...4 CONFIGURATIONS 4 1 Configuration and Wiring of CF26 CF37 Series 15 4 MEMO ...
Page 92: ...90 APPX Appendix 5 Supplemental Remarks for Tuning 2 MEMO ...
Page 111: ......