2 - processing ascii characters, Introduction, Extract a part of a bar code – Rockwell Automation Logix5000 Controllers ASCII Strings Programming Manual User Manual

Page 19: Chapter 2, Processing ascii characters, Introduction extract a part of a bar code

Advertising
background image

Chapter 2

Processing ASCII characters

You can process ASCII characters to do many things, including:

Interpret a bar code and take action based on the bar code.

Use a weight from a weigh scale when the weight is sent as ASCII

characters.

Decode a message from an ASCII triggered device, such as an operator

terminal.

Build a string for an ASCII triggered device using variables from your

application.

For example, a bar code may contain information about a bag on a conveyor at an

airport. To check the flight number and destination of the bag, you extract

characters 10 - 18.

Airline

Origin

Flight #

Destination

Date

Bar code

N

W

A

H

O

P

5

0

5

8

A

M

S

0

2

2

2

0

1

Character number

1

2

3

4

5

6

7

8

9

10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

5

0

5

8

A

M

S

9 characters

Example:

In the baggage handling conveyor of an airport, each bag gets a bar code. Characters 10 - 18 of the
bar code are the flight number and destination airport of the bag. After the bar code is read
(bag_read.EM is on) the MID instruction copies the flight number and destination airport to the
bag_flt_and_dest tag.

Introduction

Extract a part of a Bar Code

Rockwell Automation Publication 1756-PM013D-EN-P - October 2014

19

Advertising