String Data Types - Allen-Bradley Logix5000 Reference Manual

1756 controllogix, 1768 compactlogix, 1769 compactlogix, 1789 softlogix, 1794 flexlogix, powerflex 700s with drivelogix
Hide thumbs Also See for Logix5000:
Table of Contents

Advertisement

Chapter 19
ASCII Conversion Instructions (STOD, STOR, DTOS, RTOS, UPPER, LOWER)
If you want to
Add characters to the end of a string
Delete characters from a string
Determine the starting character of a sub-string
Insert characters into a string
Extract characters from a string
Rearrange the bytes of a INT, DINT, or REAL tag
Compare a string to another string
See if the characters are equal to specific characters
See if the characters are not equal to specific characters
See if the characters are equal to or greater than specific characters
See if the characters are greater than specific characters
See if the characters are equal to or less than specific characters
See if the characters are less than specific characters
Find a string in an array of strings
Name
Data Type
LEN
DINT
DATA
SINT array
622
You can also use the following instructions to compare or manipulate
ASCII characters.

String Data Types

You store ASCII characters in tags that use a string data type.
· You can use the default STRING data type. It stores up to 82 characters.
· You can create a new string data type that stores less or more characters.
To create a new string data type, see the Logix5000 Controllers Common
Procedures Programming Manual, publication 1756-PM001.
Each string data type contains the following members.
Description
Notes
Number of characters in
The LEN automatically updates to the new count of characters whenever you do the
the string
following:
·Use the String Browser dialog box to enter characters.
·Use instructions that read, convert, or manipulate a string.
The LEN shows the length of the current string. The DATA member may contain additional,
old characters, which are not included in the LEN count.
ASCII characters of the
·To access the characters of the string, address the name of the tag.
string
For example, to access the characters of the string_1 tag, enter string_1.
·Each element of the DATA array contains one character.
·You can create new string data types that store less or more characters.
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Use this instruction
Page
CONCAT
610
DELETE
612
FIND
614
INSERT
616
MID
618
SWPB
311
CMP
221
EQU
226
NEQ
257
GEQ
230
GRT
234
LEQ
238
LES
242
FSC
361

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents