«For Classroom Use Only! Important User Information This documentation, whether, illustrative, printed, “online” or electronic (hereinafter ...»
L04 - Basic PLC Programming with
Micro800™ Controller Family
For Classroom Use Only!
Important User Information
This documentation, whether, illustrative, printed, “online” or electronic (hereinafter “Documentation”) is intended for use only as
a learning aid when using Rockwell Automation approved demonstration hardware, software and firmware. The Documentation
should only be used as a learning tool by qualified professionals.
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 about practices or circumstances that can cause an explosion in a hazardous environment, which may lead to personal injury or death, property damage, or economic loss.
Identifies information that is critical for successful application and understanding of the product.
Identifies information about practices or circumstances that can lead to personal
Labels may be located on or inside the drive to alert people that surfaces may be dangerous temperatures.
Basic PLC Programming with Micro800™ Controller Family Contents Before you begin
About this lab
Tools & prerequisites
Get familiar with the Connected Components Workbench design environment
Create a CCW project and program a Micro850 controller
Build and Download your Micro850 Application
Debug your Micro850 program
Learn about Variables and Data Types
Learn how to create variables
Learn how to Implement an Instruction Block
PanelView Component HMI Design using Connected Components Workbench
About This Lab
Add the Terminal and Setup Communications
Create and Use Tags
Create the Motor Control Screen
Create a Push Button
Create a Goto Config Button
Create a Multistate Indicator
Create a Numeric Entry
Generate a Report
Validate and Transfer the Application to the Terminal
(OPTIONAL) Learn about User Defined Function Blocks
The following should have already been verified with your demo kit by the lab instructor prior to the lab:
1. USB cable connected between PC and Micro850 controller.
2. Micro850 controller firmware at v7.011 (updated via ControlFLASH if necessary).
3. PanelView Component terminal firmware at v1.80 (updated via USB drive if necessary) with static IP address configured for 192.168.1.2 and subnet mask 255.255.255.0.
4. PC Ethernet port configured for 192.168.1.1, subnet mask 255.255.255.0 with PVc Ethernet cable connected directly to it.
5. PowerFlex 4M drive parameter settings:
P106=2 o P108=0 o
1. Press Esc on the PowerFlex 4M drive keypad multiple times until 0.0 is displayed.
2. Press Sel until the leftmost alphanumeric character is flashing.
3. Press the up or down arrow until the leftmost alphanumeric character being displayed is a flashing P.
4. Press the enter key. The rightmost digit will be flashing.
5. Press the up or down arrow until P106 is displayed.
6. Press the enter key. The value of P106 is displayed.
7. If the value displayed for P106 is 2, jump to step 10.
8. Press the enter key. The value displayed for P106 will be flashing.
9. Press the up or down arrow until a flashing 2 is displayed. Press the enter key to accept this new value.
10. Press Esc – P106 is displayed and the 6 will be flashing.
11. Press the up arrow two times so that P108 is displayed.
12. Press the enter key. The value of P108 is displayed.
13. If the value displayed for P108 is 0, jump to step 16.
14. Press the enter key. The value displayed for P108 will be flashing.
15. Press the up or down arrow until a flashing 0 is displayed. Press the enter key to accept this new value.
16. Press Esc multiple times until 0.0 is displayed.
6. Demo kit power cycled off and back on.
About this lab Connected Components Workbench (CCW) is the integrated design environment software package that is used to program, design, and configure your Rockwell Automation Connected Components devices such as, Micro800 programmable logic controllers, PowerFlex drives, SMC soft-starters, and PanelView Component operator interface terminals.
This lab takes approximately 60 minutes to complete.
Tools & prerequisites Software: Connected Components Workbench Version 7.00.00 – Standard or Developer Edition (Developer Edition is only required for password protecting the UDFB in optional exercise on pages 84-85) Hardware: Connected Components demo kit – DEMO-CCMICRO1 Lab setup
This section will help get you familiar with the Connected Components Workbench design environment. As our goal to help simplify your engineering efforts, we’ve developed CCW 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.
Let’s take a couple minutes to get familiar with the CCW design environment.
(If Connected Components Workbench software is already open, jump directly to Step 2.)
1. Start the Connected Components Workbench software.
Double-click the Connected Components Workbench shortcut icon on your desktop.
You can also launch the program from your Windows Start Menu by going to: Start All Programs Rockwell Automation CCW Connected Components Workbench
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.
The Device Toolbox displays all of the devices that you can add to your Connected Components Workbench™
project. 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 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.
In the Output window, you can view and manage general purpose and debug messages generated by the
various features of Connected Components Workbench. From the Output window, you can do the following:
• Review status messages
• Locate errors within programs
In this section, you will create a CCW project and learn how to create a program for a Micro850 programmable logic controller.
You will learn how to:
Create a CCW project Add a Micro850 controller to your project Program a simple motor control seal-in circuit
Locate the Device Toolbox (upper right-hand corner). Expand Catalog and locate the Controllers folder.
Expand the Controllers folder and locate the Micro850 controller folder. Expand the folder and select catalog 2080-LC50-24QBB. Double-click this Micro850 controller catalog. This will add a Micro850 controller to your Project.
If windows appear for you to select major revision, select ‘7’, check the ‘Always use the latest revision’ box and click OK.
Alternatively, you can drag and drop the controller from the Device Toolbox into the Project Organizer.
3. Add a Ladder Diagram program.
Right-click Programs under the Micro850 in your Project Organizer, and select Add New LD : Ladder Diagram.
Micro800 controllers allow you to create multiple programs as well as use multiple types of programs (such as Structured Text or Function Block Diagram) in the same controller application.
7. Create a motor seal-in circuit in your Motor_Circuit Ladder Diagram program.
This circuit will use the DI0 (Discrete Input 0) switch on the Demo box as your Start pushbutton, and the DI1 (Discrete Input 1) switch as your Stop pushbutton. The start motor control is wired to DO9 (Discrete Output 9) so that when DO9 is on, the motor accelerates and runs, and when DO9 is off, the motor decelerates to a stop.
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.
10. In the Variable Selector window, select the I/O – Micro850 tab.
14. Locate the Reverse Contact instruction in the Toolbox and drag-and-drop it onto your rung, just to the right of the Direct Contact and assign it to embedded I/O point _IO_EM_DI_01 with alias description ‘Stop Motor PB’.
Your rung should look like the following.
15. 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.
16. Drag-and-drop a Direct Contact onto the Branch that you just added, and assign it to the embedded I/O point _IO_EM_DO_09. Your rung should look like the following.
21 of 88
17. You’ve completed creating your motor seal-in circuit. When the Start Motor pushbutton is pushed (while the Stop Motor pushbutton is not being pushed), you complete the rung circuit to the output so that the Motor turns on.
Once the motor is running, you can release the Start Motor pushbutton because the branch circuit around the pushbutton seals it in and the only way to interrupt the circuit is to push the Stop Motor pushbutton. This breaks the circuit, which turns the motor off and drops out the seal-in branch circuit. The Stop Motor pushbutton can then be released and the Motor remains off until the Start Motor pushbutton is pushed again.
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.
Now that your build has completed, you can download the program to your controller.
3. Download your program to your Micro850 by right-clicking the Micro850 in your Project Organizer, and selecting Download.
5. If the Controller is in Remote Run Mode, you will be prompted to change it to Remote Program mode. Click Yes.
6. The Download Confirmation will appear. You will be prompted to overwrite the project in the controller. The two choices are Download and Download with Project Values. The second choice is a new feature in Release 7 of Connected Components Workbench. Now, when a project is uploaded from the controller, a snapshot of the values of all of the user variables is uploaded and saved. These values can be downloaded back into the controller along with the project by selecting Download with Project Values. If you clicked the Help button, you