SlideShare a Scribd company logo
1 of 18
Chapter 06 – Arithmetic and
Move Instructions
Section 6-5-6
Data Manipulation
Instructions
 Data manipulation instructions enable the
programmable controller to manipulate data
stored in memory.
 This extra characteristic gives the PLC/PAC
capabilities that go far beyond the
conventional relay equivalent instructions.
 Data manipulation involves the transfer of
data and operation on data with math
functions, data conversion, data comparison
and logical operations.
Data Manipulation
Instructions
 Words of data memory, in singular form, can be
referred to either as registers, elements or as
words, depending upon the PLC/PAC
manufacturer.
 The terms table, array or file are generally used
when consecutive groups of related data memory
words is referenced. A group of consecutive
elements or words in the ControlLogix controller
are referred to as an array and in Siemens it is
called a table or an array.
 The data contained in files and words will be in the
form of binary bits represented as a series of 1’s
and 0’s.
Data Files, Words and
Bits
This is a pictorial representation of a file
Data Manipulation
Instructions
 Data manipulation instructions allow the
movement, manipulation or storage of
data in either a single or multiple word
groups from one data memory area of the
PLC/PAC to another.
 The use of data manipulation instructions
in applications that require the generation
and manipulation of large quantities of
data generally reduces the complexity and
quantity of the programming required.
Data Transfer
Operations
 Data transfer instructions simply involve the
transfer of the contents of a word from one word or
register to another.
 When new data replaces existing data, the
process is referred to as writing over the existing
data.
 Data transfer instructions can address almost any
location in memory. That location may be the
preset word for a timer or counter or even an
output register that controls the opening and
closing of an IP valve (Current/Pressure Valve) or
a series of outputs from a discrete output module.
Move (MOV) Instruction
 The MOV instruction is an output instruction that
moves the value stored in the Source tag to the tag
referenced in the Destination. (It doesn’t actually move
the data, it makes a copy of the data from the Source
to the Destination).
 The MOV instruction has two parameters:
 Source
 Destination
Place holder that will
display the value
stored in these words
when monitoring
online.
Source specifies the
word containing the
data to be moved.
Dest specifies the
word where the data
should be moved.
Move (MOV) Instruction
 The instruction parameters of a MOV instruction has several
rules:
 The Destination (Dest) must always be a word level tag.
 The Source data can be a word level tag or a program constant.
 MOV instructions can be conditional or unconditional.
Sample Circuit (Why
MOV Data?)
 We are assigned the task of implementing a new circuit that can be
used to control the shut-down of a pump that is being used to pump
sugar syrup or molasses. Because these ingredients have a
different viscosity, the pump needs to run for 10-seconds after the
flow meter states that the correct amount of sugar syrup has been
pumped and for 15-seconds after the flow meter states that the
correct amount of molasses has been pumped.
 Two separate latching NO selector switches are used to select the
product being pumped. One for sugar syrup and one for molasses.
 Nothing should run unless the Start push button is pressed and
everything should stop if the Stop push button is pressed.
 The product being pumped must be selected before the Start push
button will start the process. While a process is running, if the
operator changes the ingredient selector(s), the setting should not
take affect. The Stop push button must be pressed and the process
must be restarted for the new ingredient to take affect.
 Preload time delays into the appropriate tags before downloading
the program.
Sample Circuit
 Field device assignment:
 Start Push Button – Wired to IN9 of the input
module in slot 03. Tag name = startPB
 Stop Push Button – Wired to IN10 of the input
module in slot 03. Tag name = stopPB
 Sugar Syrup Selector – Wired to IN4 of the input
module in slot 03. Tag name = sugarSyrup
 Molasses Selector – Wired to IN6 of the input
module in slot 03. Tag name = molasses
 Pump Motor Starter – Wired to OUT1 of the
output module in slot 06. Tag name = pumpMotor
Simple Circuit
 Build this circuit in class with the class
helping.
Masked Move (MVM)
Instruction
 The Masked Move (MVM) instruction is
slightly different from the MOV instruction in
that a mask word is involved in the MOV.
 The MVM instruction is not an IEC 61131-3
standard instruction.
 The data being moved must pass through a
mask to get to the Dest tag.
 The instruction moves (copies) only the
desired bits from a tag of data type SINT, INT
or DINT from the Source to the Destination
by masking the bits that should not move.
MVM Instruction
 The MVM instruction has three parameters:
 Source
 Mask
 Dest
 The parameters have several rules:
 The Source and Dest must be word level tags.
 The Mask can be a word level tag or a program constant, preferably in
Hexadecimal.
Place holder that will
display the value
stored in these words
when monitoring
online.
Source specifies the
word containing the
data to be moved.
Dest specifies the
word where the data
should be moved.
Mask can be a
hexadecimal number
or word level tag.
MVM Instruction
 The Mask can be thought of as filter. The
data in the Source word will pass through the
filter (mask) and the value exiting the filter
(mask) will be stored in the Dest word.
 Think of the mask as a plate with the number
of holes that correspond to the data type of
the Source word (32-holes for 32-bits (DINT),
16-holes for 16-bit (INT) and 8-holes for 8-
bits (SINT). Each hole has a butterfly valve. If
the valve is closed, nothing can get through
(a zero). If the valve is open, an object can
drop through the hole (a one).
MVM Instruction
The mask shown would be: 1110 0000 1000 0010 or 16#E082
Entering a Constant for
the Mask Value
 When entering the mask value as a
constant it can be entered as a binary,
octal or hexadecimal value. It is usually
best to enter a constant as a hexadecimal
number.
 Entering mask values as constants is done
in the following formats:
 Hexadecimal value: 16#FFA37BC8
 Octal value: 8#2273
 Binary value: 2#101000110011100
MVM Instruction
 Mask operation example
MVM Instruction
DINT mask (32-bits)
INT mask (16-bits)
SINT mask (8-bits)

More Related Content

What's hot

System programming and implementation
System programming and implementationSystem programming and implementation
System programming and implementation
John Todora
 
10 chapter05 counters_fa14
10 chapter05 counters_fa1410 chapter05 counters_fa14
10 chapter05 counters_fa14
John Todora
 
instructions of 8085 Microprocessor
instructions of 8085 Microprocessorinstructions of 8085 Microprocessor
instructions of 8085 Microprocessor
Pooja mittal
 
Addressing mode & data transfer instruction of 8085
Addressing mode & data transfer instruction of 8085Addressing mode & data transfer instruction of 8085
Addressing mode & data transfer instruction of 8085
Chinmayee samal
 
Addressing mode
Addressing modeAddressing mode
Addressing mode
ilakkiya
 

What's hot (20)

System programming and implementation
System programming and implementationSystem programming and implementation
System programming and implementation
 
10 chapter05 counters_fa14
10 chapter05 counters_fa1410 chapter05 counters_fa14
10 chapter05 counters_fa14
 
06 chapter03 04_control_logix_tags_memory_structure_fa16
06 chapter03 04_control_logix_tags_memory_structure_fa1606 chapter03 04_control_logix_tags_memory_structure_fa16
06 chapter03 04_control_logix_tags_memory_structure_fa16
 
03 chapter03 01_introduction_fa16
03 chapter03 01_introduction_fa1603 chapter03 01_introduction_fa16
03 chapter03 01_introduction_fa16
 
12 chapter06 math_instructions_fa14
12 chapter06 math_instructions_fa1412 chapter06 math_instructions_fa14
12 chapter06 math_instructions_fa14
 
Assembly Language Programming Of 8085
Assembly Language Programming Of 8085Assembly Language Programming Of 8085
Assembly Language Programming Of 8085
 
Unit 5 assembly language programming
Unit 5   assembly language programmingUnit 5   assembly language programming
Unit 5 assembly language programming
 
instructions of 8085 Microprocessor
instructions of 8085 Microprocessorinstructions of 8085 Microprocessor
instructions of 8085 Microprocessor
 
07 chapter03 05_siemens_tags_memory_structure_fa14
07 chapter03 05_siemens_tags_memory_structure_fa1407 chapter03 05_siemens_tags_memory_structure_fa14
07 chapter03 05_siemens_tags_memory_structure_fa14
 
Computer System Architecture
Computer System ArchitectureComputer System Architecture
Computer System Architecture
 
Compilers
CompilersCompilers
Compilers
 
Addressing modes 8085
Addressing modes 8085Addressing modes 8085
Addressing modes 8085
 
8085 instruction-set new
8085 instruction-set new8085 instruction-set new
8085 instruction-set new
 
Assemblers: Ch03
Assemblers: Ch03Assemblers: Ch03
Assemblers: Ch03
 
Addressing mode & data transfer instruction of 8085
Addressing mode & data transfer instruction of 8085Addressing mode & data transfer instruction of 8085
Addressing mode & data transfer instruction of 8085
 
Microcontroller directives
Microcontroller directivesMicrocontroller directives
Microcontroller directives
 
Addressing mode
Addressing modeAddressing mode
Addressing mode
 
8051 data type and directives
8051 data type and directives8051 data type and directives
8051 data type and directives
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
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
 

Viewers also liked

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
John Todora
 
Cap5. circuitos neumaticos
Cap5. circuitos neumaticosCap5. circuitos neumaticos
Cap5. circuitos neumaticos
chorisin87
 

Viewers also liked (20)

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
 
Slc500cap6
Slc500cap6Slc500cap6
Slc500cap6
 
NB Designer Manual Operation [unlockplc.com]
NB Designer Manual Operation [unlockplc.com]NB Designer Manual Operation [unlockplc.com]
NB Designer Manual Operation [unlockplc.com]
 
Diseño de juegos
Diseño de juegosDiseño de juegos
Diseño de juegos
 
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
 
Sap -mise_en_oeuvre
Sap  -mise_en_oeuvreSap  -mise_en_oeuvre
Sap -mise_en_oeuvre
 
04 chapter04 specification_forms
04 chapter04 specification_forms04 chapter04 specification_forms
04 chapter04 specification_forms
 
Lab02 review
Lab02 reviewLab02 review
Lab02 review
 
Controllogix 5000 Training
Controllogix 5000 TrainingControllogix 5000 Training
Controllogix 5000 Training
 
07 chapter07 loop_diagrams
07 chapter07 loop_diagrams07 chapter07 loop_diagrams
07 chapter07 loop_diagrams
 
Arquitectura Integrada
Arquitectura IntegradaArquitectura Integrada
Arquitectura Integrada
 
02 chapter02 fa16
02 chapter02 fa1602 chapter02 fa16
02 chapter02 fa16
 
Examen sap master 2015
Examen sap master 2015Examen sap master 2015
Examen sap master 2015
 
Manejo de avisos y alarmas en HMI
Manejo de avisos y alarmas en HMIManejo de avisos y alarmas en HMI
Manejo de avisos y alarmas en HMI
 
PLC and SCADA
PLC and SCADAPLC and SCADA
PLC and SCADA
 
Cap5. circuitos neumaticos
Cap5. circuitos neumaticosCap5. circuitos neumaticos
Cap5. circuitos neumaticos
 
1756 rm003 -en-p
1756 rm003 -en-p1756 rm003 -en-p
1756 rm003 -en-p
 
Programación estructurada Siemens - TIA PORTAL
Programación estructurada Siemens - TIA PORTALProgramación estructurada Siemens - TIA PORTAL
Programación estructurada Siemens - TIA PORTAL
 
Allen Bradley- Micrologix PLC Instructions
Allen Bradley- Micrologix PLC InstructionsAllen Bradley- Micrologix PLC Instructions
Allen Bradley- Micrologix PLC Instructions
 

Similar to Move mask moves_rev01_fa16

Power of call symput data
Power of call symput dataPower of call symput data
Power of call symput data
Yash Sharma
 
Informatica data warehousing_job_interview_preparation_guide
Informatica data warehousing_job_interview_preparation_guideInformatica data warehousing_job_interview_preparation_guide
Informatica data warehousing_job_interview_preparation_guide
Dhanasekar T
 
SAS Macros part 3
SAS Macros part 3SAS Macros part 3
SAS Macros part 3
venkatam
 

Similar to Move mask moves_rev01_fa16 (20)

Unit 2 Instruction set.pdf
Unit 2 Instruction set.pdfUnit 2 Instruction set.pdf
Unit 2 Instruction set.pdf
 
Power of call symput data
Power of call symput dataPower of call symput data
Power of call symput data
 
Pf700 energy savings_lab
Pf700 energy savings_labPf700 energy savings_lab
Pf700 energy savings_lab
 
Data transfer and manipulation
Data transfer and  manipulationData transfer and  manipulation
Data transfer and manipulation
 
CCP class
CCP class CCP class
CCP class
 
Microprocessor and Microcontroller.pptx
Microprocessor and Microcontroller.pptxMicroprocessor and Microcontroller.pptx
Microprocessor and Microcontroller.pptx
 
How do you use PID in PLC.docx
How do you use PID in PLC.docxHow do you use PID in PLC.docx
How do you use PID in PLC.docx
 
Sap abap questions
Sap abap questionsSap abap questions
Sap abap questions
 
Micro overview
Micro overviewMicro overview
Micro overview
 
Intel x86 and ARM Data types
Intel x86 and ARM Data typesIntel x86 and ARM Data types
Intel x86 and ARM Data types
 
Introduction to Microcontrollers
Introduction to MicrocontrollersIntroduction to Microcontrollers
Introduction to Microcontrollers
 
instruction format and addressing modes
instruction format and addressing modesinstruction format and addressing modes
instruction format and addressing modes
 
Mp lab manual
Mp lab manualMp lab manual
Mp lab manual
 
Microprocessor Miscellaneous datatrans+directives
Microprocessor Miscellaneous datatrans+directivesMicroprocessor Miscellaneous datatrans+directives
Microprocessor Miscellaneous datatrans+directives
 
Informatica data warehousing_job_interview_preparation_guide
Informatica data warehousing_job_interview_preparation_guideInformatica data warehousing_job_interview_preparation_guide
Informatica data warehousing_job_interview_preparation_guide
 
Performance Analysis, Designing and Testing 512 Bit Sram Memory Chip Using Xi...
Performance Analysis, Designing and Testing 512 Bit Sram Memory Chip Using Xi...Performance Analysis, Designing and Testing 512 Bit Sram Memory Chip Using Xi...
Performance Analysis, Designing and Testing 512 Bit Sram Memory Chip Using Xi...
 
SAS Macros part 3
SAS Macros part 3SAS Macros part 3
SAS Macros part 3
 
Mule data weave_3
Mule data weave_3Mule data weave_3
Mule data weave_3
 
viva q&a for mp lab
viva q&a for mp labviva q&a for mp lab
viva q&a for mp lab
 
MPMC UNIT-2.pdf
MPMC UNIT-2.pdfMPMC UNIT-2.pdf
MPMC UNIT-2.pdf
 

More from John Todora

05 analog control_sp15
05 analog control_sp1505 analog control_sp15
05 analog control_sp15
John 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_sp15
John Todora
 

More from John Todora (18)

01 control logix_arrays_sp17
01 control logix_arrays_sp1701 control logix_arrays_sp17
01 control logix_arrays_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
 
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
 
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
 
06 chapter06 binary_logic_systems_Rev02
06 chapter06 binary_logic_systems_Rev0206 chapter06 binary_logic_systems_Rev02
06 chapter06 binary_logic_systems_Rev02
 
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
 
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
 

Recently uploaded

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 

Move mask moves_rev01_fa16

  • 1. Chapter 06 – Arithmetic and Move Instructions Section 6-5-6
  • 2. Data Manipulation Instructions  Data manipulation instructions enable the programmable controller to manipulate data stored in memory.  This extra characteristic gives the PLC/PAC capabilities that go far beyond the conventional relay equivalent instructions.  Data manipulation involves the transfer of data and operation on data with math functions, data conversion, data comparison and logical operations.
  • 3. Data Manipulation Instructions  Words of data memory, in singular form, can be referred to either as registers, elements or as words, depending upon the PLC/PAC manufacturer.  The terms table, array or file are generally used when consecutive groups of related data memory words is referenced. A group of consecutive elements or words in the ControlLogix controller are referred to as an array and in Siemens it is called a table or an array.  The data contained in files and words will be in the form of binary bits represented as a series of 1’s and 0’s.
  • 4. Data Files, Words and Bits This is a pictorial representation of a file
  • 5. Data Manipulation Instructions  Data manipulation instructions allow the movement, manipulation or storage of data in either a single or multiple word groups from one data memory area of the PLC/PAC to another.  The use of data manipulation instructions in applications that require the generation and manipulation of large quantities of data generally reduces the complexity and quantity of the programming required.
  • 6. Data Transfer Operations  Data transfer instructions simply involve the transfer of the contents of a word from one word or register to another.  When new data replaces existing data, the process is referred to as writing over the existing data.  Data transfer instructions can address almost any location in memory. That location may be the preset word for a timer or counter or even an output register that controls the opening and closing of an IP valve (Current/Pressure Valve) or a series of outputs from a discrete output module.
  • 7. Move (MOV) Instruction  The MOV instruction is an output instruction that moves the value stored in the Source tag to the tag referenced in the Destination. (It doesn’t actually move the data, it makes a copy of the data from the Source to the Destination).  The MOV instruction has two parameters:  Source  Destination Place holder that will display the value stored in these words when monitoring online. Source specifies the word containing the data to be moved. Dest specifies the word where the data should be moved.
  • 8. Move (MOV) Instruction  The instruction parameters of a MOV instruction has several rules:  The Destination (Dest) must always be a word level tag.  The Source data can be a word level tag or a program constant.  MOV instructions can be conditional or unconditional.
  • 9. Sample Circuit (Why MOV Data?)  We are assigned the task of implementing a new circuit that can be used to control the shut-down of a pump that is being used to pump sugar syrup or molasses. Because these ingredients have a different viscosity, the pump needs to run for 10-seconds after the flow meter states that the correct amount of sugar syrup has been pumped and for 15-seconds after the flow meter states that the correct amount of molasses has been pumped.  Two separate latching NO selector switches are used to select the product being pumped. One for sugar syrup and one for molasses.  Nothing should run unless the Start push button is pressed and everything should stop if the Stop push button is pressed.  The product being pumped must be selected before the Start push button will start the process. While a process is running, if the operator changes the ingredient selector(s), the setting should not take affect. The Stop push button must be pressed and the process must be restarted for the new ingredient to take affect.  Preload time delays into the appropriate tags before downloading the program.
  • 10. Sample Circuit  Field device assignment:  Start Push Button – Wired to IN9 of the input module in slot 03. Tag name = startPB  Stop Push Button – Wired to IN10 of the input module in slot 03. Tag name = stopPB  Sugar Syrup Selector – Wired to IN4 of the input module in slot 03. Tag name = sugarSyrup  Molasses Selector – Wired to IN6 of the input module in slot 03. Tag name = molasses  Pump Motor Starter – Wired to OUT1 of the output module in slot 06. Tag name = pumpMotor
  • 11. Simple Circuit  Build this circuit in class with the class helping.
  • 12. Masked Move (MVM) Instruction  The Masked Move (MVM) instruction is slightly different from the MOV instruction in that a mask word is involved in the MOV.  The MVM instruction is not an IEC 61131-3 standard instruction.  The data being moved must pass through a mask to get to the Dest tag.  The instruction moves (copies) only the desired bits from a tag of data type SINT, INT or DINT from the Source to the Destination by masking the bits that should not move.
  • 13. MVM Instruction  The MVM instruction has three parameters:  Source  Mask  Dest  The parameters have several rules:  The Source and Dest must be word level tags.  The Mask can be a word level tag or a program constant, preferably in Hexadecimal. Place holder that will display the value stored in these words when monitoring online. Source specifies the word containing the data to be moved. Dest specifies the word where the data should be moved. Mask can be a hexadecimal number or word level tag.
  • 14. MVM Instruction  The Mask can be thought of as filter. The data in the Source word will pass through the filter (mask) and the value exiting the filter (mask) will be stored in the Dest word.  Think of the mask as a plate with the number of holes that correspond to the data type of the Source word (32-holes for 32-bits (DINT), 16-holes for 16-bit (INT) and 8-holes for 8- bits (SINT). Each hole has a butterfly valve. If the valve is closed, nothing can get through (a zero). If the valve is open, an object can drop through the hole (a one).
  • 15. MVM Instruction The mask shown would be: 1110 0000 1000 0010 or 16#E082
  • 16. Entering a Constant for the Mask Value  When entering the mask value as a constant it can be entered as a binary, octal or hexadecimal value. It is usually best to enter a constant as a hexadecimal number.  Entering mask values as constants is done in the following formats:  Hexadecimal value: 16#FFA37BC8  Octal value: 8#2273  Binary value: 2#101000110011100
  • 17. MVM Instruction  Mask operation example
  • 18. MVM Instruction DINT mask (32-bits) INT mask (16-bits) SINT mask (8-bits)