SlideShare une entreprise Scribd logo
1  sur  43
EMEC245
Industrial Control Systems II
Advanced PLC’s and PAC’s
Data Handling Instructions and Shift Registers
Section 10-3-6 Copy and Fill Instructions
ControlLogix (The textbook is for reference only
and covers the instructions in SLC500 format)
Chapter 10
3
 The Copy File (COP) instruction is an
output instruction that copies data from
one memory location to another.
 Executes when the rung containing the
instruction is true and can be conditional
or unconditional.
 The COP instruction has 3-instruction
parameters:
 Source
 Destination
 Length
Copy File (COP)
4
 Source
 A word level tag that contains the data to be
copied.
 Must be an array with at least one word; ex.
ArrayName[0]. (ArrayName[x], where ‘x’ is the
starting element of the array).
 The word level tag with array element
reference is the starting word of the array to
be copied.
 Data type of SINT, INT, DINT, REAL or
Structure.
COP Instruction
Parameters (1 of 3)
5
 Destination
 A word level tag with array element reference
that is the starting word of the array to which
the Source data is to be copied.
 Must be an array with at least the same number
of elements as the array referenced in the
Source; ex. ArrayDest[0].
 The instruction will overwrite any data that is
already stored in the Destination without
notification.
 Data type of SINT, INT, DINT, REAL or
Structure.
COP Instruction
Parameters (2 of 3)
6
 Length
 Can be a tag of type DINT or a program
constant that specifies the number of elements
or words to be copied.
 Test to insure that the length will not exceed
the number of array elements referenced in
the destination to avoid runtime errors and
processor faults.
COP Instruction
Parameters (3 of 3)
7
 The COP instruction has no instruction
tags or status bits. If status is required,
status must be supplied by the user.
 The value referenced in the Length
parameter determines the number of
words to be copied. This instruction will
fault the processor if the number of
elements copied exceeds the length of the
Source or Destination array.
COP Status Bits
COP Single Word per
Array Element Dest
Because the
Destination address
is a data file that
consists of one
word array
elements, for each
array element in the
Source, one word
will be copied to the
array elements
referenced in the
Destination.
COP Structure
Destination
Because the
Destination address is
a data structure
consisting of three
words, for each array
element referenced in
the Source, three
words will be copied
to the array structure
referenced in the
Destination.
Length * 3 words.
Unpredictable operation can occur because the
status bits will be affected and the lower byte
of word 0 (being used by AB for some
purpose) will be affected.
10
 The File Fill (FLL) instruction is an output
instruction that fills data from a word level tag or
program constant referenced in the Source
parameter to the array referenced in the
Destination.
 Executes when the rung containing the instruction
is true and can be conditional or unconditional.
 The FLL instruction has 3-instruction parameters:
 Source
 Destination
 Length
File Fill (FLL)
11
 Source
 Can be a word level tag or program constant.
 When a tag, the tag is not an array because
only the value stored in the word is filled to
the destination.
FLL Instruction
Parameters (1 of 3)
12
 Destination
 A word level array that references the starting
word of the array to which the Source data is
to be filled.
 Must be an array with a length of at least one
element.
 The instruction will overwrite any data that is
already stored in the Destination without
notification.
FLL Instruction
Parameters (2 of 3)
13
 Length
 Must be a program constant that specifies the
number of array elements to be filled.
 If the Destination data type is 1-word
elements the length range can be 1 to the
upper array bounds.
 If the Destination file type is a structure such
as Timers or Counters, the number of array
elements filled is Length * the number of
words in the structure.
 The length value should be tested to insure
that it will not exceed the upper array bound.
FLL Instruction
Parameters (3 of 3)
14
 The FLL instruction has no instruction tag
or status bits. If status is required, status
must be supplied by the user.
 The value referenced in the Length
parameter determines the number of
words to be filled. This instruction will
fault the processor if the number of
elements filled exceeds the length of the
Destination array.
FLL Status Bits
FLL Single Word per
Array Element Dest
The array,
whose starting
element is
referenced in
the Destination
will be filled for
the number of
elements
referenced in
the Length,
with the data
stored in the
Source.
16
 Filling a structure such as timers and
counters should be done with extreme
care. Unpredictable operation can occur
because the status bits will be affected
and the lower byte of word 0 (being used
by AB for some purpose) will be affected.
FLL Array of Structure
Dest (1 of 2)
17
 The example shown on the next slide will fill
five timer structures starting at TimerArray[0]
with the value stored in the Source tag
FLL_Source_Tag:
 TimerArray[0].0 (the status bit word) =
FLL_Source_Tag
 TimerArray[0].PRE = FLL_Source_Tag
 TimerArray[0].ACC = FLL_Source_Tag
Through
 TimerArray[4].0 (the status bit word) =
FLL_Source_Tag
 TimerArray[4].PRE = FLL_Source_Tag
 TimerArray[4].ACC = FLL_Source_Tag
FLL Array of Structure
Dest (2 of 2)
FLL Array of
Structure Dest
FLL Constant Source
Recipe Application
 This example copies 1-of-4 user
selected recipes to the batch
parameters of a batch process.
 The COP instruction shown will copy
the content of 4-words from a two-
dimensional array referenced in the
source, to a one-dimensional array in
the destination. (The COP will be
discussed in the next unit).
 The source tag is referencing a two-
dimensional array:
Recipe[RecipeNumber, 0]. Note that
the first dimension of the array is a
tag. This tag stores the value of the
recipe number selected by a user and
is used to point to 1-of-4 of the
recipes.
 If the user selects recipe number 2, the
data stored in Recipe[2,0],
Recipe[2,1], Recipe[2,2] and
Recipe[2,3] will be copied to:
BatchRecipe[0] through BatchRecipe[3]
respectively.
0
1
2
3
Optional class material – Not covered inclass
COP & FLL for SLC500
Data Handling Instructions and Shift Registers
Section 10-3-6 Copy and Fill Instructions
SLC500, (LogixPro does not support Copy and
Fill Instructions).
Chapter 10
23
 The Copy File (COP) instruction is an
output instruction that copies data from
one memory location to another.
 Executes when the rung containing the
instruction is true and can be conditional
or unconditional.
 The COP instruction has 3-instruction
parameters:
 Source
 Destination
 Length
Copy File (COP)
24
 Source
 A word level address that contains the data to
be copied.
 Must be an indexed word level address
because a file or block of data is being copied.
Therefore, the index indicator (#) must be
used when entering the address.
 The word level address is the starting word of
the file to be copied.
 Floating Point (F8) and String (ST) values are
supported for those processor types that are
capable of these data types.
COP Instruction
Parameters (1 of 3)
25
 Destination
 A word level address that is the starting word of
the file to which the Source data is to be copied.
 Must be an indexed word level address because
a file or block of data is being copied. Therefore,
the index indicator (#) must be used when
entering the address.
 The instruction will overwrite any data that is
already stored in the Destination without issuing
a warning.
 Floating Point (F8) and String (ST) values are
supported for those processor types that are
capable of these data types.
COP Instruction
Parameters (2 of 3)
26
 Length
 Must be a program constant that specifies the
number of elements or words to be copied.
 If the Destination file type is 1-word elements
the length range is 1 to 128 inclusive.
 If the Destination file type is a 3-word element
such as Timers or Counters, the length range
is 1 to 42 inclusive.
 The length value is written to S:24 when the
instruction executes.
COP Instruction
Parameters (3 of 3)
27
 The COP instruction has no instruction
address or status bits. If status is
required, status must be supplied by the
user.
COP Status Bits
28
 This instruction will not copy across file
boundaries. The value referenced in the
Length parameter determines the number
of words to be copied. Insure that the
starting address referenced in the Source
parameter will not exceed the file
boundary of the Destination based upon
the value entered in for the Length.
 If an attempt is made to cross file
boundaries is made, and error will occur
and the processor will fault.
COP Crossing File
Boundaries
COP Single Word
Destination
Because the
Destination address
is a data file that
consists of one
word elements, for
each word in the file
referenced in the
Source, one word
will be copied to the
file referenced in
the Destination.
COP Structure
Destination
Because the
Destination address is
a data file that
consists of three word
elements, for each
word in the file
referenced in the
Source, three words
will be copied to the
file referenced in the
Destination.
Length * 3 words.
Unpredictable operation can occur because the
status bits will be affected and the lower byte
of word 0 (being used by AB for some
purpose) will be affected.
31
 The File Fill (FLL) instruction is an output
instruction that fills data from a word level address
or program constant referenced in the Source
parameter to the indexed address referenced in the
Destination.
 Executes when the rung containing the instruction
is true and can be conditional or unconditional.
 The FLL instruction has 3-instruction parameters:
 Source
 Destination
 Length
File Fill – (FLL)
32
 Source
 Can be a word level address or program
constant.
 Is not an indexed word level address because
only the value stored in the word is filled to
the destination. Therefore, the index indicator
(#) is not required.
 Floating Point (F8) and String (ST) values are
supported for those processor types that are
capable of these data types.
FLL Instruction
Parameters (1 of 3)
33
 Destination
 A word level address that is the starting word of
the file to which the Source data is to be filled.
 Must be an indexed word level address because
a file or block of data is being filled. Therefore,
the index indicator (#) must be used when
entering the address.
 The instruction will overwrite any data that is
already stored in the Destination without issuing
a warning.
 Floating Point (F8) and String (ST) values are
supported for those processor types that are
capable of these data types.
FLL Instruction
Parameters (2 of 3)
34
 Length
 Must be a program constant that specifies the
number of elements or words to be filled.
 If the Destination file type is 1-word elements
the length range is 1 to 128 inclusive.
 If the Destination file type is a 3-word element
such as Timers or Counters, the length range
is 1 to 42 inclusive.
 The length value is written to S:24 when the
instruction executes.
FLL Instruction
Parameters
35
 The FLL instruction has no instruction
address or status bits. If status is
required, status must be supplied by the
user.
FLL Status Bits
36
 This instruction will not fill across file
boundaries. The value referenced in the
Length parameter determines the number
of words to be filled. Insure that the value
referenced in the Length parameter will
not make the filled data exceed the file
boundary.
 If an attempt is made to cross file
boundaries is made, and error will occur
and the processor will fault.
FLL Crossing File
Boundaries
FLL Single Word
Destination
The file, whose
starting word is
referenced in the
Destination will be
filled for the
number of words
referenced in the
Length, with the
data stored in the
Source.
38
 Filling a file whose destination address is a 3-word
structure such as timers and counters should be
done with extreme care. Unpredictable operation
can occur because the status bits will be affected
and the lower byte of word 0 (being used by AB
for some purpose) will be affected.
 The example shown on the next slide is being used
as an FYI only to show functionality of the FLL
instruction. It will fill six counter words starting at
C5:4 with the constant 5319 as follows:
 C5:4.0 (the status bit word) = 5319
 C5:4.PRE = 5319
 C5:4.ACC = 5319
FLL Structure
Destination
FLL Structure
Destination
5419
40
 Allen Bradley makes a module that accepts
4-thermocouples (T/C), (1746-NT4).
Assume this module is placed in slot-6.
 The NT4 module has 4-input channels and
4-output channels. The input channels is
the T/C data and the output channels are
the module configuration channels.
FLL Application
41
 The module must be configured before
use. The configuration word configures:
 The T/C type
 Data in engineering units
 Open circuit response
 Temperature units (C or F)
 Filter frequency
 Channels enabled
FLL Application
(SLC500)
FLL Application
FLL Application

Contenu connexe

Tendances

11 chapter06 slc_int_float_mov_mvm_fa14
11 chapter06 slc_int_float_mov_mvm_fa1411 chapter06 slc_int_float_mov_mvm_fa14
11 chapter06 slc_int_float_mov_mvm_fa14John Todora
 
System programming and implementation
System programming and implementationSystem programming and implementation
System programming and implementationJohn Todora
 
Assemblers: Ch03
Assemblers: Ch03Assemblers: Ch03
Assemblers: Ch03desta_gebre
 
system software 16 marks
system software 16 markssystem software 16 marks
system software 16 marksvvcetit
 
Assembler directives and basic steps ALP of 8086
Assembler directives and basic steps ALP of 8086Assembler directives and basic steps ALP of 8086
Assembler directives and basic steps ALP of 8086Urvashi Singh
 
Instruction format
Instruction formatInstruction format
Instruction formatchauhankapil
 
Examinable Question and answer system programming
Examinable Question and answer system programmingExaminable Question and answer system programming
Examinable Question and answer system programmingMakerere university
 
Addressing mode
Addressing modeAddressing mode
Addressing modeilakkiya
 
MASM -UNIT-III
MASM -UNIT-IIIMASM -UNIT-III
MASM -UNIT-IIIDr.YNM
 
Chapter 2 programming concepts - I
Chapter 2  programming concepts - IChapter 2  programming concepts - I
Chapter 2 programming concepts - ISHREEHARI WADAWADAGI
 

Tendances (20)

11 chapter06 slc_int_float_mov_mvm_fa14
11 chapter06 slc_int_float_mov_mvm_fa1411 chapter06 slc_int_float_mov_mvm_fa14
11 chapter06 slc_int_float_mov_mvm_fa14
 
System programming and implementation
System programming and implementationSystem programming and implementation
System programming and implementation
 
Assemblers: Ch03
Assemblers: Ch03Assemblers: Ch03
Assemblers: Ch03
 
system software 16 marks
system software 16 markssystem software 16 marks
system software 16 marks
 
Assembler
AssemblerAssembler
Assembler
 
15ss
15ss15ss
15ss
 
Assembler directives and basic steps ALP of 8086
Assembler directives and basic steps ALP of 8086Assembler directives and basic steps ALP of 8086
Assembler directives and basic steps ALP of 8086
 
Assembler
AssemblerAssembler
Assembler
 
Macro
MacroMacro
Macro
 
Instruction format
Instruction formatInstruction format
Instruction format
 
Examinable Question and answer system programming
Examinable Question and answer system programmingExaminable Question and answer system programming
Examinable Question and answer system programming
 
Chapter 5 programming concepts iv
Chapter 5  programming concepts ivChapter 5  programming concepts iv
Chapter 5 programming concepts iv
 
Embedded C - Lecture 4
Embedded C - Lecture 4Embedded C - Lecture 4
Embedded C - Lecture 4
 
Addressing mode
Addressing modeAddressing mode
Addressing mode
 
Sp chap2
Sp chap2Sp chap2
Sp chap2
 
Two pass Assembler
Two pass AssemblerTwo pass Assembler
Two pass Assembler
 
Mp lab manual
Mp lab manualMp lab manual
Mp lab manual
 
MASM -UNIT-III
MASM -UNIT-IIIMASM -UNIT-III
MASM -UNIT-III
 
Chapter 2 programming concepts - I
Chapter 2  programming concepts - IChapter 2  programming concepts - I
Chapter 2 programming concepts - I
 
Compiler unit 4
Compiler unit 4Compiler unit 4
Compiler unit 4
 

En vedette

01 control logix_arrays_sp17
01 control logix_arrays_sp1701 control logix_arrays_sp17
01 control logix_arrays_sp17John Todora
 
01 indirect indexed_addressing_and_arrays_sp15
01 indirect indexed_addressing_and_arrays_sp1501 indirect indexed_addressing_and_arrays_sp15
01 indirect indexed_addressing_and_arrays_sp15John 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
 
02 chapter02 fa16
02 chapter02 fa1602 chapter02 fa16
02 chapter02 fa16John Todora
 
Stepper motor
Stepper motor Stepper motor
Stepper motor Ameen San
 
PLC Counters
PLC CountersPLC Counters
PLC CountersAmeen San
 
PLC arithmatic functions
PLC arithmatic functionsPLC arithmatic functions
PLC arithmatic functionsAmeen San
 
PLC application
PLC applicationPLC application
PLC applicationAmeen San
 
Module Consolidation: Combining Safety-Critical Automotive Applications with ...
Module Consolidation: Combining Safety-Critical Automotive Applications with ...Module Consolidation: Combining Safety-Critical Automotive Applications with ...
Module Consolidation: Combining Safety-Critical Automotive Applications with ...Design World
 
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
 
Plc analog input output programming
Plc analog input output programmingPlc analog input output programming
Plc analog input output programmingEngr Alam
 
PLC data types and addressing
PLC data types and addressingPLC data types and addressing
PLC data types and addressingAmeen San
 
ELECTRICAL DISTRIBUTION TECHNOLOGY
ELECTRICAL DISTRIBUTION TECHNOLOGYELECTRICAL DISTRIBUTION TECHNOLOGY
ELECTRICAL DISTRIBUTION TECHNOLOGYAmeen San
 
Load Characteristics
Load CharacteristicsLoad Characteristics
Load CharacteristicsAmeen San
 
PLC input and output devices
PLC input and output devices PLC input and output devices
PLC input and output devices Ameen San
 
Application of Capacitors to Distribution System and Voltage Regulation
Application of Capacitors to Distribution System and Voltage RegulationApplication of Capacitors to Distribution System and Voltage Regulation
Application of Capacitors to Distribution System and Voltage RegulationAmeen San
 
PLC Traffic Light Control
PLC Traffic Light ControlPLC Traffic Light Control
PLC Traffic Light ControlAmeen San
 
Input and Output Devices.
Input and Output Devices.Input and Output Devices.
Input and Output Devices.abena
 
Distribution System Voltage Drop and Power Loss Calculation
Distribution System Voltage Drop and Power Loss CalculationDistribution System Voltage Drop and Power Loss Calculation
Distribution System Voltage Drop and Power Loss CalculationAmeen San
 

En vedette (20)

01 control logix_arrays_sp17
01 control logix_arrays_sp1701 control logix_arrays_sp17
01 control logix_arrays_sp17
 
01 indirect indexed_addressing_and_arrays_sp15
01 indirect indexed_addressing_and_arrays_sp1501 indirect indexed_addressing_and_arrays_sp15
01 indirect indexed_addressing_and_arrays_sp15
 
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
 
02 chapter02 fa16
02 chapter02 fa1602 chapter02 fa16
02 chapter02 fa16
 
Stepper motor
Stepper motor Stepper motor
Stepper motor
 
PLC Counters
PLC CountersPLC Counters
PLC Counters
 
PLC arithmatic functions
PLC arithmatic functionsPLC arithmatic functions
PLC arithmatic functions
 
PLC application
PLC applicationPLC application
PLC application
 
Module Consolidation: Combining Safety-Critical Automotive Applications with ...
Module Consolidation: Combining Safety-Critical Automotive Applications with ...Module Consolidation: Combining Safety-Critical Automotive Applications with ...
Module Consolidation: Combining Safety-Critical Automotive Applications with ...
 
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
 
Plc analog input output programming
Plc analog input output programmingPlc analog input output programming
Plc analog input output programming
 
PLC data types and addressing
PLC data types and addressingPLC data types and addressing
PLC data types and addressing
 
ELECTRICAL DISTRIBUTION TECHNOLOGY
ELECTRICAL DISTRIBUTION TECHNOLOGYELECTRICAL DISTRIBUTION TECHNOLOGY
ELECTRICAL DISTRIBUTION TECHNOLOGY
 
Load Characteristics
Load CharacteristicsLoad Characteristics
Load Characteristics
 
PLC input and output devices
PLC input and output devices PLC input and output devices
PLC input and output devices
 
Application of Capacitors to Distribution System and Voltage Regulation
Application of Capacitors to Distribution System and Voltage RegulationApplication of Capacitors to Distribution System and Voltage Regulation
Application of Capacitors to Distribution System and Voltage Regulation
 
PLC Traffic Light Control
PLC Traffic Light ControlPLC Traffic Light Control
PLC Traffic Light Control
 
Input and Output Devices.
Input and Output Devices.Input and Output Devices.
Input and Output Devices.
 
Distribution System Voltage Drop and Power Loss Calculation
Distribution System Voltage Drop and Power Loss CalculationDistribution System Voltage Drop and Power Loss Calculation
Distribution System Voltage Drop and Power Loss Calculation
 

Similaire à 02 copy file_fill_sp16

Instruction Set (Part 2)
Instruction Set (Part 2)Instruction Set (Part 2)
Instruction Set (Part 2)Ajeng Savitri
 
loaders-and-linkers.pdfhhhhhccftyghgfggy
loaders-and-linkers.pdfhhhhhccftyghgfggyloaders-and-linkers.pdfhhhhhccftyghgfggy
loaders-and-linkers.pdfhhhhhccftyghgfggyrahulyadav957181
 
Chapter 11 - Intermediate Code Generation.pdf
Chapter 11 - Intermediate Code Generation.pdfChapter 11 - Intermediate Code Generation.pdf
Chapter 11 - Intermediate Code Generation.pdfRAnwarpasha
 
COMPUTER COMMUNICATION NETWORKS -IPv4
COMPUTER COMMUNICATION NETWORKS -IPv4COMPUTER COMMUNICATION NETWORKS -IPv4
COMPUTER COMMUNICATION NETWORKS -IPv4Krishna Nanda
 
C programming session 08
C programming session 08C programming session 08
C programming session 08Dushmanta Nath
 
C++ CoreHard Autumn 2018. Text Formatting For a Future Range-Based Standard L...
C++ CoreHard Autumn 2018. Text Formatting For a Future Range-Based Standard L...C++ CoreHard Autumn 2018. Text Formatting For a Future Range-Based Standard L...
C++ CoreHard Autumn 2018. Text Formatting For a Future Range-Based Standard L...corehard_by
 
Overview of Language Processor : Fundamentals of LP , Symbol Table , Data Str...
Overview of Language Processor : Fundamentals of LP , Symbol Table , Data Str...Overview of Language Processor : Fundamentals of LP , Symbol Table , Data Str...
Overview of Language Processor : Fundamentals of LP , Symbol Table , Data Str...Bhavin Darji
 
Compiler chapter six .ppt course material
Compiler chapter six .ppt course materialCompiler chapter six .ppt course material
Compiler chapter six .ppt course materialgadisaAdamu
 
Matlab ch1 (5)
Matlab ch1 (5)Matlab ch1 (5)
Matlab ch1 (5)mohsinggg
 
Introduction to Operating Systems - Part3
Introduction to Operating Systems - Part3Introduction to Operating Systems - Part3
Introduction to Operating Systems - Part3Amir Payberah
 
3 address code ujjwal matoliya.pptx
3 address code ujjwal matoliya.pptx3 address code ujjwal matoliya.pptx
3 address code ujjwal matoliya.pptxujjwalmatoliya
 
Computer architecture instruction formats
Computer architecture instruction formatsComputer architecture instruction formats
Computer architecture instruction formatsMazin Alwaaly
 
Intermediate code generation (Compiler Design)
Intermediate code generation (Compiler Design)   Intermediate code generation (Compiler Design)
Intermediate code generation (Compiler Design) Tasif Tanzim
 
Pattern-based Definition and Generation of Components for a Synchronous React...
Pattern-based Definition and Generation of Components for a Synchronous React...Pattern-based Definition and Generation of Components for a Synchronous React...
Pattern-based Definition and Generation of Components for a Synchronous React...ijeukens
 
CC week 1.pptx
CC week 1.pptxCC week 1.pptx
CC week 1.pptxkkjk4
 
8051 instruction set
8051 instruction set8051 instruction set
8051 instruction setStefan Oprea
 

Similaire à 02 copy file_fill_sp16 (20)

Instruction Set (Part 2)
Instruction Set (Part 2)Instruction Set (Part 2)
Instruction Set (Part 2)
 
loaders-and-linkers.pdfhhhhhccftyghgfggy
loaders-and-linkers.pdfhhhhhccftyghgfggyloaders-and-linkers.pdfhhhhhccftyghgfggy
loaders-and-linkers.pdfhhhhhccftyghgfggy
 
Chapter 11 - Intermediate Code Generation.pdf
Chapter 11 - Intermediate Code Generation.pdfChapter 11 - Intermediate Code Generation.pdf
Chapter 11 - Intermediate Code Generation.pdf
 
COMPUTER COMMUNICATION NETWORKS -IPv4
COMPUTER COMMUNICATION NETWORKS -IPv4COMPUTER COMMUNICATION NETWORKS -IPv4
COMPUTER COMMUNICATION NETWORKS -IPv4
 
ARM Architecture Subroutine and Flags
ARM Architecture Subroutine and FlagsARM Architecture Subroutine and Flags
ARM Architecture Subroutine and Flags
 
C programming session 08
C programming session 08C programming session 08
C programming session 08
 
C++ CoreHard Autumn 2018. Text Formatting For a Future Range-Based Standard L...
C++ CoreHard Autumn 2018. Text Formatting For a Future Range-Based Standard L...C++ CoreHard Autumn 2018. Text Formatting For a Future Range-Based Standard L...
C++ CoreHard Autumn 2018. Text Formatting For a Future Range-Based Standard L...
 
Overview of Language Processor : Fundamentals of LP , Symbol Table , Data Str...
Overview of Language Processor : Fundamentals of LP , Symbol Table , Data Str...Overview of Language Processor : Fundamentals of LP , Symbol Table , Data Str...
Overview of Language Processor : Fundamentals of LP , Symbol Table , Data Str...
 
Compiler chapter six .ppt course material
Compiler chapter six .ppt course materialCompiler chapter six .ppt course material
Compiler chapter six .ppt course material
 
qb unit2 solve eem201.pdf
qb unit2 solve eem201.pdfqb unit2 solve eem201.pdf
qb unit2 solve eem201.pdf
 
Matlab ch1 (5)
Matlab ch1 (5)Matlab ch1 (5)
Matlab ch1 (5)
 
Introduction to Operating Systems - Part3
Introduction to Operating Systems - Part3Introduction to Operating Systems - Part3
Introduction to Operating Systems - Part3
 
3 address code ujjwal matoliya.pptx
3 address code ujjwal matoliya.pptx3 address code ujjwal matoliya.pptx
3 address code ujjwal matoliya.pptx
 
Computer architecture instruction formats
Computer architecture instruction formatsComputer architecture instruction formats
Computer architecture instruction formats
 
Intermediate code generation (Compiler Design)
Intermediate code generation (Compiler Design)   Intermediate code generation (Compiler Design)
Intermediate code generation (Compiler Design)
 
Pattern-based Definition and Generation of Components for a Synchronous React...
Pattern-based Definition and Generation of Components for a Synchronous React...Pattern-based Definition and Generation of Components for a Synchronous React...
Pattern-based Definition and Generation of Components for a Synchronous React...
 
CC week 1.pptx
CC week 1.pptxCC week 1.pptx
CC week 1.pptx
 
Co&al lecture-05
Co&al lecture-05Co&al lecture-05
Co&al lecture-05
 
Addressing
Addressing Addressing
Addressing
 
8051 instruction set
8051 instruction set8051 instruction set
8051 instruction set
 

Plus de John 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
 
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
 
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
 
Control Systems Basics
Control Systems BasicsControl Systems Basics
Control Systems BasicsJohn Todora
 
01 overview of_industrial_automation_sp15
01 overview of_industrial_automation_sp1501 overview of_industrial_automation_sp15
01 overview of_industrial_automation_sp15John Todora
 
05 analog control_sp15
05 analog control_sp1505 analog control_sp15
05 analog control_sp15John Todora
 
03 shift registers_and_more_data_manipulation_sp15
03 shift registers_and_more_data_manipulation_sp1503 shift registers_and_more_data_manipulation_sp15
03 shift registers_and_more_data_manipulation_sp15John Todora
 
13 chap07 and_08_comparison_subs_force_fa14
13 chap07 and_08_comparison_subs_force_fa1413 chap07 and_08_comparison_subs_force_fa14
13 chap07 and_08_comparison_subs_force_fa14John Todora
 

Plus de John Todora (20)

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
 
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
 
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
 
Control Systems Basics
Control Systems BasicsControl Systems Basics
Control Systems Basics
 
01 overview of_industrial_automation_sp15
01 overview of_industrial_automation_sp1501 overview of_industrial_automation_sp15
01 overview of_industrial_automation_sp15
 
05 analog control_sp15
05 analog control_sp1505 analog control_sp15
05 analog control_sp15
 
03 shift registers_and_more_data_manipulation_sp15
03 shift registers_and_more_data_manipulation_sp1503 shift registers_and_more_data_manipulation_sp15
03 shift registers_and_more_data_manipulation_sp15
 
13 chap07 and_08_comparison_subs_force_fa14
13 chap07 and_08_comparison_subs_force_fa1413 chap07 and_08_comparison_subs_force_fa14
13 chap07 and_08_comparison_subs_force_fa14
 

Dernier

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
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
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
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
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
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
Food processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsFood processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsManeerUddin
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptshraddhaparab530
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 

Dernier (20)

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
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
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
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
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
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
Food processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsFood processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture hons
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
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
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.ppt
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 

02 copy file_fill_sp16

  • 1. EMEC245 Industrial Control Systems II Advanced PLC’s and PAC’s
  • 2. Data Handling Instructions and Shift Registers Section 10-3-6 Copy and Fill Instructions ControlLogix (The textbook is for reference only and covers the instructions in SLC500 format) Chapter 10
  • 3. 3  The Copy File (COP) instruction is an output instruction that copies data from one memory location to another.  Executes when the rung containing the instruction is true and can be conditional or unconditional.  The COP instruction has 3-instruction parameters:  Source  Destination  Length Copy File (COP)
  • 4. 4  Source  A word level tag that contains the data to be copied.  Must be an array with at least one word; ex. ArrayName[0]. (ArrayName[x], where ‘x’ is the starting element of the array).  The word level tag with array element reference is the starting word of the array to be copied.  Data type of SINT, INT, DINT, REAL or Structure. COP Instruction Parameters (1 of 3)
  • 5. 5  Destination  A word level tag with array element reference that is the starting word of the array to which the Source data is to be copied.  Must be an array with at least the same number of elements as the array referenced in the Source; ex. ArrayDest[0].  The instruction will overwrite any data that is already stored in the Destination without notification.  Data type of SINT, INT, DINT, REAL or Structure. COP Instruction Parameters (2 of 3)
  • 6. 6  Length  Can be a tag of type DINT or a program constant that specifies the number of elements or words to be copied.  Test to insure that the length will not exceed the number of array elements referenced in the destination to avoid runtime errors and processor faults. COP Instruction Parameters (3 of 3)
  • 7. 7  The COP instruction has no instruction tags or status bits. If status is required, status must be supplied by the user.  The value referenced in the Length parameter determines the number of words to be copied. This instruction will fault the processor if the number of elements copied exceeds the length of the Source or Destination array. COP Status Bits
  • 8. COP Single Word per Array Element Dest Because the Destination address is a data file that consists of one word array elements, for each array element in the Source, one word will be copied to the array elements referenced in the Destination.
  • 9. COP Structure Destination Because the Destination address is a data structure consisting of three words, for each array element referenced in the Source, three words will be copied to the array structure referenced in the Destination. Length * 3 words. Unpredictable operation can occur because the status bits will be affected and the lower byte of word 0 (being used by AB for some purpose) will be affected.
  • 10. 10  The File Fill (FLL) instruction is an output instruction that fills data from a word level tag or program constant referenced in the Source parameter to the array referenced in the Destination.  Executes when the rung containing the instruction is true and can be conditional or unconditional.  The FLL instruction has 3-instruction parameters:  Source  Destination  Length File Fill (FLL)
  • 11. 11  Source  Can be a word level tag or program constant.  When a tag, the tag is not an array because only the value stored in the word is filled to the destination. FLL Instruction Parameters (1 of 3)
  • 12. 12  Destination  A word level array that references the starting word of the array to which the Source data is to be filled.  Must be an array with a length of at least one element.  The instruction will overwrite any data that is already stored in the Destination without notification. FLL Instruction Parameters (2 of 3)
  • 13. 13  Length  Must be a program constant that specifies the number of array elements to be filled.  If the Destination data type is 1-word elements the length range can be 1 to the upper array bounds.  If the Destination file type is a structure such as Timers or Counters, the number of array elements filled is Length * the number of words in the structure.  The length value should be tested to insure that it will not exceed the upper array bound. FLL Instruction Parameters (3 of 3)
  • 14. 14  The FLL instruction has no instruction tag or status bits. If status is required, status must be supplied by the user.  The value referenced in the Length parameter determines the number of words to be filled. This instruction will fault the processor if the number of elements filled exceeds the length of the Destination array. FLL Status Bits
  • 15. FLL Single Word per Array Element Dest The array, whose starting element is referenced in the Destination will be filled for the number of elements referenced in the Length, with the data stored in the Source.
  • 16. 16  Filling a structure such as timers and counters should be done with extreme care. Unpredictable operation can occur because the status bits will be affected and the lower byte of word 0 (being used by AB for some purpose) will be affected. FLL Array of Structure Dest (1 of 2)
  • 17. 17  The example shown on the next slide will fill five timer structures starting at TimerArray[0] with the value stored in the Source tag FLL_Source_Tag:  TimerArray[0].0 (the status bit word) = FLL_Source_Tag  TimerArray[0].PRE = FLL_Source_Tag  TimerArray[0].ACC = FLL_Source_Tag Through  TimerArray[4].0 (the status bit word) = FLL_Source_Tag  TimerArray[4].PRE = FLL_Source_Tag  TimerArray[4].ACC = FLL_Source_Tag FLL Array of Structure Dest (2 of 2)
  • 20. Recipe Application  This example copies 1-of-4 user selected recipes to the batch parameters of a batch process.  The COP instruction shown will copy the content of 4-words from a two- dimensional array referenced in the source, to a one-dimensional array in the destination. (The COP will be discussed in the next unit).  The source tag is referencing a two- dimensional array: Recipe[RecipeNumber, 0]. Note that the first dimension of the array is a tag. This tag stores the value of the recipe number selected by a user and is used to point to 1-of-4 of the recipes.  If the user selects recipe number 2, the data stored in Recipe[2,0], Recipe[2,1], Recipe[2,2] and Recipe[2,3] will be copied to: BatchRecipe[0] through BatchRecipe[3] respectively. 0 1 2 3
  • 21. Optional class material – Not covered inclass COP & FLL for SLC500
  • 22. Data Handling Instructions and Shift Registers Section 10-3-6 Copy and Fill Instructions SLC500, (LogixPro does not support Copy and Fill Instructions). Chapter 10
  • 23. 23  The Copy File (COP) instruction is an output instruction that copies data from one memory location to another.  Executes when the rung containing the instruction is true and can be conditional or unconditional.  The COP instruction has 3-instruction parameters:  Source  Destination  Length Copy File (COP)
  • 24. 24  Source  A word level address that contains the data to be copied.  Must be an indexed word level address because a file or block of data is being copied. Therefore, the index indicator (#) must be used when entering the address.  The word level address is the starting word of the file to be copied.  Floating Point (F8) and String (ST) values are supported for those processor types that are capable of these data types. COP Instruction Parameters (1 of 3)
  • 25. 25  Destination  A word level address that is the starting word of the file to which the Source data is to be copied.  Must be an indexed word level address because a file or block of data is being copied. Therefore, the index indicator (#) must be used when entering the address.  The instruction will overwrite any data that is already stored in the Destination without issuing a warning.  Floating Point (F8) and String (ST) values are supported for those processor types that are capable of these data types. COP Instruction Parameters (2 of 3)
  • 26. 26  Length  Must be a program constant that specifies the number of elements or words to be copied.  If the Destination file type is 1-word elements the length range is 1 to 128 inclusive.  If the Destination file type is a 3-word element such as Timers or Counters, the length range is 1 to 42 inclusive.  The length value is written to S:24 when the instruction executes. COP Instruction Parameters (3 of 3)
  • 27. 27  The COP instruction has no instruction address or status bits. If status is required, status must be supplied by the user. COP Status Bits
  • 28. 28  This instruction will not copy across file boundaries. The value referenced in the Length parameter determines the number of words to be copied. Insure that the starting address referenced in the Source parameter will not exceed the file boundary of the Destination based upon the value entered in for the Length.  If an attempt is made to cross file boundaries is made, and error will occur and the processor will fault. COP Crossing File Boundaries
  • 29. COP Single Word Destination Because the Destination address is a data file that consists of one word elements, for each word in the file referenced in the Source, one word will be copied to the file referenced in the Destination.
  • 30. COP Structure Destination Because the Destination address is a data file that consists of three word elements, for each word in the file referenced in the Source, three words will be copied to the file referenced in the Destination. Length * 3 words. Unpredictable operation can occur because the status bits will be affected and the lower byte of word 0 (being used by AB for some purpose) will be affected.
  • 31. 31  The File Fill (FLL) instruction is an output instruction that fills data from a word level address or program constant referenced in the Source parameter to the indexed address referenced in the Destination.  Executes when the rung containing the instruction is true and can be conditional or unconditional.  The FLL instruction has 3-instruction parameters:  Source  Destination  Length File Fill – (FLL)
  • 32. 32  Source  Can be a word level address or program constant.  Is not an indexed word level address because only the value stored in the word is filled to the destination. Therefore, the index indicator (#) is not required.  Floating Point (F8) and String (ST) values are supported for those processor types that are capable of these data types. FLL Instruction Parameters (1 of 3)
  • 33. 33  Destination  A word level address that is the starting word of the file to which the Source data is to be filled.  Must be an indexed word level address because a file or block of data is being filled. Therefore, the index indicator (#) must be used when entering the address.  The instruction will overwrite any data that is already stored in the Destination without issuing a warning.  Floating Point (F8) and String (ST) values are supported for those processor types that are capable of these data types. FLL Instruction Parameters (2 of 3)
  • 34. 34  Length  Must be a program constant that specifies the number of elements or words to be filled.  If the Destination file type is 1-word elements the length range is 1 to 128 inclusive.  If the Destination file type is a 3-word element such as Timers or Counters, the length range is 1 to 42 inclusive.  The length value is written to S:24 when the instruction executes. FLL Instruction Parameters
  • 35. 35  The FLL instruction has no instruction address or status bits. If status is required, status must be supplied by the user. FLL Status Bits
  • 36. 36  This instruction will not fill across file boundaries. The value referenced in the Length parameter determines the number of words to be filled. Insure that the value referenced in the Length parameter will not make the filled data exceed the file boundary.  If an attempt is made to cross file boundaries is made, and error will occur and the processor will fault. FLL Crossing File Boundaries
  • 37. FLL Single Word Destination The file, whose starting word is referenced in the Destination will be filled for the number of words referenced in the Length, with the data stored in the Source.
  • 38. 38  Filling a file whose destination address is a 3-word structure such as timers and counters should be done with extreme care. Unpredictable operation can occur because the status bits will be affected and the lower byte of word 0 (being used by AB for some purpose) will be affected.  The example shown on the next slide is being used as an FYI only to show functionality of the FLL instruction. It will fill six counter words starting at C5:4 with the constant 5319 as follows:  C5:4.0 (the status bit word) = 5319  C5:4.PRE = 5319  C5:4.ACC = 5319 FLL Structure Destination
  • 40. 40  Allen Bradley makes a module that accepts 4-thermocouples (T/C), (1746-NT4). Assume this module is placed in slot-6.  The NT4 module has 4-input channels and 4-output channels. The input channels is the T/C data and the output channels are the module configuration channels. FLL Application
  • 41. 41  The module must be configured before use. The configuration word configures:  The T/C type  Data in engineering units  Open circuit response  Temperature units (C or F)  Filter frequency  Channels enabled FLL Application (SLC500)