You are on page 1of 18

Industrial Process Control(Lab)

Comparison and Mathematical instructions (Lab 2)

Zaib.zafar@nu.edu.pk

FAST Isb
Engr.jahanzaib Zafar

Objectives of today Lab

Familiar with different types of Memory


How to Access Memory
Familiar with different types of DATA types
Familiar with different types of comparison
instructions
Basic of timers

Types of Registers in PLC


1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.

Process-Image Input Register: I


Process-Image Output Register: Q
Variable Memory Area: V
Accumulators: AC
Special Memory: SM
Timer Memory Area: T
Counter Memory Area: C
High-Speed Counters: HC
Analog Inputs: A
Analog Outputs: AQ
Sequence Control Relay (SCR) Memory Area: S
Bit Memory Area: M

How to access Memory Area


The memory registers of Can be:
Bit Accessible
Byte Accessible
Word Accessible
Double Word Accessible

How to access Bits of Memory

Byte, Word & Double Access

Data Types & Ranges

Compare Instructions

Use for comparison of the following data


types:

LAD Symbols for Byte Comparison:

Compare Integer:
same way we can compare integer but:
Integer comparisons are signed.

LAD Symbols for Integer Comparison:

Compare Double
Double word comparisons are signed

Math instructions:

The math instructions includes:

instructions add or subtract two 16-bit


integers and produce a 16-bit result (OUT)
SM1.1 bit is an overflow flag.
SM1.2 (negative)

Multiplication & Division Instructions


The Multiply Integer instruction multiplies
two 16-bit integers and produces a 16-bit
product.
The Divide Integer instruction divides two
16-bit integers and produces a 16-bit
quotient. No remainder is kept.

SM1.1 (overflow) flag


SM1.3 (divide-by-zero) flag.

Increment & Decrement Instructions:

The Increment Byte and Decrement Byte instructions add


or subtract 1 to or from the input byte (IN) and place the
result
into the variable specified by OUT.

Introduction with timer Instruction

two types of timers available with different


resolutions :
T Delay ON
T Delay OFF

When timer value reaches at PT it turn on TXX


Contact.

Example: (timer working)

Lab
Tasks
Task
1
Construct the following LADs using the STEP 7Micro/WIN 32. ladder are given in the Lab Manual.
Task 2:
A circuit consists of 10 LEDs. The sequence of glowing
of LED is in such a way that after every five seconds a
LED glows. As a LED glow, it turns off the LED which is
glowing already. So at any time only one LED can
glow. After completing one loop, all LEDs are switched
off automatically and repeat the previous cycle again.
Construct Ladder Logic Diagram to implement the
given circuit.

Task3:
Implementation of calculator:
Design a calculator which can add , multiply ,
subtract, divide, also have capability to have to
overflow handling capability.

You might also like