Tutorial 01 PLC Basics1 PDF
Tutorial 01 PLC Basics1 PDF
The variety of uses for the hardware, software and firmware (hereinafter “Products”) described in this Documentation, mandates
that those responsible for the application and use of those Products must satisfy themselves that all necessary steps have been
taken to ensure that each application and actual use meets all performance and safety requirements, including any applicable
laws, regulations, codes and standards in addition to any applicable technical documents.
In no event will Rockwell Automation, Inc., or any of its affiliate or subsidiary companies (hereinafter “Rockwell Automation”) be
responsible or liable for any indirect or consequential damages resulting from the use or application of the Products described in
this Documentation. Rockwell Automation does not assume responsibility or liability for damages of any kind based on the
alleged use of, or reliance on, this Documentation.
No patent liability is assumed by Rockwell Automation with respect to use of information, circuits, equipment, or software
described in the Documentation.
Except as specifically agreed in writing as part of a maintenance or support contract, equipment users are responsible for:
• properly using, calibrating, operating, monitoring and maintaining all Products consistent with all Rockwell Automation
or third-party provided instructions, warnings, recommendations and documentation;
• ensuring that only properly trained personnel use, operate and maintain the Products at all times;
• staying informed of all Product updates and alerts and implementing all updates and fixes; and
• all other factors affecting the Products that are outside of the direct control of Rockwell Automation.
Reproduction of the contents of the Documentation, in whole or in part, without written permission of Rockwell Automation is
prohibited.
Throughout this manual we use the following notes to make you aware of safety considerations:
Identifies information that is critical for successful application and understanding of the product.
Identifies information about practices or circumstances that can lead to personal injury or death, property
damage, or economic loss. Attentions help you:
• identify a hazard
• avoid a hazard
• recognize the consequence
Labels may be located on or inside the drive to alert people that dangerous voltage may be present.
Labels may be located on or inside the drive to alert people that surfaces may be dangerous temperature
Before you begin
This lab will demonstrate and help guide you on how to use and program a Micro850 controller using the CCW software.
Please note:
CCW is an all-encompassing software package for component class controllers (or- small / micro controllers). It contains the application
programming environment for the Micro800 Programmable Controllers (PLC), Drives (Variable Frequency Drives or VFD’s which use AC
voltage, converted to DC, generate a Pulse Width Modulated (PWM) signal to control AC induction Motors) Human-Machine Interface
(HMI) displays for control, feedback to an operators panel and some Safety PLC’s.
With that- all User Manuals are included in CCW as well as a very extensive Help menus.
At any time that you need help or reference to any item, component or object, simply click on the help pulldown
Get familiar with the Connected Components Workbench design environment
This section will help get you familiar with the Connected Components Workbench design environment. As our
goal to help simplify your engineering efforts, CCW developed using the Microsoft Visual Studio Shell. This
common and popular software shell provides you the benefits of a common look, feel, and design environment
when transitioning from other similar software packages.
You can also launch the program from your Windows Start Menu by going to: Start > All
Programs > Rockwell Automation > CCW > Connected Components Workbench
4
1
3
2
1. Project Organizer
The Project Organizer displays the contents of your project in an organized tree view, providing access to each of
the devices and project elements. From the Project Organizer, you can add, move, or delete devices and
project elements, as well as double-click them to display their contents.
If your project contains a Micro800 controller, the Project Organizer also displays the logic programs,
variables, and user-defined function blocks associated with that Micro800 controller.
More on this later in the Lab.
2. Project
Create new or open an existing project, or discover (connect) to a Processor on a network
• Discover - discovers devices that are connected to your computer and recognized by Connected
Components Workbench.
3. Getting Started
This will launch your web browser to review instructional videos on various aspects of CCW. Take a moment to
review the following videos:
Connected Components Accelerator Toolkit
This is for an overall System design which builds an entire system, Bill of Material and sample code. This is for
more advanced system generation and will not be covered in this Lab.
4. Toolbox
The Toolbox displays icons for items that you can add to programs. From the Toolbox, you can drag and drop
individual Toolbox elements onto a design view surface or copy and paste these into a code editor. Each of
these actions adds the fundamental code to create an instance of the Toolbox item in the active project file
The Toolbox displays all of the devices that you can add to your Connected Components Workbench™ project.
On the right side of this box- there are (3) tabs on the side:
Device Toolbox: From the Device Toolbox, you can select devices for your project from the following two tabs:
• Discover - discovers devices that are connected to your computer and recognized by Connected
Components Workbench.
• Catalog - browses a catalog of devices that are included with Connected Components Workbench.
The Properties tool box will display the properties and attributes of objects selected while programming
.
Device Toolbox
The Toolbox displays icons for items that you can add to programs. From the Toolbox, you can drag and drop
individual Toolbox elements onto a design view surface or copy and paste these into a code editor. Each of
these actions adds the fundamental code to create an instance of the Toolbox item in the active project file
Definitions
Pointer: Points to specific line of code
Rung: Allows user to add another line to the program to perform other
operations
Branch: Allows a user to place more than one Contact or Coil in Parallel to each
other
Direct Coil: Output that starts in the OFF State and goes to ON State
Reverse Coil: Output that starts in the ON State and goes to OFF State
Set Coil: Sets the coil into the its final state (I.E Direct wiring (Off then On) sets
the coil to the ON State)
Reverse Coil: Sets the coil back into its default state (I.E Direct Wiring (Off then
On) sets the coil to the OFF State)
Pulse Rising Edge Coil: Asks if a bit just returned from 0 to 1 based on a clock
signal pulse wave (Consistently checking for change)
Pulse Falling Edge Coil: Asks if a bit just returned from 1 to 0 based on a clock
signal pulse wave (Consistently checking for change)
Direct Contact: Input that starts in the OFF State and goes to ON State
Reverse Contact: Input that starts in the ON State and goes to OFF State
Pulse Rising Edge Contact: Asks if a bit just returned from 0 to 1 based on a
clock signal pulse wave (Consistently checking for change)
Pulse Falling Edge Contact: Asks if a bit just returned from 1 to 0 based on a
clock signal pulse wave
(Consistently checking for change)
Create a CCW project and program a Micro850 controller
In this section, you will create a CCW project and learn how to create a program for a Micro850 programmable
logic controller.
2. File > New > Pop-up Menu > Give the Project a name Tutorial1Basics > Choose where user would like to
save the project > Click Create
3. Next a pop-up menu will appear to choose the PLC controller or other mechanical parts that will be used
in the project > Select Controllers > Micro 850 > 2080-LC50-24QBB > Information will come up about the
controller > Select Version 10 > Click Select > Click Add to Project
4. Notice that the Micro850 shows up in your Project Organizer on the left-hand side.
Alternatively, you can drag and drop the controller from the Device Toolbox into the Project
Organizer.
Right-click Programs under the Micro850 in your Project Organizer, and select Add > New LD : Ladder
Diagram.
6. Notice a new Ladder Diagram program called UntitledLD will be added under Programs.
Micro800 controllers allow you to create multiple programs as well as use multiple types of
rograms (such as Structured Text or Function Block Diagram) in the same controller application.
7. Right-click the UntitledLD program and select Rename, and name the Program Motor_Circuit
This circuit will use the DI0 switch on the Demo as your Start button, and the DI1 switch as your Stop button.
The pilot light wired to DO7 will simulate your motor coil.
In many applications, a ‘seal-in circuit not only starts a process or function, but ‘seals’ it in that ON or OFF
state. Many times, permissives are required to turn ON or OFF the output or- to hold it in the required state.
9. Double-click the Motor_Circuit program. A ladder diagram editor will appear in the main project workspace
with one empty rung. On the right side is the Toolbox of objects. If your screen does not show these- click on
the tab to the right called ‘Toolbox’
10. Locate the Direct Contact instruction in the Toolbox pane (right-hand side), and drag-and-drop it onto the
left side of the rung.
After inserting the Direct Contact instruction, the Variable Selector will automatically pop-up, allowing you
to select the variable or I/O point to assign to this instruction.
We will be assigning an embedded I/O point to this instruction; therefore we want to select the I/O –
Micro850 tab to show the available embedded I/O points. Then select _IO_EM_DI_00, and click OK.
11. Your rung should look like the following.
12. Locate the Reverse Contact instruction in the Toolbox and drag-and-drop it onto your rung, just to the right
of the Direct Contact you inserted in the previous step. Assign it to the embedded I/O point, _IO_EM_DI_01.
Your rung should look like the following.
13. Locate the Direct Coil instruction in the Toolbox, and drag-and-drop it onto the far right side of the rung, and
assign it to the embedded I/O point, _IO_EM_DO_07. Your rung should look like the following.
14. Locate the Branch instruction in the Toolbox and drag-and-drop it on top of the Direct Contact on the far left
of the rung. Your rung should look like the following.
15. Drag-and-drop a Direct Contact in to the Branch that you just added, and assign it to the embedded I/O point,
_IO_EM_DO_07. Your rung should look like the following.
You’ve completed creating your motor seal-in circuit. This type of circuit is used to maintain a current flow
after a momentary switch has been pressed or released.
16. Save your project and proceed to the next section to build and download your application to the Micro850
controller.
Build and Download your Micro850 Application
In this section, you will learn how to build and download your Micro850 application to the controller.
Before you can download an application to the controller, you must build it to verify that there are no errors with
the programming.
1. Build your application by right-clicking the Micro850 in your Project Organizer, and selecting Build, or via
the icons at the top of your screen
When the build is complete, you will see a message in the Output panel that the build has succeeded. If there
were errors in your programming, then they would be listed in the Output panel as well – and clicking on the
error would direct you to the error in your program.
Now that your build has completed, you can download the program to your controller.
2. Download your program to your Micro850 by right-clicking the Micro850 in your Project Organizer, and
selecting Download, or click on the download icon
07
Or
3. The Connection Browser will appear. Browse for your controller by
Option 1: expanding USB > selecting 16, Micro850, Micro850 > Click Ok
Option 2: Expand Connect w/ Linx Gateways, Ethernet > Select IP Address > Click OK.
USB
Ethernet
NOTE: Each time a user goes thru
Ethernet wire a new IP address will
show. The school district has floating
IP addresses, so each time a PLC is
hooked up a new IP address is
assigned to that location
4. If the Controller is in Run Mode, you will be prompted to change it to Remote Program mode. Click Yes.
5. The download will proceed. When the download is complete, you will be prompted to put the controller
back in to Run Mode. Click Yes.
6. Notice the messages in the Output panel that indicate the Download has completed successfully.
7. You have completed downloading to your Micro850 controller. Proceed to the next section to test and
debug your application.
Debug your Micro850 program
In this section, we will demonstrate how to debug your Micro850 program. By debugging your program, you can
view your program visually in real-time and watch values change in the program, as well as visually debug your
Ladder Logic or Function Block Diagram.
1. Click the “Play” button in the Toolbar at the top of the workspace environment. This will put your program
into “Debug” mode.
07
2. You should see the Ladder Diagram change color. The rung will turn blue, and any Boolean instructions that
are active will turn Red.
3. Press DI0 switch on the Demo hardware. Notice the _IO_EM_DI_00 Direct Contact instruction turn red as
you turn on the switch, and then turn blue as you release it (if you press and release the switch too fast, you
may not see it update in the ladder diagram). Then notice the _IO_EM_DO_07 Direct Contact and Direct Coil
instructions turn red. You should also notice that the DO7 light on the Demo is now on.
07
This is a typical motor seal-in circuit (and can also be applied in non-motor circuits as well). The
Output Coil is turned on using a Direct Contact and then the active state of the Output Coil seals in
the circuit. The circuit is unsealed when a Reverse Contact (normally closed) is opened. DI_01
would be the permissive to allow the circuit to work, such as a door that must be closed before
operation. If the door is closed- the system can start. If it opens- it stops
Both DI0 and DI1 Pressed at the same time. DI0 is move to the ON state and DI1 is
moved to the OFF state keeping the light turned off since both Contacts are not True since
they are In-Series
4. Press and release the DI1 switch on the Demo to turn off the output. Notice the light on your Demo turn off
and the corresponding changes in your Ladder Diagram.
So far, we have debugged the program primarily by viewing real-time changes in the Ladder Diagram editor. In
some instances, you may just want to view the real-time changes in a list format. You can do this by looking at
them in the Variables list.
Since the variables we are working with right now are embedded I/O points, we need to open the Global
Variables list.
5. Double-click Global Variables in your Project Organizer. The Global Variables pane will launch in a new tab
in the main project workspace.
The Global Variables pane is a list of all the Global Variables in your program. You will learn more about
Global Variables and other types of variables in the next section.
6. Locate the _IO_EM_DO_07 embedded I/O variable in the Global Variable list, and notice that the logical
value. checkbox is empty.
7. Press and release the DI0 switch on the Demo. Notice there is now a checkmark in the Logical Value for
_IO_EM_DO_07, and the light on the Demo is on. You may have also noticed a checkmark appear in the
_IO_EM_DI_00 logical value as you turned on the switch and then noticed the checkmark go away as you
released the switch.
8. Press and release the DI1 switch on the Demo. Notice the checkmark go away in the logical value for
_IO_EM_DO_07, and the light turn off on the Demo.
9. You have completed debugging your program. To exit Debug mode, click the Stop button in the toolbar.
Being able to debug a program in real-time is a very valuable tool in the programming and trouble-shooting
process, and Connected Components Workbench makes this design step very simple and easy.
Submission:
A. Show/Video program working (Show computer screen and PLC Board)
B. Printout a copy of the program