EasyManuals Logo

Allen-Bradley 1769-L32E CompactLogix 5332E User Manual

Allen-Bradley 1769-L32E CompactLogix 5332E
90 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 #54 background imageLoading...
Page #54 background image
52 Rockwell Automation Publication 1756-PM004D-EN-P - September 2012
Chapter 2 Organizing Tags
The following example loads a series of preset values into a timer, one value (array
element) at a time.
Expressions
You can also use an expression to specify the subscript of an array.
· An expression uses operators, such as + or -, to calculate a value.
· The controller computes the result of the expression and uses it as the array
subscript.
EXAMPLE
Step through an array.
The timer_presets array stores a series of preset values for the timer in the next rung. The north_tank.step tag points to which element of the array to use. For
example, when north_tank.step equals 0, the instruction loads timer_presets[0] into the timer (60,000 ms).
When north_tank.step_time is done, the rung increments north_tank.step to the next number and that element of the timer_presets array loads into the
timer.
When north_tank.step exceeds the size of the array, the rung resets the tag to start at the first element in the array. (The array contains elements 0…3.)
42358
Move
Source timer_presets[north_tank.step]
60000
Dest north_tank.step_time.PRE
60000
MOV
/
north_tank.step_time.DN
EN
DN
Timer On Delay
Timer north_tank.step_time
Preset 60000
Accum 0
TON
north_tank.step_time.DN
Add
Source A 1
Source B north_tank.step
0
Dest north_tank.step
0
ADD
Equal
Source A north_tank.step
0
Source B 4
EQU
Move
Source 0
Dest north_tank.step
0
MOV

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Allen-Bradley 1769-L32E CompactLogix 5332E and is the answer not in the manual?

Allen-Bradley 1769-L32E CompactLogix 5332E Specifications

General IconGeneral
BrandAllen-Bradley
Model1769-L32E CompactLogix 5332E
CategoryController
LanguageEnglish

Related product manuals