EasyManuals Logo
Home>Allen-Bradley>Controller>Logix5000

Allen-Bradley Logix5000 Reference Manual

Allen-Bradley Logix5000
708 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
Page #618 background imageLoading...
Page #618 background image
618 Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Chapter 18 ASCII String Instructions (CONCAT, DELETE, FIND, INSERT, MID)
Middle String (MID)
The MID instruction copies a specified number of ASCII characters from a string and
stores them in another string.
Operands:
Relay Ladder
Structured Text
The operands are the same as those for the relay ladder MID instruction.
Description: The MID instruction copies a group of characters from the Source and places the result in
the Destination.
·The Start position and Quantity define the characters to copy.
·Unless the Source and Destination are the same tag, the Source remains
unchanged.
Arithmetic Status Flags: Not affected
Fault Conditions:
Middle String
Source ?
??
Qty ?
??
Start ?
??
Dest ?
??
MID
Operand Type Format Enter Notes
Source String Tag String to copy characters from String data types are:
·Default STRING data type
·Any new string data type that you create
Quantity SINT
INT
DINT
Immediate
Tag
Number of characters to copy The Start plus the Quantity must be less than or
equal to the DATA size of the Source.
Start SINT
INT
DINT
Immediate
Tag
Position of the first character
to copy
Enter a number between 1 and the DATA size of the
Source.
Destination String Tag String to copy the characters
to
MID(Source,Qty,Start,
Dest);
Type Code Cause Recovery Method
4 51 The LEN value of the string tag is greater
than the DATA size of the string tag.
1. Check that no instruction is writing to the LEN member of the string tag.
2. In the LEN value, enter the number of characters that the string contains.
4 56 The Start or Quantity value is invalid. 1. Check that the Start value is between 1 and the DATA size of the Source.
2. Check that the Start value plus the Quantity value is less than or equal to the
DATA size of the Source.

Table of Contents

Other manuals for Allen-Bradley Logix5000

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Allen-Bradley Logix5000 and is the answer not in the manual?

Allen-Bradley Logix5000 Specifications

General IconGeneral
BrandAllen-Bradley
ModelLogix5000
CategoryController
LanguageEnglish

Related product manuals