Rockwell Automation Logix 5000 Instruction Manual

Programming Manual

Logix 5000 Controllers ASCII Strings

Original Instructions
Logix 5000 Controllers ASCII Strings
personal injury or death, property damage, or economic loss.
Attentions help you identify a hazard, avoid a hazard, and recognize the consequence.
IMPORTANT
SHOCK HAZARD: Labels may be on or inside the equipment, for example, a drive or motor, to alert people that dangerous voltage may be present.
temperatures.
for Personal Protective Equipment (PPE).

Important User Information

Read this document and the documents listed in the additional resources section about installation, configuration, and operation of this equipment before you install, configure, operate, or maintain this product. Users are required to familiarize themselves with installation and wiring instructions in addition to requirements of all applicable codes, laws, and standards.
Activities including installation, adjustments, putting into service, use, assembly, disassembly, and maintenance are required to be carried out by suitably trained personnel in accordance with applicable code of practice.
If this equipment is used in a manner not specified by the manufacturer, the protection provided by the equipment may be impaired.
In no event will Rockwell Automation, Inc. be responsible or liable for indirect or consequential damages resulting from the use or application of this equipment.
The examples and diagrams in this manual are included solely for illustrative purposes. Because of the many variables and requirements associated with any particular installation, Rockwell Automation, Inc. cannot assume responsibility or liability for actual use based on the examples and diagrams.
No patent liability is assumed by Rockwell Automation, Inc. with respect to use of information, circuits, equipment, or software described in this manual.
Reproduction of the contents of this manual, in whole or in part, without written permission of Rockwell Automation, Inc., is prohibited.
Throughout this manual, when necessary, we use notes to make you aware of safety considerations.
WARNING: Identifies information about practices or circumstances that can cause an explosion in a hazardous environment, which may lead to
ATTENTION: Identifies information about practices or circumstances that can lead to personal injury or death, property damage, or economic loss.
Identifies information that is critical for successful application and understanding of the product.
Labels may also be on or inside the equipment to provide specific precautions.
BURN HAZARD: Labels may be on or inside the equipment, for example, a drive or motor, to alert people that surfaces may reach dangerous
ARC FLASH HAZARD:
will cause severe injury or death. Wear proper Personal Protective Equipment (PPE). Follow ALL Regulatory requirements for safe work practices and
Labels may be on or inside the equipment, for example, a motor control center, to alert people to potential Arc Flash. Arc Flash
2 Rockwell Automation Publication 1756-PM013G-EN-P - September 2020

Summary of Changes

Change
Topic
Updated branding.
Throughout
This manual includes new and updated information. Use these reference tables to locate changed information.
Grammatical and editorial style changes are not included in this summary.
Global changes
This table identifies changes that apply to all information about a subject in the manual and the reason for the change. For example, the addition of new supported hardware, a software design change, or additional reference material would result in changes to all of the topics that deal with that subject.
This table identifies changes that apply to all information about a subject in the manual and the reason for the change. For example, the addition of new supported hardware, a software design change, or additional reference material would result in changes to all of the topics that deal with that subject.
Updated Legal notices.
New or enhanced features
None in this release.
Legal Notices on page 8
Rockwell Automation Publication 1756-PM013G-EN-P - September 2020 3
Summary of Changes
Communicating with an ASCII device
Processing ASCII characters
ASCII character codes
Index

Table of Contents

Preface
Studio 5000 environment .......................................................................... 7
Additional resources ................................................................................... 7
Legal Notices ............................................................................................... 8
Chapter 1
Introduction ................................................................................................ 9
Connect the ASCII device ........................................................................... 9
Configure the Serial Port ..........................................................................10
Configure the User Protocol ...................................................................... 12
Create string data types ............................................................................. 13
Read characters from the device ............................................................... 14
Send characters to the device .................................................................... 15
Enter ASCII characters .............................................................................. 16
Chapter 2
Introduction ............................................................................................... 19
Extract a part of a Bar Code ...................................................................... 19
Look up a Bar Code ..................................................................................... 19
Create the PRODUCT_INFO Data Type ............................................ 20
Search for the characters ..................................................................... 21
Identify the Lane Number ................................................................... 21
Reject bad characters .......................................................................... 22
Enter the Product IDs and Lane Numbers ........................................ 22
Check the Bar Code characters ................................................................. 22
Convert a value ...........................................................................................23
Decode an ASCII message ........................................................................ 24
Build a string ............................................................................................. 25
Rockwell Automation Publication 1756-PM013G-EN-P - September 2020 5
Appendix A
ASCII character codes .............................................................................. 27
Resource
Description
at http://ab.rockwellautomation.com
and other certification details.

Studio 5000 environment

Additional resources

Preface

This manual shows how to manipulate ASCII strings in Logix 5000 controllers. This manual is one of a set of related manuals that show common procedures for programming and operating Logix 5000 controllers.
For a complete list of common procedures manuals, refer to the
Logix 5000 Controllers Common Procedures Programming Manual, publication 1756- PM001.
The term Logix 5000 controller refers to any controller based on the Logix 5000 operating system.
The Studio 5000 Automation Engineering & Design Environment® combines
engineering and design elements into a common environment. The first element is the Studio 5000 Logix Designer® application. The Logix Designer application is the rebranding of RSLogix 5000® software and will continue to be the product to program Logix 5000™ controllers for discrete, process, batch, motion, safety, and drive-based solutions.
Rockwell Automation Publication 1756-PM013G-EN-P - September 2020 7
The Studio 5000® environment is the foundation for the future of Rockwell Automation® engineering design tools and capabilities. The Studio 5000 environment is the one place for design engineers to develop all elements of their control system.
These documents contain additional information concerning related
Rockwell Automation products.
Industrial Automation Wiring and Grounding Guidelines, publication 1770-4.1
Product Certifications webpage, available
Provides general guidelines for installing a Rockwell Automation industrial system.
Provides declarations of conformity, certificates,
View or download publications at http://www.rockwellautomation.com/literature
. To order paper copies of technical documentation, contact the local Rockwell Automation distributor or sales representative.
Preface

Legal Notices

Rockwell Automation publishes legal notices, such as privacy policies, license agreements, trademark disclosures, and other terms and conditions on
the Legal Notices
page of the Rockwell Automation website.
End User License Agreement (EULA)
You can view the Rockwell Automation End-User License Agreement ("EULA") by opening the License.rtf file located in your product's install folder on your hard drive.
Open Source Licenses
The software included in this product contains copyrighted software that is licensed under one or more open source licenses. Copies of those licenses are included with the software. Corresponding Source code for open source packages included in this product are located at their respective web site(s).
Alternately, obtain complete Corresponding Source code by contacting Rockwell Automation via the Contact form on the Rockwell Automation website:
us/contact/contact.page
Please include "Open Source" as part of the request text.
http://www.rockwellautomation.com/global/about-
A full list of all open source software used in this product and their corresponding licenses can be found in the OPENSOURCE folder. The default installed location of these licenses is
Files\Rockwell\Help\FactoryTalk Services Platform\Release
Notes\OPENSOURCE\index.htm
C:\Program Files (x86)\Common
.
8 Rockwell Automation Publication 1756-PM013G-EN-P - September 2020

Introduction

Connect the ASCII device

Chapter 1
Communicating with an ASCII device
You can exchange ASCII data with a device through the serial port of the controller. For example, you can use the serial port to:
Read ASCII characters from a weigh scale module or bar code reader.
Send and receive messages from an ASCII triggered device, such as a
MessageView terminal.
Firmware revision 3.1 and later of the 1756-EWEB EtherNet/IP Web Server module supports the controller serial port and a socket interface that lets Logix 5000 controllers exchange ASCII data using TCP or UDP socket services.
To connect to the ASCII device, use these steps.
1. On the serial port of the ASCII device, determine which pins send signals and which pins receive signals.
2. Connect sending pins to corresponding receiving pins and attach jumpers.
Rockwell Automation Publication 1756-PM013G-EN-P - September 2020 9
Loading...
+ 21 hidden pages