SlideShare una empresa de Scribd logo
1 de 32
EMEC245
Industrial Control Systems II
Advanced PLC’s and PAC’s
Arrays
ControlLogix
3
 The ControlLogix processors can store
data in arrays.
 Arrays – An array is a tag that holds multiple
values of the same data type.
 Your textbook defines an array as: “a data
structure that allocates a contiguous block of
memory to store a specific data type as a table
of values.
ControlLogix Arrays
4
 Arrays are specified as having dimensions.
They can be:
 1-dimensional
 2-dimensional
 3-dimensional
ControlLogix Arrays
ControlLogix Arrays
ControlLogix Arrays
Tag Name Data Type
Dimension
0
Dimension
1
Dimension
2
Total # of
Elements
one_d_array DINT[7] 7 0 0 7
two_d_array DINT[4,5] 4 5 0 20
three_d_array DINT[2,3,4] 2 3 4 24
Creating an Array
Enter a tag name
Click this button
to open the
Select Data Type
Dialog box
Creating and Array
Select the data
type, then
enter the
number of
elements for
each
dimension.
Use Dim0 for a
1-dimensional
array, Dim0
and Dim1 for a
2-dimensional
array and
Dim0, Dim1
and Dim2 for a
3-dimensional
array.
Creating an Array
This Select Data
Type dialog box
shows a DINT
data type
configured as a
3-dimensional
array. Note how
the array
elements are
designated in
the Data Types:
box.
ControlLogix Arrays
   
 
396,2
396,25
5
5




esultRMOVAfter
Array
ArrayterPoinArray
terPoin
11
 The ladder shown will collect temperature
readings from tempReading
<Local:10:I.Ch0Data>, every 30-seconds and
store them in an array.
Array Example
SLC500 – Indexed and Indirect Addressing
SLC500 Information (Optional)
Indirect and Indexed Addresses (SLC500 and
LogixPro)
Includes arrays (ControlLogix)
Chapter 09
14
Valid Addressing Modes
 There are four basic modes or types of
addressing in the SLC500 series PLC’s
 Direct
 Indexed direct
 Indirect
 Indexed indirect
15
Direct Addressing
 Data is stored in the specified address.
 This mode is what we have been using for
all of our work in the course.
 Examples:
 N7:3
 T4:9.PRE
 R6:3.POS
 F8:7
 B3:6/2
 C5:8.ACC
Memory Address Data Value
N7:0 52
N7:1 128
N7:2 346
N7:3 510
N7:4 14
16
Indirect Addressing
 The address in the instruction serves as a
reference point and does not point directly
to the data location. In other words: the
instructions memory address contains the
address of a memory location.
Memory
Address
Data
Values
2210 52
2211 128
2212 345
2213 510
2214 343
Memory
Address
Data
Values
343 54
344 71
345 633
346 85
347 500
Address = 2212 Data = 633
17
Indirect Addressing
 An address can be specified as indirect by
replacing the file number, element number
or sub-element number with another word
address.
 The indirect address is always enclosed in
square brackets [ ].
 N7:[N7:0] is an example of an indirect
address.
 The word level address in the square brackets
is queried for a value. The queried value then
becomes the file, element or sub-element
portion of the indirect address.
18
Indirect Address
Examples
 N7:[N7:0]
 If a value of 43 is stored in N7:0, the indirect
address N7:[N7:0] is indirectly referencing
N7:43
 B3:[T4:0.ACC]
 If the value of 12 is stored in the accumulator
of T4:0, the indirect address B3:[T4:0.ACC] is
indirectly referencing B3:12
 F[N7:3]:[N26:12]
 If a value of 18 is stored in N7:3 and a value
of 4 is stored in N26:12, the indirect address
F[N7:3]:[N26:12] is indirectly referencing
F18:4
19
 Guidelines for specifying indirect
addresses:
 The
 file number
 word number (element + sub-element)
 bit number
can be addressed indirectly
 The substitute address must be a word-
level address.
 Enter the substitute address in square
brackets [ ].
Indirect Addressing
20
 The table shows some additional examples
of indirect addressing:
Indirect Addressing
Valid Address Variable Explanation
N7:[C5:7.ACC] Word number The word number of N7 is
being specified by the value
stored in the accumulator of
C5:7
B3:0/[R6:4.POS] Bit number The bit number of B3:0 is
being specified by the value
stored in the position word of
R6:4
N[N7:0]:[N22:1] File and word
number
The file number is stored in
N7:0 and the word number is
stored in N22:1
I:[N10:0].1/1 Slot number The slot number is stored in
N10:0
21
Indirect Addressing
When using indirect addressing, the data file
(memory location) being referenced must
exist. Data files (memory) is not
dynamically created or expanded. In other
words, the memory is not dynamically
allocated to fit the size of the data.
IMPORTANT
22
Indirect Addressing
 Indirect addressing allows for the
 creation of less complex ladder logic
 preservation of memory
 use of an array like structure
 Indirect addressing can be used for
applications such as cycling through a
recipe file in a multiple batch operation.
23
 Example application of Indirect
Addressing:
 Data collection is an application for indirect
addressing such as, keeping a record of
temperature at prescribed times and over a
given period of time.
 Using recipes in systems that require different
parameters depending upon the product being
produced.
Discuss the LogixPro Batch Process Recipe
Example
Indirect Example
24
 An indexed address is an addressing mode
for referencing a memory location that is
the original memory address plus a value
that is stored in an index register.
 The content of the index register is added
to the original address to obtain the final
memory location (offset).
 Indexed addressing is useful for accessing
elements of an array of data. The base
address stays the same, but the value of
the index register is incremented or
decremented.
Indexed Addressing
25
 The table shows an example of an indexed
address:
Indexed Addressing
Memory
Address
Data
Value
N7:33 52
N7:34 578
N7:35 79
N7:36 427
N7:37 56
N7:38 4
N7:39 131
Base address = N7:22
Index or Offset = 15
Data = 56
N7:22 → (Word 22 + 15) = N7:37
26
 An address is specified as being “indexed”
by placing the “#” character in front of the
address.
 When the program encounters an address
of this form, the processor takes the
element (word) number of the address
and adds to it the value stored in the
index register.
 The index register is in the
SLC500/LogixPro Processor Status file at:
S:24
Indexed Addressing
27
 The actual address is the Base address
plus the value stored in the index register.
 Example:
 #N7:10
 Here, the element (word) number of the direct
address (the base address) is 10.
 If S:24 has a value of 25 stored in it, the value of 25
is added to the base address element number; in this
case 10.
 The address that #N7:10 with S:24 = 25 is
referencing is N7:35.
 N7:10 + S:24 or N7:10 + 25 = N7:35
Indexed Addressing
28
 When the processor resolves an Indexed
Indirect address it first resolves the
indirect portion of the address and then
adds the offset from the index register
S:24 to create the final address.
 What makes the addressing mode
powerful is that S:24 is a dynamic
address. It can be read and written to on-
the-fly.
Indexed Indirect
Addressing
29
 An address can be specified as a
combination of indirect and indexed
addressing.
 Example:
 #N7:[N10:3]
 If a value of 20 is stored in N10:3 and a value of 10
is stored in S:24, then the indexed indirect address
#N7:[N10:3] is referencing N7:30
 That is, N7:[N10:3] is indirectly referencing N7:20
and #N7:[N10:3] is indexed by 10 producing
N7:20 + 10 = N7:30
Indexed Indirect
Addressing
LogixPro does not support this mode of addressing
30
 Guidelines for specifying indexed
addresses:
 The offset value stored in S:24 can be positive
or negative.
 The offset value should not cause the base
address to cross a file boundary.
 If an instruction uses more than one indexed
address, the processor uses the same index
value on each of the indexed addresses.
 The value of the index register should be set
immediately before enabling the instruction
that uses an indexed address.
Indexed Indirect
Addressing
31
 Guidelines for specifying indexed
addresses:
 Indexed addressing does not work with
Timers, Counters or the Control File.
 Indexed addressing is invalid for any file type
that uses multiple words.
 Some instructions modify the value of the
index register so that they can function
properly. The Sequencer and the Bit Shift
instructions are examples of instructions that
use and modify the value of S:24.
Indexed Indirect
Addressing
Monitoring Indexed
Addresses
 The value of the
indexed address
will not display
when it is being
monitored.
 The code snippet
shown assumes
that:
 S:24 = 5
 N7:3 = 123
 N7:8 = 456
When the MOV instruction is executed
the indexed address #N7:3 is evaluated
to N7:8 and the value of the indexed
address will be stored and displayed in
the direct address of N10:3. Also note in
the ADD instruction that the value stored
in the indexed address is added to the
zero of C5:0.ACC.

Más contenido relacionado

La actualidad más candente

Lec 02 data representation part 2
Lec 02 data representation part 2Lec 02 data representation part 2
Lec 02 data representation part 2Abdul Khan
 
Chap ii.BCD code,Gray code
Chap ii.BCD code,Gray codeChap ii.BCD code,Gray code
Chap ii.BCD code,Gray codeBala Ganesh
 
Data representation
Data representationData representation
Data representationMysore
 
Chapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSIChapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSIEr. Nawaraj Bhandari
 
Data representation
 Data representation Data representation
Data representationAshraf Miraz
 
Understand data representation on CPU 1
Understand data representation on CPU 1Understand data representation on CPU 1
Understand data representation on CPU 1Brenda Debra
 
DLD Presentation By Team Reboot,Rafin Rayan,EUB
DLD Presentation By Team Reboot,Rafin Rayan,EUBDLD Presentation By Team Reboot,Rafin Rayan,EUB
DLD Presentation By Team Reboot,Rafin Rayan,EUBRafin Rayan
 
data representation
 data representation data representation
data representationHaroon_007
 
Digital Comprator
Digital CompratorDigital Comprator
Digital Compratorsuraj829
 
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...Arti Parab Academics
 
Synthesized report on the comparison of lut and splitting method for decrypti...
Synthesized report on the comparison of lut and splitting method for decrypti...Synthesized report on the comparison of lut and splitting method for decrypti...
Synthesized report on the comparison of lut and splitting method for decrypti...eSAT Journals
 
Chapter 01 Basic Principles of Digital Systems
Chapter 01 Basic Principles of Digital SystemsChapter 01 Basic Principles of Digital Systems
Chapter 01 Basic Principles of Digital SystemsSSE_AndyLi
 
NETWORK LAYER - Logical Addressing
NETWORK LAYER - Logical AddressingNETWORK LAYER - Logical Addressing
NETWORK LAYER - Logical AddressingPankaj Debbarma
 

La actualidad más candente (20)

DIGITAL DESIGN
DIGITAL DESIGNDIGITAL DESIGN
DIGITAL DESIGN
 
Lec 02 data representation part 2
Lec 02 data representation part 2Lec 02 data representation part 2
Lec 02 data representation part 2
 
Csc 2313 (lecture 3)
Csc 2313 (lecture 3)Csc 2313 (lecture 3)
Csc 2313 (lecture 3)
 
Chap ii.BCD code,Gray code
Chap ii.BCD code,Gray codeChap ii.BCD code,Gray code
Chap ii.BCD code,Gray code
 
Data representation
Data representationData representation
Data representation
 
Chapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSIChapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSI
 
Data representation
 Data representation Data representation
Data representation
 
Data Representation
Data RepresentationData Representation
Data Representation
 
Binary codes
Binary codesBinary codes
Binary codes
 
What is Gray Code?
What is Gray Code? What is Gray Code?
What is Gray Code?
 
Understand data representation on CPU 1
Understand data representation on CPU 1Understand data representation on CPU 1
Understand data representation on CPU 1
 
DLD Presentation By Team Reboot,Rafin Rayan,EUB
DLD Presentation By Team Reboot,Rafin Rayan,EUBDLD Presentation By Team Reboot,Rafin Rayan,EUB
DLD Presentation By Team Reboot,Rafin Rayan,EUB
 
data representation
 data representation data representation
data representation
 
Number system
Number systemNumber system
Number system
 
Digital Comprator
Digital CompratorDigital Comprator
Digital Comprator
 
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
 
Synthesized report on the comparison of lut and splitting method for decrypti...
Synthesized report on the comparison of lut and splitting method for decrypti...Synthesized report on the comparison of lut and splitting method for decrypti...
Synthesized report on the comparison of lut and splitting method for decrypti...
 
Chapter 01 Basic Principles of Digital Systems
Chapter 01 Basic Principles of Digital SystemsChapter 01 Basic Principles of Digital Systems
Chapter 01 Basic Principles of Digital Systems
 
DEL-244Chep i
DEL-244Chep iDEL-244Chep i
DEL-244Chep i
 
NETWORK LAYER - Logical Addressing
NETWORK LAYER - Logical AddressingNETWORK LAYER - Logical Addressing
NETWORK LAYER - Logical Addressing
 

Similar a 01 control logix_arrays_sp17

Cmps290 classnoteschap02
Cmps290 classnoteschap02Cmps290 classnoteschap02
Cmps290 classnoteschap02HussnainSarmad
 
Memory Reference Instructions
Memory Reference InstructionsMemory Reference Instructions
Memory Reference InstructionsRabin BK
 
Assignment on different types of addressing modes
Assignment on different types of addressing modesAssignment on different types of addressing modes
Assignment on different types of addressing modesNusratJahan263
 
Ch12- instruction sets- char & funct.pdf
Ch12- instruction sets- char & funct.pdfCh12- instruction sets- char & funct.pdf
Ch12- instruction sets- char & funct.pdfsaimawarsi
 
Addressing modes presentation
Addressing modes presentationAddressing modes presentation
Addressing modes presentationUmeshBhattarai4
 
Instruction Set Architecture: MIPS
Instruction Set Architecture: MIPSInstruction Set Architecture: MIPS
Instruction Set Architecture: MIPSPrasenjit Dey
 
Data representation computer architecture
Data representation  computer architectureData representation  computer architecture
Data representation computer architecturestudy cse
 
Variables in Visual Basic Programming
Variables in Visual Basic ProgrammingVariables in Visual Basic Programming
Variables in Visual Basic ProgrammingKasun Ranga Wijeweera
 
Design of QSD Number System Addition using Delayed Addition Technique
Design of QSD Number System Addition using Delayed Addition TechniqueDesign of QSD Number System Addition using Delayed Addition Technique
Design of QSD Number System Addition using Delayed Addition TechniqueKumar Goud
 
Design of QSD Number System Addition using Delayed Addition Technique
Design of QSD Number System Addition using Delayed Addition TechniqueDesign of QSD Number System Addition using Delayed Addition Technique
Design of QSD Number System Addition using Delayed Addition TechniqueKumar Goud
 
An overview of siemens plc address mapping
An overview of siemens plc address mappingAn overview of siemens plc address mapping
An overview of siemens plc address mappingJustEngineering
 
C programming session 05
C programming session 05C programming session 05
C programming session 05Vivek Singh
 
Chapter 02 instructions language of the computer
Chapter 02   instructions language of the computerChapter 02   instructions language of the computer
Chapter 02 instructions language of the computerBảo Hoang
 
A comprehensive framework for secure query processing on relational data in t...
A comprehensive framework for secure query processing on relational data in t...A comprehensive framework for secure query processing on relational data in t...
A comprehensive framework for secure query processing on relational data in t...Totan Banik
 

Similar a 01 control logix_arrays_sp17 (20)

Cmps290 classnoteschap02
Cmps290 classnoteschap02Cmps290 classnoteschap02
Cmps290 classnoteschap02
 
Memory Reference Instructions
Memory Reference InstructionsMemory Reference Instructions
Memory Reference Instructions
 
Assignment on different types of addressing modes
Assignment on different types of addressing modesAssignment on different types of addressing modes
Assignment on different types of addressing modes
 
Ch12- instruction sets- char & funct.pdf
Ch12- instruction sets- char & funct.pdfCh12- instruction sets- char & funct.pdf
Ch12- instruction sets- char & funct.pdf
 
digital-180612132737.pdf
digital-180612132737.pdfdigital-180612132737.pdf
digital-180612132737.pdf
 
Addressing modes presentation
Addressing modes presentationAddressing modes presentation
Addressing modes presentation
 
Instruction Set Architecture: MIPS
Instruction Set Architecture: MIPSInstruction Set Architecture: MIPS
Instruction Set Architecture: MIPS
 
Data representation computer architecture
Data representation  computer architectureData representation  computer architecture
Data representation computer architecture
 
Variables in Visual Basic Programming
Variables in Visual Basic ProgrammingVariables in Visual Basic Programming
Variables in Visual Basic Programming
 
Design of QSD Number System Addition using Delayed Addition Technique
Design of QSD Number System Addition using Delayed Addition TechniqueDesign of QSD Number System Addition using Delayed Addition Technique
Design of QSD Number System Addition using Delayed Addition Technique
 
Design of QSD Number System Addition using Delayed Addition Technique
Design of QSD Number System Addition using Delayed Addition TechniqueDesign of QSD Number System Addition using Delayed Addition Technique
Design of QSD Number System Addition using Delayed Addition Technique
 
Chapter1-bag2-mikroprocessor
Chapter1-bag2-mikroprocessorChapter1-bag2-mikroprocessor
Chapter1-bag2-mikroprocessor
 
An overview of siemens plc address mapping
An overview of siemens plc address mappingAn overview of siemens plc address mapping
An overview of siemens plc address mapping
 
Chapter7.2-mikroprocessor
Chapter7.2-mikroprocessorChapter7.2-mikroprocessor
Chapter7.2-mikroprocessor
 
Data structures using c
Data structures using cData structures using c
Data structures using c
 
C programming session 05
C programming session 05C programming session 05
C programming session 05
 
Chapter 02 instructions language of the computer
Chapter 02   instructions language of the computerChapter 02   instructions language of the computer
Chapter 02 instructions language of the computer
 
Data structures using C
Data structures using CData structures using C
Data structures using C
 
Csc 2313 (lecture 3)
Csc 2313 (lecture 3)Csc 2313 (lecture 3)
Csc 2313 (lecture 3)
 
A comprehensive framework for secure query processing on relational data in t...
A comprehensive framework for secure query processing on relational data in t...A comprehensive framework for secure query processing on relational data in t...
A comprehensive framework for secure query processing on relational data in t...
 

Más de John Todora

04 scaling analog_datal_sp17
04 scaling analog_datal_sp1704 scaling analog_datal_sp17
04 scaling analog_datal_sp17John Todora
 
03 analog control_sp17
03 analog control_sp1703 analog control_sp17
03 analog control_sp17John Todora
 
Comparison instructions, AB, Siemens and AB CCW
Comparison instructions, AB, Siemens and AB CCWComparison instructions, AB, Siemens and AB CCW
Comparison instructions, AB, Siemens and AB CCWJohn Todora
 
Subroutines rev01 fa16
Subroutines rev01 fa16Subroutines rev01 fa16
Subroutines rev01 fa16John Todora
 
Move mask moves_rev01_fa16
Move mask moves_rev01_fa16Move mask moves_rev01_fa16
Move mask moves_rev01_fa16John Todora
 
Math cl ccw_siemens_rev01_fa16
Math cl ccw_siemens_rev01_fa16Math cl ccw_siemens_rev01_fa16
Math cl ccw_siemens_rev01_fa16John Todora
 
ControlLogix Counters FA16
ControlLogix Counters FA16ControlLogix Counters FA16
ControlLogix Counters FA16John Todora
 
ControlLogix Timers FA16
ControlLogix Timers FA16ControlLogix Timers FA16
ControlLogix Timers FA16John Todora
 
02 chapter02 fa16
02 chapter02 fa1602 chapter02 fa16
02 chapter02 fa16John Todora
 
01 introduction to_plc-pac_rev01_fa16
01 introduction to_plc-pac_rev01_fa1601 introduction to_plc-pac_rev01_fa16
01 introduction to_plc-pac_rev01_fa16John Todora
 
07 chapter07 loop_diagrams
07 chapter07 loop_diagrams07 chapter07 loop_diagrams
07 chapter07 loop_diagramsJohn Todora
 
06 chapter06 binary_logic_systems_Rev02
06 chapter06 binary_logic_systems_Rev0206 chapter06 binary_logic_systems_Rev02
06 chapter06 binary_logic_systems_Rev02John Todora
 
04 chapter04 specification_forms
04 chapter04 specification_forms04 chapter04 specification_forms
04 chapter04 specification_formsJohn Todora
 
03 chapter03 lists_indexes_databases
03 chapter03 lists_indexes_databases03 chapter03 lists_indexes_databases
03 chapter03 lists_indexes_databasesJohn Todora
 
02 chapter02 p&ids_and_symbols_split_animations
02 chapter02 p&ids_and_symbols_split_animations02 chapter02 p&ids_and_symbols_split_animations
02 chapter02 p&ids_and_symbols_split_animationsJohn Todora
 
01 chapter01 process_flow_diagram
01 chapter01 process_flow_diagram01 chapter01 process_flow_diagram
01 chapter01 process_flow_diagramJohn Todora
 
EMEC130 P&ID Symbol Primer
EMEC130 P&ID Symbol PrimerEMEC130 P&ID Symbol Primer
EMEC130 P&ID Symbol PrimerJohn Todora
 

Más de John Todora (20)

04 scaling analog_datal_sp17
04 scaling analog_datal_sp1704 scaling analog_datal_sp17
04 scaling analog_datal_sp17
 
03 analog control_sp17
03 analog control_sp1703 analog control_sp17
03 analog control_sp17
 
Comparison instructions, AB, Siemens and AB CCW
Comparison instructions, AB, Siemens and AB CCWComparison instructions, AB, Siemens and AB CCW
Comparison instructions, AB, Siemens and AB CCW
 
Lab02 review
Lab02 reviewLab02 review
Lab02 review
 
Subroutines rev01 fa16
Subroutines rev01 fa16Subroutines rev01 fa16
Subroutines rev01 fa16
 
Move mask moves_rev01_fa16
Move mask moves_rev01_fa16Move mask moves_rev01_fa16
Move mask moves_rev01_fa16
 
Math cl ccw_siemens_rev01_fa16
Math cl ccw_siemens_rev01_fa16Math cl ccw_siemens_rev01_fa16
Math cl ccw_siemens_rev01_fa16
 
ControlLogix Counters FA16
ControlLogix Counters FA16ControlLogix Counters FA16
ControlLogix Counters FA16
 
Lab02 lead in
Lab02 lead inLab02 lead in
Lab02 lead in
 
ControlLogix Timers FA16
ControlLogix Timers FA16ControlLogix Timers FA16
ControlLogix Timers FA16
 
02 chapter02 fa16
02 chapter02 fa1602 chapter02 fa16
02 chapter02 fa16
 
01 introduction to_plc-pac_rev01_fa16
01 introduction to_plc-pac_rev01_fa1601 introduction to_plc-pac_rev01_fa16
01 introduction to_plc-pac_rev01_fa16
 
07 chapter07 loop_diagrams
07 chapter07 loop_diagrams07 chapter07 loop_diagrams
07 chapter07 loop_diagrams
 
06 chapter06 binary_logic_systems_Rev02
06 chapter06 binary_logic_systems_Rev0206 chapter06 binary_logic_systems_Rev02
06 chapter06 binary_logic_systems_Rev02
 
04 chapter04 specification_forms
04 chapter04 specification_forms04 chapter04 specification_forms
04 chapter04 specification_forms
 
03 chapter03 lists_indexes_databases
03 chapter03 lists_indexes_databases03 chapter03 lists_indexes_databases
03 chapter03 lists_indexes_databases
 
02 chapter02 p&ids_and_symbols_split_animations
02 chapter02 p&ids_and_symbols_split_animations02 chapter02 p&ids_and_symbols_split_animations
02 chapter02 p&ids_and_symbols_split_animations
 
01 chapter01 process_flow_diagram
01 chapter01 process_flow_diagram01 chapter01 process_flow_diagram
01 chapter01 process_flow_diagram
 
00 introduction
00 introduction00 introduction
00 introduction
 
EMEC130 P&ID Symbol Primer
EMEC130 P&ID Symbol PrimerEMEC130 P&ID Symbol Primer
EMEC130 P&ID Symbol Primer
 

Último

Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinojohnmickonozaleda
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 

Último (20)

FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipino
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 

01 control logix_arrays_sp17

  • 1. EMEC245 Industrial Control Systems II Advanced PLC’s and PAC’s
  • 3. 3  The ControlLogix processors can store data in arrays.  Arrays – An array is a tag that holds multiple values of the same data type.  Your textbook defines an array as: “a data structure that allocates a contiguous block of memory to store a specific data type as a table of values. ControlLogix Arrays
  • 4. 4  Arrays are specified as having dimensions. They can be:  1-dimensional  2-dimensional  3-dimensional ControlLogix Arrays
  • 6. ControlLogix Arrays Tag Name Data Type Dimension 0 Dimension 1 Dimension 2 Total # of Elements one_d_array DINT[7] 7 0 0 7 two_d_array DINT[4,5] 4 5 0 20 three_d_array DINT[2,3,4] 2 3 4 24
  • 7. Creating an Array Enter a tag name Click this button to open the Select Data Type Dialog box
  • 8. Creating and Array Select the data type, then enter the number of elements for each dimension. Use Dim0 for a 1-dimensional array, Dim0 and Dim1 for a 2-dimensional array and Dim0, Dim1 and Dim2 for a 3-dimensional array.
  • 9. Creating an Array This Select Data Type dialog box shows a DINT data type configured as a 3-dimensional array. Note how the array elements are designated in the Data Types: box.
  • 10. ControlLogix Arrays       396,2 396,25 5 5     esultRMOVAfter Array ArrayterPoinArray terPoin
  • 11. 11  The ladder shown will collect temperature readings from tempReading <Local:10:I.Ch0Data>, every 30-seconds and store them in an array. Array Example
  • 12. SLC500 – Indexed and Indirect Addressing SLC500 Information (Optional)
  • 13. Indirect and Indexed Addresses (SLC500 and LogixPro) Includes arrays (ControlLogix) Chapter 09
  • 14. 14 Valid Addressing Modes  There are four basic modes or types of addressing in the SLC500 series PLC’s  Direct  Indexed direct  Indirect  Indexed indirect
  • 15. 15 Direct Addressing  Data is stored in the specified address.  This mode is what we have been using for all of our work in the course.  Examples:  N7:3  T4:9.PRE  R6:3.POS  F8:7  B3:6/2  C5:8.ACC Memory Address Data Value N7:0 52 N7:1 128 N7:2 346 N7:3 510 N7:4 14
  • 16. 16 Indirect Addressing  The address in the instruction serves as a reference point and does not point directly to the data location. In other words: the instructions memory address contains the address of a memory location. Memory Address Data Values 2210 52 2211 128 2212 345 2213 510 2214 343 Memory Address Data Values 343 54 344 71 345 633 346 85 347 500 Address = 2212 Data = 633
  • 17. 17 Indirect Addressing  An address can be specified as indirect by replacing the file number, element number or sub-element number with another word address.  The indirect address is always enclosed in square brackets [ ].  N7:[N7:0] is an example of an indirect address.  The word level address in the square brackets is queried for a value. The queried value then becomes the file, element or sub-element portion of the indirect address.
  • 18. 18 Indirect Address Examples  N7:[N7:0]  If a value of 43 is stored in N7:0, the indirect address N7:[N7:0] is indirectly referencing N7:43  B3:[T4:0.ACC]  If the value of 12 is stored in the accumulator of T4:0, the indirect address B3:[T4:0.ACC] is indirectly referencing B3:12  F[N7:3]:[N26:12]  If a value of 18 is stored in N7:3 and a value of 4 is stored in N26:12, the indirect address F[N7:3]:[N26:12] is indirectly referencing F18:4
  • 19. 19  Guidelines for specifying indirect addresses:  The  file number  word number (element + sub-element)  bit number can be addressed indirectly  The substitute address must be a word- level address.  Enter the substitute address in square brackets [ ]. Indirect Addressing
  • 20. 20  The table shows some additional examples of indirect addressing: Indirect Addressing Valid Address Variable Explanation N7:[C5:7.ACC] Word number The word number of N7 is being specified by the value stored in the accumulator of C5:7 B3:0/[R6:4.POS] Bit number The bit number of B3:0 is being specified by the value stored in the position word of R6:4 N[N7:0]:[N22:1] File and word number The file number is stored in N7:0 and the word number is stored in N22:1 I:[N10:0].1/1 Slot number The slot number is stored in N10:0
  • 21. 21 Indirect Addressing When using indirect addressing, the data file (memory location) being referenced must exist. Data files (memory) is not dynamically created or expanded. In other words, the memory is not dynamically allocated to fit the size of the data. IMPORTANT
  • 22. 22 Indirect Addressing  Indirect addressing allows for the  creation of less complex ladder logic  preservation of memory  use of an array like structure  Indirect addressing can be used for applications such as cycling through a recipe file in a multiple batch operation.
  • 23. 23  Example application of Indirect Addressing:  Data collection is an application for indirect addressing such as, keeping a record of temperature at prescribed times and over a given period of time.  Using recipes in systems that require different parameters depending upon the product being produced. Discuss the LogixPro Batch Process Recipe Example Indirect Example
  • 24. 24  An indexed address is an addressing mode for referencing a memory location that is the original memory address plus a value that is stored in an index register.  The content of the index register is added to the original address to obtain the final memory location (offset).  Indexed addressing is useful for accessing elements of an array of data. The base address stays the same, but the value of the index register is incremented or decremented. Indexed Addressing
  • 25. 25  The table shows an example of an indexed address: Indexed Addressing Memory Address Data Value N7:33 52 N7:34 578 N7:35 79 N7:36 427 N7:37 56 N7:38 4 N7:39 131 Base address = N7:22 Index or Offset = 15 Data = 56 N7:22 → (Word 22 + 15) = N7:37
  • 26. 26  An address is specified as being “indexed” by placing the “#” character in front of the address.  When the program encounters an address of this form, the processor takes the element (word) number of the address and adds to it the value stored in the index register.  The index register is in the SLC500/LogixPro Processor Status file at: S:24 Indexed Addressing
  • 27. 27  The actual address is the Base address plus the value stored in the index register.  Example:  #N7:10  Here, the element (word) number of the direct address (the base address) is 10.  If S:24 has a value of 25 stored in it, the value of 25 is added to the base address element number; in this case 10.  The address that #N7:10 with S:24 = 25 is referencing is N7:35.  N7:10 + S:24 or N7:10 + 25 = N7:35 Indexed Addressing
  • 28. 28  When the processor resolves an Indexed Indirect address it first resolves the indirect portion of the address and then adds the offset from the index register S:24 to create the final address.  What makes the addressing mode powerful is that S:24 is a dynamic address. It can be read and written to on- the-fly. Indexed Indirect Addressing
  • 29. 29  An address can be specified as a combination of indirect and indexed addressing.  Example:  #N7:[N10:3]  If a value of 20 is stored in N10:3 and a value of 10 is stored in S:24, then the indexed indirect address #N7:[N10:3] is referencing N7:30  That is, N7:[N10:3] is indirectly referencing N7:20 and #N7:[N10:3] is indexed by 10 producing N7:20 + 10 = N7:30 Indexed Indirect Addressing LogixPro does not support this mode of addressing
  • 30. 30  Guidelines for specifying indexed addresses:  The offset value stored in S:24 can be positive or negative.  The offset value should not cause the base address to cross a file boundary.  If an instruction uses more than one indexed address, the processor uses the same index value on each of the indexed addresses.  The value of the index register should be set immediately before enabling the instruction that uses an indexed address. Indexed Indirect Addressing
  • 31. 31  Guidelines for specifying indexed addresses:  Indexed addressing does not work with Timers, Counters or the Control File.  Indexed addressing is invalid for any file type that uses multiple words.  Some instructions modify the value of the index register so that they can function properly. The Sequencer and the Bit Shift instructions are examples of instructions that use and modify the value of S:24. Indexed Indirect Addressing
  • 32. Monitoring Indexed Addresses  The value of the indexed address will not display when it is being monitored.  The code snippet shown assumes that:  S:24 = 5  N7:3 = 123  N7:8 = 456 When the MOV instruction is executed the indexed address #N7:3 is evaluated to N7:8 and the value of the indexed address will be stored and displayed in the direct address of N10:3. Also note in the ADD instruction that the value stored in the indexed address is added to the zero of C5:0.ACC.