Download as pdf or txt
Download as pdf or txt
You are on page 1of 37

Chapter

Programmable Logic Controllers

Lab
16
PLC Troubleshooting
PLC Troubleshooting

LAB 16-1

Troubleshooting Wiring
PLC Troubleshooting

When troubleshooting the control panel wiring, it is important to be careful


and not cause more problems by pulling or moving wires.

Panduit (wire duct) is used


to keep the wires from
crossing over components
and keep the panel neat to
make troubleshooting
easier.
PLC Troubleshooting

PLC Wiring: Wiring to a PLC is straight forward

Here are some rules for wiring PLCs.

• Only one output device to one output terminal


• Outputs can output only 1 amp. Use a relay to control more current
• Inputs are common to +24 VDC
• Outputs are common to ground
• Inputs are wired to normally open devices.
• Wire only one input to each input terminal
• Input and output voltage must match the I/O module
• Some input devices such as proxs require a pull up resistor
PLC Troubleshooting

Troubleshooting PLC Wiring.

PLC are wired simple usually with ont input device to one address and
one output device to one output address. This makes the
troubleshooting easy since an LED on the PLC lights when an input
device is activated and an output LED glows when the program
activates an output.

Voltages (usually 24VDC) are sent into inputs on the PLC and voltages
are sent out of the PLC to output devices. If an input LED does not
glow when an input devices is activated, the device and or the wiring is
tested for operation and connection.

The same for output device. If an output device is not activated when
the PLC address LED glows, the output device may be defective or the
wiring may have opened.
PLC Troubleshooting
Voltage Measurements:

A digital or analog voltmeter is the main tool for troubleshooting wiring.


Measuring voltage requires that power be on and safety rules should
be observed. Lab 1-1 Safety should be reviewed. Two procedures
are the most common.

1. Connect the ground of the voltmeter to the ground or -24vdc power


and use the positive probe to trace the power from the power supply,
to the breaker then out of the plc to the device looking for a loss in
power or an open circuit.

2. Connect the positive lead of the voltmeter to the positive terminal of


the power supply or breaker. Use the negative probe to trace the
ground connections to the device looking for an open ground. This
procedure is often overlooked and is important since a ground can
open as well as power connections.
PLC Troubleshooting

Resistance Measurements:

Resistance and current measurements are normally not practical


since to measure current, the circuit must be cut and the ammeter
places in series. Measuring the voltage to the device indicates
power to the device.

Resistance measurements are useful for testing the continuity of a


components such as a solenoid valve coil or relay coil. The coil
however must be disconnected (at least one of the wires) to make
the resistance or continuity measurement.

Resistance or continuity check is the last check made after


confirming a good ground and confirming power is reaching the
device.
PLC Troubleshooting

Troubleshooting Outputs: Outputs can be tested with a temporary


jumper
L1 = 24 vac

A 2
1
10 Light
11
12 Jumper
13
14
4 Solenoid Valve
15
3
16 5
17
B
L2 = 24 vac
PLC Swing Arm H/P Tie Block
(not connected to module)
24.
0

+ c
PLC Troubleshooting

Troubleshooting Inputs: Inputs can be checked with a voltmeter


to find the lose in voltage to the PLC.

L1 = 24 vac
1
A
00
Limit Sw 1 01
3 02
2 4 5 03
Limit Sw 2 04
05
06
H/P Tie Block 07 PLC Swing Arm
B

24.0 L2 = 24 vac

+ c

Voltmeter
PLC Troubleshooting

PLC Control Panels

Input Switches

Output Lights
PLC Troubleshooting
CB1 2a
5Amp BLACK L1
120 VAC WHITE L2 24 VDC POWER SUPPLY
GREEN GN + -
D
CB2 4a RED BLACK
Amp

RED
Thumbwheel
Switch
RED RED RED RED RED
0-9

1 2 4 8
Red Black White grey Blu Or Green White Red Or Green Blue Cable 1

24 vdc +24 VDC COM 0 I/1 I/3 I/4 I/6 COM 2 I/9 I/11
POWER COM I/0 I/2 COM 1 I/5 I/7 I/8 I/10
Output
Black Black Black
I/0
1764-24BWA LSP SERIES C
RED RED RED RED RED

L2 VDC 0 VDC 1 VDC 2 VDC 3 VAC 4 O/5 O/7 O/8 O/10 24BWA
85-265
L1 O/0 O/1 O/2 O/3 O/4 O/6 VAC 5 O/9 O/11
Black Green
Black Blue Orange Green White Cable 2 Black
White
Green Green Green Red Blue

Black Black Black Black Black


PLC Troubleshooting
Output Output Input Input

Addresses Description Addresses Description

O:0/0 Top Light - Red I:0/0 Units Thumbwheel Switch - Weight 1


O:0/1 2nd Light - Green I:0/1 Units Thumbwheel Switch - Weight 2
O:0/2 3rd Light - Green I:0/2 Units Thumbwheel Switch - Weight 4
O:0/3 4th Light - Yellow I:0/3 Units Thumbwheel Switch - Weight 8
O:0/4 5th Light - Blue I:0/4 Tens Thumbwheel Switch - Weight 1
PLC Trainer I:0/5 Tens Thumbwheel Switch - Weight 2
O:0/8 Solenoid SOL-1 I:0/6 Tens Thumbwheel Switch - Weight 4
O:0/9 Solenoid SOL-2
Addresses O:0/10 Solenoid SOL-3 I:0/7 Top Panel Pushbutton - Red
I:0/8 2nd Panel Pushbutton - Green
O:0/11 Fan I:0/9 3rd Panel Pushbutton - Black
I:0/10 4th Panel Pushbutton - Black
O:2/0 Segment A I:0/11 Bottom Panel Switch
O:2/1 Segment B
O:2/2 Segment C I:1/1 Limit Switch - LS1
O:2/3 Segment D I:1/2 Limit Switch - LS2
O:2/4 Segment E I:1/3 Limit Switch - LS3
O:2/5 Segment F I:1/4 Limit Switch - LS4
O:2/6 Segment G
I:1/5
I:1/6 Photo Sensor
I:1/7 Proximity Sensor
PLC Troubleshooting

LAB 16-2

The Force Command


PLC Troubleshooting
Input Forcing: When an input is forced, the value in the input data file is set to
a user-defined state. For discrete inputs, you can force an input “on” or “off”.
When an input is forced, it no longer reflects the state of the physical input or the
input LED. For embedded inputs, the controller reacts as if the force is applied to
the physical input terminal.

Output Forcing: When an output is forced, the controller overrides the status of
the control program, and sets the output to the user-defined state. Discrete
outputs can be forced “on” or “off”. The value in the output file is unaffected by the
force. It maintains the state determined by the logic in the control program.
However, the state of the physical output and the output LED will be set to the
forced state.

How to Force: To force, you must be in the run mode. Place the mouse on the
input or output instruction and press right mouse. A menu box will show force
instructions. You can force on Input files and output files, however you cannot
force binary, timer, or counter files.
PLC Troubleshooting

LAB 16-3: Troubleshooting

Contact Histograms
Use the histogram functionality in RSLogix 500 to get information about how an address's data value changes over time. You must be online with the SLC controlle
From the Comms menu, click Histogram to display the Histogram dialog. By clicking Start on this dialog, the histogram function sends a message to the SLC cont

PLC Troubleshooting

Use the histogram functionality in RSLogix 500 to get information


about how an address's data value changes over time. You must be
online with the SLC controller to access the histogram function.

From the Comms menu, click Histogram to display the Histogram dialog.
By clicking Start on this dialog, the histogram function sends a message to
the SLC controller to begin logging data.

Each time the address value changes, the controller stores the value for the
address in a histogram buffer, logging both the new value and the time interval
between value changes.

This data is represented in the top portion of the histogram display window.
If you frequently log certain data, you can save the configuration and simply
load it without having to enter new parameters each time. Use Save and Load
(accessible from the right mouse menu) for this functionality.
PLC Troubleshooting

Use this drop-down list box


to select a time base for the
histogram (in seconds).
If you don’t see data values
changing, it is possible that
your time base is incorrect
for the addresses you are
monitoring.
PLC Troubleshooting

LAB 16-4:

Temporary End (TND)

Suspend (SUS)
PLC Troubleshooting

TND - Temporary End (Instruction Type: output) The TND instruction


is used to denote a premature end-of-ladder program execution. The
TND instruction cannot be executed from a subroutine or a user fault
subroutine. This instruction may appear more than once in a ladder
program. On a true rung, TND stops the processor from scanning the
rest of the program file. In addition, this instruction performs the output
scan, input scan, and housekeeping aspects of the processor scan cycle
prior to resuming scanning at rung 0 of the main program (file 2). If this
instruction is executed in a nested subroutine, it terminates execution of
all nested subroutines.

Execution Time for the TND Instruction (MicroLogix 1500)


Controller When Rung Is True 1.0 μs
Controller When Rung Is False 0.0 μs
PLC Troubleshooting

SUS - Suspend (Instruction Type: output) The SUS instruction is used


to trap and identify specific conditions for program debugging and
system troubleshooting. This instruction causes the processor to enter
the suspend idle mode, causing all outputs to be de-energized. The
suspend ID and the suspend file (program file number or subroutine file
number identifying where the suspend instruction resides) are placed in
the status file (S:7 and S:8). The immediate data range for the suspend
ID is from -32768 to 32767.
PLC Troubleshooting

LAB 16-5

Status Files
Fault Messages
Error Codes
PLC Troubleshooting

Identifying Controller Faults While a program is executing, a fault may


occur within the operating system or your program. When a fault occurs,
you have various options to determine what the fault is and how to correct
it. This lab describes how to clear faults and provides a list of possible
advisory messages with recommended corrective actions.

Automatically Clearing Faults You can automatically clear a fault by


cycling power to the controller when the Fault Override at Power-Up bit
(S:1/8) is set in the status file.

You can also configure the controller to clear faults and go to RUN every
time the controller is power cycled. This is a feature that OEMs can build
into their equipment to allow end users to reset the controller. If the
controller faults, it can be reset by simply cycling power to the machine. To
accomplish this, set the following bits in the status file:

• S2:1/8 - Fault Override at Power-up


• S2:1/12 - Mode Behavior
PLC Troubleshooting

If the fault condition still exists after cycling power, the controller re-enters
the fault mode. Status bits will be set in the System Status File. The
status file lets you monitor how your controller works and lets you direct
how you want it to work. This is done by using the status file to set up
control bits and monitor both hardware and programming device faults and
other status information.

NOTE You can declare your own application-specific major fault by writing
your own unique value to S:6 and then setting bit S:1/13 to prevent reusing
system defined codes. The recommended values for user-defined faults
are FF00 to FF0F.
PLC Troubleshooting

Manually Clearing Faults Using the Fault Routine The occurrence of


recoverable or non-recoverable user faults can cause the user fault
subroutine to be executed. If the fault is recoverable, the subroutine can be
used to correct the problem and clear the fault bit S:1/ 13. The controller
then continues in the Run or test mode. The subroutine does not execute
for non-user faults. See User Fault Routine on page 18-6 for information
on creating a user fault subroutine.

Fault Messages This section contains fault messages that can occur
during operation of the MicroLogix 1200 and MicroLogix 1500
programmable controllers. Each table lists the error code description, the
probable cause, and the recommended corrective action.
PLC Troubleshooting

Error Codes: See MicroLogix™ 1200 and MicroLogix 1500


Programmable Controllers Bulletins 1762 and 1764 Instruction Set
Reference Manual Appendix D Fault Messages and Error Codes

Error codes are listed in HEX. The fault is described and a


recommended action is provided.
PLC Troubleshooting
Major Error Code This register displays a value which can be used to
determine what caused a fault to occur. The controller sets (1) this bit when
a major error is encountered. The controller enters a fault condition and word
S:6 contains the Fault Code that can be used to diagnose the condition. Any
time bit S:1/13 is set, the controller: • turns all outputs off and flashes the
FAULT LED, • or, enters the User Fault Routine allowing the control program
to attempt recovery from the fault condition. If the User Fault Routine is able
to clear S:1/13 and the fault condition, the controller continues to execute the
control program. If the fault cannot be cleared, the outputs are cleared and
the controller exits its executing mode and the FAULT LED flashes.

Contacting Rockwell Automation for Assistance: If you need to contact


Rockwell Automation or local distributor for assistance, it is helpful to obtain
the following information ready: • controller type, series letter, and revision
letter of the base unit • series letter, revision letter, and firmware (FRN)
number of the processor (on bottom side of processor unit) • controller LED
status • controller error codes (found in S2:6 of status file). Rockwell
Automation phone numbers are listed on the back cover of this manual. To
contact us via the Internet, go to http://www.rockwellautomation.com.
PLC Troubleshooting

Go to the status file by clicking on the S2 file, next click on the Errors
tab
PLC Troubleshooting

The major fault is set at S:1/13 with the description displayed and
a tab to clear the fault.

S:1/13 Error
Description

Clear Error
PLC Troubleshooting

LAB 16-6:

Troubleshooting

Trends
PLC Troubleshooting
Trends: Trends are typically used to observe data such as temperature
changes over a period of time, however they can also be used to
troubleshot an applications.

A Trend logs the data for more than one address (typically
related) over a period of time. Contrast this with a histogram which logs
the data contained in a single address over a period of time. This
option provides the features of the RSTrendX Viewer plus remote
trending capability. The RSTrendX Viewer is an ActiveX control for
displaying process data in a trend or strip chart recorder format. It is
based on the Viewer display in the RSTrend Data Acquisition and
Trending software.

To create a Trend chart right-click the Trends folder in the


project tree and select “New”. Trends are saved with the project. Logged
data is not retained. You can create a trend configuration while offline or
online. You must be online to trend data.
PLC Troubleshooting

Features: The Trend Active X Viewer supports a Manual and an


Automatic (unsolicited) mode for updating the Viewer data. In the
Automatic mode the Viewer grabs the latest pen values at the control’s
refresh rate. In the manual mode the pen values are updated based on
some external trigger (timer). Choose either mode by right-clicking
within the grid and selecting Chart Properties from the menu. Then on
the Config tab select the control button for either mode under General
Chart Operation.

You can modify a pen's properties (color, line width) or customize scaling
and axis properties. Click the help button on any dialog within the
control to access help for that specific feature of the RSTrendX Active X
control.
PLC Troubleshooting

This example shows a Trend for a timer T4:9.


PLC Troubleshooting

The legend at the left side of the display window contains:


A colored box representing the pen color. The color can be changed by
double-clicking on the box and then selecting a new color from the available
color chart. The symbol name identifying the pen. In the display above, no
symbol was defined for any of the addresses so the address is displayed
instead. The engineering units if they are defined. N/A means this is
currently not available (not defined) for the selected pen.

Additional features of the display:


The value bar. It displays if you click anywhere within the grid. The value
bar identifies the pen values in that region on the grid. The number of
points viewable per page is fixed at 32. VCR buttons that allow you to
maneuver forward or backward along the timeline to see the pen values at
any point since logging began. If you choose to use the VCR buttons to look
at historical data the line chart reverts to a Stop state. Click the Pause VCR
button to resume logging.
PLC Troubleshooting
Properties: Right mouse on the Trend chart to view properties.
Tabs include

General: for time span and starting date &


time

Display: Line Legend, Scrolling, Colors,


radix, time format

Pens: Color for each pen, type, style,


marker, etc.

X-Axis: Scale, time span, date grid color

Y-Axis: Min/Max values, Display options

Overlays: Attributes

Template: 17 template options, make a


template
PLC Troubleshooting

Create a chart. You can create a trend while offline or online. First click
the Trends folder in the project tree.

TREND Folder

Icon with name TREND


PLC Troubleshooting

Add pens (addresses) to the chart

Double-click the newly created


trend icon to open the chart.

Drag addresses from the ladder or


data tables to the trend while
offline or online. The address
does not need to have live data.
Click on the ACC value of the
timer and drag it onto the TREND
chart anywhere and drop. A scale
on the left is created.
Chapter
Programmable Logic Controllers

The End
PLC Troubleshooting

You might also like