On A Programmable Controller Side - Mitsubishi Electric Melsensor CF37-SR Settings Manual

Table of Contents

Advertisement

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.
Ladder
(s1)
FBD/LD
EN
ENO
s1
d
s2
■ Execution condition
Instruction
MIDR
MIDRP
Setting data
■ Description, range, data type
Operand
Description
(s1)
Character string or the start device containing the character
string
(d)
Start device for storing the character string data of the operation
result
(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
EN
Execution condition
ENO
Execution result
■ Applicable devices
Operand
Bit
X, Y, M, L, SM,
F, B, SB, FX,
FY
(s1)
(d)
(s2)
APPX
104
Appendix 11 Outputting any characters from a decoded character string
(d)
(s2)
Word
J\
T, ST, C, D,
W, SD, SW,
FD, R, ZR,
RD
ST
ENO:=MIDR(EN,s1,s2,d);
ENO:=MIDRP(EN,s1,s2,d);
Execution condition
Rang
Data type
e
Character string
Character string
16-bit signed binary
Bit
Bit
Double word
U\G,
Z
LT, LST,
J\,
LC
U3E\(H)G
Data type (label)
ANYSTRING_SINGLE
ANYSTRING_SINGLE
ANY16_ARRAY
(Number of elements: 2)
BOOL
BOOL
Indirect
Constant
specifica
LZ
K,
E
tion
H
Others
$

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsensor cf37-lrMelsensor cf26-srMelsensor cf26-lr

Table of Contents