7 APPLICATION INSTRUCTIONS
7.8 String Processing Instructions
693
7
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
■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 Range Data type Data type (label)
(s1) Character string or the start device containing the
character string
String ANYSTRING_SINGLE
(d) Start device for storing the character string data of the
operation result
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
specification
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)
RnCPU
RnENCPU
RnSFCPU RnSFCPURnPCPURnPCPU
(Standard) (Safety)
(Redundant)
(Process)