-
- 1 -
Kennesaw State University ECET 4530 – Laboratory Exercise PLC-1
Electrical Engineering Technology RSLogix 5000 and the Compact
Logix PLC
Introduction: In this exercise you will setup, configure,
program and operate a motor control system that utilizes a
Compact Logix 1769-L32E Programmable Logic Controller (PLC) to
control a pair of 3 Induction Motors, one by means of a PowerFlex
40 Variable Frequency Drive (VFD) and the other by means of a 3
contactor.
Preamble:
To complete this entire experiment, access is required to one of
the motor control lab benches in the Q-215 Electric Machines
laboratory that contains all of the equipment following
equipment:
1 – Compact Logix L32E Programmable Logic Controller (PLC) with
a 16-port IQ16 Digital Input Module and a 16-port OW16 Relay Output
Module
1 – PowerFlex 40 (PF40) Variable Frequency Drive (VFD) w/
Ethernet Module 1 – Personal Computer (PC) with the following
installed software packages:
RSLogix5000, RSLinx Classic, BootP, & DriveExplorer. 2 –
Combination (NO/NC) Pushbuttons 1 – Indicator Lamp (120V) 2 –
Three-phase (3Φ) Induction Machines 1 – Three-phase (3Φ) Contactor
with a 120VAC Field Coil 1 – Three-phase (3Φ) 120/208V LabVolt
Power Supply 1 – Ethernet Switch
If you only have access to a desktop computer that has the
RSLogix software installed, you can
complete the programming part of this experiment and save the
results on a memory stick, after which you can complete the
physical portions of the experiment when you are able to gain
access to one of the motor control lab benches.
Skip ahead to the section titled “RSLogix 5000 Software” on page
eight (8) of this handout if you
do not currently have access to the physical motor control
system components. Physical Setup of the Motor Control System’s
Devices
The required physical (wired) connections between the various
control system components utilized during this experiment should
already be complete.
A detailed description of the required connections is provided
in Appendix A of this handout for
informational purposes in case you need to troubleshoot and/or
make repairs to the system.
DO NOT disassemble the control system components or modify any
of the physical connections if the system is already setup as
described in Appendix A.
Additionally, the PF40 VFD’s operating parameters should also be
properly configured. A detailed description of the procedure
required to reset the VFD and then properly configure its
operating parameters is provided in the next section of this
handout in case you need to troubleshoot the system. Note that,
even if the VFD is properly configured, you may find it beneficial
to complete the configuration procedure provided in the next
section.
-
- 2 -
Configuration of the Powerflex 40 Operating Parameters Although
there are a variety of operating parameters within the VDF, the two
primary parameters
that must be configured for this experiment are P036 and P038,
which determine from where the VFD will receive its start and
frequency commands respectively. Additionally, the drive’s web
browser interface will be enabled and its default accel and decel
times will be decreased.
1. Check (and correct if necessary) the setting of the 2
DIP-switches next to the Ethernet jack on
the front of the PF-40. Correct Settings: Switch1 Off Switch 2
On
Switch 1 is used to set the VFD for either single (off) or
multiple drive operation (on). Switch 2 disables (off) or enables
(on) the VFD’s web browser interface.
2. Reset the VFD to its default configuration by changing the
value stored in the VFD’s Basic
Program Group P041 to one (1) using the following procedure:
a) Press the Esc button on the front panel of the PF40 two
times. The left-most character (“d” for Display Group) in the LED
display should be flashing.
b) Press the button once such that the left-most character
changes to a “P” for Basic Program Group. This allows you to view
and/or change the settings within this group.
c) Press the Sel button once such that the right-most character
of the display is flashing, and then use the or the button to
change to program “P041”. Once “P041” is displayed, press the
button to choose this program.
d) Use the or button to change the displayed value from a “0” to
a “1” and press . This will reset the PF40 to default
conditions.
e) The PF40’s display should now be flashing “F048”. Fault code
48 occurs when the VFD’s parameters were reset to their default
values.
f) Press the Stop button on the control panel of the PF40 to
acknowledge/clear the fault.
It is important that the VFD be reset back to its default
configuration because the previous users may have changed its
operating parameters,
3. In a similar manner, change the following parameter(s) of the
VFD as stated below:
P036 From “0” to “5” This allows the PF40 to receive the “Start”
command (Start Source) from the “Comm Port” instead of the
keypad.
P038 From “0” to “5” This allows the PF40 to receive its drive
Speed Reference (Speed Reference) (frequency) value from the “Comm
Port” instead of the potentiometer on the front panel.
P039 From “10” to “3” This decreases the length of time that it
takes to PF40 to (Accel Time 1) increase its output frequency from
an initial value to a
commanded higher value from 10 sec down to 3 sec.
P040 From “10” to “3” This decreases the length of time that it
takes to PF40 to (Decel Time 1) decrease its output frequency from
an initial value to a
commanded lower value from 10 sec down to 3 sec.
4. Access the Display Group “d012” and verify that it displays
“55”. This group displays the current settings of P036 and P038 as
a 2-digit number.
-
- 3 -
If the physical control system is properly setup as described in
Appendix A and the VFD is properly configured as described in the
previous section, then you are ready to complete the Procedure
portion of this experiment. Unless instructed otherwise, perform
all parts of the procedure, in order, without skipping any
sections.
Procedure:
Desktop Computer Network Connection
If the desktop computer is connected to the campus network,
unplug the (black) cable that connects the desktop computer’s
Ethernet port to the campus network.
The computer must be disconnected from the campus network
because the control system requires the use of the program BootP,
which functions as a DHCP Server that can assign IP addresses to
computers attached to the network. IT Policy does not allow
individual users to operate DHCP Server software while connected to
the campus network.
Connect the desktop computer’s Ethernet Port to the control
system’s Ethernet Switch.
LabVolt Power Supply
Switch on the main LabVolt power supply.
Note – TURN-OFF the main supply immediately and notify the
instructor if any unexpected operation occurs when the main supply
is energized.
CONFIGURATION OF THE NETWORK SETTINGS FOR THE CONTROL SYSTEM
DEVICES
Internet Protocol (IP) Addresses In order to communicate across
the control system network, every device on the network must be
assigned a logical IP address. Each address is composed of a set
of four numbers that range from 0 to 255. Similar in nature to
phone numbers; when one device needs to contact another device on
the network, it passes the IP address of the remote device to its
network interface, and the network hardware takes care of setting
up the connection between the two devices.
Most devices can be assigned either a static IP address which
they maintain until that are assigned a new address or a dynamic IP
address that they must renew after a preset amount of time (or
whenever they reconnect to the network).
Although the desktop computer will be assigned a static IP
address, care should be taken when logging into the computer to be
sure that the address is still set to the correct value. When
connected to the “campus network”, the laboratory computers are
configured to receive dynamic addresses. Thus, when changing
between the campus and the control system networks, the computer’s
IP settings will need to be changed.
The PLC and the VFD are configured such that, every time they
are “powered-down”, they will discard their IP addresses. In-turn,
whenever they are restarted, the PLC and the VFD will need to be
reassigned IP Addresses. Thus, once they finish their boot-up
processes, they will begin to broadcast (ARP) requests indicating
that they are in need of an IP Address, and special (DHCP Server)
software on the desktop computer will be configured to assign those
addresses whenever it receives a requests.
ARP ≡ Address Resolution Protocol DHCP ≡ Dynamic Host Control
Protocol
-
- 4 -
Although IP addressing theory will not be discussed any further
at this point, the required procedural steps are provided for
assigning the following set of IP Addresses to the control system
devices that are able to communicate across a network:
Computer – 192.169.3.1 PLC – 192.169.3.20 VFD – 192.169.3.22
Assigning an IP Address to the Desktop Computer 5. Check the IP
configuration of the desktop computer by performing the following
steps:
a) Right-click on the Network icon
on the taskbar in the bottom-right corner of the desktop.
b) In the pop-up that appears, click Open Network and Sharing
Center.
c) In the Network and Sharing Center pop-up window, click Local
Area Connection. This will allow you to view and/or modify the
computer’s network settings.
Note that some of the values in your window may differ from
those shown to the right.
d) In the Local Area Connection Status pop-up window that
appears, click the Details button.
e) In the Network Connection Details window that appears, check
the IPv4 Address of the computer.
If the IPv4 address is 192.169.3.1 then the computer is already
properly configured. Close all of the network windows, skip step 2,
and proceed to the next section: Assigning IP Addresses to the PLC
& VFD.
If the IP address is NOT correct, complete step 2.
6. Set the IP Address of the desktop computer to 192.169.3.1 by
performing the following steps: a) Close the Network Connect
Details window. b) In the Local Area Connection Status pop-up
window that should still be open,
click the Properties button. c) In the Local Area Connection
Status pop-up window,
locate and double-click on Internet Protocol Version 4
(TCP/IPv4) in the list of items.
d) In the Internet Protocol Version 4 (TCP/IPv4) Properties
pop-up window that appears, click the radio button Use the
following IP address.
Enter 192.169.3.1 into the IP Address field and then click on
the Subnet Mask field. The subnet mask field will automatically
populate with the value 255.255.255.0. Click OK to save the
changes.
or
-
- 5 -
An IP Address has two parts, a Network Number and a Host Number.
The Network Number identifies the network to which a device is
directly connected and the Host Number identifies the specific
device connected to the network. The Subnet Mask is used to
determine which parts of the IP Address relate to the Network
Number and the Host Number.
Both the IP Address and the Subnet Mask are composed of a set of
four numbers, expressed in the form A.B.C.D. Whenever a 255 exists
in a specific position in the Subnet Mask, then that respective
value in the IP Address relates to the Network Number. Whenever a 0
exists in a specific position in the Subnet Mask, then that
respective value in the IP Address relates to the Host Number.
Given the computer’s IP address 192.169.3.1 and its subnet mask
255.255.255.0, the first three values in the IP address are the
Network Number and the last value is the Host Number.
Thus, the computer is host 1 on network 192.169.3.0. Note that
the network number is expressed with 0’s placed in the host
number’s position(s).
e) Verify that the IP Address has been changed by clicking the
Details button the Local Area Connection Status window and checking
the IPv4 Address in the Network Connection Details window that
appears.
f) Once the IP address is properly set, close all of the network
windows and continue on to the next section of the procedure.
Assigning IP Addresses to the PLC and the VFD Whenever the PLC
and the VFD are powered-up, they have previously been configures to
begin
broadcasting requests for an IP Address on the Ethernet network.
A DHCP Server is required to answer these requests and assign IP
Addresses to these devices. The “BOOTP-DCHP Server” software on the
desktop computer will be utilized to perform this task.
Complete the following steps to configure the BOOTP software to
assign the following addresses:
PLC – 192.169.3.20 VFD – 192.169.3.22 7. Start the BOOTP
software on the desktop computer by clicking “Start” and
choosing:
All ProgramsRockwell SoftwareBOOTP-DHCP ServerBOOTP-DHCP
Server.
8. The BOOTP program window has two main fields; Request History
and Relation List. The Request History field displays the MAC
Address of any network device that requests an IP Address. The
Relation List field displays the devices to which BOOTP is
configured to assign an IP Address if requested.
INFORMATIONAL NOTE
-
- 6 -
9. Locate the Ethernet (MAC) Addresses of the PLC and the VFD
that are present on your workbench. The MAC address of the PLC is
written on the front of the PLC’s LabVolt frame and the MAC address
of the VFD is written on the VFD’s terminal cover.
MAC (Media Access Control) Addresses are hardware level
addresses that are assigned by the manufacturers of the devices and
are specific to the type of network that is being utilized, in this
case an Ethernet network. Ethernet MAC addresses are composed of a
set of six, two-digit, hexadecimal numbers that are expressed in
the form AA:BB:CC:DD:EE:FF.
10. Whenever a device on the network broadcasts a request for an
IP Address, the request will
appear in the Request History field of the BOOTP window. Locate
the MAC address of the PLC within the Request History field and
double-click that entry. A “New Entry” window will appear.
Note – the MAC address shown in the above figure may differ from
that of your PLC.
11. Enter the IP Address, Hostname, and Description values shown
below and click OK when
done. Note that the MAC address displayed in the figure may
differ from that of your PLC.
12. Once the new entry is complete, the entry will appear in the
Relation List field of the BOOTP window.
The Relation List shows all of the user-defined MAC IP address
relations. The next time a device with a listed MAC address
requests an IP address, BOOTP will assign the appropriate address
to the device, after which that device will stop sending out any
more address requests.
13. In the same manner, double-click on MAC address of the
VFD
within the Request History field of the BOOTP window, enter the
following “New Entry” values and click OK.
The information for the VFD should also appear in BOOTP’s
Relation List field.
14. When BOOTP assigns an address to a device, the assigned
value will also appear in the
Request History field of the BOOTP window next to the
corresponding request. Note that you may need to scroll up or down
in the Request History field to verify that an IP address has been
assigned to a specific device.
Your addresses will be
192.169.3.20 and
192.169.3.22
Your addresses may differ
-
- 7 -
15. Minimize (do NOT close) the BOOTP program window. By
minimizing it instead of closing the program, BOOTP will continue
running in the background. That way, if you have to power-down
either the PLC or the VFD, BOOTP will automatically reassign them
an IP address when they are powered-up again.
Note that, by choosing FileSave As in the BOOTP window, you can
also save a copy of the relation list in a .bpc (BootP Config) file
to the desktop, after which you can automatically restart BOOTP
with the previously-entered relations by double-clicking on the
saved bpc file.
Confirming Ethernet Network Connectivity The PLC, the VFD, and
the desktop computer should now be networked together. Confirm this
by
utilizing Internet Explorer to access the web-interfaces
provided by both the PLC and the VFD.
16. To access the webpage-based interface of the PLC:
Run Internet Explorer and enter the PLC’s IP Address
(192.169.3.20) into the address bar and hit Enter; Internet
Explorer should display the web-interface.
Take a moment to become familiar with the PLC’s web interface
before proceeding to Step 17.
17. To access the webpage-based interface of the VFD: Enter the
VFD’s IP Address (192.169.3.22) into Internet Explorer’s address
bar; Internet Explorer should display the VFD’s web-interface.
Take a moment or two to become familiar with the interface
before proceeding to Step 18.
18. Close the Internet Explorer window.
RSLINX CLASSIC
RSLinx Classic is a program that provides the protocols
necessary for Microsoft Windows applications, such as RSLogix 5000,
to communicate with any Allen-Bradley networked devices.
Complete the following steps to start and configure the RSLinx
software:
19. Run the “RSLinx Classic” software from the desktop. 20. In
the main RSLinx window, choose CommunicationsConfigure Drivers. A
new
Configure Drivers window will open.
21. If any “Configured Drivers” are already present, Stop and
Delete them.
22. In the “Available Driver Types” drop-down list, locate and
choose “EtherNet/IP Driver” and click the “Add New…” button.
23. Click OK to accept the default name “AB_ETHIP-1” in the Add
New RSLinx Classic Driver
window that appears.
24. Choose the desktop computer’s Ethernet adapter (IP Address
192.169.3.1) from the list that appears in the “Configure Driver:”
window and click OK.
-
- 8 -
25. The “Configure Drivers” window should appear as shown to the
right.
Click Close to save and close the Configure Drivers window.
26. In the main RSLinx window, choose CommunicationsRSWho.
Your RSLinx window should look similar to the one shown to the
right:
27. Click the next to the AB_ETHIP-1, Ethernet entry to expand
that item. You should see both
the PowerFlex 40 and the Compact Logix 1769-L32E devices
similarly listed.
28. Fully expand all the 1769-L32E entry to investigate all of
its attached components. The complete set of entries should appear
as shown to the right.
Note – it may take a few seconds for each of
the items to appear as you continue to expand down the list.
Also note that the IP addresses shown above for the PLC and VFD
differ from your values.
29. Minimize (do NOT close) the RSLinx window.
RSLOGIX 5000 SOFTWARE
RSLogix 5000 is the software that you will be utilizing to
program the Compact Logix PLCs. Software Revision 20 is loaded on
the laboratory computers. Note that the software revision must
match the firmware revision that is loaded into the PLCs, which is
currently version 20.04.
Log into the desktop computer (user: .\student pw: student) and
execute the RSLogix 5000
software. If a shortcut is not available on the computer’s
desktop, the RSLogix software can be found by clicking on the Start
button and choosing:
All ProgramsRockwell SoftwareRSLogix 5000 Enterprise Series
RSLogix 5000.
Creating a New Project – Specifying the Controller and its
Modules
You are now ready to begin programming the PLC. To do this, you
must first create a “project”. Whenever you create a new project,
you must first specify and characterize the controller (PLC)
that you will be utilizing and the modules (if any) that are
connected to the controller. This allows the RSLogix software to
preconfigure its environment for all of the operational parameters
of the devices, in-turn allowing the programmer to directly control
or interface with those devices without necessarily knowing the
technical aspects of their operation.
-
- 9 -
For this exercise, we will utilize a modular PLC that contains a
1769-L32E Compact Logix controller, a 1769-IQ16 16-port, 24VDC,
digital input module, and a 1769-OW16 16-port, relay output
module.
Note – the input and output modules are directly connected to
the controller and communicate
with the controller via its “Local” communication bus
(CompactBus). The bus itself is configured into positional “slots”,
such that the controller is considered to reside in slot 0. The
module directly connected to the controller, in this case the
IQ-16, is considered to reside in slot 1. The next module, in this
case the OW-16 that is directly connected to the IQ-16, is
considered to reside in slot 2. If an additional module is attached
directly to the OW-16, then it would reside on slot 3, and so
forth.
In addition to the directly-connected modules, we will also use
a PowerFlex 40 VFD that will be
remotely controlled by the PLC via its 22-COMM-E (Ethernet)
communications port. For this reason, we must also provide the
previously-assigned IP addresses when configuring the project.
Complete the following steps to create and configure your new
project: 30. Run the RSLogix 5000 Software and open a “New Project”
from the Quick Start window.
A “New Controller” dialog box will appear.
31. Locate and select the 1769-L32E controller in the Type
field.
32. Configure the controller as shown to the right
and click “OK”.
Note – if you prefer, you may replace the word “Main” in the
controller’s Name field with your last name.
(I.e. – “Lastname_Controller”)
33. The 1769-L32E controller should now appear in the
I/O Configuration folder in the Controller Organizer window.
Right-click on the 1769-L32E Ethernet Port LocalENB and choose
Properties.
34. In the Module Properties Report: Controller:1 window,
configure the IP Address as shown below and click OK.
-
- 10 -
35. Now that the controller has been selected, its input and
output modules must be defined.
In the Controller Organizer window, locate CompactBus Local
under I/O Configuration. You may need to click to expand the
contents.
36. Right-click on CompactBus Local and select
New Module…
37. When the Select Module Type window appears, uncheck all of
the boxes except for “Digital” and “Allen-Bradley”.
Locate and select a 1769-IQ16 from the list of modules in the
lower field and click Create.
A New Module pop-up window will appear.
38. Configure the module as shown to the left but do NOT click
OK yet.
39. In the Module Definition section of the
New Module window, click “Change…”
40. When the Module Definition window opens, change the value of
“Electronic Keying” to “Disable Keying” and click OK.
41. The Electronic Keying option in the New Module window should
now read “Disable Keying”.
If this is correct, click “OK”. Electronic keying is utilized to
ensure that the device defined in your project is the same as the
actual installed device including the device’s firmware revision.
Although Allen-Bradley recommends that the “Disable Keying” option
not be used due to safety risks, we will utilize this option in the
lab setting due to the variance of the modules available in the
lab.
The 1769-IQ16 should now appear under CompactBus Local in the
I/O Configuration folder.
42. Once again, right-click on CompactBus Local and select New
Module…
43. Select and configure a 1769-OW16 in the same manner
that the 1769-IQ16 was configured. The 1769-OW16 is mounted in
Slot 2 of the Compact Logix controller.
44. Once complete, the 1769-IQ16 and the 1769-OW16 should both
be present under CompactBus Local in the I/O Configuration
folder.
-
- 11 -
Adding the PowerFlex 40 VFD
45. At this point, you must add the PowerFlex 40 Variable Speed
Drive to the I/O Configuration. In the Controller Organizer window
under the folder I/O Configuration, right-click on the 1769-L32E
Ethernet Port LocalENB and select New Module…
46. In the Select Module window, locate and
select a PowerFlex 40-E drive. 47. Configure the module as shown
to the right,
remembering to “Change…” the value of “Electronic Keying” to
“Disable Keying”.
Also, under the Connection tab, uncheck the box
“Use Unicast Connection over EtherNet/IP” 48. When the module is
configured correctly, click “OK”. 49. The PowerFlex 40 should new
appear in the
I/O Configuration under Ethernet. The control system devices are
now completely configured.
Note – if additional network-connected devices are added to the
control system, such as a
second VFD or a remote I/O module, they would be configured
similar to the PF40.
Information Regarding the Initial Operational Logic of the Motor
Control System
In this exercise, the PLC will be used to control the operation
of two different motors, the first of which is supplied by means of
a contactor, the field-coil of which is directly connected to the
PLC’s output module, and the second of which is supplied by a
PowerFlex 40 VFD that the PLC will remotely control via the
Ethernet network.
A normally-open (NO) “Start” pushbutton and a normally-closed
(NC) “Stop” pushbutton are both
wired to the input module of the PLC to allow for manual control
of the system’s operation. Initially, a typical “Start-Stop”
controller scheme will be employed in order to control the
operation
of the first motor such that the PLC will energize the main
contactor’s field-coil when the “Start” button is pressed and it
will de-energize the field-coil when the “Stop” button is
pressed.
The operation of the second motor will be more complex. When the
first motor is energized, the
PLC will “enable” (start) a ten-second timer. When the timer is
enabled, a message will be sent to the VFD, instructing it to
energize its output and to increase the frequency of its voltages
to 60Hz. When the timer is “done” counting to ten, another message
will be sent to the VFD instructing it to lower the frequency back
to 0Hz and to disable its output (i.e. – stop the motor).
Pressing “Stop” before the timer is “done” will cause the second
motor to stop early, but unless
“Stop” is pressed, the first motor will continue to operate even
after the second motor stops.
-
- 12 -
Note that, although this exercise will take you step-by-step
through the process of creating a ladder-logic program that will
allow the PLC to control the system as described above, upon
completion of this exercise, you are encouraged to experimentally
modify your program in order to vary the operation of the
system.
Examples of potential modifications after you complete this
entire exercise include:
a) Modify the program such that both motors are de-energized
when the timer is “done” counting, whether or not the operator
presses the “Stop” button.
b) An indicator lamp is wired to output port #1 of the PLC’s
output module. Modify the program to illuminate (energize) the
indicator lamp whenever the first motor is energized.
Creating the Initial Ladder Diagram (Program)
You are ready to begin creating your initial ladder diagram
(i.e. – program the PLC).
50. In the main RSLogix 5000 window, Choose ViewToolbars. When
the “Toolbars” window opens, be sure the first five options are
selected and then click “OK”.
51. In the Controller Organizer window,
expand the MainProgram folder by clicking next to the
folder.
52. Double-click the MainRoutine icon
to open the Routine Editor window.
53. The Routine Editor window should now display a blank ladder
diagram as shown below: Note the column of e’s that appear to the
left of the rung. The e’s signify that the rung is in “edit mode”
to signify that one or more of the instructions on the rung have
not yet been properly defined. Once all instructions have been
properly defined, the e’s will disappear.
54. Choose the Bit tab in the New Component
toolbar. The Bit tab displays instructions that are associated
with a single-bit in memory.
55. Left-click and hold the XIC instruction.
56. Using the mouse, drag and place this instruction in the
left-most position on Rung 0. Note that
as you drag the instruction into the Routine Editor window,
small green circles will appear on the ladder diagram that show the
available locations in which the instruction may be placed.
-
- 13 -
57. Right-click on the “?” above the XIC instruction and choose
“New Tag”. Tags: Tags contain information that identifies data
stored in memory,
allowing that data to be associated with a specific instruction
in order to define its operation.
For example – a bit in memory that is used to define the
state
of the XIC (0 open, 1 closed)
New Tag Data Fields:
Name – an alpha/numeric identifier (including underscores)
assigned to data stored in memory.
Names can be used to help clarify the ladder logic
structure by relating data to a specific task, function, or the
physical device linked to that data.
Names must begin with an alphabetic character,
cannot be greater than 40 characters in length, and are not case
sensitive.
Description – text-based field that may be used to further
identify the function of the data.
Type – defines how the tag operates.
Base – a tag that results in the allocation of memory (when
initially created) and that
provides a reference to that data stored in that memory
location, allowing the data to be directly linked to the operation
of an instruction.
Alias – a tag that allows the programmer to assign a name to an
existing base tag, such as the base tags that are automatically
created when a specific module or device is added to the
controller’s configuration.
For Example – RSLogix 5000 created a base tag for each input
port when the IQ-16 module was added to the controller’s. The
programmer could create an Alias tag named “Stop” and assign it to
one of these base tags.
Alias For (only active for Type: Alias) – the pre-defined base
tag re-named by the Alias tag.
Data Type – defines the type of data stored at the specific
memory location, such as:
BOOL (Boolean): 0 or 1 INT (Integer): –32768 to +32767
Scope – defines whether a tag is global or local. The controller
allows an application to be broken down into multiple programs. A
global tag is available to all of the programs, while a local tag
is available only to a specific program, such as “Main
Program”.
External Access – defines whether the tag will have Read/Write,
Read Only, or no (None)
access from external applications such as HMIs.
Style – defines how the tag is displayed. (Style does not affect
the “Data Type”)
Binary: Base 2 Decimal: Base 10 Constant – prevents executing
logic (instructions) from writing values to the tag if checked.
-
- 14 -
58. Define the New Tag fields as shown to the right and click
OK. This XIC instruction will provide the logic for the
controller’s
“Stop” button within the ladder diagram. The instruction will
return “false” when the bit referenced by the tag “Stop” is “0”,
and it will return “true” when the bit is “1”.
Note – an XIC, which resembles a NO contact, was chosen
because it will operationally be held “true” (closed) by the
physical NC “Stop” Pushbutton that is wired to Input-0 of the IQ-16
unless the actual button is pressed. You will link the Stop tag to
Input-0 in a later step.
59. The Stop button should now appear in
your ladder diagram.
60. Add a parallel Branch to the right of the “Stop” button and
place an XIC on each of the parallel paths.
The XIC in the upper branch will provide the logic for the
controller’s “Start” button, while the
XIC in the lower branch will eventually act as a “hold-in”
contact after “Start” is released. 61. Define a New Tag for the XIC
in the upper branch (similar to the Stop tag) but name it
“Start”.
Note – the lower XIC’s tag will be defined later
62. Place an “OTE” instruction to the right of the parallel
branches.
The OTE instruction will provide the function of the main
contactor’s field coil which, when energized, will actuate the
contactor’s main contacts, in-turn energizing Motor #1.
In terms of the ladder logic, when the rung condition to the
left of the OTE is “true”, the OTE
sets a bit to “1” (energize the motor), and when the rung
condition is “false”, the OTE resets the bit to a “0” (de-energize
the motor).
63. Define a New Tag for the OTE and name it “Motor_1”
64. In a physical system, if a “hold-in” contact is to be placed
in
parallel with a NO Pushbutton (Start), then an auxiliary-contact
from the main contactor would be utilized.
Since the Motor_1 OTE in represents the main contactor’s field
coil, the “hold-in” XIC can be
assigned the same Tag as the OTE such that the XIC’s state will
be determined by the operation of the Motor_1 OTE. (I.e. – the XIC
will close when the OTE is “energized”)
To copy the OTE’s tag onto the XIC, left-click and hold the
mouse
pointer over the OTE’s tag name Motor_1. Drag the tag name over
to the “hold-in” XIC instruction until a green circle appears next
to the XIC’s “?”, and release the mouse button.
-
- 15 -
65. The “hold-in” XIC should now have the same tag name as the
Motor_1 OTE.
Note – you could also have assigned the XIC the tag name
Motor_1 by double-clicking on the “?” (tag name) of the XIC to
enabling a drop-down menu.
Open the drop-down menu to view a list of all of
the previously-defined base tags from which you can select the
desired tag (Motor_1) by locating and double-clicking on Motor_1 in
the list.
Also note that there are several base tags displayed in the
list that you did not create. These are the tags that were
created automatically by the RSLogix 5000 software when you added
the controller’s modules and the VFD.
If you need to delete (or edit) a base tag that you defined,
double-click the Program Tags entry in the MainProgram folder in
the Controller Organizer window.
The ladder diagram will be replaced by a list of the tags that
have the Scope: MainProgram.
The tag list defaults to “Monitor Tags”, allowing you to view
the tags and their current state.
To delete a tag, click the “Edit Tags” tab at the bottom of the
tag display.
Then, right-click the grey box next to the tag that you want to
delete (edit)
and select Delete from the list of options.
66. Add a new rung to your routine by dragging a “Rung” icon in
the New Component toolbar into your ladder diagram just below rung
“0”. A green circle will appear between rung “0” and the “End” rung
as shown to the right. Release the mouse.
67. Add an XIC instruction to the left side of the new rung and
assign it the tag Motor_1.
68. Select the “Timer/Counter” tab in the New Component
toolbar.
69. Select a “TON” (Turn-On Delay) timer and place it to the
right of the XIC on the new rung.
70. Right-click the “?” in the Timer field of the TON and
define a New Tag for the timer as shown to the right, and then
click OK when done.
71. Double-click the “?” in the Preset of the TON and
enter the value 10000. The timer’s Preset value is defined in
msec, therefore the value 10000 relates to a time of 10
seconds.
-
- 16 -
72. Rung 1 should now appear as follows:
TON Operation: When the rung condition to the left of the TON
becomes true, the timer will be enabled and its Enable (EN) bit
will be set. The timer will then begin incrementing the value in
its Accumulator (Accum) in real-time from the initial value stored
in the Accum up its Preset value, at which time it stops counting
and the Done (DN) bit is set.
The timer will remain in this state until the rung condition
becomes false, at which time both the EN bit and the DN bit will be
reset and the Accum will revert back to its initially defined
value.
Note that, while it is enabled, the TON’s Accum can also be
reset back to its initial value by utilizing the RES (reset)
instruction that resides on the “Timer/Counter” tab in the New
Component toolbar.
73. Add another rung to your diagram between rung “1” and the
“end” rung. 74. Add an XIC instruction to the left side of the rung
and double-click on the “?” above the XIC.
75. Click on the down-arrow that appears in the Tag field,
locate and expand
the group of Run_Timer tags within the list of tags that
appear.
76. Choose the .EN bit of the timer by double-clicking on that
option. Then press “Enter”.
77. Add a “One Shot” (ONS) to the right of the XIC and define a
New Tag to name it “one1”.
Note – the ONS instruction is located under the “Bit” tab.
ONS Operation: When the rung condition to the left of the ONS
becomes true, the ONS is triggered, making the ONS true for that
one scan of that rung. If, at that time, the entire rung condition
becomes true, then any output instructions on that rung also become
true for that scan of the rung.
But, after the ONS is triggered, the ONS will return a false
condition during any successive scans of the rung until the ONS is
reset.
In order to reset the ONS so it can be triggered again, the rung
condition to the left of the ONS must become false for at least one
scan of the rung.
78. Add an Output Latch (OTL) and an Output
Unlatch (OTU) to the left side of the rung.
79. Double-click the “?” in the Tag field of the OTL instruction
and locate “PowerFlex_40:O” in the drop-down menu that appears.
-
- 17 -
80. Expand the set of “PowerFlex_40:O” tags; locate and
double-click the tag “PowerFlex_40:O.Start”
The tag “PowerFlex_40:O.Start” assigned to the XIC actually
refers to the tag “O.Start” that resides in the remote device
called “PowerFlex_40”. To control or monitor this bit, the PLC must
be able to communicate with the PF40 over the Ethernet network.
81. Assign the tag “PowerFlex_40:O.Stop” to the OTU in
the same manner that you configured the OTL.
OTL Operation: When the rung condition to the left of the OTL
becomes true, the OTL will set the bit associated with its assigned
tag to a one (1).
But, when the rung condition to the left of the OTL becomes
false, the OTL does nothing.
In other words, the OTL can set the bit but it cannot reset the
bit.
OTU Operation: When the rung condition to the left of the OTU
becomes true, the OTU will reset the bit associated with its
assigned tag to a zero (0).
But, when the rung condition to the left of the OTU becomes
false, the OTU does nothing.
In other words, the OTU can reset the bit but it cannot set the
bit.
PF40 Operation: The PowerFlex_40 must initially be enabled
before it can supply a set of variable frequency voltages to its
attached Induction motor. But, instead of pressing the green
“Start” button on the PF40 front panel, we previously configured
the PF40 to receive its Start command via its “Comm Port”.
This task can be accomplished by using an OTL to set the remote
“O.Start” bit that is located in the PF40. When the OTL becomes
true, the PLC will send a message to the PF40 via the Ethernet
network using the IP Address that was previously specified when
initially configuring the project. When the PF40 receives the
message, it will set the “O.Start” bit.
Note that the PF40 also contains an “O.Stop” bit that should be
reset whenever the drive is enabled by setting the “O.Start” bit.
The PF40 will accept the Stop command both via the Ethernet network
and by means of the red “Stop” button on the PF40 front panel.
Additionally, note that the drive can be disabled by setting the
“O.Stop” bit and resetting the “O.Start” bit.
Once the drive has been enabled, it will begin to output a set
of voltages, the frequency of which is determined by the value
stored in the PF40 memory location associated with the tag
“O.FreqCommand”.
Note that the value stored in the tag location “O.FreqCommand”
must be an integer number ranging from 0 600. This value relates to
the output frequency of the drive, and is specified in tenths of
Hertz. Thus, if the value “600” is stored in that location, the
drive will output a set of voltages with a frequency of 60.0Hz.
-
- 18 -
82. Add another rung to your diagram between rung “2” and the
“end” rung. This will be rung 3. 83. Add an XIC instruction to the
left side of the rung and assign it the “Run_Timer.EN” tag.
84. Add an ONS to the right of the XIC and assign it the new tag
“one2”.
85. Add a MOV instruction to the right of the ONS “one2”.
The MOV instruction resides under the “Move/Logical” tab of the
New Components toolbar.
MOV Operation: When the rung condition to the left of the
MOV
becomes true, the MOV instruction copies the data located in or
specified by the Source field into the location specified by the
Destination field (such as a frequency value into the PF40’s
“O.FreqCommand” register).
Note that, when locations are defined in the Source or
Destination fields, the MOV instruction will display the value
currently stored at the defined location within the “??” field.
Otherwise, the “??” field will be blank.
86. Double-click the “?” in the Source field of the MOV
instruction and enter the value 600.
87. Double-click the “?” in the Destination field of the MOV
instruction and locate “PowerFlex_40:O.FreqCommand” in the
drop-down menu that appears.
88. Double-click “PowerFlex_40:O.FreqCommand”
to assign it to the Destination field. Rung 3 should now appear
as shown to the right:
In this case, when the Run_Timer.EN XIC becomes true, the ONS
will trigger, causing the overall rung condition to become true for
that scan of the rung, in-turn causing the MOV instruction will
copy the value 600 into the destination location defined by the tag
PowerFlex_40:O.FreqCommand.
The MOV instruction will only be executed when the Run_Timer is
initially enabled, because once it is triggered, the ONS will
return a false condition as long as the Run_Timer.EN XIC remains
true. In order to reset the ONS, the rung condition to the left of
the ONS must become false, which will only occur when the Run_Timer
disabled.
89. Add another rung, and configure it as shown below:
When the Run_Timer’s accumulate reaches 10000, its .DN bit will
be set, causing the Run_Timer.DN XIC to become true, triggering the
ONS, in-turn causing the MOV to copy a frequency of zero (0) into
“PowerFlex_40:O.FreqCommand”, thus stopping its motor.
-
- 19 -
90. Add another rung, and configure it as shown:
This will cause a frequency of zero to be written to
“PowerFlex_40:O.FreqCommand” whenever the Stop button is
pressed.
91. Finally, add one last rung and configure it as shown
below:
This will also disable the PF40 when the Stop button is
pressed.
Linking the Logic & Output Instructions to the Associated
Physical Input & Output Ports
Now that the overall program structure has been completed, you
must link the operation of several instructions to the operation of
the physical devices wired to the PLC’s input and output ports:
92. Right-click on the tag name of the Stop XIC in rung 1
and choose Edit “Stop” Properties. 93. Change the “Type” to
“Alias”.
94. In the “Alias For” field, click on the down-arrow and
locate
the “Local:1:I” option in the menu that appears.
95. Expand ( ) “Local:1:I”, locate “Local:1:I.Data” and click
the down-arrow next to INT.
96. Double-click on port “0”. 97. The “Alias For” field of the
“Tag Properties – Stop” window
should appear as shown to the right. If so, click “OK”. You have
now linked the Stop XIC to the physical NC Stop pushbutton that is
wired to PLC Input Port 0 (zero).
98. Alias the Start XIC to the physical NO Start pushbutton
that is wired to PLC Input Port 1.
99. Alias the Motor_1 OTE to the field coil of the Main
Contactor that is wired to PLC Output Port 0 (zero).
Reminder – the output module is connected to slot 2
of the local bus. (Local:2:O)
100. Rung 0 should now display as shown to the right:
Note that, after the Motor_1 tag was aliased to
Local:2:O.Data.0, the change affects every instruction that was
previously assigned the Motor_1 base tag. This happens because,
when Edit Tag is selected, it is the actual tag itself that is
edited, not the specific instruction. Thus, changing a base tag to
an alias tag will affect all instructions that are assigned that
tag.
XIO (NC)
-
- 20 -
Checking Your Program for Errors
At this point, you have completed the initial ladder logic
program that is required for the exercise. Your ladder diagram
should be identical to the one shown at the bottom of this
page.
Remember that the presence of a column of e’s to the left of any
rung indicates that the rung is still
in “edit mode” and has not yet been fully configured. But, even
if all rungs have been fully configured, there may still be some
errors that remain unseen.
To have to RSLogix software check your ladder diagram for
errors: 101. Locate and click the icon at the top of the RSLogix
5000 main window.
If any errors are found, they will be reported as either “fatal
errors” or “warning” in the field immediately below your ladder
diagram at the bottom of the RSLogix 5000 main window.
102. If any errors are reported, make the appropriate
corrections until no more errors are reported.
Complete Ladder Logic Program for this Exercise
-
- 21 -
Setting the Communications Path to the PLC
In order to download your program into the PLC, you must first
set the communications “path” that the RSLogix software can use to
locate your controller.
103. Click the to the right of the “Path” field in the main
window.
104. In the “Who Active” window that appears, expand
the “AB_ETHIP-1, Ethernet” item by clicking its and keep
expanding the revealed items until the “00, CompactLogix Processor”
is located.
Note that the items in your list may differ slightly from those
shown in the list to the right:
105. Select the “00, CompactLogix Processor” and click the Set
Project Path
button and then close the “Who Active” window.
The path should now appear in the “Path” field as: Note that,
once the correct path has initially been defined, future attempts
to set the path can be completed by clicking the down-arrow on the
right side of the “Path” field and selecting the correct path from
the displayed list of recently set paths.
Connection Status of the RS Logix Software to the PLC
The RSLogix software on the desktop computer will either be in
an “Offline” or an “Online” state with respect to the operation of
the PLC.
Offline – the RS Logix software is not in direct (real-time)
contact with the PLC.
While offline, the ladder diagram displayed within the RS Logix
window is completely independent of the program that is stored in
the PLC’s memory.
The RSLogix software must be “Offline” while creating the ladder
diagram because
structural changes can only be made to the ladder diagram while
in the offline state.
Online – the RS Logix software is communicating in real-time
with the PLC. While online:
the ladder diagram displayed within the RSLogix window is
directly linked to the program that is stored within the PLC’s
memory such that the current state of the instructions and the
values stored within the tag locations will be shown on the ladder
diagram and updated in real time.
the operator of the desktop computer has the ability to both
monitor and affect the
operation of the PLC. the RSLogix software will display the
PLC’s current operational state, which for
this exercise will either be Program Mode or Run Mode. Note
that, when the key-switch is set to the REM (remote) position,
the RSLogix software has the ability to remotely toggle the PLC
between the Program and Run modes.
-
- 22 -
Operational State of the PLC
SAFETY NOTE – remotely switching the PLC between Program and Run
modes can be dangerous, especially in a live industrial setting
where unexpected motion or energization could pose a safety hazard
to human life.
Program Mode (online) – the RSLogix software is communicating in
real-time with the PLC
but the PLC is not executing the program stored in its
memory.
While in Program Mode, minor (non-structural) changes can be
made to the program, such as the values stored in a tag location or
specified in a MOV instruction.
Although the logic states of the ladder instructions will be
displayed on the ladder
diagram while in this mode, the PLC is configured such that all
output ports will be false (off or de-energized) while in Program
Mode.
Run Mode (online) – the RSLogix software is communicating in
real-time with the PLC while
the PLC is executing the program stored in its memory.
While in Run Mode, logic states of the ladder instructions will
be displayed on the ladder diagram.
Although changes cannot be made to the program while in this
mode, the PLC’s
operation, including the state of its outputs, can be directly
affected by the operator of the desktop computer. (This will be
discussed at a later time)
SAFETY NOTE – while using the PLC system in the lab, if the PLC
system starts operating in an
unexpected or unsafe manner when the PLC is switched from
Program to Run mode, DO NOT PANIC and DO NOT CLOSE THE RS LOGIX
PROGRAM WINDOW!!!
Simple toggle the PLC back into Program mode using the RSLogix
software. If this does not solve the problem, then shut-off the
main breaker located on the Lab Volt power supply to de-energize
the entire system.
Downloading Your Program into the PLC and Going Online with the
Controller
Now that the “path” to the controller has been set within the
RSLogix software, you can Download your program into the PLC’s
memory and Go Online with the PLC as follows:
106. Click the down-arrow just to the right of the “Offline”
field in the
upper-left portion of the main RSLogix window and select
“Download” to begin the download process.
107. If a Connecting to Controller window appears (it probably
won’t) stating that you must first
update the firmware to be able to connect to the PLC, click on
“Update Firmware” and answer positively to any other Update windows
that may appear until the update is complete.
108. If a “Connected to Go Online” window appears stating that
“The open project has changes
that aren’t in the controller” appears, choose “Download”.
-
- 23 -
109. A “Download” window will appear that will allow you to
transfer your program into the PLC’s memory.
Read the warning and then click “Download”.
110. Once the download is complete, the status of the PLC
will either switch to Remote Program mode or a warning window
will appear asking if you want to
“Change Controller mode to Remote Run?”
If that window appears, click “Yes”. Otherwise, click the
down-arrow next to “Rem Prog” and select “Run Mode” from the list
of menu items.
This will cause the PLC to begin executing (running) the
downloaded program.
111. Note – the VFD will typically display the fault code “F048”
after you download a program into the PLC because the PLC stops
communicating with the VFD when it is switched from Run Program
mode. Press the red “Stop” button on the VFD’s panel to Clear the
Fault.
112. RSLogix 5000 software should now be “Online” with the PLC
such that the operational state of the PLC can be seen by viewing
the ladder diagram:
Any TRUE logic instructions (XIO, XIC, etc.) and OTE output
instructions in the diagram are highlighted in green. In addition,
if the bit associated with the tag assigned to an OTL/OTU is
currently a 1, then that OTL/OTU will also be highlighted in
green.
Initially the Stop XICs, and the PowerFlex_40:O.Stop OTLs/OTUs
should all be green.
Verify the Proper Operation of the Motor Control System
Verify the proper operation of the motor control system as
described in the section titled: “Information Regarding the Initial
Operational Logic of the Motor Control System” (page 11).
While you are testing the system, pay attention to both the
operation of the physical setup and the instructions displayed on
the ladder diagram within the RSLogix window.
For example, verify that:
When you press the Start button, the contactor should
immediately actuate and the first motor should accelerate quickly
us to its synchronous speed. Simultaneously, the VFD should
energize and raise its output frequency from 0Hz to 60Hz over a
three second timespan, in-turn causing the second motor to
accelerate much slower.
Ten seconds after you pressed Start, when Run_Timer’s
accumulator reaches 10000, the VFD should begin to lower its output
frequency from 60Hz back down to 0Hz and then energize, causing the
second motor to stop rotating.
At this point, pressing Stop should cause the contactor to
dropout and de-energize motor one. If any errors are detected, go
back “Offline” and trouble-shoot your ladder diagram.
Be sure to test to all of the system’s specified operational
characteristics. If anything is not
working properly: Toggle the PLC from Run Mode Program Mode
Toggle RSLogix from Program Mode Offline Troubleshoot your program
and try again!
-
- 24 -
APPENDIX A – PHYSICAL CONFIGURATION OF THE CONTROL SYSTEM
EQUIPMENT
WARNING – Make sure that the main LabVolt power supply is
de-energized before making any physical changes to the
configuration of the control system equipment.
Programmable Logic Controller
L32E CPU & Power Supply
113. Energize the PLC’s DC power supply by connecting a power
cord from the Edison Plug adapter on the front panel of the PLC’s
frame to an AC power-strip on the workbench.
114. Connect the PLC to the control system’s Ethernet switch via
the RJ-45 communications
jack available on the front panel of the PLC. This will allow
the PLC to communicate with any other devices that are connected to
the control-system’s Ethernet network such as the VFD and the
desktop computer.
115. If not already in the proper position, turn the key-switch
on the PLC’s CPU to the “REM”
position (vertical). This will allow the PLC to be switched
between “program” and “run” modes remotely using the RSLogix
software that is installed on the desktop computer.
IQ16 Input Module
116. Connect the negative terminal of the PLC’s 24VDC source to
the Common terminal of the Input Module. Note that both of these
terminals are available on the PLC’s front panel.
This provides the DC zero-volt reference for all of the PLC’s
inputs.
117. Connect a NC (Stop) Pushbutton between the positive
terminal of the PLC’s 24VDC source and Input Port 0 of the PLC.
Since the PLC’s inputs are triggered by +24VDC, the NC
pushbutton will hold Input Port 0 “high” unless the NC pushbutton
is pressed.
118. Connect a NO (Start) Pushbutton between the positive
terminal of the 24VDC source and
Input Port 1 of the PLC. Since a NO pushbutton is connected to
Input Port 1, the port will remain “low” unless the NO pushbutton
is pressed.
OW16 Output Module 119. Connect the Common terminal for Ports
0-7 the Output Module to Terminal 1 of the
constant 120/208V 3 supply. Since the output module is a
relay-type module, whenever an output port (numbered 0-7) is
activated, 120VAC (with respect to the AC supply’s neutral
terminal) will be present at that port’s terminal.
120. Connect Output Port 0 of the PLC to the left terminal of
the contactor’s Field Coil.
Connect and the right terminal of the Field Coil to the Neutral
(N) terminal of the constant 120/208V 3 supply.
Whenever Output Port 0 is activated, the field coil will be
supplied with 120VAC.
-
- 25 -
121. Connect Output Port 1 of the PLC to the left terminal of
the Indicator Lamp.
Connect the right terminal of the Indicator Lamp to the supply’s
Neutral (N) terminal. Whenever Output Port 1 is activated, the lamp
will be supplied with 120VAC.
Contactor – Main Contacts
122. Connect terminals 1, 2, and 3 of the constant 120/208V 3
supply to terminals 1, 3, and 5 of the “red” contactor’s NO
contacts.
Connect terminals 2, 4, and 6 of the contactor’s NO contacts to
terminals 1, 2, and 3 of the left-hand 3 Induction Motor’s stator
windings.
Connect terminals 4, 5, and 6 of the left-hand 3 Induction
Motor’s stator windings together using two short (yellow) patch
cables.
When the field coil is energized, the NO contacts will close,
energizing the first induction motor by connecting terminals 1, 2,
and 3 of the 120/208V supply to terminals 1, 2, and 3 of the
motor.
PowerFlex 40 VFD
123. Connect the three “blue” leads attached to terminals L1,
L2, and L3 of the PF40 VFD to
terminals 1, 2, and 3 of the LabVolt constant 120/208V 3 Supply.
This will provide the VFD with the supply voltage that is needs to
operate.
124. Connect the three “red” leads attached to terminals T1, T2,
and T3 of the PF40 VFD to
stator terminals 1, 2, and 3 of the right-hand 3 Induction
Motor.
Connect terminals 4, 5, and 6 of the right-hand 3 Induction
Motor’s stator windings together using two short (yellow) patch
cables.
When the PF40 VFD is activated, the VFD will supply a
variable-frequency AC voltage to terminals 1, 2, and 3 of the
second motor’s stator windings.
125. Connect the VFD’s RJ-45 Ethernet Port to the control
system’s Ethernet Switch.
This will allow the VFD to communicate with any other devices
that are connected to the control-system’s Ethernet network such as
the PLC and the desktop computer.
Desktop Computer
126. Unplug the (blue) cable that connects the computer’s
Ethernet Port to the campus network.
The computer must be disconnected from the campus network
because the control system requires the use of the program BootP,
which functions as a DHCP Server that can assign IP addresses to
computers attached to the network. IT Policy does not allow
individual users to operate DHCP Server software while connected to
the campus network.
127. Connect the computer’s Ethernet Port to the control
system’s Ethernet Switch. LabVolt 3 Power Supply 128. Energize the
main LabVolt power supply.
Note – TURN-OFF the main power supply immediately and notify the
instructor if any
unexpected operation occurs when the supply is energized.