Page 1
EEEF
1 HCMUTE 11_2014 [email protected] _0908248231
RockWell Automation PLC Overview
CompactLogix Controller and Modules
ControlLogix Controller and Modules
Network Overview
Connecting sensors and Actuators to Modules
Controller Organizer
Tasks and Tags Types
Program and Routine
Connecting PC to PLC via Serial and Ethernet
Download and Test
Basic Instructions
Enhanced Instructions
Analog Module
Tasks and Tags In Controller
Add-on Instruction
Handling Minor, Major and I/O Faults
Page 2
EEEF
2 HCMUTE 11_2014 [email protected] _0908248231
RockWell Software & Allen Bradley
Rockwell Software:
•RSLogix 500
•RSLogix 5000
•RSLink…v..v..
Allen – Bradley Hardware:
Programmable Controller
HMI (Human Machine
Interface)
I/O ….v…v…
Page 3
EEEF
3 HCMUTE 11_2014 [email protected] _0908248231
Allen Bradley Hardware
Page 4
EEEF
4 HCMUTE 11_2014 [email protected] _0908248231
ControlLogix System.
CompactLogix System.
FlexLogix System.
Allen Bradley Hardware
Page 5
EEEF
5 HCMUTE 11_2014 [email protected] _0908248231
Allen – Bradley Hardware
Page 6
EEEF
6 HCMUTE 11_2014 [email protected] _0908248231
COMPACTLOGIX OVERVIEW
CompactLogix is designed to provide a Logic Solution for machine-level
control applications with I/O modules, motion and network
requirements.
Page 7
EEEF
7 HCMUTE 11_2014 [email protected] _0908248231
COMPACTLOGIX OVERVIEW Complex CompactLogix System
Page 8
EEEF
8 HCMUTE 11_2014 [email protected] _0908248231
Some CompactLogix Controllers COMPACTLOGIX OVERVIEW
Page 9
EEEF
9 HCMUTE 11_2014 [email protected] _0908248231
CompactLogix Network Systems
COMPACTLOGIX OVERVIEW
Page 10
EEEF
10 HCMUTE 11_2014 [email protected] _0908248231
ControlLogix Network Systems
CONTROLLOGIX OVERVIEW
Page 11
EEEF
11 HCMUTE 11_2014 [email protected] _0908248231
PLC OVERVIEW
Page 12
EEEF
12 HCMUTE 11_2014 [email protected] _0908248231
COMPACTLLOGIX MODULES
1769-IQ32 Sinking/Sourcing 24V DC Input
On state:
Min voltage: 10V, I = 2mA
Max voltage: 30V, I=10mA
OFF state
Max voltage 5V.
Max current: 1,5mA.
Time to change from ON and OFF state is
8ms.
Page 13
EEEF
13 HCMUTE 11_2014 [email protected] _0908248231
1769-IQ32 Sinking/Sourcing 24V DC Input
COMPACTLLOGIX MODULES
Page 14
EEEF
14 HCMUTE 11_2014 [email protected] _0908248231
1769-IA16 Module Input Wiring
COMPACTLLOGIX MODULES
Page 15
EEEF
15 HCMUTE 11_2014 [email protected] _0908248231
CONTROLLOGIX MODULE
ControlLogix DC (10..30V) diagnostic Input Module
Page 16
EEEF
16 HCMUTE 11_2014 [email protected] _0908248231
CONTROLLOGIX MODULE
ControlLogix AC ( 74..132V) Input Module
Page 17
EEEF
17 HCMUTE 11_2014 [email protected] _0908248231
Input Digital Module Connection Ex1: Connecting PNP sensors to Input DC,AC module
COMPACTLOGIX MODULES
Page 18
EEEF
18 HCMUTE 11_2014 [email protected] _0908248231
COMPACTLOGIX MODULES
Input Digital Module Connection Ex1: Connecting PNP sensor to Input DC,AC module
Page 19
EEEF
19 HCMUTE 11_2014 [email protected] _0908248231
COMPACTLOGIX MODULES
Input Digital Module Connection Ex2: Connecting NPN sensors to Input DC,AC module
Page 20
EEEF
20 HCMUTE 11_2014 [email protected] _0908248231
COMPACTLOGIX MODULES
Input Digital Module Connection Ex2: Connecting NPN sensors to Input DC,AC module
Page 21
EEEF
21 HCMUTE 11_2014 [email protected] _0908248231
1769-OB32 Current Sourcing 24V DC Output
1769-OB32
Min Voltage: 20,4V DC, I = 1mA
Max Voltage: 26,4V DC, I = 1A
32 digital Outputs
1769-OB32T(Terminated Ouput Module)
Min Voltage: 10,2V DC, I = 1mA
Max Voltage: 26,4V DC, I = 0,5A
32 digital Outputs
COMPACTLLOGIX MODULES
Page 22
EEEF
22 HCMUTE 11_2014 [email protected] _0908248231
1769-OB32 Current Sourcing 24V DC Output
COMPACTLLOGIX MODULES
Page 23
EEEF
23 HCMUTE 11_2014 [email protected] _0908248231
1769-OB32 Current Sourcing 24V DC Output
COMPACTLLOGIX MODULES
Page 24
EEEF
24 HCMUTE 11_2014 [email protected] _0908248231
ControlLogix DC diagnostic Output Module
CONTROLLOGIX MODULES
Page 25
EEEF
25 HCMUTE 11_2014 [email protected] _0908248231
ControlLogix AC diagnostic Output Module
CONTROLLOGIX MODULES
Page 26
EEEF
26 HCMUTE 11_2014 [email protected] _0908248231
PLC Output Connection Ex3: Connecting DC motor(ON_OF) to PLC output Module
INPUT OUTPUT PLC CONNECTING
Page 27
EEEF
27 HCMUTE 11_2014 [email protected] _0908248231
Connecting Actuators to output digital module Ex4: Connecting DC motor(PWM mode) to PLC output module
INPUT OUTPUT PLC CONNECTING
Page 28
EEEF
28 HCMUTE 11_2014 [email protected] _0908248231
Connecting AC Motor to PLC output module Ex5: Connecting a three phase motor to Output digital module
INPUT OUTPUT PLC CONNECTING
Page 29
EEEF
29 HCMUTE 11_2014 [email protected] _0908248231
C
P
U
INPUT OUTPUT PLC CONNECTING Inverter Block Diagram_M420
Connecting Inverter to PLC???
Page 30
EEEF
30 HCMUTE 11_2014 [email protected] _0908248231
INPUT OUTPUT PLC CONNECTING Inverter Block Diagram_FC50
Connecting Inverter to PLC???
Page 31
EEEF
31 HCMUTE 11_2014 [email protected] _0908248231
INPUT OUTPUT PLC CONNECTING Replacing relay control circuits from Ex6 to Ex10
using PLC
Ex6
Page 32
EEEF
32 HCMUTE 11_2014 [email protected] _0908248231
INPUT OUTPUT PLC CONNECTING Ex7
Page 33
EEEF
33 HCMUTE 11_2014 [email protected] _0908248231
INPUT OUTPUT PLC CONNECTING Ex8
Page 34
EEEF
34 HCMUTE 11_2014 [email protected] _0908248231
INPUT OUTPUT PLC CONNECTING Ex9
Page 35
EEEF
35 HCMUTE 11_2014 [email protected] _0908248231
Ex10 INPUT OUTPUT PLC CONNECTING
Page 36
EEEF
36 HCMUTE 11_2014 [email protected] _0908248231
• Bộ nhớ: 750kbytes.
• 1 port Ethernet/IP, 1 port RS-232.
• EtherNet/IP, DeviceNet.
• Relay Ladder, FBD, Structured text,
Sequential function block.
• Số module mở rộng: 16.
COMPACTLOGIX L32E
COMPACTLOGIX CONTROLLER
Page 37
EEEF
37 HCMUTE 11_2014 [email protected] _0908248231
• Bộ nhớ: 2MB.
• 1 port Ethernet/IP, 1 port RS-232.
• EtherNet/IP,Controlnet, DeviceNet.
• Relay Ladder, FBD, Structured text,
Sequential function block.
• Số module mở rộng: 18
CONTROLLOGIX L61
CONTROLLOGIX CONTROLLER
Page 38
EEEF
38 HCMUTE 11_2014 [email protected] _0908248231
CONTROLLER ORGANIZER
Page 39
EEEF
39 HCMUTE 11_2014 [email protected] _0908248231
CONTROLLER ORGANIZER
Controller Organizer includes following elements Controller fault handler is executed whenever the CPU is fault. Power Up handler is executed as the CPU is powered. Task includes three types: Continuous Task is executed all the time, a project has only a
continuous task Periodic Task performs function at a specific time, whenever the time for periodic task expires. Event Task performs a function only when a specific event occurs.
Tag is a memory (data variable ) in controller, includes controller tag and local tag
Page 40
EEEF
40 HCMUTE 11_2014 [email protected] _0908248231
TASK IN CONTROLLER
Page 41
EEEF
41 HCMUTE 11_2014 [email protected] _0908248231
There are two types of tag: Controller tag(Global data) and Local
tag(Program tag)
TAGS IN CONTROLLER
Page 42
EEEF
42 HCMUTE 11_2014 [email protected] _0908248231
Tag is a data variable in a controller
TAGS IN CONTROLLER
DINT
DINT
DINT
DINT
…….
DINT
DINT
Page 43
EEEF
43 HCMUTE 11_2014 [email protected] _0908248231
Data types of tag
TAG IN CONTROLLER
Page 44
EEEF
44 HCMUTE 11_2014 [email protected] _0908248231
Controller Tags & Program Tags
TAGS IN CONTROLLER
Page 45
EEEF
45 HCMUTE 11_2014 [email protected] _0908248231
Using Controller tags or Program tags
TAGS IN CONTROLLER
Page 46
EEEF
46 HCMUTE 11_2014 [email protected] _0908248231
Type Tag defines how the tag operates within a project, There are
four types of tag: Base, Alias, Produced and Consumed
TYPE TAG IN CONTROLLER
Page 47
EEEF
47 HCMUTE 11_2014 [email protected] _0908248231
COMMUNICATION WITH I/O Create a new Module:On the Controller Organizer, right-click I/O
Configuration and choose New Module.
Page 48
EEEF
48 HCMUTE 11_2014 [email protected] _0908248231
COMMUNICATION WITH I/O Insert a new Module, Enter an Apropriate name, Major Revision
and Electronic Keying
Page 49
EEEF
49 HCMUTE 11_2014 [email protected] _0908248231
COMMUNICATION WITH I/O Electronic Keying: Compares expected module in I/O configuration
and physical module
Page 50
EEEF
50 HCMUTE 11_2014 [email protected] _0908248231
SETTING ELECTRONIC KEYING Electronic Keying: Protect a system against the accidental placement
of the wrong module in the slot
The Electronic Key determines how closely any module in a slot must
match the configuration for that slot
Page 51
EEEF
51 HCMUTE 11_2014 [email protected] _0908248231
Exact Match: All information must match
SETTING ELECTRONIC KEYING
Page 52
EEEF
52 HCMUTE 11_2014 [email protected] _0908248231
SETTING ELECTRONIC KEYING Compatible Keying: All information excepte the minor revision number
Page 53
EEEF
53 HCMUTE 11_2014 [email protected] _0908248231
Disable Keying:No information must match
SETTING ELECTRONIC KEYING
Page 54
EEEF
54 HCMUTE 11_2014 [email protected] _0908248231
Setting RPI, COS, Diagnostics, Filter Time
FEATURE SFECIFIC TO STANDARD INPUT MODULE
Page 55
EEEF
55 HCMUTE 11_2014 [email protected] _0908248231
ADDRESS I/O DATA I/O information is presented as a set of tag
Page 56
EEEF
56 HCMUTE 11_2014 [email protected] _0908248231
ADDRESS I/O DATA I/O information is presented as a set of tag
Page 57
EEEF
57 HCMUTE 11_2014 [email protected] _0908248231
ADDRESS I/O DATA I/O information is presented as a set of tag
Page 58
EEEF
58 HCMUTE 11_2014 [email protected] _0908248231
Tasks, Program and Rountine
32 programs in a task
One main routine and many subroutines in a program
Main routine is executed from program, sub is executed as called
PROGRAM AND ROUTINE IN RSLOGIX
Page 59
EEEF
59 HCMUTE 11_2014 [email protected] _0908248231
A Subroutine is called by another routine
SUBROUTINE
Page 60
EEEF
60 HCMUTE 11_2014 [email protected] _0908248231
Nested Subroutine
SUBROUTINE
Page 61
EEEF
61 HCMUTE 11_2014 [email protected] _0908248231
Rslogix 5000: Programming for CompactLogix and ControlLogix.
Rslink: Communicating between RSLogix 5000 and
controllers.
Rsnetwork for Devicenet: Configuring Devicenet
Network
Rsnetwork for Controlnet: Configuring Controlnet
Network
RSview32, Factory Talk: Designing Scada Systems
ROCKWELL SOFTWARE
Page 62
EEEF
62 HCMUTE 11_2014 [email protected] _0908248231
RSLINX
ROCKWELL SOFTWARE
Page 63
EEEF
63 HCMUTE 11_2014 [email protected] _0908248231
RSlink
PLC
RSLOGIX500
RSLINK
ROCKWELL SOFTWARE
Page 64
EEEF
64 HCMUTE 11_2014 [email protected] _0908248231
SFC, Structure Text, Ladder and FBD
Ladder Diagram
SFC
FB
Structure Text
PROGRAMMING LANGUAGE
Page 65
EEEF
65 HCMUTE 11_2014 [email protected] _0908248231
Ladder logic
Rungs.
Instructions.
Branches.
LAD
Page 66
EEEF
66 HCMUTE 11_2014 [email protected] _0908248231
Function Block Diagram: Function Block. Input Reference. Output Reference. Wire.
FBD
Page 67
EEEF
67 HCMUTE 11_2014 [email protected] _0908248231
Start Stop Motor Control
FBD
Page 68
EEEF
68 HCMUTE 11_2014 [email protected] _0908248231
STRUCTURED TEXT
ST Construct
Page 69
EEEF
69 HCMUTE 11_2014 [email protected] _0908248231
STRUCTURED TEXT
Page 70
EEEF
70 HCMUTE 11_2014 [email protected] _0908248231
STRUCTURED TEXT
IF.. THEN Construct
Page 71
EEEF
71 HCMUTE 11_2014 [email protected] _0908248231
STRUCTURED TEXT
CASE...OF Construct
Page 72
EEEF
72 HCMUTE 11_2014 [email protected] _0908248231
Sequential Function Chart (SFC):
SFC
Page 73
EEEF
73 HCMUTE 11_2014 [email protected] _0908248231
Start Stop Motor Control
SFC
Page 74
EEEF
74 HCMUTE 11_2014 [email protected] _0908248231
Sequential Motor Starter
SFC
Page 75
EEEF
75 HCMUTE 11_2014 [email protected] _0908248231
COMPACTLOGIX TRAINING KIT
Slot0 Slot1 Slot2 Slot3 Slot4 Slot5
Except the CPU, all modules can be changed their position
Page 76
EEEF
76 HCMUTE 11_2014 [email protected] _0908248231
CONTROLLOGIX TRAINING KIT
Slot0 Slot1
Slot2
Slot3
Slot4
Slot5
CPUs and modules can be placed in any slot of chassis
Page 77
EEEF
77 HCMUTE 11_2014 [email protected] _0908248231
PLC PROGRAMMING Working with a project
1. Connecting hardware
2. Configuring CPU and I/O module by Rslogix 5000
3. Create Tags(Program Tags or Controller Tags)
4. Alias Tags to represent another tag
5. Write logic: LAD, FBD, ST, SFC
6. Download to CPU by Rslinx via Rs232 or Ethernet
7. Run and check
Page 78
EEEF
78 HCMUTE 11_2014 [email protected] _0908248231
Open Rslogix 5000
PLC PROGRAMMING
Page 79
EEEF
79 HCMUTE 11_2014 [email protected] _0908248231
Configure hardware for commpactLogix
Open Rslogix 500, Create a new
project, slelect a appropriate CPU and
Revision, enter project name and save.
Notice:
CPU type must be matched with
real CPU.
For controllogix, CPU can be placed
in any slot of chassis
PLC PROGRAMMING
Page 80
EEEF
80 HCMUTE 11_2014 [email protected] _0908248231
PLC PROGRAMMING Configure hardware for commpactLogix: Adding Dnet module
Page 81
EEEF
81 HCMUTE 11_2014 [email protected] _0908248231
PLC PROGRAMMING Configure hardware for commpactLogix: Adding Input module
Page 82
EEEF
82 HCMUTE 11_2014 [email protected] _0908248231
PROGRAMMING Configure hardware for commpactLogix: Similar to others modules
EX11: Participants configure hardware for compactLogix and ControlLogix
Controller.
CompactLogix hardware ControlLogix hardware
Page 83
EEEF
83 HCMUTE 11_2014 [email protected] _0908248231
Directly connect to the CPU via the serial port
CONNECT PC TO CPU
Page 84
EEEF
84 HCMUTE 11_2014 [email protected] _0908248231
Configure the serial driver via RSlinx
From communication tab in Rslink, choose configure Driver, Rs232 DF1
devices, enter an appropriate name
CONNECT PC TO CPU
Page 85
EEEF
85 HCMUTE 11_2014 [email protected] _0908248231
Configure the serial driver via RSlinx
Setup parameters for
Configure RS 232 DF1 Devices
dialogs
CONNECT PC TO CPU
Page 86
EEEF
86 HCMUTE 11_2014 [email protected] _0908248231
Select the Controller Path to download to the CPU: Open a project,
choose Who Active then choose CPU to download
CONNECT PC TO CPU
Participants download to ComactLogix to test hardware??
Page 87
EEEF
87 HCMUTE 11_2014 [email protected] _0908248231
192.168.1.20
255.255.255.0
Connect to the CPU via the Ethernet port CONNECT PC TO CPU
192.168.1.21
255.255.255.0
192.168.1.24
255.255.255.0
192.168.1.25
255.255.255.0
192.168.1.10
255.255.255.0
192.168.1.20
255.255.255.0 192.168.1.30
255.255.255.0
Page 88
EEEF
88 HCMUTE 11_2014 [email protected] _0908248231
Configure the Ethernet driver via RSlinx
From communication tab in Rslink, choose configure Driver, Ethernet/IP
Driver, enter an appropriate name
CONNECT PC TO CPU
Page 89
EEEF
89 HCMUTE 11_2014 [email protected] _0908248231
Configure the Ethernet driver via RSlinX
Choose Network connection
and IP address
CONNECT PC TO CPU
Page 90
EEEF
90 HCMUTE 11_2014 [email protected] _0908248231
Select the Controller Path to download to the CPU: Open a project,
choose Who Active then choose CPU to download via ethernet
CONNECT PC TO CPU
Participants download to ComactLogix to test hardware?
Page 91
EEEF
91 HCMUTE 11_2014 [email protected] _0908248231
BASIC INSTRUCTION Bit instructions
Page 92
EEEF
92 HCMUTE 11_2014 [email protected] _0908248231
Bit instructions BASIC INSTRUCTION
Page 93
EEEF
93 HCMUTE 11_2014 [email protected] _0908248231
Compare instructions BASIC INSTRUCTION
Page 94
EEEF
94 HCMUTE 11_2014 [email protected] _0908248231
Compare instruction BASIC INSTRUCTION
Page 95
EEEF
95 HCMUTE 11_2014 [email protected] _0908248231
Math instructions BASIC INSTRUCTION
Page 96
EEEF
96 HCMUTE 11_2014 [email protected] _0908248231
Math instruction BASIC INSTRUCTION
Page 97
EEEF
97 HCMUTE 11_2014 [email protected] _0908248231
Timer BASIC INSTRUCTION
Page 98
EEEF
98 HCMUTE 11_2014 [email protected] _0908248231
Timer BASIC INSTRUCTION
Page 99
EEEF
99 HCMUTE 11_2014 [email protected] _0908248231
Counter BASIC INSTRUCTION
Page 100
EEEF
100 HCMUTE 11_2014 [email protected] _0908248231
Counter BASIC INSTRUCTION
Page 101
EEEF
101 HCMUTE 11_2014 [email protected] _0908248231
EXAMPLE OF INSTRUCTIONS Using LAD, FBD, ST, SFC to program for relay
control circuits from Ex11 to Ex13
Ex11
Ex12
Page 102
EEEF
102 HCMUTE 11_2014 [email protected] _0908248231
Ex13:
Ex14:
EXAMPLE OF INSTRUCTIONS
Page 103
EEEF
103 HCMUTE 11_2014 [email protected] _0908248231
Ex15: EXAMPLES OF INSTRUCTION
Page 104
EEEF
104 HCMUTE 11_2014 [email protected] _0908248231
Use GSV instruction to read and store Realtime in plc
Depend on your applications, which data in array is used
If DateTime data is wrong, use SSV to set
DateTime to PLC
MSG, GSV, SSV INSTRUCTIONS
Page 105
EEEF
105 HCMUTE 11_2014 [email protected] _0908248231
Choose Monitor Tags to view DateTime data of the controller
MSG, GSV, SSV INSTRUCTIONS
Page 106
EEEF
106 HCMUTE 11_2014 [email protected] _0908248231
Message Control (MSG)
Read or write data to or from the controller or a block of
data to or from another module on another network.
MSG, GSV, SSV INSTRUCTIONS
Page 107
EEEF
107 HCMUTE 11_2014 [email protected] _0908248231
Message Control (MSG)
• Message configuration
MSG, GSV, SSV INSTRUCTIONS
Page 108
EEEF
108 HCMUTE 11_2014 [email protected] _0908248231
ENHANCE INSTRUCTIONS Message Control (MSG): Message configuration
Page 109
EEEF
109 HCMUTE 11_2014 [email protected] _0908248231
Message Control (MSG): Message configuration
MSG, GSV, SSV INSTRUCTIONS
Page 110
EEEF
110 HCMUTE 11_2014 [email protected] _0908248231
Message Control (MSG): Message configuration
MSG, GSV, SSV INSTRUCTIONS
Page 111
EEEF
111 HCMUTE 11_2014 [email protected] _0908248231
Message Control (MSG) Example
Send data from Master_CPU ( Slot 0) to Peer CPU(Slot 5) or
vice versa
Create a project with two CPUs and a Send_Data tag in
controller tag
Create another project with two CPUs and Read_Data tag in
controller tag
Use MSG instruction to send or read data from Master_CPU
to PEER_CPU or vice versa
All tags are created in controller tag
MSG, GSV, SSV INSTRUCTIONS
Page 112
EEEF
112 HCMUTE 11_2014 [email protected] _0908248231
Message Control (MSG) Example
Create a project with two CPUs and download to
CPU_Master
MSG, GSV, SSV INSTRUCTIONS
Page 113
EEEF
113 HCMUTE 11_2014 [email protected] _0908248231
Message Control (MSG) Example
Create an another project with two CPUs and download to
CPU_Peer
MSG, GSV, SSV INSTRUCTIONS
Page 114
EEEF
114 HCMUTE 11_2014 [email protected] _0908248231
Message Control (MSG) Example
Use MSG instruction to write or read Data from Master to
Peer or vice versa
Configure to write data
from Master to Peer
Tag in master
Tag in Peer
MSG, GSV, SSV INSTRUCTIONS
Page 115
EEEF
115 HCMUTE 11_2014 [email protected] _0908248231
Message Control (MSG) Example
Slect path to transfer data
MSG, GSV, SSV INSTRUCTIONS
Page 116
EEEF
116 HCMUTE 11_2014 [email protected] _0908248231
Add-on Instruction introduction
Custom Instruction
Reuse code
Provide an easier to understand interface
Export and Import an Add-on Instruction
ADDON INSTRUCTION
Page 117
EEEF
117 HCMUTE 11_2014 [email protected] _0908248231
Creating Add-on Instruction
ADDON INSTRUCTION
Page 118
EEEF
118 HCMUTE 11_2014 [email protected] _0908248231
Creating parameters and Local Tags
ADDON INSTRUCTION
Page 119
EEEF
119 HCMUTE 11_2014 [email protected] _0908248231
ADDON INSTRUCTION Creating logic for the Add-on Instruction
Page 120
EEEF
120 HCMUTE 11_2014 [email protected] _0908248231
Creating I/O Tags and Adding the Add_on instruction to project. ADDON INSTRUCTION
Participants program to control Tank Level using Add-on Instruction?
Page 121
EEEF
121 HCMUTE 11_2014 [email protected] _0908248231
Export and Import the Add-on Instruction ADDON INSTRUCTION
Page 122
EEEF
122 HCMUTE 11_2014 [email protected] _0908248231
ANALOG MODULES
Page 123
EEEF
123 HCMUTE 11_2014 [email protected] _0908248231
1769-IF4 Analog Input
Configure input voltage range
-10V…10V DC
0…10V DC
0 …5V DC
1…5V DC
Configure input current range
0…20mA
4…20mA
ANALOG MODULES
Page 124
EEEF
124 HCMUTE 11_2014 [email protected] _0908248231
Connecting voltage and current Sensors
ANALOG MODULES
Page 125
EEEF
125 HCMUTE 11_2014 [email protected] _0908248231
Configure input voltage range
-10V…10V DC
0…10V DC
0 …5V DC
1…5V DC
Analog Input Module, connecting voltage sensors
ANALOG MODULES
Page 126
EEEF
126 HCMUTE 11_2014 [email protected] _0908248231
Analog Input Module, connecting current sensors
Configure input current range
0…20mA or 4…20mA.
ANALOG MODULES
Page 127
EEEF
127 HCMUTE 11_2014 [email protected] _0908248231
Valid Input Data
ANALOG VALUE REPRESENTATION
Page 128
EEEF
128 HCMUTE 11_2014 [email protected] _0908248231
Valid Input Data
ANALOG VALUE REPRESENTATION
Page 129
EEEF
129 HCMUTE 11_2014 [email protected] _0908248231
Valid Input Data
ANALOG VALUE REPRESENTATION
Page 130
EEEF
130 HCMUTE 11_2014 [email protected] _0908248231
1769-OF2 Analog Output
Configure input voltage range
-10V…10V DC
0…10V DC
0…5V DC
1…5V DC.
Configure input current range
0…20mA
4…20mA
ANALOG MODULES
Page 131
EEEF
131 HCMUTE 11_2014 [email protected] _0908248231
Connecting Actuators to current and voltage Output
ANALOG MODULES
Page 132
EEEF
132 HCMUTE 11_2014 [email protected] _0908248231
Connecting Actuator to current Output
ANALOG MODULES
Page 133
EEEF
133 HCMUTE 11_2014 [email protected] _0908248231
Connecting Actuator to voltage output
ANALOG MODULES
Page 134
EEEF
134 HCMUTE 11_2014 [email protected] _0908248231
EX16: Connecting pressure sensor with voltage output to input analog module
CONNECTING ANALOG INPUT MODULE
Page 135
EEEF
135 HCMUTE 11_2014 [email protected] _0908248231
EX16: Answer
CONNECTING ANALOG INPUT MODULE
Page 136
EEEF
136 HCMUTE 11_2014 [email protected] _0908248231
EX17: Connecting an Ultrasonic sensor with current output to input analog module
CONNECTING ANALOG INPUT MODULE
Page 137
EEEF
137 HCMUTE 11_2014 [email protected] _0908248231
EX17: Answer
CONNECTING ANALOG INPUT MODULE
Page 138
EEEF
138 HCMUTE 11_2014 [email protected] _0908248231
EX18: Program to output 10V at 1769-OF2 module Connecting an potentiometer to 1769-IF4 and program to calculate voltage at input of the module
CONNECTING ANALOG INPUT MODULE
1769-OF2
1769-L32E
1769-IF4
Vout0
ANLG Com
Vin0+
Vin0-
ANLG
0 – 10V
Page 139
EEEF
139 HCMUTE 11_2014 [email protected] _0908248231
EX19: Program to output Votage(10V) at 1769-OF2 module Connecting an potentiometer to 1769-IF4 and program to output I(mA) at Iout1 of OF2 module. Connecting Iout1 to Iin1 and program to calculate I(mA) at input module.
CONNECTING ANALOG INPUT MODULE
1769-OF2
1769-L32E
1769-IF4
Vout0
ANLG Com
Vin0+
Vin0-
ANLG
10V
ANLG Com
Iout1
0-20mA
In1+
Vin1/In1-
Page 140
EEEF
140 HCMUTE 11_2014 [email protected] _0908248231
A RSLogix 5000 supports three type of tasks
Continuous Tasks
Periodic Task
Event Task
Characteristic of Tasks
The controller executes only one Task at one time
A Task can interrupt a different task that is executing and take
control if it has high priority
In any given Task, only one program executes at one time.
RSLOGIX 5000 CONTROLLER TASKS
Page 141
EEEF
141 HCMUTE 11_2014 [email protected] _0908248231
Function of Tasks
RSLOGIX 5000 CONTROLLER TASKS
Page 142
EEEF
142 HCMUTE 11_2014 [email protected] _0908248231
Examples for using Tasks
RSLOGIX 5000 CONTROLLER TASKS
Page 143
EEEF
143 HCMUTE 11_2014 [email protected] _0908248231
Priority Periodic and Event Tasks: The priority of each task tells the controller
what to do
RSLOGIX 5000 CONTROLLER TASKS
Page 144
EEEF
144 HCMUTE 11_2014 [email protected] _0908248231
This example depicts execution of a project with three tasks
RSLOGIX 5000 CONTROLLER TASKS
Page 145
EEEF
145 HCMUTE 11_2014 [email protected] _0908248231
Create a Periodic Task, Put an appropriate name, select Task Type, Periodic
and Priority, create a program and write a logic program
PROGRAM FOR PERIODIC TASKS
Create a Periodic Task, enter an appropriate name
Page 146
EEEF
146 HCMUTE 11_2014 [email protected] _0908248231
PROGRAM FOR PERIODIC TASKS
Select Task Type, Periodic and Priority
Page 147
EEEF
147 HCMUTE 11_2014 [email protected] _0908248231
PROGRAM FOR PERIODIC TASKS
Create a new Program with appropriate name and a new routine
Page 148
EEEF
148 HCMUTE 11_2014 [email protected] _0908248231
PROGRAM FOR PERIODIC TASKS
Select Main Routine for writing logic program
Page 149
EEEF
149 HCMUTE 11_2014 [email protected] _0908248231
PROGRAM FOR PERIODIC TASKS
Select Main Routine for writing a Program
Add Instruction will executed one every 1000ms
Page 150
EEEF
150 HCMUTE 11_2014 [email protected] _0908248231
MANAGE EVENT TASKS Choose the Trigger for an Event Task
Page 151
EEEF
151 HCMUTE 11_2014 [email protected] _0908248231
MANAGE EVENT TASKS Module Input Data State Change Trigger
Event Task is trigged whenever data from input change
Page 152
EEEF
152 HCMUTE 11_2014 [email protected] _0908248231
MANAGE EVENT TASKS Choose Trigger for Module Input State
Event Task is trigged whenever data from input change
Page 153
EEEF
153 HCMUTE 11_2014 [email protected] _0908248231
Create a Event Task, enter an appropriate name, Select Task Type, event
And Priority, create a Program and write a logic program
PROGRAM FOR EVENT TASKS
Create a Event Task, enter an appropriate name, Type of Task , Trigger and
Priority
Page 154
EEEF
154 HCMUTE 11_2014 [email protected] _0908248231
PROGRAM FOR EVENT TASKS
Create a new Program with appropriate name and a new routine
Page 155
EEEF
155 HCMUTE 11_2014 [email protected] _0908248231
PROGRAM FOR EVENT TASKS
Select Main Routine in Event Task to write logic program
Page 156
EEEF
156 HCMUTE 11_2014 [email protected] _0908248231
PROGRAM FOR EVENT TASKS
Select Main Routine in Event Task to write a Program
Add Instruction will executed whenever Event Task is Called
Page 157
EEEF
157 HCMUTE 11_2014 [email protected] _0908248231
PROGRAM FOR EVENT TASKS
Use Trigger Event Instruction to call Event_Task
Trigger Task Instruction is placed in another Task.
Page 158
EEEF
158 HCMUTE 11_2014 [email protected] _0908248231
Minor Fault: CPU does not go in stop mode with fault
Periodic Task overlap.
Load from nonvolatile memory.
Problem with serial port.
Low battery…..
Major Fault: CPU goes in stop mode with fault
The CPU powered on in run mode.
A required I/O module connection failed.
Configuration fault occurred…..
MINOR AND MAJOR FAULT
Page 159
EEEF
159 HCMUTE 11_2014 [email protected] _0908248231
MINOR FAULT CODES
Page 160
EEEF
160 HCMUTE 11_2014 [email protected] _0908248231
MINOR FAULT CODES
Page 161
EEEF
161 HCMUTE 11_2014 [email protected] _0908248231
MINOR FAULT CODES
Page 162
EEEF
162 HCMUTE 11_2014 [email protected] _0908248231
MINOR FAULT CODES
Handle Minor Fault
EX: Arithmetic overflow, result of arithmetic instruction is out of
range( Type =4, code =4)
Create a tag, named source with real type and another
named Destination with integer type .
Write an instruction to increase data of source tag.
Write an instruction to move data from Source tag to
Destination tag
Download program to the CPU, run CPU
Slect the CPU/ Properties and minor fault to view Type and
Code.
Page 163
EEEF
163 HCMUTE 11_2014 [email protected] _0908248231
MINOR FAULT CODES Ex: Arithmetic overflow, result of arithmetic instruction is out of range(
Type =4, code =4)
Page 164
EEEF
164 HCMUTE 11_2014 [email protected] _0908248231
MINOR FAULT CODES
Monitor Minor Fault
EX: Periodic task overlap, Task scheduled again before it finished
executing(Type =6, code =2)
Create a tag, named CPT with data type is real, two tag
named Source(real) and Destination(Sint).
Create a Periodic Task with period 1ms and a routine
Use CPT instruction to multi Source tag and Destination tag,
the result is placed in CPT tag.
Download program to the CPU, run CPU
Slect the CPU/ Properties and minor fault tab to view Type
and Code.
Page 165
EEEF
165 HCMUTE 11_2014 [email protected] _0908248231
MINOR FAULT CODES EX: Periodic task overlap, Task scheduled again before it finished executing(Type
=6, code =2)
Page 166
EEEF
166 HCMUTE 11_2014 [email protected] _0908248231
MAJOR FAULT CODES
Page 167
EEEF
167 HCMUTE 11_2014 [email protected] _0908248231
MAJOR FAULT CODES
Page 168
EEEF
168 HCMUTE 11_2014 [email protected] _0908248231
MAJOR FAULT CODES
Page 169
EEEF
169 HCMUTE 11_2014 [email protected] _0908248231
MAJOR FAULT CODES Example about Major Fault: Timer with a negative value preset for its Pre
( Type =04, code =34)
Page 170
EEEF
170 HCMUTE 11_2014 [email protected] _0908248231
MAJOR FAULT CODES Example about Major Fault: JMP to a label that do not exits ( Type =04, code =42)
Page 171
EEEF
171 HCMUTE 11_2014 [email protected] _0908248231
MAJOR FAULT CODES Example about Major Fault: Task watchdog expired( Type =06, code =01)
Page 172
EEEF
172 HCMUTE 11_2014 [email protected] _0908248231
Create a Data Type to Store the fault information.
HANDLE FAULTs
To access system information, use GSV(Get System Value) and SSV(Set
System Value) Instruction.
For status information about a program, access the program Objects.
For fault information, access these attribute of the program Object
Page 173
EEEF
173 HCMUTE 11_2014 [email protected] _0908248231
Get the fault Type and Code.
HANDLE FAULTs
Page 174
EEEF
174 HCMUTE 11_2014 [email protected] _0908248231
Check for Specific fault.
HANDLE FAULTs
Page 175
EEEF
175 HCMUTE 11_2014 [email protected] _0908248231
Clear Fault.
HANDLE FAULTs
Page 176
EEEF
176 HCMUTE 11_2014 [email protected] _0908248231
Choose Where To Place The Fault Routine .
HANDLE FAULTs
Page 177
EEEF
177 HCMUTE 11_2014 [email protected] _0908248231
Choose Where To Place The Fault Routine .
HANDLE FAULTs
Page 178
EEEF
178 HCMUTE 11_2014 [email protected] _0908248231
Example: Check and clear the fault when CPU powered in run mode: Type =1,
Code = 1.
Create a Data type to store fault information of program
Use GSV instruction to read MAJORFAULTRECORD attribute of the program
Check specific fault code of Type and Code and clear
Use SSV instruction to write new value to MAJORFAULTRECORD attribute of
the program.
HANDLE FAULTs
Page 179
EEEF
179 HCMUTE 11_2014 [email protected] _0908248231
Create a Data Type to store fault information of program
HANDLE FAULTs
Page 180
EEEF
180 HCMUTE 11_2014 [email protected] _0908248231
Create a tag to store MAJORFAUTRECORD of the program
HANDLE FAULTs
Page 181
EEEF
181 HCMUTE 11_2014 [email protected] _0908248231
Create a routine in Controller Fault Handler and write a program as following
HANDLE FAULTs
Page 182
EEEF
182 HCMUTE 11_2014 [email protected] _0908248231
EX2: Handle fault when download program to cpu in run mode.
EX3: Handle fault when configure a wrong module
HANDLE FAULTs