Relay Ladder; Structured Text - 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

Execution:
Condition
Prescan
Rung-condition-in is false
Rung-condition-in is true
EnableIn is set
Instruction execution
Postscan
bag_read.EM
Relay Ladder Action
The rung-condition-out is set to false.
The rung-condition-out is set to false.
The instruction executes.
The rung-condition-out is set to true.
N/A
The instruction copies the specified characters from a string and stores them in another string.
The rung-condition-out is set to false.
Example:
In a baggage handling conveyor of an airport, each bag gets a bar code. Characters 9...17
of the bar code are the flight number and destination airport of the bag. After the bar
code is read (bag_read.EM is set) the MID instruction copies the flight number and
destination airport to the bag_flt_and_dest string.

Relay Ladder

Structured Text

IF bag_read.EM THEN
MID(bar_barcode,9,9,bag_flt_and_dest);
bag_read.EM := 0;
END_IF;
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
ASCII String Instructions (CONCAT, DELETE, FIND, INSERT, MID)
Structured Text Action
No action taken.
N/A
N/A
EnableIn is always set.
The instruction executes.
No action taken.
MID
Middle String
Source
bag_barcode
'NWA HOP 5058 AMS 01'
Qty
9
Start
9
Dest
bag_flt_and_dest
'5058 AMS '
Chapter 18
619

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents