OMRON PLC Training
OMRON PLC Training
OMRON PLC Training
OMRON
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
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
OMRON
Functionality
CPM2A CPM1A
ZEN
34
100 120
140
256
512
1184
2560
5000
I/O
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
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
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
OMRON
CPM1A-10 CPM1A-20
No-expansion
OMRON
CPM expansion 20 I/O
12 digital inputs 8 digital outputs
CPM2A 40 I/O
24 digital inputs 16 digital outputs
12.00 12.07
OMRON
Modules
CPUs
Inner boards
Communications
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
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...
CQM1H expansion
OMRON
CQM1H expansion
OMRON
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
/!\ 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
CQM1H networking
OMRON
CompoBus/S (Master)
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
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
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
CS1D
OMRON
OMRON
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
CS1D Hot-standby
OMRON
OMRON
OMRON
OMRON
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!
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
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.
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.
OMRON
Ethernet Controller Link DeviceNet CompoBus/S Single Port Multiple Access Protocol Macro
OMRON
Protocol Macro:
Non-Omron Serial Devices
SCADA
Ethernet
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
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)
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,
OMRON
120 K steps
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
OMRON
375 ns
17.7 s
OMRON
CJ1-I/O Control Unit End-Cover
CJ1-CPU
Max 10 Units
End-Cover
OMRON
Special I/O Units CPU Bus Units
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)
OMRON
008 009 010 011
I/O word
000
001 002
IN 16
OUT IN OUT 16 16 16
IN 16
IN 16
IN 32
OUT 64
OMRON
008 009 010 011
I/O word
000
IN 16
OUT IN OUT 16 16 16
Reserved
IN 16
IN 16
IN 32
OUT 64
OMRON
IN 16
OUT 16
IN 16
003
IN 16
OUT 16
IN 16
OUT 16
007
OUT 16
IN 16
OUT 16
IN 16
OMRON
Special I/O
000 001 002 003 004 005 006 007 008 009 010
CPU BUS
Special I/O
00 00 01
OUT OUT 16 64
IN 64
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
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
OMRON
OMRON
OMRON
OMRON
Statement List
OMRON
000.00 000.01 000.01 100.00
000.02
000.02
Statement List
OMRON
000.00 000.01 100.00
000.02
000.03
000.02
000.00
000.01
100.00
000.02
000.03
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.07
Statement List
OMRON
000.00 000.01 000.02 000.03 100.02
000.04
000.05
100.03
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
OMRON
TRY...
OMRON
1. Define the purpose 2. Problem Splitting 3. Working out 4. 5. 6. 7. Design Writing Testing Finishing
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.
OMRON
2.
In-take transport
Drilling station
OMRON
2.
In-take transport Transport
Drilling station
Transport
Drilling
Transport
OMRON
OMRON
OMRON
Online Edit
OMRON
OMRON
OMRON
TRY...
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
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
Normal Timer
OMRON
000.00
100.00
SV
SV
OMRON
000.01
SV1
100.01
SV1
On/Off Delay
OMRON
000.02
SV3
100.02
SV3 SV2
SV2
One Shot
OMRON
000.03
SV3
100.03
SV3
OMRON
Operand Data-area N: TC number # (000-511) SV: Set value (BCD) IR, AR, DM, HR, LR, #
INPUT
SV
TIMER OUTPUT
SV
OMRON
Operand Data-area N: Counter number # (000 511) SV: Set value (BCD) IR, AR, DM, HR, LR, #
PULSE
5
RESET
COUNTER OUTPUT
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
Example Program
OMRON
OMRON
Try
OMRON
Operand Data-area B: Bit IR, AR, HR, LR
100.00
100.00
Set en Reset
OMRON
Operand Data-area B: Bit IR, AR, HR, LR B: Bit IR, AR, HR, LR
OMRON
Operand Data-area B: Bit IR, AR, HR, LR B: Bit IR, AR, HR, LR
CYCLUS
Interlock
OMRON
Signal
ILC(03)
Interlock
OMRON
Interlock
OMRON
OMRON
000.00 IL(02) 000.01 DIFU(13) 10.00
ILC(03)
000.00
000.01
010.00
Example Program
OMRON
OMRON
Try
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
Questions?
OMRON
OMRON
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
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
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:
Basic Instructions
OMRON
No function End of program Interlock Interlock close
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)
Jump Instructions
OMRON
V.W.1 JMP(O4) 0
JME(O5) 0
Jump Instructions
OMRON
V.W.1 JMP(O4) 0
V.W.2 JMP(O4) 0
JME(O5) 0
Jump Instructions
OMRON
V.W.1 JMP(O4) 1
V.W.2 JMP(O4) 2
JME(O5) 2
JME(O5) 1
Jump Instructions
OMRON
JME(O5) 1
V.W.1 JMP(O4) 1
USED Recursive action Conversion more than one variable MODBUS CRC Check
Example Program
OMRON
OMRON
Try
Data monitoring
OMRON
OMRON
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
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:
Example Program
OMRON
OMRON
Try
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
Shift Register
OMRON
SHIFTREGISTER
ASL(25)
V.W. ASL(25) Wd
ER, EQ
BIT 15
BIT 0
0 0 0 1 1 0 1 0 1 1 1 1 0 0 0 0
Cy
Shift Register
OMRON
SHIFTREGISTER
ASR(26)
V.W. ASR(26) Wd
ER, EQ
BIT 15
BIT 0
0 0 0 1 1 0 1 0 1 1 1 1 0 0 0 0
Cy
Shift Register
OMRON
SHIFTREGISTER
ROL(27)
V.W. ROL(27) Wd
ER, EQ
BIT 15
BIT 0
0 0 0 1 1 0 1 0 1 1 1 1 0 0 0 0
Cy
Shift Register
OMRON
SHIFTREGISTER
ROR(28)
V.W. ROR(28) Wd
ER, EQ
BIT 15
BIT 0
0 0 0 1 1 0 1 0 1 1 1 1 0 0 0 0
Cy
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
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:
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:
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
Notations
OMRON
NOTATIONS
Binary
0,1
11
:2 rest 1 rest 1 rest 0 rest 1
5
:2
2
:2
= 8 11
1
:2
1011
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
Notations
OMRON
NOTATIONS
Hexadecimal <-> Binary Hexadecimal
12A4
Binary
Notations
OMRON
NOTATIONS
Decimal <-> BCD Decimal
1294
BCD
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
OMRON
OMRON
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
Example Program
OMRON
OMRON
Try
Differentiated Instructions
OMRON
000.02 000.03 DIFU(13) 010.00
Differentiated Instructions
000.01
010.00
000.01
000.02
000.03
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
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
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
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
D+N-1
A120
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
3331
Condition:
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
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
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
7 9
1 9
OMRON
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
Example Program
OMRON
OMRON
PROGRAM DOWNLOAD
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
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
1 0 1 0
Bit 0
CB+30
1100
CB+31
1500
Bit 15
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
0 0 1 0
Bit 0
CB+15
1100
Bit 15
OMRON
Multiple words compare Binary compare with sign Double binary compare met sign Zone compare with sign Double zone compare with sign
OMRON
BCD ->Binary Double BCD -> Double Binary Binary -> BCD Double Binary -> Double BCD HEX -> ASCII ASCII -> HEX
OMRON
OMRON
LADDER SYMBOOL @STC(40)
STC(40)
Bit 255.04
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
OMRON
OMRON
PROGRAM DOWNLOAD
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
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)
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
OMRON
Increases BCD number with 1 Decreases BCD number with 1 Double word ADD Double word SUBTRACT Double word MULTIPLY Double word DIVIDE
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)
OMRON
1s Complement Logical AND between two words Logical OR between two words Logical XOR between two words Logical XNOR between two words
OMRON
N: Subroutine number #(00 - 255)
ER
SBN(92) N
- Program -
APPLICATION Actions which are executed more than once in the program
RET(93)
Example Program
OMRON
OMRON
PROGRAM DOWNLOAD
OMRON
B: Control bit IR, AR, HR, LR
OMRON
1
TR2
5
TR6
2
TR3
6
TR7
4
TR4
7
TR8
Ref 0
Ref 1
OMRON
Example Program
EXAMPLE PROGRAM
OMRON
OMRON
Try
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
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
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
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
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
OMRON
Overseeing Processing
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
OMRON
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 !
Questions?
OMRON