OMRON PLC Training

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 169

Welcome

OMRON

ng ini tra on snd ha plc

dvanced Industrial Automation

OMRON component subdivision Industrial Components Automation & Drives

OMRON
Photoelectric sensors Displacement sensors Vision systems Safety sensors Safety switches Safety relays Proximity sensors Rotary encoders Pressure sensors

Electromechanical relays Timers and counters Programmable relays Level controllers Limit switches Push buttons Low voltage switch gear Temperature and process controllers Solid-state relays Panel indicators Power supplies

Program. Logic Controller Network systems HMI terminals Inverters Servo systems Software

Sensing & Safety

dvanced Industrial Automation

Contents of the training Automation & Drives

OMRON

Contents of the training: Introduction: PLC Overview OMRON PLC range CJ1M Software CX-programmer V3.0 PLC-Basic Hands-On Training Building up an Project PLC-Advanced Hands-on Training

dvanced Industrial Automation

Overview PLC range

OMRON

Functionality

CS1 C200HE/HG/HX CQM1H CJ1 SRM1 CPM2C

CPM2A CPM1A

ZEN

34

100 120

140

256

512

1184

2560

5000

I/O

dvanced Industrial Automation

CPM PLC family Relay or transistor outputs Various peripheral devices 4 types of interrupts High-speed counter integrated Networking: Compobus-S (remote I/O) Compobus-D Super (DeviceNet) compact, high Profibus functionallity Micro (slave) PLC

OMRON
CPM1A
The Micro PLC, standard for most of the basic applications

CPM
High functionality Micro PLC fully compatible with CPM1A

CPM2C

CPM2A

dvanced Industrial Automation

CPM1A Family

OMRON
CPUs with 10, 20, 30 and 40 I/O Expandable to 100 I/O 2 KW program memory 1KW data memory 150 instructions 1 port (peripheral) 1 counter for counting to up to 5 KHz 2 pulse generators, up to 2 KHz frequency

dvanced Industrial Automation

CPM2A Family

OMRON
CPUs with 30, 40 or 60 I/O Expandable up to 120 I/O 4 KW Program memory 2KW Data memory 185 instructions 2 ports (Peripheral and RS232) 1 counter, 20 KHz range 4 counters for up to 2 KHz 2 pulse outputs, 10 Khz

dvanced Industrial Automation

CPM1A/2A adding I/O

OMRON

CPM1A-10 CPM1A-20

No-expansion

CPM1A-30 CPM1A-40 CPM2A-20 CPM2A-30 CPM2A-40 CPM2A-60 Max. 3 modules extra

I/O Inputs: I/O Outputs:

0.00 9.15 10.00 19.15

dvanced Industrial Automation

CPM I/O example

OMRON
CPM expansion 20 I/O
12 digital inputs 8 digital outputs

CPM2A 40 I/O
24 digital inputs 16 digital outputs

0.00 0.11 1.00 1.11

2.00 2.07 3.00 3.03

10.00 10.07 11.00 11.07

12.00 12.07

dvanced Industrial Automation

CQM PLC family

OMRON
Modules

CPUs

Inner boards

Communications

dvanced Industrial Automation

CQM PLC family

OMRON
Modular system configuration No need for racks 256/512 I/O points maximum 15 Kw Program memory max. Up to 12.000 data memory registers Built in all CPUs :
16 built-in digital inputs 4 counting/interrupt inputs 1 counter, 5 Khz 1 or 2 comunication ports

dvanced Industrial Automation

CQM PLC family

OMRON

CQM1H modules Variety of Digital and Analogue I/O Temperature control Linear sensor module Remote I/O master, CQM1H innermasters fieldbus boards Counters, Encoders, Pulse drivers, Analogue, Communications...

dvanced Industrial Automation

CQM1H expansion

OMRON

dvanced Industrial Automation

CQM1H expansion

OMRON

dvanced Industrial Automation

CQM1H - bits and memory


Input bits Output bits Work bits 000.00 015.15 100.00 115.15 016.00 089.15 116.00 189.15 216.00 219.15 224.00 229.15 244.00 255.07 TR0 TR7 HR00.00 HR99.15 AR00.00 AR27.15 LR00.00 LR63.15 TIM/CNT 000 - 511

OMRON
Max 256 I/O CPU11/21 Max 512 I/O CPU51/61

Special bits Temporary bits Holding bits Auxiliary bits Link bits Timers / counters Data memory

CPU settings Holds on power failure

/!\ Mixed

DM0000 DM3071 (CPU 11/21) / DM6143 (CPU 51/61) DM6144 DM6655 (read only) EM0000 EM6655 (CPU 61) 000.00 000.03

Interrupts

4 interrupts sequence

dvanced Industrial Automation

CQM1H networking

OMRON

Controller link CompoBus/D (Slave) NT Link, Host Link,Modem..

AS-I Bus (Master)

CompoBus/S (Master)

Protocol Macro, Modbus (Master)

dvanced Industrial Automation

CS1 PLC family - Hardware Modular system configuration Standard Nine types of CPU Back-planes for CPU & expansion 2, 3, 5, 8 and 10 slots (max. 7 pcs. 12 meter special up-to 50meter) C200H power supply units C200H expansion back-planes usable (max. 3 pcs.) Number of Special I/O units Communication Inner boards

OMRON

dvanced Industrial Automation

CS1 Family - Networks


Network possibilities Ethernet Controller Link DeviceNet (Compobus/D) Compobus/S

OMRON

Full Support of Ethernet, DeviceNet and Profibus-DP as open networks, as well as enhanced support of Controller Link for Proprietary control networking

Remote Programming & Monitoring Program or monitor a PLC on a remote network (access 3 layers) Easy setup of Data Links for high capacity data sharing between nodes Fieldbus solutions on device level for lower dvanced Industrial Automation installation/maintenance costs

CS1 Family Data storage

OMRON

Comments stored in the PLC Easy backup of the program Flash-memory card: 8, 16, 32, 48, 64MB Process values recording from the ladder Data file management program files I/O memory files system parameters files

dvanced Industrial Automation

CS1D

OMRON

dvanced Industrial Automation

CS1D Risk Management

OMRON

Risk Management is essential in systems requiring a high level reliability.


Duplex unit

Every system is subjected to malfunction


CLK CLK

CPU

PS PS CPU

I/O

When is this a significant problem? 24 hour system that can not be stopped Extremely high starting-up costs Unexpected stops can lead to disasters e.g. toxic spills, explosions Duplexing functions:

Double power supply (main and expansion rack) Expansion Double CPU I/O Rack Double Network cards Hot swapping of all units without powering down the system (CPU, power supply and normal I/O units Expansion But ALSO network and special I/O units)
I/O Rack

PS PS PS PS

dvanced Industrial Automation

CS1D Hot-standby

OMRON

dvanced Industrial Automation

CS1D redundant network

OMRON

dvanced Industrial Automation

CS1 Allocating I/O Units

OMRON

dvanced Industrial Automation

CJ1 PLC family

OMRON

Fast, Compact, Seamless

dvanced Industrial Automation

Introducing the new CJ1

OMRON

A SMALL PLC in size, but it is not a MICRO PLC size and capability no longer go hand-in-hand! The CJ1 features: High speed CPUs (40 and 20ns): 20ns is 3 to 5 times faster than typical mid-sized CPU. (e.g. C200H series) Control up to 2560 Local I/O: Typical of the mid-sized PLC category. Industry leading networking: Omrons FINS protocol routes data across networks. Compact size: Free up panel space without sacrificing performance!

dvanced Industrial Automation

The CJ1 is a mid-sized PLC in a micro-sized package.

OMRON

In fact the Omron CJ1 is a CS1 in a smaller package. Released in 1999, the CS1 is and will remain Omrons mid-sized PLC and leading technology 2/3 of the platform. Footprint 2/3 the Panel Depth

1/3 Total Panel Volume

dvanced Industrial Automation

How is the CJ1 possible?

OMRON

Advances in printed circuit board design More efficient layout. New component technology Lower energy requirements. Surface mounted PCB technology Better heat dissipation. New processors Faster and more energy efficient.

dvanced Industrial Automation

CJ1 Features - Flash Memory Cards

OMRON

16 to 64 MB flash cards available. Store PLC programs and transfer to/from PLC memory. Log data into the card for manual or network retrieval. Access the flash card from CX-Programmer it appears as another PC drive. Use FTP to store non-PLC related files on the flash card.

dvanced Industrial Automation

CJ1 Features - Communications

OMRON

Ethernet Controller Link DeviceNet CompoBus/S Single Port Multiple Access Protocol Macro

dvanced Industrial Automation

CJ1 Features - Communications


Programming & Debug Tool

OMRON
Protocol Macro:
Non-Omron Serial Devices

SCADA

MESSAGE BOARD Ethernet


CLK PCI Board
Flash Memory

Ethernet

Controller Link DeviceNet or CompoBus/S

Host Link Omron Touch Screen Programming/Diagnostic Software

Single Port Multiple Access

dvanced Industrial Automation

CJ1G/H Features Layout Flexibility

OMRON
CPU Rack

Rack mounted PLCs come with fixed number of slots available. CJ1 is more flexible. Eliminating the rack eliminates module width restrictions. Smaller modules up to 10 can be joined by the CJ1 through plane

Expansion 1

Expansion 2

Expansion 3

Expand up to 4 racks of I/O and communications 40 total modules (2560 dvanced Industrial Automation local I/O)

TOTAL EXPANSION BUS LENGTH = 12 meters 0.3, 0.7, 2.0, 3.0, 5.0, 10.0, 12.0 meter cables available

CJ1M - series

OMRON

dvanced Industrial Automation

CJ1M new CPUs

OMRON

Fast! Small! Seamless! Expands the CJ1 family to the small scale control area (CQM1H) CJ1M memory map, instructions and I/O with CJ1G/H compatible 6 NEW CPUs: .CJ1M-CPU11 (5Ksteps) CJ1M-CPU12 (10Ksteps) CJ1M-CPU13 (20Ksteps) CJ1M-CPU21 (5Ksteps) CJ1M-CPU22 (10Ksteps) CJ1M-CPU23 (20Ksteps)

dvanced Industrial Automation

CJ1M - features

OMRON
Peripheral port RS232C Memory card interface Just 31mm wide

.CJ1M-CPU11
(5Ksteps) CJ1M-CPU12 (10Ksteps) CJ1M-CPU13 (20Ksteps)

31
CJ1M-CPU11 (5Ksteps) CJ1M-CPU22 (10Ksteps) CJ1M-CPU23 (20Ksteps) 16 I/O on the CPU - 10 inputs - 6 outputs Interrupt functions 4 points Build-in positioning functions - pulse output 100kHz, 2 axes - counter function Phase differ. 50kHz,

dvanced Industrial Automation

CJ1M Capacity compared to


User Memory Capacity CJ1G/H CJ1M CQM1H 15 K 20 K

OMRON
120 K steps

Data Memory Capacity CJ1G/H CJ1M CQM1H 12 K 32 K 256 K words

50% volume reduction

dvanced Industrial Automation

CJ1M Expansion compared to


Maximum Number of I/O bits CJ1G/H CJ1M CQM1H 512 640

OMRON
2560

Maximum Number of Connectable Units CJ1G/H CJ1M CQM1H 11 Up to 10 I/O units can be placed on a CJ1M-CPU. A expansion rack can be added to the CJ1M-CPU13 & CJ1M-CPU23 20 40

dvanced Industrial Automation

CJ1M Speed compared to


Execution Time (Basic Instruction) CJ1G/H CJ1M CQM1H Execution Time (Special Instructions) 0.04 s CJ1G/H CJ1M CQM1H 0.3 s 20 ns 100 ns

OMRON

375 ns

17.7 s

CJ1M is 59 times faster!!!

dvanced Industrial Automation

CJ1 PLC System set-up


CJ1-Power Supply Basic I/O Special I/O CPU-Bus I/O(*) Interrupt units(*)

OMRON
CJ1-I/O Control Unit End-Cover

CJ1-CPU

Memory Card CJ1-Power Supply

Max 12 m I/O Connecting Cable

Basic I/O Special I/O CPU-Bus I/O

Max 10 Units

End-Cover

CJ1-I/O Interface Unit

Max 10 Units WARNING


(*) Place CPU-Bus Units and I/O-Interrupt units next to CPU (5 left slots)

dvanced Industrial Automation

CJ1 PLC - Hardware


3 groups of CJ1-Units

OMRON
Special I/O Units CPU Bus Units

Basic I/O Units

CIO 0000 to CIO 0079 (8 , 16 , 32 or 64 points)

CIO 2000 to CIO 2959 (Refresh area :10 words/unit) D20000 to D29599 (Setup area : 100 words/unit)

CIO 1500 to CIO 1899 (Refresh area : 25 words/unit) D30000 to D31599 (Setup area : 100 words/unit)

Special I/O unit number (40 Units maximum)

CPU Bus unit number (16 Units maximum)

dvanced Industrial Automation

CJ1 - I/O channel assignment

OMRON
008 009 010 011

I/O word

000

001 002

006 003 004 005 007

IN 16

OUT IN OUT 16 16 16

IN 16

IN 16

IN 32

OUT 64

dvanced Industrial Automation

CJ1 - I/O channel assignment

OMRON
008 009 010 011

I/O word

000

006 001 002 003 004 005 007 Reserved

IN 16

OUT IN OUT 16 16 16

Reserved

IN 16

IN 16

IN 32

OUT 64

dvanced Industrial Automation

CJ1 - I/O channel assignment


CIO word 000 001 002

OMRON

IN 16

OUT 16

IN 16

003

004 005 006

IN 16

OUT 16

IN 16

OUT 16

007

008 009 010

OUT 16

IN 16

OUT 16

IN 16

dvanced Industrial Automation

CJ1 - I/O channel assignment

OMRON
Special I/O
000 001 002 003 004 005 006 007 008 009 010

CPU BUS

Special I/O

00 00 01

IN 16 1500 1524 2000 2009

OUT 16 2010 2019

OUT OUT 16 64

IN 64

dvanced Industrial Automation

CX-programmer V3.0

OMRON

CX-Programmer V3.0 made in Japan Improvements on 87 points Designed to operate with MS Windows XP as well as MS Windows 95, 98, ME, NT and 2000. Recommended: MS Windows NT, 2000 or XP New PLC ranges supported: - CJ1M - CS1H - CS1D (needs CX-P V3.1 for duplex functions) New Networks supported: - CS1 Bus I/F Board (ITBC-CST01) - 62 node Controller Link

dvanced Industrial Automation

Improvements on 87 points
Small selection: RS01 RS03 RS05 RS06 RS10

OMRON

Key-function allocation Open CX-P with default environment On-line default state: Monitoring Auto on-line function Improvement to address formatting: A-AR, H-HR, L-LR, T-TIM, C-CNT, D-DM, E-EM RS11 Enable pasting of Symbol data created using MS-Excel and CX-P V1.2. RS16 Automatically generate an END instruction in a new section RS19 Fast connection across empty cells: [Ctrl] + arrow keys RS24 Connection and division of rungs RS35 Jump to corresponding contact / coil RS56 Rung Wrap RS86 Block / Network Manager

dvanced Industrial Automation

PLC - Basic Hands-on training

OMRON

ing ain tr on snd ha sic ba

dvanced Industrial Automation

Starting a new project in CX-Programmer

OMRON

dvanced Industrial Automation

Opening a new Program

OMRON

dvanced Industrial Automation

Up- and downloading of PLC programs

OMRON

dvanced Industrial Automation

Statement List

OMRON
000.00 000.01 000.01 100.00

000.02

LD AND OR AND OUT


000.00 000.01 000.03 100.00

000.00 000.01 000.02 000.03 100.00

000.02

dvanced Industrial Automation

Statement List

OMRON
000.00 000.01 100.00

000.02

000.03

LD AND OR AND OUT


000.00 000.01

000.00 000.01 000.02 000.03 100.00


000.03 100.00

000.02

000.00

000.01

100.00

000.02

000.03

LD AND LD AND OR LD OUT

000.00 000.01 000.02 000.03 100.00

dvanced Industrial Automation

Statement List

OMRON
000.04 000.05 100.01

000.06

000.07

000.04

000.05

100.01

000.06

000.07

000.05

LD OR LD OR AND LD OUT

000.04 000.06 000.05 000.07 100.01

000.07

dvanced Industrial Automation

Statement List

OMRON
000.00 000.01 000.02 000.03 100.02

000.04

000.05

100.03

dvanced Industrial Automation

Statement List

OMRON
000.00 000.01

000.02

000.03

100.02

000.04

000.05

100.03

TEMPORAIRY RELAY
LD 000.00 AND 000.01 OUT TR 0 AND 000.02 AND 000.03 OUT 100.02 LD TR 0 AND 000.04 AND 000.05 OUT 100.03

dvanced Industrial Automation

OMRON

TRY...

dvanced Industrial Automation

Program Writing Seven steps

OMRON

1. Define the purpose 2. Problem Splitting 3. Working out 4. 5. 6. 7. Design Writing Testing Finishing

dvanced Industrial Automation

Program Writing Define the Purpose


1.

OMRON

Products on the inputbelt are transported to PES 0.00. This belt stops if there is another product under work. Otherwise the product is transported to the next belt and stops if PES 0.01 detects the product. The drill is in the upper position and will be started by output 100.02. The drill goes down to limitswitch 0.02. The output 100.02 is set to off and the drill is returning to the upper position. If upperlimitswitch 0.03 detects the drill, the inputbelt, the transportbelt and the outputbelt is started. PES 0.04 detects the product and stops the outputbelt on the backside of the product . After five products the pusher is activated and pushes the products from the belt by output 100.04. If the pusher is in the out position (limitswitch 0.05) the output goes off and the pusher returns. During this period no belt is running except the inputbelt.

dvanced Industrial Automation

Program Writing Problem Splitting

OMRON

2.
In-take transport

Drilling station

Transport and ejecting the products

dvanced Industrial Automation

Program Writing More Splitting

OMRON

2.
In-take transport Transport

Drilling station

Transport

Drilling

Transport & ejection

Transport

Ejection of the products

dvanced Industrial Automation

Program Writing Defining I/O list


3.
000.00 000.01 000.02 000.03 000.04 000.05 000.06 100.00 100.01 100.02 100.03 100.04 099.15 099.14 099.13 099.12 FInput FTransp CilOut CilIn FOutput PusIn PusOut Minput MTransport ACyl MOutput APus PUW PUWR MP MPR

OMRON

Working out (I/O list)


Sensor on input belt Sensor on transport belt Cylinder out Cylinder in Sensor on output belt Pusher in Pusher out Motor input belt Motor transport belt Cylinder Motor output belt Pusher Product under work Product under work ready Move products Move products ready

dvanced Industrial Automation

Adding comments to the PLC program

OMRON

dvanced Industrial Automation

Adding comments to contacts: Symbols

OMRON

Global symbols and Local symbols

dvanced Industrial Automation

Online Edit

OMRON

dvanced Industrial Automation

An easy way to connect

OMRON

dvanced Industrial Automation

OMRON

TRY...

dvanced Industrial Automation

Functions

OMRON
Operand Data-area S: Source word IR, SR, AR, HR, LR, T/C, DM, # P1: Parameter word IR, AR, HR, LR R: Result word IR, AR, HR, LR, T/C, DM

Ladder symbol Condition 1 XYZ(99) Condition 2 S Condition 3 P1 R

dvanced Industrial Automation

Timer Ladder symbol Condition 1 TIM N SV

OMRON
Operand Data-area N: TC number # (000-511) SV: Set value (BCD) IR, AR, DM, HR, LR, #
P1 Time Contact = 1 - 9999 = 0.1 - 999.9 sec = TIM0

INPUT

SV
TIMER OUTPUT

SV

dvanced Industrial Automation

Normal Timer

OMRON

000.00

100.00

SV

SV

dvanced Industrial Automation

Delay After Off

OMRON

000.01

SV1
100.01

SV1

dvanced Industrial Automation

On/Off Delay

OMRON

000.02

SV3
100.02

SV3 SV2

SV2

dvanced Industrial Automation

One Shot

OMRON

000.03

SV3
100.03

SV3

dvanced Industrial Automation

High Speed Timer

OMRON
Operand Data-area N: TC number # (000-511) SV: Set value (BCD) IR, AR, DM, HR, LR, #

Ladder symbol Condition 1 TIMH(15) N SV


SV Time Contact = 1 - 9999 = 0.01 - 99.99 sec = TIM0

INPUT

SV
TIMER OUTPUT

SV

dvanced Industrial Automation

Counter Ladder symbol Pulse Reset CNT N SV


SV Contact = 1 - 9999 = CNT511

OMRON
Operand Data-area N: Counter number # (000 511) SV: Set value (BCD) IR, AR, DM, HR, LR, #

PULSE

5
RESET

COUNTER OUTPUT

dvanced Industrial Automation

Reversible Counter Ladder symbol II+ DIReset


SV Contact
II+ DI-

OMRON
Operand Data-area N: Counter number # (000 511) SV: Set value (BCD) IR, AR, DM, HR, LR, #

CNTR(12) N SV
= 1 - 9999 = CNT511

0
RESET COUNTER OUTPUT

dvanced Industrial Automation

Example Program

OMRON

dvanced Industrial Automation

OMRON
Try

Manipulation of numbers and bits ON-LINE edit

dvanced Industrial Automation

Keep Ladder symbol S R KEEP(11) B


000.00 000.01

OMRON
Operand Data-area B: Bit IR, AR, HR, LR
100.00

100.00

000.00 KEEP(11) 000.01 100.00

BIT SET RESET

dvanced Industrial Automation

Set en Reset

OMRON
Operand Data-area B: Bit IR, AR, HR, LR B: Bit IR, AR, HR, LR

Ladder symbol S SET B R RSET B

dvanced Industrial Automation

Signal Flanks Ladder symbol Signal DIFU(13) B Signal DIFD(14) B

OMRON
Operand Data-area B: Bit IR, AR, HR, LR B: Bit IR, AR, HR, LR

CYCLUS

dvanced Industrial Automation

Interlock

OMRON

Ladder symbol Signal IL(02)

Signal

ILC(03)

dvanced Industrial Automation

Interlock

OMRON

PROGRAM WITHOUT INTERLOCK

dvanced Industrial Automation

Interlock

OMRON

PROGRAM WITH INTERLOCK

dvanced Industrial Automation

DIFU and DIFD in Interlocks

OMRON
000.00 IL(02) 000.01 DIFU(13) 10.00

ILC(03)

A ON OFF ON OFF ON OFF

000.00

000.01

010.00

dvanced Industrial Automation

Example Program

OMRON

dvanced Industrial Automation

OMRON

Try

dvanced Industrial Automation

Special Internal Relays

OMRON
Output inhibit Battery alarm Always on Always off - 253.14

First scan

1 min pulse 0.02 sec pulse 0.1 sec pulse 0.2 sec pulse 1.0 sec pulse

dvanced Industrial Automation

Questions?

OMRON

Thank you for you attention

if you have any question

dvanced Industrial Automation

PLC - DATA Hands-on training

OMRON

ing ain tr on snd ha ta da

dvanced Industrial Automation

System Flags

OMRON

ADRESS
255.03 255.04 255.05 255.06 255.07

FUNCTION
ER CY GR EQ LE

NAME
ERROR CARRY GREATER EQUAL LESS error bit carry bit > bit = bit < bit

dvanced Industrial Automation

Instruction groups * * * * * * * * * * * * * * * * Logical instructions Timer instructions Counter instructions Basic instructions Bit control instructions Data shifting instructions Data movement instructions Data compare instructions Data conversion instructions Binary calculation BCD calculation Logical calculation Subroutine instructions Step instructions Network instructions Special instructions

OMRON

dvanced Industrial Automation

Logical instructions

OMRON
NO contact NC contact Output Inverted output Horizontal and vertical line LD LD NOT AND AND NOT OR OR NOT OUT OUT NOT OR LD AND LD

Ladderdiagram:

Statement list:

dvanced Industrial Automation

Basic Instructions

OMRON
No function End of program Interlock Interlock close

NOP(00) END(01) IL(02) ILC(03)

dvanced Industrial Automation

Jump Instructions
LADDER SYMBOOL JMP(04) N N: Sprongnummer # (00 to 99)

OMRON
OPERAND DATAGEBIEDEN N: Sprongnummer # (00 to 99)

JME(05) N
000.00 JMP(O4) 000.01 100.00

OUTPUTS FREEZE
TIM 0 #9999

TIMERS STOP

JME(O5)

dvanced Industrial Automation

Jump Instructions

OMRON
V.W.1 JMP(O4) 0

JME(O5) 0 V.W.2 JMP(O4) 0

LABEL 0 Can be used more than one time in the program.

JME(O5) 0

USED More programs into 1 PLC Shorten programs.

dvanced Industrial Automation

Jump Instructions

OMRON
V.W.1 JMP(O4) 0

V.W.2 JMP(O4) 0

LABEL 0 JMP-JMP-JME combination

JME(O5) 0

dvanced Industrial Automation

Jump Instructions

OMRON
V.W.1 JMP(O4) 1

V.W.2 JMP(O4) 2

LABEL 1- 99 Can be used only once in the program.

JME(O5) 2

JME(O5) 1

dvanced Industrial Automation

Jump Instructions

OMRON
JME(O5) 1

V.W.1 JMP(O4) 1

LABEL 1- 99 Jump back in the program

USED Recursive action Conversion more than one variable MODBUS CRC Check

dvanced Industrial Automation

Example Program

OMRON

dvanced Industrial Automation

OMRON

Try

dvanced Industrial Automation

Data monitoring

OMRON

dvanced Industrial Automation

Data Shifting Instructions

OMRON

Data Shifting Instructions

dvanced Industrial Automation

Shift Register

OMRON
SHIFTREGISTER
SFT(10)
DATA SFT(10) C.P. 99 RESET 99 99.12 100.00

Start word IR, AR, DM, HR, LR End word IR, AR, DM, HR, LR

St+1, St+2, ...

St

VERLOREN0 0 0 0 DATA 1

1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 EXECUTIE 1 1
CONDITIE

Condition:

End word >= Start word Same data area

dvanced Industrial Automation

Example Program

OMRON

dvanced Industrial Automation

OMRON

Try

dvanced Industrial Automation

Shift Register

OMRON
SHIFTREGISTER
SFTR(84)
V.W. SFTR(84) C St E 000.00 10.12

C: Control word IR, AR, DM, HR, LR St: Start word IR, AR, DM, HR, LR E: End word IR, AR, DM, HR, LR

Example C= IR10
000.01 10.13

L/R DATA
000.02 10.14

CLOCK PULSE
000.03 10.15

RESET

dvanced Industrial Automation

Shift Register

OMRON
SHIFTREGISTER
ASL(25)
V.W. ASL(25) Wd

Wd: Word IR, AR, DM, HR, LR

ER, EQ

BIT 15

BIT 0

0 0 0 1 1 0 1 0 1 1 1 1 0 0 0 0

Cy

dvanced Industrial Automation

Shift Register

OMRON
SHIFTREGISTER
ASR(26)
V.W. ASR(26) Wd

Wd: Word IR, AR, DM, HR, LR

ER, EQ

BIT 15

BIT 0

0 0 0 1 1 0 1 0 1 1 1 1 0 0 0 0

Cy

dvanced Industrial Automation

Shift Register

OMRON
SHIFTREGISTER
ROL(27)
V.W. ROL(27) Wd

Wd: Word IR, AR, DM, HR, LR

ER, EQ

BIT 15

BIT 0

0 0 0 1 1 0 1 0 1 1 1 1 0 0 0 0

Cy

dvanced Industrial Automation

Shift Register

OMRON
SHIFTREGISTER
ROR(28)
V.W. ROR(28) Wd

Wd: Word IR, AR, DM, HR, LR

ER, EQ

BIT 15

BIT 0

0 0 0 1 1 0 1 0 1 1 1 1 0 0 0 0

Cy

dvanced Industrial Automation

Shift Register

OMRON
SHIFTREGISTER
SLD(74)
V.W. SLD(74) St E

St: Start word IR, AR, DM, HR, LR E: End word IR, AR, DM, HR, LR

ER

St

1 2

3 2

4 3

5 4

6 5

7 6

8 7

0 8

VERLOREN DATA

0 Condition: End word >= Start word Same data area

dvanced Industrial Automation

Shift Register

OMRON
SHIFTREGISTER
SRD(75)
V.W. SRD(75) E St

E: End word IR, AR, DM, HR, LR St: Start word IR, AR, DM, HR, LR

ER

St

1 0

1 2

2 3

3 4

4 5

5 6

6 7

7 8

VERLOREN DATA

0 Condition:

End word >= Start word Same data area

dvanced Industrial Automation

Shift Register

OMRON
SHIFTREGISTER
WSFT(16)
V.W. WSFT(16) St E

St: Start word IR, AR, DM, HR, LR E: End word IR, AR, DM, HR, LR

ER
DM100

0000

0000 1234 1111 1234 1111 2233 1FFF 2233 1FFF 0000 0000 9999 4545 9999
DM106

VERLOREN DATA

Condition:

End word >= Start word Same data area

dvanced Industrial Automation

Notations

OMRON
NOTATIONS
Decimal
0,1,2,3,4,5,6,7,8,9

1234 4 * 10 0 3 * 10 1 2 * 10 2 1 * 10 3

dvanced Industrial Automation

Notations

OMRON
NOTATIONS
Binary
0,1

1011 1*20 = 1 1*21 = 2 0*22 = 0 1*2


3

11
:2 rest 1 rest 1 rest 0 rest 1

5
:2

2
:2

= 8 11

1
:2

1011

dvanced Industrial Automation

Notations

OMRON
NOTATIONS
Hexadecimal
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F

12A4 4 * 16 0 = 10 * 16 1 = 2 * 16 2 = 1 * 16
3

4772
: 16 rest 4 rest 10=A rest 2 rest 1

4 160 512

298
: 16

18
: 16

= 4096 4772

1
: 16

12A4

dvanced Industrial Automation

Notations

OMRON
NOTATIONS
Hexadecimal <-> Binary Hexadecimal
12A4

Binary

0001 0010 1010 0100


2 15 20

dvanced Industrial Automation

Notations

OMRON
NOTATIONS
Decimal <-> BCD Decimal
1294

BCD

0001 0010 1001 0100


23 D 20 23 H 20 23 T 20 23 E 20

dvanced Industrial Automation

Notations

OMRON
NOTATIONS
DEC
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

HEX
0 1 2 3 4 5 6 7 8 9 A B C D E F 10 11 12 13 14

BIN
00000 00001 00010 00011 00100 00101 00110 00111 01000 01001 01010 01011 01100 01101 01110 01111 10000 10001 10010 10011 10100

BCD
0000 0000 0000 0001 0000 0010 0000 0011 0000 0100 0000 0101 0000 0110 0000 0111 0000 1000 0000 1001 0001 0000 0001 0001 0001 0010 0001 0011 0001 0100 0001 0101 0001 0110 0001 0111 0001 1000 0001 1001 0010 0000

dvanced Industrial Automation

Data Movement Instructions

OMRON

Data Movement Instructions

dvanced Industrial Automation

Data Movement Instructions

OMRON

Data Movement Instructions


MOV(21)
V.W. MOV(21) S

S: Source word IR, AR, DM, HR, LR, TC, # D: Destination word IR, AR, DM, HR, LR

ER, EQ

SOURCE WORD

DESTINATION WORD

1101101110011011

1101101110011011

Status source word will not be changed

dvanced Industrial Automation

Example Program

OMRON

dvanced Industrial Automation

OMRON

Try

dvanced Industrial Automation

Differentiated Instructions

OMRON
000.02 000.03 DIFU(13) 010.00

Differentiated Instructions
000.01

010.00

MOV(21) #0001 DM0000

000.01

000.02

000.03

@MOV(21) #0001 DM0000

dvanced Industrial Automation

Indirect Addressing

OMRON
Indirect Addressing
000.01 MOV(21) #0010 DM0012

BEFORE DM0010 DM0011 DM0012 DM0013 DM0014 DM0015 0013 3331 1234 A000 0000 FFFF

AFTER DM0010 DM0011 DM0012 DM0013 DM0014 DM0015 0013 3331 0010 A000 0000 FFFF

dvanced Industrial Automation

Indirect Addressing

OMRON
Indirect Addressing
000.01 MOV(21) #0010 *DM0012

BEFORE DM0010 DM0011 DM0012 DM0013 DM0014 0013 3331 1234 A000 0000

AFTER DM0010 DM0011 DM0012 DM0013 DM0014 0013 3331 1234 A000 0000

DM1233 DM1234 DM1235

A120 AD01 FFFF

DM1233 DM1234 DM1235

A120 0010 FFFF

dvanced Industrial Automation

Data Movement Instructions MVN(22)


V.W. MVN(22) Br

OMRON
Br: Source word IR, AR, DM, HR, LR, TC, # D: Destination word IR, AR, DM, HR, LR

ER, EQ

SOURCE WORD

DESTINATION WORD

1101101110011011

0010010001100100

Status source word will not be changed

dvanced Industrial Automation

Data Movement Instructions XFER(70)


V.W. XFER(70) N Br D

OMRON
N: Number of words IR, AR, DM, HR, LR, TC, # Br: First source word IR, AR, DM, HR, LR, TC D: First destination word IR, AR, DM, HR, LR

ER Br Br+1 Br+2 Br+3 3331 1234 A000 0000 D D+1 D+2 D+3 3331 1234 A000 0000

Br+N-1

A120 Status source word will not be changed

D+N-1

A120

dvanced Industrial Automation

Data Movement Instructions BSET(71)


V.W. BSET(71) Br St E

OMRON
Br: Source word IR, AR, DM, HR, LR, TC, # St: Start word IR, AR, DM, HR, LR, TC E: End word IR, AR, DM, HR, LR, TC

ER Br 3331 St St+1 St+2 St+3 3331 3331 3331 3331

3331

Condition:

End word >= Start word Same data area

dvanced Industrial Automation

Data Movement Instructions XCHG(73)


V.W. XCHG(73) V1 V2

OMRON
V1: To change word 1 IR, AR, DM, HR, LR, TC V2: To change word 2 IR, AR, DM, HR, LR, TC

ER

V1

1234 3331

V2

3331 1234

dvanced Industrial Automation

Data Movement Instructions MOVB(82)


V.W. MOVB(82) Br Bi D

OMRON
Br: Source word IR, AR, DM, HR, LR, # Bi: Bit designation (BCD) IR, AR, DM, HR, LR, TC, # D: Destination word IR, AR, DM, HR, LR

ER
SOURCE WORD

DESTINATION WORD

1
Bit status source word will not be changed

dvanced Industrial Automation

Data Movement Instructions MOVD(83)


V.W. MOVD(83) Br Di D

OMRON
Br: Source word IR, AR, DM, HR, LR, TC, # Di: Digit designation (BCD) IR, AR, DM, HR, LR, TC, # D: Destination word IR, AR, DM, HR, LR, TC

ER
SOURCE WORD

1
Di = #0210

DESTINATION WORD DOELWOORD

7 9

1 9

Digit source word will not be changed

dvanced Industrial Automation

Data Compare Instructions

OMRON

Data Compare Instructions

dvanced Industrial Automation

Data Compare Instructions CMP(20)


V.W. CMP(20) Cp1 Cp2 255.05 > 100.00

OMRON
Cp1: First compare word IR, AR, DM, HR, LR, TC, # Cp2: Second compare word IR, AR, DM, HR, LR, TC, #

255.06 =

100.01

255.07 <

100.02

ER

dvanced Industrial Automation

Example Program

OMRON

dvanced Industrial Automation

OMRON

PROGRAM DOWNLOAD

dvanced Industrial Automation

Data Compare Instructions CMPL(60)


V.W. CMPL(60) Cp1 Cp2 255.05 > 100.00

OMRON
Cp1: First compare word IR, AR, DM, HR, LR, TC Cp2: Second compare word IR, AR, DM, HR, LR, TC

255.06 =

100.01

255.07 <

100.02

ER

dvanced Industrial Automation

Data Compare Instructions BCMP(68)


V.W. BCMP(68) VD CB R

OMRON
VD: Compare data IR, DM, HR, LR, TC, # CB: Startaddress table IR, DM, HR, LR, TC R: Result word IR, AR, DM, HR, LR 1234
Upper limit RES

ER VD
Lower limit

CB CB+2 CB+4 CB+6

1000 1280 1234 2000

CB+1 CB+3 CB+5 CB+7

2000 1420 1234 2400

1 0 1 0

Bit 0

CB+30

1100

CB+31

1500

Bit 15

dvanced Industrial Automation

Data Compare Instructions TCMP(65)


V.W. TCMP(65) VD CB R

OMRON
VD: Compare data IR, DM, HR, LR, TC, # CB: Startaddress table IR, DM, HR, LR, TC R: Result word IR, AR, DM, HR, LR 1234
DATA RES

ER VD

CB CB+1 CB+2 CB+3

1000 1280 1234 2000

0 0 1 0

Bit 0

CB+15

1100

Bit 15

dvanced Industrial Automation

Data Compare Instructions

OMRON

MCMP(19) CPS(--) CPSL(--) ZCP(--) ZCPL(--)

Multiple words compare Binary compare with sign Double binary compare met sign Zone compare with sign Double zone compare with sign

dvanced Industrial Automation

Data Conversion Instructions

OMRON

BIN(23) BINL(58) BCD(24) BCDL(59) ASC(86) HEX(--)

BCD ->Binary Double BCD -> Double Binary Binary -> BCD Double Binary -> Double BCD HEX -> ASCII ASCII -> HEX

dvanced Industrial Automation

BCD Calculation Instructions

OMRON

BCD Calculation Instructions

dvanced Industrial Automation

Data Calculation Instructions

OMRON
LADDER SYMBOOL @STC(40)

STC(40)

LADDER SYMBOOL CLC(41) @CLC(41)

Bit 255.04

dvanced Industrial Automation

Data Calculation Instructions ADD(30)


V.W. ADD(30) Br1 Br2 R

OMRON
Br1: Source word 1 (BCD) IR, AR, DM, HR, LR, TC, # Br2: Source word 2 (BCD) IR, AR, DM, HR, LR, TC, # R: Result word IR, AR, DM, HR, LR

ER, EQ, CY

Br1 + Br2 + Cy = R -> Cy


CY before exec. - Br1 (Source) - Br2 (Add) 0 1234 2345 1 1234 2345 0 4567 7667 1 4567 7667 0 9999 0001 1 9999 0000 0 0000 0000 - R (Result) - CY after exec. 3579 0 3580 0 2234 1 2235 1 0000 1 0000 1 0000 0

dvanced Industrial Automation

EXAMPLE PROGRAM Example Program

OMRON

dvanced Industrial Automation

OMRON

PROGRAM DOWNLOAD

dvanced Industrial Automation

Data Calculation Instructions SUB(31)


V.W. SUB(31) Br1 Br2 R

OMRON
Br1: Source word 1 (BCD) IR, AR, DM, HR, LR, TC, # Br2: Source word 2 (BCD) IR, AR, DM, HR, LR, TC, # R: Result word IR, AR, DM, HR, LR

ER, EQ, CY

Br1 - Br2 - Cy = R -> Cy


CY before exec. - Br1 (Source) - Br2 (Add) 0 1234 2345 1 1234 2345 0 8567 7667 1 8567 7667 0 0000 0001 1 0001 0000 0 0000 0000 - R (Result) - CY after exec. 8889 1 8888 1 0900 0 0899 0 9999 1 0000 0 0000 0

dvanced Industrial Automation

Data Calculation Instructions MUL(32)


V.W. MUL(32) Vt Vv R

OMRON
Vt: Multiply word (BCD) IR, AR, DM, HR, LR, TC, # Vv: Multiplier(BCD) IR, AR, DM, HR, LR, TC, # R: First result word IR, AR, DM, HR, LR

ER, EQ

Vt * Vv = R (R+1)

Attention: the result gives always two words (eight digits)

dvanced Industrial Automation

Data Calculation Instructions DIV(33)


V.W. DIV(33) Dd Dr R

OMRON
Dd: Divider word (BCD) IR, AR, DM, HR, LR, TC, # Dr: Divider (BCD) IR, AR, DM, HR, LR, TC, # R: First result word IR, AR, DM, HR, LR

ER, EQ

Dd : Dr = R

rest R+1

Attention: the result gives always two words

dvanced Industrial Automation

Data Calculation Instructions

OMRON

INC(38) DEC(39) ADDL(54) SUBL(55) MULL(56) DIVL(57)

Increases BCD number with 1 Decreases BCD number with 1 Double word ADD Double word SUBTRACT Double word MULTIPLY Double word DIVIDE

dvanced Industrial Automation

Binary Calculation Instructions

OMRON

ADB(50) SBB(51) MLB(52) DVB(53) ADBL(--) SBBL(--) MBS(--) MBSL(--) DBS(--) DBSL(--) NEG(--) NEGL(--) CPS(--) CPSL(--)

ADD binary SUBTRACT binary MULTIPLY binary DIVIDE binary Double word ADD Double word SUBTRACT Signed MULTIPLY Double word signed MULTIPLY Signed DIVIDE Double word signed DIVIDE 2s complement conversion 2s complement conversion (double) 2s complement compare 2s complement compare (double)

dvanced Industrial Automation

Logistic Calculation Instructions

OMRON

COM(29) ANDW(34) ORW(35) XORW(36) XNRW(37)

1s Complement Logical AND between two words Logical OR between two words Logical XOR between two words Logical XNOR between two words

dvanced Industrial Automation

Subroutine Instructions SBS(91) / SBN(92) / RET(93)


V.W. SBS(91) N

OMRON
N: Subroutine number #(00 - 255)

ER

SBN(92) N

- Program -

APPLICATION Actions which are executed more than once in the program

RET(93)

dvanced Industrial Automation

Example Program

OMRON

dvanced Industrial Automation

OMRON

PROGRAM DOWNLOAD

dvanced Industrial Automation

Step Instruction STEP(08) / SNXT(09)


STEP(08) B

OMRON
B: Control bit IR, AR, HR, LR

254.07 Step start flag - Program V.W. SNXT(09) B

dvanced Industrial Automation

Step Instruction Example 0


TR1 TR5

OMRON

1
TR2

5
TR6

2
TR3

6
TR7

4
TR4

7
TR8

Ref 0

Ref 1

dvanced Industrial Automation

Step Instruction STEP(08) / SNXT(09)


099.00 000.01 099.01 000.02 099.02 099.00 CNT500 099.00 000.03

OMRON

dvanced Industrial Automation

Example Program

EXAMPLE PROGRAM

OMRON

dvanced Industrial Automation

OMRON

Try

dvanced Industrial Automation

Task programming

OMRON
Task

One Ladder

End

Continuous Ladder program can be split into the functional parts These parts are called Tasks or Programs Task programming results in faster and more flexible program development

dvanced Industrial Automation

Cyclic Tasks

OMRON
List of active tasks is refreshed during I/O refresh Active cyclic tasks are executed from the lowest task number Tasks can be activated or deactivated by other tasks Operation Start assignment can be switched On/Off

Task 00

End

Task 01

Task 02

I/O refresh

dvanced Industrial Automation

Interrupt tasks

OMRON
Interrupt of cycle task execution can be triggered by Power fail Internal timer External interrupt input Message received on serial board
Interrupt Task

Task 00

End
Task 01

Task 02

End

dvanced Industrial Automation

Task programming

OMRON

When to use Tasks? Local symbols results in flexible programming Parallel program development Reuse of standard blocks of code Upgrade of the machine by activating the task Optimisation of the cycle time

dvanced Industrial Automation

Cycle time Standard situation

OMRON

Overseeing Processing

- Check Battery - Read DIP-switches - Check I/O Bus - Check User Program Memory - Check for Memory Card

Cycle Time

Program Execution Refresh data for : - Basic I/O Units - SYSMAC BUS Remote I/O - Special I/O Units - CPU Bus Units Events Servicing : - Special I/O unit events - CPU Bus Unit events - Peripheral port and RS-232C port events - File access - Communications port events

I/O Refreshing Peripheral Servicing

dvanced Industrial Automation

Cycle time Parallel Processing Mode

OMRON

Cycle Time for program execution

Overseeing Processing

Cycle Time for Peripheral Servicing

Overseeing Processing Peripheral Servicing

Program Execution

I/O Refreshing

- Faster servicing of events - Time slice for program execution and peripheral servicing can be tuned by the customer - Synchronous or asynchronous I/O-memory access can be set by the user - Data concurrence via special instructions

dvanced Industrial Automation

Optimisation of the cycle time

OMRON

Execute Stop Stop Execute

dvanced Industrial Automation

Tasks : summary

OMRON

Task is a program Equivalent to a function of your process Easier programming, debugging and maintenance Integrate tasks into a project Up to 32 tasks ! Up to 256 linked to an event ! Project will call the tasks needed Your cycle is optimal Re-use-able !

dvanced Industrial Automation

Questions?

OMRON

Thank you for you attention

if you have any question

dvanced Industrial Automation

You might also like