plc architecture – memory 2 by dr. amin danial asham

21
PLC ARCHITECTURE – Memory 2 by Dr. Amin Danial Asham

Upload: prudence-booker

Post on 17-Jan-2018

239 views

Category:

Documents


1 download

DESCRIPTION

 Application Memory.  The application memory stores programmed instructions and any data the processor will use to perform its control functions.  The maximum amount of application memory varies depending on the size of PLC.  The controller stores all data in the data table section of the application memory, while it stores programmed instructions in the user program section. Application memory map

TRANSCRIPT

Page 1: PLC ARCHITECTURE – Memory 2 by Dr. Amin Danial Asham

PLC ARCHITECTURE – Memory2by

Dr. Amin Danial Asham

Page 2: PLC ARCHITECTURE – Memory 2 by Dr. Amin Danial Asham

References

Programmable Controllers-Theory and Implementation, 2nd Edition, L.A. Bryan and E.A. Bryan

Page 3: PLC ARCHITECTURE – Memory 2 by Dr. Amin Danial Asham

Application Memory. The application memory stores programmed instructions and any

data the processor will use to perform its control functions. The maximum amount of application memory varies depending on

the size of PLC. The controller stores all data in the data table section of the

application memory, while it stores programmed instructions in the user program section. Application memory map

Page 4: PLC ARCHITECTURE – Memory 2 by Dr. Amin Danial Asham

Application Memory (continue)Data Table:

This section stores:

i. The input table

ii. The output table

iii. The storage area

Page 5: PLC ARCHITECTURE – Memory 2 by Dr. Amin Danial Asham

Application Memory (continue) Data Table (continue)

i. The input table This area of memory stores the status of the digital inputs of a

PLC, such that each bit represents a digital input. The maximum number of input table bits is equal to the

maximum number of field inputs that can be connected to the PLC.

Each digital input is represented by a bit; that is, if the maximum number of digital inputs is 16 field inputs connected to a PLC then the input table must have a maximum of 16 bits (two bytes).

The address of an input to a PLC is consisting of the analogous bit position and the word address that contains this bit in the input table.

Page 6: PLC ARCHITECTURE – Memory 2 by Dr. Amin Danial Asham

Application Memory (continue) Data Table (continue)

i. The input table (continue) Example: An input address 130078 means the bit number 078 in the word

location 1308 in the input table area. This bit is 1 when the input is ON and 0 when the input is OFF. These input table changes take place during the input reading part of the scan

cycle.

Page 7: PLC ARCHITECTURE – Memory 2 by Dr. Amin Danial Asham

Application Memory (continue) Data Table (continue)

ii. The Output table This area stores the status of the digital outputs of a PLC , such

that each bit represents a digital input. The maximum number of output table bits is equal to the

maximum number of field outputs that can be connected to the PLC.

Each digital output is represented by a bit; that is, if the maximum number of digital outputs is 16 field outputs connected to a PLC then the output table must have a maximum of 16 bits (two bytes).

The address of an output to a PLC is consisting of the analogous bit position and the word address that contains this bit in the output table.

Page 8: PLC ARCHITECTURE – Memory 2 by Dr. Amin Danial Asham

Application Memory (continue) Data Table (continue)

ii. The Output table (continue) Example: An output address 051058 means the bit position 058 in the word

location 0518

If 0 is written by the program in this bit the corresponding output will be turned OFF.

If 1 is written by the program in this bit the corresponding output will be ON. The turning ON and OFF of field devices via the output module occurs during

the update of outputs after the end of the scan cycle.

Page 9: PLC ARCHITECTURE – Memory 2 by Dr. Amin Danial Asham

Application Memory (continue) Data Table (continue)iii. Storage Area The purpose of the storage area section of the data table is to store changeable

data, whether it is one bit or a word. This area has two sections; Internal Bit Storage and Register/Word storage.oInternal Bit Storage

•This section area contains storage bits that are referred to as either internal outputs, internal coils, internal (control) relays, or internals.

•These internals provide virtual outputs, for interlocking purposes, of ladder sequences in the control program. In other words these internal outputs are used as variables used throughout the program.

• Internal outputs are not reflected on the real physical devices connected to a PLC.

o Register/Word storage•This area is used to store groups of bits (bytes and words).•This information is stored in binary format and represents quantities or code such as BCD code, ASCII, decimal values in binary form,..etc.

Page 10: PLC ARCHITECTURE – Memory 2 by Dr. Amin Danial Asham

Storage area section of the

data table

Application Memory (continue) Data Table (continue)iii. Storage Area (continue)

Values placed in the register/word storage area represent input data from a variety of devices, such as thumbwheel switches, analog inputs, and other types of variables.

These registers can contain output values for interface modules connected to field devices, such as seven-segment LED indicators (BCD), and drive speed controllers.

Page 11: PLC ARCHITECTURE – Memory 2 by Dr. Amin Danial Asham

Application Memory (continue)Data Table (continue)iii.Storage Area (continue) Storage registers are also used to hold fixed constants, such as

preset timer/counter values, and changing values, such as arithmetic results and accumulated timer/counter values

Depending on their use, the registers in the register/word storage area may also be referred to as input registers, output registers, or holding registers

Page 12: PLC ARCHITECTURE – Memory 2 by Dr. Amin Danial Asham

Example2: what happens to internal 2301 (word 23, bit 01) when the limit switch connected to input terminal 10 closes?

Solution: When LS closes contact 10 will close, Turning internal output 2301 ON

(a 1 in bit 01 of word 23). This will close contact 2301 (-||-) and turn real output 20 ON causing the light PL to turn ON

at the end of the scan.

Page 13: PLC ARCHITECTURE – Memory 2 by Dr. Amin Danial Asham

•Example 3: For the shown memory map in illustrate how to represent the following numbers in the storage area: (Word 16bit)

(a) the BCD number 9876,(b) the ASCII character A (octal 101) in one byte (use lower byte), and(c) the analog value 2257 (1000 1101 0001 binary). Represent these values starting at register 400.

Page 14: PLC ARCHITECTURE – Memory 2 by Dr. Amin Danial Asham

• Solution of Example 3

Page 15: PLC ARCHITECTURE – Memory 2 by Dr. Amin Danial Asham

Application Memory (continue)User Control Program • All of the PLC instructions that constitute a control program

for a machine or a process are stored in this area.• The processor’s executive software language, which

represents each of the PLC instructions, stores its instructions in the user program memory.

• When a PLC executes its program, the processor interprets the information in the user program memory and controls the referenced bits in the data table that correspond to real or internal I/O.

• The processor’s execution of the executive program accomplishes this interpretation of the user program.

Page 16: PLC ARCHITECTURE – Memory 2 by Dr. Amin Danial Asham

An example of the organization of the Application memory map For a PLC with the following configuration:

• total application memory of 4K words with 16 bits•capability of connecting 256 I/O devices (128 inputs and 128 outputs)

• 128 available internal outputs•capability of up to 256 storage registers, selectable in groups of 8- word locations, with 8 being the minimum number of registers possible (32 groups of 8 registers each)

•octal (base 8) numbering system with 2-byte (16-bit) word length

Page 17: PLC ARCHITECTURE – Memory 2 by Dr. Amin Danial Asham

An example of the organization of the Application memory map (continue)

Input table words=128/16=8 words

Addr. from 00008 to 00078

Output table words=128/16=8 words

Addr. from 00108 to 00178

Internal Output storage=128/16=8 words

Addr. from 00208 to 00278

Maximum register storage =256 words in 32

groups of 8 words

The size of the user program memory words

Page 18: PLC ARCHITECTURE – Memory 2 by Dr. Amin Danial Asham

Example 4: Show that how the following simple circuit is implemented using PLC, where the used input address is 0000058 and output address 0010068. The internal output bit 0020178 is derived by the virtual contact 0010068.

Solution:

Page 19: PLC ARCHITECTURE – Memory 2 by Dr. Amin Danial Asham

•Solution Example 4 (continue):o When the LS is closed bit 0000058 turns into 1.

o When bit 0000058 becomes one the virtual contact 0000058 closes.o When contact 0000058 closes the output bit 0010068 becomes 1 and hence

the virtual coil 0010068 is energized hence corresponding output the light PL is energized.

The virtual contact 0010068 closes.

oWhen the virtual contact 0010068 closes the internal output bit 002017 turns ON.

Page 20: PLC ARCHITECTURE – Memory 2 by Dr. Amin Danial Asham

Steps in the evaluation of a PLC circuit

Page 21: PLC ARCHITECTURE – Memory 2 by Dr. Amin Danial Asham

Thanks