MB03 - BAsic Programing 800micro PDF
MB03 - BAsic Programing 800micro PDF
MB03 - BAsic Programing 800micro 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 temperatures.
Basic PLC Programming with Micro800™ Controller Family
Contents
Before you begin ........................................................................................................................................... 5
About this lab ................................................................................................................................................................. 6
Tools & prerequisites ..................................................................................................................................................... 6
Get familiar with the Connected Components Workbench design environment .......................................... 7
3 of 128
Add the Terminal and Setup Communications ........................................................................................... 57
Learn how to Create a Trend and Configure a Data Log .......................................................................... 102
Create a Trend Object................................................................................................................................................ 102
Configure a Data Log ................................................................................................................................................. 106
4 of 128
Before you begin
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 v6.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.100.2 and subnet mask 255.255.255.0.
4. PC Ethernet port configured for 192.168.100.1, subnet mask 255.255.255.0 with PVc Ethernet cable connected
directly to it.
5. PowerFlex 4M drive parameter settings:
o P106=2
o P108=0
To verify:
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.
5 of 128
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 will demonstrate and help guide you on how to use and program a Micro850 controller using the CCW
software.
Lab setup
Ethernet
6 of 128
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, 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.
You can also launch the program from your Windows Start Menu by going to: Start > All Programs
> Rockwell Automation > CCW > Connected Components Workbench
7 of 128
2. Get familiar with the CCW design environment.
This is the default project layout. Below are descriptions of each of the panels’ contents and the general task the
pane is used for.
8 of 128
3. 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.
9 of 128
4. Device Toolbox
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.
10 of 128
5. 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.
11 of 128
6. Output
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:
12 of 128
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.
13 of 128
1. Add a Micro850 to your project.
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 ‘6’, check the ‘Always use the latest revision’ box and
click OK.
14 of 128
2. 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.
15 of 128
4. Notice a new Ladder Diagram program called Prog1 has been added under Programs.
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.
Since we’ll be creating a Motor Circuit in this program, let’s rename it Motor_Circuit.
16 of 128
5. Right-click the Prog1 program icon and select Rename.
17 of 128
6. Rename the program, Motor_Circuit.
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.
18 of 128
8. Double-click the Motor_Circuit program icon. A ladder diagram editor will appear in the main project workspace
with one empty rung.
19 of 128
You do not need the ‘Device Toolbox’ window for the time being. Toggle at the top right hand corner of the
window to hide it.
9. 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.
20 of 128
10. In the Variable Selector window, select the I/O – Micro850 tab.
21 of 128
11. Scroll to the right, then drag and drop the ‘Alias’ column in between the ‘Dimension’ and ‘String Size’ columns.
You will notice a red arrow indicating where you will insert the ‘Alias’ column.
22 of 128
12. We will be assigning an embedded I/O point to this instruction. Select _IO_EM_DI_00, then, in the ‘Alias’ column
of _IO_EM_DI_00, type ‘Start Motor PB’ and click OK.
23 of 128
14. 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_09 with alias description ‘Motor’. Your rung should look like
the following.
15. 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.
16. 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.
17. 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.
18. 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.
24 of 128
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.
25 of 128
2. 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.
3. Download your program to your Micro850 by right-clicking the Micro850 in your Project Organizer, and selecting
Download.
26 of 128
4. The Connection Browser will appear. Browse for your controller by expanding USB and selecting 16, Micro850,
Micro850, then clicking OK.
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 will proceed. When the download is complete, you will be prompted to put the controller back in
Remote Run Mode. Click Yes.
27 of 128
7. Notice the messages in the Output panel that indicate the Download has completed successfully.
8. You have completed downloading to your Micro850 controller. Proceed to the next section to test and debug
your application.
28 of 128
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.
2. You should see the Ladder Diagram change color. The rung will turn blue, and any Boolean instructions that are
active will turn Red.
29 of 128
3. Set the speed reference by adjusting the trimpot on the PowerFlex 4M drive.
4. Turn and release the DI0 switch on the Demo box. 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 turn and release the switch too fast, you
may not see it update in the ladder diagram). Then notice the _IO_EM_DO_09 Direct Contact and Direct Coil
instructions turn red. You should also notice that the motor is running.
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.
5. Turn and release the DI1 switch on the Demo box to turn off the output. Notice the motor decelerate to a stop
and the corresponding changes in your Ladder Diagram.
6. So far, you’ve debugged your 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
the Variables list.
Since the variables we’re working with right now are embedded I/O points, we need to open the Global Variables
list.
30 of 128
7. 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.
8. Locate the _IO_EM_DO_09 embedded I/O variable in the Global Variable list, and notice that the logical value
checkbox is empty.
31 of 128
9. Turn and release the DI0 switch on the Demo box. Notice there is now a checkmark in the Logical Value for
_IO_EM_DO_09, and the motor begin to run. 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.
10. Turn and release the DI1 switch on the Demo box. Notice the checkmark go away in the logical value for
_IO_EM_DO_09, and the motor decelerate to a stop.
32 of 128
11. 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 troubleshooting
process, and Connected Components Workbench makes this design step very easy.
33 of 128
Learn about Variables and Data Types
In this section, we will discuss what a Variable is, and the different Data Types available.
A variable is a unique identifier of data. A basic example of a variable is what you’ve already been referencing in the
lab for Embedded I/O points. The Embedded I/O variables are Boolean data types that are direct references to the
embedded input and outputs on the controller. They are identified by variables that start with the prefix _IO_EM, and
are globally scoped. We will discuss variable scope a little later.
Micro800 controllers also have System Variables of varying data types that reference internal system values of the
controller that a user may want to use in their programming, or for troubleshooting purposes. System Variables start
with the prefix __SYSVA. An example of a system variable that is commonly used is the __SYSVA_FIRST_SCAN
variable. This is a Boolean variable that is TRUE when the Micro800 controller is going through its first scan of the
program – typically used for programming startup routines.
34 of 128
User variables can be created dynamically as you need them, and they can be named anything you want (as long as
it’s not a reserved name). You can also create variables for local program use only, or you can create them for global
use (for all programs to use) – this is what we refer to as variable scope. Global Variables are created in the Global
Variables list, and Local Variables are created in the Local Variables list of the specific program.
Being able to create variables dynamically and use custom names provides you, as a programmer, great flexibility
and customization that will help you create code and troubleshoot faster.
Data types
When you create a variable, you have to specify its data type. A data type defines the type of data that the variable
represents, such as an integer, real (floating point), Boolean, time, double integer, etc. Data types can also be data
structures of an Instruction Block.
35 of 128
Learn how to create variables
In this section of the lab, you will learn how to create variables for use in your program. The variables you create in
this section of the lab will be used in the next section of the lab.
1. Double-click Global Variables in your Motor_Circuit program to launch the Variables panel.
2. Scroll to the bottom of the list and create a variable called Motor_On_Time of Data Type TIME and press
‘ENTER’.
3. Create a variable called Motor_On_Time_ms of Data Type INT with an Initial Value of 5000.
4. Create a variable called Motor_Timer of Data Type TON and press ‘ENTER’.
36 of 128
A TON data type is actually the data structure of a Timer-ON-delay Instruction Block. We will
discuss Instruction Blocks in the next section.
5. Create a variable called Start_Motor of Data Type BOOL and press ‘Enter’.
6. Create a variable called Stop_Motor of Data Type BOOL and press ‘Enter’.
7. You have completed creating variables to be used in the next section of the lab.
37 of 128
Learn how to Implement an Instruction Block
An Instruction Block is essentially a function block that has been predefined to perform a specific task or function.
Instruction Blocks include functions such as timer-on-delay, timer-off-delay, math instructions, data-type conversions,
motion instructions, and so forth.
In this section of the lab, you will learn how to implement a Timer-ON-delay Instruction Block (TON). This instruction
block will be inserted into your motor circuit and will automatically turn off the motor coil after it has been running for
five seconds.
You will also learn how to implement an ANY_TO_TIME data conversion Instruction Block to convert an Integer to a
Time value.
38 of 128
4. Drag-and-drop this Block instruction into the branch that you just added.
5. The Instruction Block Selector will appear. This is where you can select the type of Instruction Block you would
like to use. As you can see, there is a long list of different types of instruction blocks that you can choose from.
Feel free to take a minute to scroll through this list to see what types of instruction blocks are available.
39 of 128
6. Since we want to use a Timer-On-Delay instruction block, type TON in the ‘Search’ field. This will filter the
choices to only Instruction Blocks that contain TON within their name.
7. Select the TON Instruction Block – this is the Timer-ON-delay. Then select the Instance combo box pull-down,
and select the variable instance, Motor_Timer that you created in the previous section, and click OK.
40 of 128
8. Your ladder program should look like the following.
9. Next, hover the mouse cursor over the red box area next to the PT parameter of the Motor_Timer TON
instruction. You will notice a light blue highlighted box appear.
10. Click this box, and a pull down combo box will appear. Find and select the variable Motor_On_Time and then
press the Enter key.
41 of 128
11. Your ladder program should look like the following.
12. Insert a Reverse Contactor after the _IO_EM_DI_01 Reverse Contact, as shown below.
13. The Variable Selector will display. Select the Global Variables – Micro850 tab. Click on the first cell in the last
row to display the remaining non-BOOL User Global Variables.
42 of 128
14. Expand the variable Motor_Timer and select Motor_Timer.Q. Then click OK.
43 of 128
16. Locate the rung instruction in the Toolbox.
44 of 128
18. Your program should look like the following.
19. Insert a Block instruction into the rung you just created, type ‘any_to_time’ in the search field and select the
ANY_TO_TIME Instruction Block. Then click OK.
45 of 128
20. Your program should look like the following.
46 of 128
22. Select the variable Motor_On_Time for the o1 parameter.
23. The ANY_TO_TIME instruction block is being used to convert an integer value into a time value that is used as
the preset time for the Motor_Timer. The integer value represents time in milliseconds.
24. From here, you will assign two variables as a set of parallel inputs to start and stop the motor. This will be used
for the PanelView Component HMI Design lab in the later section.
Create another parallel branch on the far left of rung 1.
25. Drag and drop a Direct Contact onto the branch you inserted in the previous step.
47 of 128
26. The Variable Selector window appears. Select the User Global Variables –Micro850 tab, select ‘Start_Motor’
and click OK.
48 of 128
28. The Variable Selector window appears. Select the User Global Variables –Micro850 tab, select ‘Stop_Motor’
and click OK.
30. Build your program, and download it to the Micro850 (if you forgot how to do this, go back and reference the
section Build and Download your Micro850 Application).
31. After completing the download, put the program into Debug mode by clicking the Play button (or pressing the F5
key).
32. Now test your program. Turn the DI0 switch on, and watch the motor run for 5 seconds and then decelerate to a
stop.
49 of 128
33. Change the value of the variable, Motor_On_Time_ms. Double click the variable box in debug mode to launch
the Variable Monitoring window.
34. Change the amount of time the motor runs to 10 seconds (remember to enter the value in milliseconds). Make
sure to press ‘Enter’ after changing the value.
35. Now test your program again. Turn the DI0 switch on and off. The motor runs for 10 seconds and then
decelerates to a stop.
36. Close the Variable Monitoring window and click the Stop button to exit Debug Mode (or press Shift+F5).
50 of 128
Learn how to add a plug-in module
In this section of the lab, you will learn how to add an Analog Input plug-in module. A plug-in module is a module that
you can plug into the Micro800 chassis to allow you to add additional I/O or Communications Options to your
controller.
1. Double-click your Micro850 controller in the Project Organizer to make sure you are displaying the controller
configuration window.
51 of 128
3. Right-click on the middle plug-in module slot, and select Analog > 2080-IF4.
52 of 128
4. Notice that the 2080-IF4 module is now added to your controller graphic. The plug-in configuration
properties specific to the 2080-IF4 should also show up in the pane below it.
53 of 128
6. Configure the input State for Channel 1, 2, and 3 to Disabled.
54 of 128
9. Double-click Global Variables in the Project Organizer.
10. Locate the variable _IO_P2_AI_00. This is the raw data value in relation to the voltage that is wired to
Channel 0 of the plug-in module. The value should range from ~0 to 65535 in relation to a 0 to 10 volt input.
11. On your demo box, turn the potentiometer labeled Speed Command and notice the value of _IO_P2_AI_00
change.
55 of 128
PanelView Component HMI Design using Connected Components Workbench
56 of 128
Add the Terminal and Setup Communications
Add a PanelView Component terminal to project and then configure the application.
1. From View Device Toolbox, expand Catalog and Graphic Terminals to bring up the list of PanelView
Component HMI catalog numbers. Double-click on 2711C-T6T to add it to the Project Organizer.
2. Double-click the Graphic Terminal (Labeled as PVcApplication1) icon in Project Organizer to bring up the
PanelView Component device configuration screen.
3. On the Settings tab, select the Serial radio button in the Protocol section. From the drop down menu, select
Allen-Bradley CIP as shown.
57 of 128
4. Leave the rest of the communication settings at the default state. Scroll down to view the Controller Settings.
Notice that the name of the controller we will be using is PLC-1.
5. Rename the PVcApplication1 as “MotorStarter” by right-clicking on the icon and selecting Rename from the
menu.
58 of 128
Create and Use Tags
This application uses read and write tags to define how objects interact with the addresses of the Micro850 controller.
You must create these tags before you can assign them to the objects in the application. Only objects that interact
with the controller require a tag. Objects such as screen navigation buttons, drawings, and screen text do not require
tags.
59 of 128
5. Select Motor_On_Time_ms from the list of variables and click OK.
Note: The Tag Name and Address do not have to match, but it is good programming practice.
8. Click in the Controller field and select PLC-1. This is the controller name defined on the Communication tab.
60 of 128
10. Repeat steps 3 through 9 to add the Start_Motor and Stop_Motor.
11. Add one more tag by selecting the Add button.
12. Select the the (…) in the Address field.
13. Select the I/O – Micro850 tab.
16. Click in the Controller field and select PLC-1and optionally, enter a description.
61 of 128
17. When done, the Tag Editor should look like this.
18. Save the application by selecting the Save icon ( ) from the toolbar.
62 of 128
Create the Motor Control Screen
New applications open with the first screen created. Each screen is created with a default name, Screen_NN, where
NN is a number from 1 to 99. The first screen is named Screen_1. You can rename the screen using a maximum of
50 characters.
This is what the Motor Control screen will look like when the following sections are complete.
1. If the Screens section is not expanded already, go ahead and expand the Screens (Startup Screen : 1) by
clicking the + sign to the left of the screens icon.
3. Type “MOTOR_CONTROL” into the text field as shown below and press Enter.
63 of 128
4. If the screen tab is not open already, double click the screen icon next to the newly named screen to open it for
editing. It should look similar this:
Verify the screen border is highlighted (in red) indicating the screen is selected. You can modify screen properties as long
as nothing on the screen is selected.
5. Select View Properties Window from the tool bar to view the Properties Window. It will show up on the
right side of the screen.
Note: The Properties Window can also be activated by right-clicking on an object, in this case the
screen, and selecting Properties. If you wanted to see the Properties of a push button, right-click
on that button and select Properties. The properties window is context sensitive. If the screen is
highlighted, it will display the screen properties. If an object is highlighted, it will display the ojects
properties.
64 of 128
Create a Push Button
1. From the Toolbox, locate Momentary Push Button, and drag-and-drop it onto the middle of your screen.
Note: The “Toolbox” is context sensitive. It changes the selection of objects for HMI development
versus the controller program development.
65 of 128
2. Double-click the button to open the States editor.
Each row is a state with a default value, text, and other format options. Move the scroll bar to see additional options. It
should look similar to the one shown below:
3. Edit State 1:
Click (…) button in the Background Color field and select green from the color palatte. Then click OK.
66 of 128
Click the (…) button in the Caption Text Color field and select black. Then click OK.
4. Edit State 2:
Click in the CaptionText field and type “MOTOR STARTED”
Select green as the Background Color
Select black as the Caption Text Color.
Check the Caption Font Bold checkbox.
5. Click row 1 so that this is the state displayed on the screen in CCW.
6. Verify your States window matches the image below and click OK to close the window and apply the changes.
67 of 128
7. Make sure the button is still selected and go to the Properties window. (View Properties)
Note: The Top and Left parameters determine the location of the object. The Height and Width
parameters determine the size of the object.
9. Click the Write Tag drop down arrow in the Connections section and select Start_Motor from the list of tags.
The Start Motor button is complete. Next, create the Stop Motor button by using a copy and paste operation.
10. Click the Copy icon ( ) on the toolbar or press the Ctrl+C keys on your keyboard.
11. Click the Paste icon ( ) on the toolbar or press the Ctrl+ V keys on your keyboard.
12. Move the pasted button to the right of the original push button.
13. Double click the new button to open the States editor.
68 of 128
14. Edit state 1:
Replace the Caption Text with “STOP MOTOR”
Select red as the Background Color
Select white as the Caption Text Color
Double check the Caption Font Bold checkbox is checked.
16. Click row 1 so that this is the state displayed on the screen in CCW.
17. Verify the screen looks as shown below and click OK when done.
18. Make sure the button is still selected and go to the Properties window.
19. Assign tags to the Stop Motor push button by clicking the drop down arrow for the Write Tag, on the Properties
window. Assign tag Stop_Motor by clicking on it.
69 of 128
20. Verify your screen appears as shown below.
21. Save the application by selecting the Save icon ( ) from the toolbar.
70 of 128
Create a Goto Config Button
The Goto Config button allows access to the configuration mode screens of the terminal when the button is pressed
at runtime.
1. From the Toolbox, scroll down to the Advanced section, and find the Goto Config button. Click and drag it to
the center of the screen.
2. Make sure the button is still selected and go to the Properties window.
71 of 128
5. Verify the screen looks as shown below.
6. Save the application by selecting the Save icon ( ) from the toolbar.
72 of 128
Create a Multistate Indicator
The Multistate indicator will show whether the motor is running or stopped. You will be creating the indicator.
1. From the Toolbox, locate the Multistate Indicator object listed in the Display section.
3. Double-click the object to open the States editor. The indicator is created with five states. This lab only uses
two.
4. Delete rows 3 and 4. (Select the row, and click the Delete button). Select OK when prompted.
5. Edit state 1:
Accept 0 as the Value.
Replace the MultiState0 Caption Text with “Stopped”
Select red as the Background Color
Select black as the Caption Text Color
Check the Font Bold and Italics checkboxes
6. Edit state 2:
Accept 1 as the Value.
Replace the MultiState1 Caption Text with “Running”
Select green as the Background Color
Leave white as the Caption Text Color
Check the Font Bold and Italics checkboxes
73 of 128
7. Click row 1 and then click OK to close the editor.
8. Make sure the button is still selected and go to the Properties window.
11. Save the application by selecting the Save icon ( ) from the toolbar.
74 of 128
Create a Numeric Entry
The Numeric Entry will allow the user to set how long the motor will run for, in milliseconds.
2. Drag the object into the space above the Multistate Indicator.
3. Make sure the button is still selected and go to the Properties window.
75 of 128
5. Verify the screen looks as shown below
6. Save the application by selecting the Save icon ( ) from the toolbar.
76 of 128
Generate a Report
In this section, you will learn how to generate a report. It provides detailed information about the PanelView
Component application.
1. Go to the Settings tab of the PanelView Component. If it is not open, double click the Motor Starter icon in the
Project Organizer.
77 of 128
4. Select the Save icon from the toolbar. There are two options: save it as an excel file, or as a PDF. Select either
option..
6. Once the file has been saved, locate it on the desktop. Open the file and view the report in the preferred format.
Notice the report provides images of all the screens in the application, a list of tags used, all the settings
configured for the controller, as well as data usage and much more.
78 of 128
Validate and Transfer the Application to the Terminal
Before you run an application on the PanelView Component, it is strongly recommended that you validate the
application for errors and warnings. The application does not need to be error-free to run, however, it is good
practice to fix both errors and warnings to ensure expected system behavior.
1. Right-click on the MotorStarter icon in the Project Organizer and select Validate.
79 of 128
7. Enter the terminals IP address, “192.168.100.2” . Then click Download.
8. The Output window will show the progress of the download. Ensure the application downloads successfully
before moving forward.
11. Scroll through the list of applications using the arrow keys to find the MotorStarter application you created.
13. The application will load. Select the START MOTOR button, and let the motor run. Notice the Multistate
Indicator you created now says “Running”.
15. Select the Numeric Input button you created, enter “5000” into the keypad, and press Enter.
16. Select the START MOTOR button again. Watch the motor run for 5 seconds then stop. Feel free to explore some
more.
25. To exit the application, select the CONFIG SCREEN button. This will bring you back to the File Manager screen.
80 of 128
Learn About Additional Features of the PanelView Component
In this section of the lab, you will learn about additional features of the PanelView Component that will help you
create a fully functional application. The topics in this section cover Go To Screen buttons, User Defined Objects,
Languages, Alarms, Trends, Data Logging, and Security.
81 of 128
Create a GoTo Screen Button
Now that the MOTOR_CONTROL screen has been completed, let’s create another screen which will be used to explore more
options within PanelView Component. We will add GoTo Screen buttons, MORE… and MOTOR_ CONTROL, to navigate
between the Options and MOTOR CONTROL screens. Follow the steps below to create these buttons.
3. From the Toolbox, locate the Goto Screen, click and drag the Goto Screen button to the middle of the screen.
4. Right-click the object and select Properties to open the Properties window.
82 of 128
6. Select light blue as the Background Color.
83 of 128
11. Go to the MOTOR_CONTROL screen by double clicking on it, right click, and select Paste.
12. Right-click the object and select Properties to open the Properties window, if it is not already opened.
17. Save the application by selecting the Save icon ( ) from the toolbar.
84 of 128
Learn how to Create and Use User Defined Objects
The User Defined Object (UDO) allows the user to easily duplicate single objects as well as entire screens from one
screen to the next within an application. A UDO can also be used in multiple applications by exporting it to the
computer as a .chu file and then importing the file in to the UDO library of the new application. In this section, follow
the steps to create a UDO which we will use frequently throughout the rest of this application.
Create a UDO
1. First, open the UDO library. Go to View → User-Defined Object Library from the menu.
2. Go to the Options screen by double clicking the icon from the Project Organizer.
We will create a UDO of the MOTOR CONTROL button, since it will be used frequently in the next few sections. UDO’s can
contain as little as one object, to an entire screen.
3. Right click on the MOTOR CONTROL button and select Add to Library
85 of 128
4. Type “MOTOR CONTROL GOTO” in the Name field of the pop up window.
You have now created a UDO, which can be used throughout the application, as well as in other applications. Now let’s add
the UDO to a screen.
7. Create a new screen and rename it Alarms. (We will be using this screen in an upcoming section.)
8. Add the MOTOR CONTROL GOTO UDO to the screen by double clicking the UDO. It will be placed in the top
most left corner of the screen, move it to the bottom right corner.
There are two ways to add a UDO to a screen, similar to how toolbox objects are added. The first way was just shown
above. The second way is to click the UDO, and drag and drop it where you want on the screen.
86 of 128
Exporting a UDO
In order to use a UDO in another application, it must be exported out of the current application. Here, you will learn
how to export a UDO, however, you will not be importing it into another application at this time.
3. Select a destination for the UDO, in this case, choose the Desktop and click Save.
4. Take a look at the desktop, there should now be a file called MOTOR CONTROL GOTO.chu. This is the UDO
object. You have successfully exported a UDO to be used in other applications.
87 of 128
Importing a UDO
1. To import the UDO, follow similar steps for exporting. Select the Import button from the toolbar.
4. Check that you are on the Alarms screen, and add the UDO by double clicking it.
88 of 128
5. You have just created an Alarm screen using User Defined Objects. It should look similar to the screen below.
6. Save the application by selecting the Save icon ( ) from the toolbar.
89 of 128
Language Switching
In this section, you will learn about language switching. The language switching functionality makes it possible to
create a single application that can be used in multiple countries. For example, this application will be modified so
that users can view it in English, German, or Spanish.
1. On the Options Screen, add a Multistate Push Button by double clicking the object from the Toolbox.
It is best practice to only have as many states as you do languages in your application. Since we have three languages, we
will delete the last state.
90 of 128
3. Click row 4, and select the Delete button.
91 of 128
Your screen should look similar to the image below:
9. Go to the Settings tab. (Or double click the MotorStarter application in the Project Organizer to open the
Settings tab if it is not already open.)
Notice the Startup Application Language is currently set to English. Also notice that all the existing text in your application is
shown below in the list.
92 of 128
11. Select the Manage Language List button.
We will add two more languages to this application, German and Spanish.
12. Scroll until you see German (Germany)(1031). Select the language, and then click the >> button to add the
language to the terminal. Note that the number following the language is the ID that was used in the States
setup.
13. Repeat the above steps in order to add Spanish (Mexico)(2058) to your application.
93 of 128
Your list should look similar to the one shown below. Then select OK.
14. Next, add the translations. Click the drop down arrow to the right of the second column that currently shows
English.
16. Notice that the list is empty. Translations have already been completed for you and can be found on the
desktop in an Excel file. Go to the desktop, and open the Microsoft Excel fileTranslations.xlsx.
94 of 128
17. Select the translated words for German. Make sure to select all the words, but do not highlight empty
spaces.
95 of 128
20. Your screen should look similar when complete:
21. Repeat the above steps to create the same translations for Spanish.
There are words that are repeated in the list. Every word and phrase in the application is added to
the Language list; therefore, each word and phrase must have its own translation. If it does not
have a translation, it will show up blank when the translation is made.
It is suggested to set up languages last when building an application. Since it pulls words into the
application in the order they were added, anything added to the application after translations have
been made will need to be translated again.
22. Double check the Startup Application Language. Select English if it is not already.
23. Validate the application by right clicking on MotorStarter, and selecting Validate. Correct any warnings if
they exist.
24. Save the application by selecting the Save icon ( ) from the toolbar.
25. Right-click on the MotorStarter icon and select Download. The IP address should already be populated
from the last download. Click the Download button to proceed.
96 of 128
26. Select Yes to the prompt.
This will unload the current application. While this is process is occurring, the terminal will display “Unloading” on the
screen. Once it has completed, you will need to down load the application one more time after it has unloaded.
27. Right-click on the MotorStarter icon and select the Download button again to download the application.
28. Select Yes if prompted to overwrite an existing application with the same name.
29. Load the application following the steps from the Validate and Transfer the Application to the Terminal
section. (pg 75.)
31. Click the English button once, and then go back to the MOTOR CONTROL display. Everything should be in
German.
32. Click the MORE… (Mehr) button again to go back to the Options display.
33. Click the German button once more to go to Spanish, or two times to return to English. Go back to the
MOTOR CONTROL display to see the translation.
34. Once you are done exploring, select English as the language and return to the Config Screen (MOTOR
CONTROL CONFIG SCREEN) on the terminal.
You have now completed the language switching section of the lab.
97 of 128
Learn how to Use Alarms
Making unexpected system or process events visible to operators is an important part of many HMI applications. In
this section, you will learn about alarms and how to use them.
2. Explore the options on the Alarm page. Take note of the Clear Alarm History when Application is Loaded,
and the Alarm History Size.
3. Click the Add Alarm button to add a new alarm to the application.
For simplicity, you will create an alarm that notifies the user when the PanelView Components System Second tag hits
the 30 second mark of every minute. This enables you to still explore alarming even if the rest of the application has
not been completely configured.
4. Click the drop down arrow under Trigger, and select $SysClockSecond.
98 of 128
5. Select Numeric for the Alarm Type
8. Use the scroll bar and scroll to the right to view the rest of the options for the alarm. Type “One Minute
Mark” in the Message box and press Enter. Leave the rest of the settings as the default.
You have just configured an alarm that will notify you every minute, on the 30 second mark.
In order to navigate to the Alarms screen, let’s add a GoTo Screen button on the Options display.
9. Open the Options display by double clicking on it.
10. From the Toolbox, add a GoTo Screen button by double clicking it.
11. Edit the following properties:
Background Color: Red
Font Bold: True
Text: ALARMS
Text Color: Black
Height: 60
Left: 0
Top: 180
Width: 80
Screen: 3- Alarms
99 of 128
12. The screen should look similar to the one shown below.
13. Validate the application by right clicking on MotorStarter, and selecting Validate.
There will be two warnings stating there are alarms configured without a message if you completed the
Language Switching section.
14. If you wish to fix these, go to the Languages section on the Settings tab. For German and Spanish, scroll
until you see the “One Minute Mark” text. Type in “One Minute Mark” for each of these and validate the
application again. The warnings should be gone.
15. Save the application by selecting the Save icon ( ) from the toolbar.
16. Right-click on the MotorStarter icon and select Download. The IP address should already be populated
from the last download. Click the Download button to proceed.
100 of 128
17. Select Yes to the prompt.
This will unload the current application. While this is process is occurring, the terminal will display “Unloading” on the
screen. Once it has completed, you will need to download the application one more time after it has unloaded.
18. Right-click on the MotorStarter icon and select the Download button again to download the application.
19. Select Yes if prompted to overwrite an existing application with the same name.
20. Load the application following the steps from the Validate and Transfer the Application to the Terminal
section. (pg 75.)
21. Once the application has been running for a minute or two, you should notice a pop up banner notifying you
of an alarm. Click the Close button.
22. Navigate to the Alarm screen (MORE… ALARMS)
23. Notice there are alarms populating every minute in the table. Use the arrow keys to move up and down.
Use the Enter to acknowledge the alarm. Once enter is pressed, it will display the time and date of the
acknowledgement.
24. Once you are done exploring, return to the Config Screen (MOTOR CONTROL CONFIG SCREEN) on
the terminal.
101 of 128
Learn how to Create a Trend and Configure a Data Log
In this section you will learn about Trends and Data Logs. In some applications, it is important to monitor specific
data as well as have a historical record of the data. Trending and data logs provide such functionality.
4. Each application is allowed up to 5 trends. If more than 5 trends are added, the application will error when
the validation is run.
102 of 128
5. Edit the following properties:
Height: 180
Left: 0
Top: 0
Width: 320
6. Double click the trend object to open the Pens page. This is where pens are added, edited, and removed on
the trend. Each trend can have up to 6 pens.
For simplicity, we will use the PanelView Components system seconds tag, $SysClockSecond. This will allow you to
view active trending, even if the rest of the application has not been completely configured.
7. Select the drop down arrow under Read Tag, and select $SysClockSecond.
103 of 128
8. Click in the Appearance Line Color box, and select the … button. Choose light blue as the color and select
OK.
104 of 128
12. Click in the box next to Autoscroll Configuration, and then click the drop down arrow. There are two
options, select Remove One Then Add if it is not already selected. This will keep a continuous line on the
trend object. (This will also keep continuous data in the Data Log file.)
Note: Selecting Remove One Then Add will continue scrolling at the end of the time span. When a
new event is added, the oldest event value is removed from the viewing area.
Selecting Remove All Then Add will restart scrolling at the end of the time span. All events are
removed from the chart and plotting will restart at the beginning of the time span.
13. Click in the box next to Update While Off Screen, and then click the drop down arrow. Select True. This
will allow the trend to update continuously, even though the screen may not be displayed on the terminal.
(This will also keep continuous data in the Data Log file.)
Note: Selecting False will stop the trend from plotting when a screen change occurs.
105 of 128
Configure a Data Log
Data logging allows tag values to be recorded and saved for further analysis. It is possible to store a data log on a
USB, SD card, as well as the Emulator Storage. The user can start and stop the data log in order to transfer the file
to a PC, and then resume logging. The data log file is stored as Trendlog.csv.
In order to create a Data Log, there must be a trend object in the application. Only one data log file can be created
per application. If the application has multiple trend objects, the trend that has the Log File Location specified in the
Properties will be represented in the Data Log. It is not possible to set the Log File Location for more than one trend
object at a time.
Since a Trend object has already been created, let’s configure the rest of the Properties to create a Data Log.
1. Click in the box to the right of Log File Location, and then click the drop down arrow.
2. There are three options, USB Storage, SD Storage, and Emulator Storage. For this lab, select USB
Storage.
3. Click in the box next to Log Trigger Tag, and then click the drop down arrow. Select the Start_Motor tag.
This tag must be set in order to start a Data Log file and it must be a Boolean tag.
106 of 128
4. Add the Motor Control UDO to the display. (View User Defined Object Library double click MOTOR
CONTROL GOTO) Place the button in the lower right corner. This will allow navigation to the Motor Control
screen.
In order to navigate to the Trend screen, let’s add a GoTo Screen button on the Options display.
5. Open the Options display by doubling clicking on it.
6. From the Toolbox, add a GoTo Screen button by double clicking it.
107 of 128
8. The Options screen should look similar to the one shown below.
9. Validate the application by right clicking on MotorStarter, and selecting Validate. Correct any warnings if
they exist.
10. Save the application by selecting the Save icon ( ) from the toolbar.
11. Right-click on the MotorStarter icon and select Download. The IP address should already be populated
from the last download. Click the Download button to proceed.
12. Select Yes to the prompt.
This will unload the current application. While this is process is occurring, the terminal will display “Unloading” on the
screen. Once it has completed, you will need to download the application one more time after it has unloaded.
13. Right-click on the MotorStarter icon and select the Download button again to download the application.
108 of 128
14. Select Yes if prompted to overwrite an existing application with the same name.
15. Load the application following the steps from the Validate and Transfer the Application to the Terminal
section. (pg 75.)
17. Notice that the trend line is constantly moving on the screen. This is because you chose “Remove One
Then Add” for the Autoscroll Configuration.
18. If there were a USB device attached, the terminal would create and store a Trend Log file on it.
109 of 128
19. It would look something similar to the data below if you were to save the file and review it. You created a
trend to display seconds, so the data below represents that.
20. Once you are done exploring, return to the Config Screen (MOTOR CONTROL CONFIG SCREEN) on
the terminal.
You have now completed the trend and data logging section of the lab.
110 of 128
Learn how to Add Security to the Terminal
Most applications are created for multiple users, however you may want to restrict access for some users. In this
section, you will learn about security and how to use it.
111 of 128
5. In the pop up display, fill in the following:
User Name: Engineer
Password: pvc
Confirm Password: pvc
Password Modifiable: Yes
7. Notice once the user is added, the Design right is automatically checked, as well as the Password –
Modifiable, since ‘Yes’ was selected in the pop up window.
112 of 128
10. Notice the Operator is not given Design rights automatically.
Next, let’s assign the Engineer access to all screens, but the Operator only to MOTOR_CONTROL, Options, and Alarms.
13. This provides a text box. Type “Trend” in the box and press Enter.
14. Assign the Engineer rights to view the Trend screen by checking the box in the Trend column.
Since we are preventing the Operator from viewing the Trend screen, we need to apply security to the trend screen.
113 of 128
17. In the Screen section, click in the box next to Access Rights, and select Trend.
19. From the Advanced section of theToolbox, add a Login button by double clicking on it.
114 of 128
20. Edit the following properties for the button:
Height: 30
Left: 16
Top: 40
Width: 60
21. From the Toolbox, add a Logout button.
115 of 128
25. Your screen should look similar to the one shown below:
You have added all the buttons required for the users to log in and out of the application, as well as change their own
password. Take note that you did not add a Reset Password button to the application. The Reset Password button allows
the user to reset a password without the use of an old password. This button requires a current user name and a new
password only. It should be used on a secured screen to prevent password changes by unauthorized users. A warning is
also generated during validation if this button is placed on an unsecured screen.
26. Validate the application by right clicking on MotorStarter, and selecting Validate. Correct any warnings if they
exist.
27. Save the application by selecting the Save icon ( ) from the toolbar.
28. Right-click on the MotorStarter icon and select Download. The IP address should already be populated from
the last download. Click the Download button to proceed.
29. Select Yes to the prompt.
This will unload the current application. While this is process is occurring, the terminal will display “Unloading” on the
screen. Once it has completed, you will need to download the application one more time after it has unloaded.
116 of 128
30. Right-click on the MotorStarter icon and select the Download button again to download the application.
31. Select Yes if prompted to overwrite an existing application with the same name.
32. Load the application following the steps from the Validate and Transfer the Application to the Terminal section.
(pg 75.)
33. To test the security, select the MORE… button on the terminal to go to the Options screen.
117 of 128
40. Select the Change Password button
Congratulations! You have now completed the PanelView Component section of the lab!
118 of 128
(OPTIONAL) Learn about User Defined Function Blocks
In this section of the lab, you will learn about User Defined Function Blocks (UDFBs) - how to create one using
Structured Text and how to password protect it using Connected Components Workbench Developer Edition.
A User Defined Function Block is a user defined program that can be packaged into an Instruction Block and reused
within your Micro800 project. A UDFB can be written in Ladder, Function Block, or Structured Text.
You will be creating a UDFB to calculate the volume of a cylinder based on an inputted radius and height value.
1. In your current project, right click User-Defined Function Blocks and select Add New ST: Structured Text.
119 of 128
2. A program called FB1 will be created under User-Defined Function Blocks.
120 of 128
5. Create the following variables. Take careful note to properly configure the Direction property. This property
defines whether the variable is an Input, Output, or standard Variable.
6. Next, double-click the Calc_Volume UDFB to launch the program editor in the main project window.
121 of 128
10. Next, create a new ladder diagram program called Tank_Volume.
11. Open the Local Variables for the Tank_Volume program, and create the following variables. Notice the Data
Type for the variable Calc_Tank_Volume is the Calc_Volume UDFB you created.
122 of 128
12. Next, open the Tank_Volume program, and add a Block Instruction to the first rung.
13. Search for the Calc_Volume UDFB and specify the Instance Calc_Tank_Volume. Then click OK.
123 of 128
14. Next, specify the following variables for each parameter of the Block.
17. Once your download is complete, press the F5 key to enter Debug Mode.
18. Open the Local Variables of your Tank_Volume program, and set the value of Radius to 5, and Height to 10.
124 of 128
19. The value of Volume should read 785.0.
125 of 128
22. Press Shift+F5 to exit Debug Mode.
Now that you have proved out the functionality of your UDFB, you may want to password protect it, especially if you
are trying to prevent disclosure of any proprietary algorithms you may have used. Starting with version 6.0 of
Connected Components Workbench – Developer Edition, you may password protect individual UDFBs and programs
so that the logic cannot be viewed without knowing the password.
126 of 128
24. Enter from one to eight alpha-numeric characters into the New Password field, then re-type it in the Confirm
Password field and click OK.
25. Notice that the Calc_Volume UDFB now has a padlock showing on its icon to indicate that it has been password
protected.
26. Save the project, Close the project then Open the project again. Double click on the Calc_Volume UDFB icon
and enter the Password you created above in order to display the program.
Note that although you need Developer Edition to add or remove password protection for programs and UDFBs, you
may still enter passwords using Standard Edition in order to access password-protected files.
Congratulations!! You have now completed the Basic PLC Programming with Micro800™ Controller Family lab!
127 of 128
128 of 128
Publication CE-DM263B-EN-P — January 2014 Copyright© 2014 Rockwell Automation, Inc. All rights reserved.