CCW Basics and The Micro 830
CCW Basics and The Micro 830
2011 6.2
CCW Basics and the Micro830
Hands-On Labs
LAB 6: HELP!______________________________________________________________41
Page 5 of 55
Document Conventions
Throughout this workbook, we have used the following conventions to help guide you through the
lab materials.
This style or symbol: Indicates:
Words shown in bold italics Any item or button that you must click on, or a menu name
(e.g., RSLogix 5000 or OK) from which you must choose an option or command. This will
be an actual name of an item that you see on your screen or
in an example.
Words shown in bold italics, An item that you must type in the specified field. This is
enclosed in single quotes information that you must supply based on your application
(e.g., 'Controller1') (e.g., a variable).
Note: When you type the text in the field, remember that you
do not need to type the quotes; simply type the words that
are contained within them (e.g., Controller1).
The text that appears inside of this gray box is supplemental
information regarding the lab materials, but not information
that is required reading in order for you to complete the lab
exercises. The text that follows this symbol may provide you
with helpful hints that can make it easier for you to use this
product. Most often, authors use this “Tip Text” style for
important information they want their students to see.
Note: If the mouse button is not specified in the text, you should click on the left mouse button...
Page 7 of 55
Connected Component Workbench
and the Micro800
This lab contains material about a new series of Programmable Controllers (Micro 800) and the
software used to program it. (Connected Components Workbench known as CCW). The lab will
give you objectives, such as to enter a rung of logic, followed by detailed instructions.
CCW is the programming environment for the Micro 800 Series of programmable controllers, PF4
drives, and the Panel View Component operator interface.
In this classroom we are running VMWare images. When using images like this we need to
make sure that all Serial, USB, and Ethernet devices that might be needed are connected to
the “image” and not to the “host” computer.
1. Verify that the Micro830 is connected via USB cable to the PC.
2. Click on VM (found in the center and top of the screen), select Removable Devices and verify
that 2080-LC30 is checked:
Page 8 of 55
4. Once the Micro830 is “connected”, you should get the following screen. Select No, not this
time and click Next:
Page 9 of 55
7. You are now ready to start the Connected Components Workbench software.
You will see the following window briefly while the software opens showing that CCW
is built on Microsoft Visual Studio.
Page 10 of 55
9. Begin a new project by clicking on Catalog and expanding the Controllers folder in the Device
Toolbox, which is located on the right-hand side of the Workbench screen.
11. A new Micro830 project based on this controller has now been created. The Micro830 should
show up in the Project Organizer on the left-hand side of the Workbench screen
Page 11 of 55
12.
The first part of this section will explain how to enter a basic motor start/stop rung as shown below.
Detailed instructions follow on how to enter this rung.
Page 12 of 55
Programming in Ladder Diagram
13. Select Programs in the Project Organizer
Page 13 of 55
15. Double click on your new program, and a blank ladder, with one rung will open in the main
workspace window.
16. Look at the lower right Toolbox window and you should see it is now populated with familiar
ladder elements.
Page 14 of 55
17. Drag a Direct Contact (N.O) from the Toolbox to the new rung, and drop it on the empty rung.
18. When the Variable Selector opens, click on the I/O –Micro830 tab
20. Now drop a Direct Coil to represent the motor starter coil on the rung to the right of the contact.
21. When the Variable Selector opens, click on the I/O Micro 830 tab, and assign it the variable
name of _IO_EM_DO_00.
Page 15 of 55
22. Follow the same procedure again for the start button in this circuit. Assign it the variable name
of _IO_EM_DI_01.
23. To create the “seal in contact” of the motor starter, start by dragging over a branch and
dropping it around the start button you just created.
Page 16 of 55
25. Assign the variable _IO_EM_DO_00, to the new contact, which is the address of the coil.
Alias names
It will probably be helpful to be able to use real world names to aid the programming and
troubleshooting process. We can fill in the Alias values for all of the I/O in this table.
When assigning I/O references to contacts and coils, the variable name
(_IO_EM_DI_00) must be used. The alias is actually a symbol, or label used as
an aid in programming and troubleshooting.
26. Double click on Global Variables in the Project organizer tree to see the variable table.
27. Fill in the Alias names as shown below in the Variable table
Page 17 of 55
Changing properties of the ladder elements
Look at the above ladder. It looks like we may have a small mistake that needs to be corrected. On
the demo case, the red push button DI0 is wired to the input of the Micro 830 using its “normally
open” contacts. In order for this simple program to work, we will need to change the Direct Contact
to a Reverse Contact. (normally open to normally closed)
28. To make this change right click on the _IO_EM_DI_00 contact and select properties.
29. Then using the drop down at the end of the Modifier line in the Properties window change to
ClosedContact.
Page 18 of 55
Build, Save, Download, and Debug functions
You must perform a “Build” operation before you can download to the controller.
30. To initiate a “Build” operation to verify, and compile the program, click on the Build icon in the
toolbar. You will find “Build” in other menu locations, but the toolbar icon is conveniently
located.
31. After the Build is complete, with no errors shown in the Output pane, the Download button will
be available. Save, then Download your new program by clicking on the Download button.
If your controller is in “Remote” then the controller must be stopped to download…. You know what
to do.
32. Next click on the Debug (play) icon, next to the Build icon, to view your program in a “monitor
mode” environment.
Notice that the program shows individual contact status and power flow. The reverse contact of DI0
is closed so its status and the possible paths to the right are highlighted.
33. If you push DI0 and DI1, opening DI0 and closing DI1 you will see just the closed contact status
without powerflow.
Page 19 of 55
34. Push the “start” button and you should see the following
The output is on, and DI1 has been closed, and opened.
Page 20 of 55
Lab 3 Tips, tools and views in CCW
You have already seen how the Toolbox displays ladder tools when you are programming in ladder.
Latter in the lab this toolbox will display Function Block, or Structured Text elements when we
programming in those languages.
CCW has more ways that can be used to modify the layout of the screen, or change how data is
entered.
Faster editing
As you have seen, each time you drop a contact or other element on the ladder, you are prompted
to select its address, as shown below.
You might be able to work faster if you don’t have to stop…just keep drawing the ladder, and add
the addresses latter. There is a quick edit mode that will allow you to do that.
Variable Selector Manual Mode
36. Turn on Manual Variable Selector Mode by holding down the Control key while you push R.
(Control R)
37. Add some more contacts to the right of the start button as shown below. Notice that you are not
stopped each time and prompted to enter the variable name. You may have to scroll left and
right to see them all.
Page 21 of 55
Linking program elements to variable names in Manual Variable Selector Mode
38. Use your mouse to hover over the contact until a blue box appears.
Page 22 of 55
39. Now select any previously configured address from the drop down list and apply it to your
contact. The Manual / Auto status should be displayed in the lower left of your screen.
Scrolling left and right or up and down across a ladder can be annoying. But
all of the windows are really valuable. There are several ways to modify your
view, and reduce the amount scrolling.
Docking
One way to customize the view is by docking the windows in different locations. Let’s try one to see
if its helpful in this situation.
40. Click and hold, on the title bar of the Toolbox window. Drag it to the left, and notice that the
docking arrows appear. Re-dock the Toolbox on the bottom left, below the Project Organizer so
that your screen looks like this:
This might be helpful but the Device Toolbox is still taking up the right side of the screen, and its not
really needed at this time, while editing ladder. You only need it when adding hardware to the
project.
Page 23 of 55
Tabbed Document view
Sometimes its helpful to put some windows away that are not constantly in use while
programming. You can easily put them “behind” your ladder diagram by using the tabbed
document view.
41. Right click on the title bar of the Device Toolbox to display some other choices.
Now the Device Toolbox has been moved to a tab in the main window, allowing you to easily switch
between tabs.
Page 24 of 55
43. Select the ladder tab, and you will see that the editing space is now much larger. The seldom
used Device Toolbox is easily accessible the next time we need to add a controller, drive, or
operator interface to the project.
Auto Hide
44. Move your mouse cursor towards the Toolbox in the lower left window, and hover over the push
pin icon. You will see the tool tip for Auto Hide.
45. Click the push pin to select Auto hide for the Device Toolbox.
Page 25 of 55
46. To open the Toolbox, hover over the Toolbox icon on the left side.
Page 26 of 55
There is one more option that may be useful. You decide how you want your screen to look.
Floating toolbars
Windows can be set to float, making them always available yet able to be moved out of the way so
they don’t hide important information.
48. Right click in the Toolbox title bar and select the Floating option this time.
Page 27 of 55
Changing your view summary
All of the windows have the option to be:
Floating
Docked
Page 28 of 55
49. Re-dock the Toolbox, so it is easy to use, while learning this new software!
50. Resize the Toolbox after it is docked so that you can see Pointer at the top of the list, and Block
at the bottom, without scrolling.
Now that the view is better, lets do some more programming. Those extra contacts we put in
need to be deleted.
51. Left click to select the contact which will display a green box.
52. Then right click and select “Delete” from the menu.
54. Delete the other contacts as well so that your program looks like this:
Page 29 of 55
End of Lab 3: Tips, tools and views in CCW
Page 30 of 55
Lab 4 : Programming Instruction Blocks
In this section you will add a counter to the logic, that will count up each time the DO0
output energizes.
You will be adding the following rung to your program:
Creating variables to be used to hold the preset value, and counter (accumulated) value.
55. Double click on Local Variables for your ladder to open the variable editor
In the name field enter StartCountPV as the name of the new variable. This will be used for the
preset of the counter.
56. Change the Data Type to DINT for StartCountPV
57. Set the Initial Value of the StartCountPV to 5. The counter will have a preset value of 5 in this
lab.
58. Next add StartCountCV for the counter variable on accumulator of the counter.
Page 31 of 55
5
60. Drag a new Rung from the Toolbox to the ladder editing window.
61. Drag a “Block” instruction from the Toolbox to the new rung
Blocks?
All special functions, like timers, counters, math and comparisons are known as
“Instruction Blocks”. First the block must be dropped on the ladder, then the specific
type of block will be assigned.
62. Double click on the block to open the Instruction Block Selector window
Page 32 of 55
63. Program blocks are accessed from this selector. Scroll up and down the list to view the rich
instruction set in this “simple”, Micro 830.
64. Type “ct” as shown in the name field as shown below and the available counters will be filtered
and displayed.
65. Double click on CTU to add the up counter to the rung as shown.
Page 33 of 55
The block has several variables associated with it. Note the yellow triangles indicating a portion
of the program that must be completed.
66. The counter needs to count each time the DO0 energizes. Add a contact of DO0,
(_IO_EM_DO_00) to the CU “count up” line as shown.
67. Micro 800s use a reset input to reset the counter to zero. In this lab you will use DI 2, the green
button, to reset the counter. Click on the top of the RESET box to link _IO_EM_DI_02 to
RESET.
68. Click on the top of the PV input block to open the Variable Selector. If you had not already
created this variable, you would have had to do it now.
Page 34 of 55
69. Click OK
70. Double click on the CV output block, and select the variable StartCountCV and the counter
value will be held in this variable. (Again, you created this variable at the top of this section)
Q?
71. Add a coil to turn on the D I2 (_IO_EM_DO_01) light as shown. The completed rung should
look like this.
73. Go to Debug to monitor your program using the “play” button on the menu above.
75. Each time DO0 transitions from Off to On, the counter will count up by 1. Verify this by checking
the CountStartsCV value.
When the CV is equal to or greater than the PV, the output of the counter block will turn on.
Page 35 of 55
77. Take CCW out of debug by pushing the square “stop” icon located next to the debug icon in
the CCW toolbar.
Experimented with rearranging the view by docking, floating, hiding, or adding tabs
Page 36 of 55
Lab 5: Plug-In Modules
Plug-Ins are a new type of hardware for the Micro 800 family. These modules can customize the
personality of the Micro, by adding I/O or communication options without changing the footprint of
the unit, like traditional expansion I/O would.
The Micro 830 in the demo box is equipped with a serial communications plug-in on the left, and an
analog input plug-in on the right. Both must be configured in CCW before use.
RIUP
Warning
Page 37 of 55
Hardware configuration
78. Right click on the Micro 830 in the Project Organizer and select Open from the dropdown
The following screen will be displayed showing a graphic view of the hardware configuration for this
project.
From this view the controller can be changed from Run to Program, and you can go offline or
online, and make changes to the hardware configuration.
Adding the 2080-SERIAL-ISOL plug-in module
Page 38 of 55
79. Right click on the left plug-in, as shown above, and select the communications
2080-SERIALISOL plug-in module from the drop down. This will be used for Modbus RTU
communications to the drive latter on.
80. Now add the 2080-IF4 analog input in the right slot as shown. It needs to be configured as
“Voltage” because it is wired to the ANALOG INPUT pot on the demo, which provides a 0-
10VDC input.
81. Open the Global Variables list from the Project Organizer and you will see that the I/O for the
analog plug-in has been added to the bottom of the list.
Page 39 of 55
82. Note that the main window now has a tab for Global Variables
Page 40 of 55
Lab 6: Help!
The previous sections on Plug-In modules and program blocks may leave you wanting more information. Fortunately the
interactive Help, installed with CCW provides answers to many of your questions. Make sure you take some time at the
end of this section to more fully explore the Help options.
84. In the Look for: line enter “cat”. You will see catalog numbers filter to the top of the list
85. Click on “understanding” and you can read “About device catalog numbers”
Page 41 of 55
87. Select “configuring” from the list
Page 42 of 55
88. Click on the 2080 IF4 plug-in module from the displayed list to get detailed information on the
configuration parameters of the IF4 plug-in.
Instruction Blocks
Page 43 of 55
Lab 7: Programming using Function Block Diagrams
Eventhough the Micro 830 is a small, inexpensive controller, it has some big system features, such
as Function Block programming.
Creating a new Function Block Diagram
You are going to create a simple FBD program that compares the value of the Analog Input pot to a
preset value. When the value of the pot is greater than or equal to the preset value the red light
DO3 will flash.
90. In the Project Organizer, right click on Programs, click Add, and select New FBD
Page 44 of 55
Thinking ahead – adding the variables needed for this program
The comparator and the timer required to blink the light both need variables. These variables could
be added latter, but doing them now will make the programming a little easier.
91. Double click on the FBD Local Variables and add the variables shown below. HiValue will be
used as the output of the comparator, and BlinkerET will be used for the accumulated time of a
timer.
94. Double click on the block and select the Greater Than or Equal To comparator from the list
95. Drop two Variables on the screen and connect them to input 1 and 2 of the >= block as shown
Page 45 of 55
Assigning the input blocks to the Plug-In I/O and constant values
96. Left click in the top of the top variable, connected to “i1”, and select the _IO_P2_AI_00 analog
input. (Plug in 2, Analog Input, circuit 00)
98. Add another variable for the output, just as you did for the inputs. Click in the top of the symbol,
and link it to the variable HiValue that you created earlier.
The output HiValue will become true when _IO_P2_AI_00 is greater than or equal to the preset of 30000.
The range of this analog is input is 0-65535, with 0 = 0 volts, and 65535 = 10 volts.
So the smallest resolution of voltage is 1/65535 X 10V or about .00015 volts/ “count”
Page 46 of 55
Adding the flasher
The TONOFF instruction block is an on delay/ off delay timer that is perfect for the flashing light in
this example.
99. Add another Block to your program space to the right of the comparator and define it as a
TONOFF.
100. Set both presets, PT (on delay) and PTOF (off delay) to 1 second using the value of “T#1s”
as shown.
101. Assign the variable you created called BlinkerET to the elapsed time (ET) output.
This language actually supports a mix of Ladder and Function Block. The Q output is connected to
DO3, which is the red light in the bottom row on your demo.
102. To make DO 3 blink, drop a reverse contact from DO3, just like you would do in a ladder
diagram, and use it to connect the Q output of the >= function, and the Input of the TONOFF.
When DO3 is NOT on and the contact is closed, the timer will start its on delay cycle. When the
contact opens by DO3 energizing, the timer will start its off delay cycle. As long is HiValue is high,
or on, or a “one”, the DO3 light will blink.
104. Switch to Debug and watch it run while turning the Analog Input pot, up and down.
Page 47 of 55
Lab 8: Structured Text Programming
Our customers may have a need, or simply prefer to work in one or more languages. Structured
Text is easily programmed in CCW. Here is a simple example that turns lights on or off lights
based, once again, on the Analog Input pot.
Here’s the code that will be entered so you see where we are headed. Detailed instructions follow.
If the value of the pot is less than 2000 DO5 will light. If its between 2000 and 4000, then DO4 will
light.
105. Right click on Programs in the Project Organizer, then Add, a new Structured Text program.
106. Double click in the new ST program in the list and a ST work space will open, and this time
the Toolbox will show ST tools.
107. Enter IF on Line 1, and you should see a pop as follows with reserved words.
Page 48 of 55
108. Finish selecting or typing IF
109. When you enter the starting underscore of the variable name, you will get the familiar drop
down with the variable names.
Notice how the keywords and values are show in different colors
Page 49 of 55
113. Enter the code for next section that turns DO4 on as shown below.
Page 50 of 55
Lab 9: User Defined Function Blocks
User Define Function Blocks or UDFB allow a customer to create a library of custom routines that
can be used to simplify the programming process.
116. Because there are a limited amount of field devices on the Micro 830 demo, start by
deleting all of the POU (Program Organizational Units) that you have created so far. Then we
can easily reference the same I/O with out worry of a conflict.
117. When you have deleted the old programs from your project you will need to create two new
Programs as shown below.
The program block will work much as the ladder did that was developed earlier. It will count each
time the motor starter starts.
Local Variables will be used in the ladder rather than I/O addresses.
118. Double click on the Local Variables under A_Start_Count and enter the following. Pay
attention to Data Type, Direction, and the Initial Value columns.
Page 51 of 55
119. From the Control-R mode, create the following ladder. (In Control-R, you will not have to
create the variable names until you are complete)
120. Apply the variable names as shown above to the ladder as you did earlier.
The User Defined Function Block is complete. Next you will use it in a program, and relate I/O
references and other variables to the variables inside the block.
123. Drag a Rung, and a Block to the workspace from the Toolbox as shown below
Page 52 of 55
124. Double click on the block you just created
125. Scroll down to the Name of the UDFB just created, A_Start_Count.
126. Double click on it and this UDFB will now be treated like any other Program Block, such as a
math function or timer.
127. Now the new UDFB has been placed on the ladder diagram. Variable names need to be
linked to the variables that are used inside the block.
Page 53 of 55
128. Add the contacts and coils that are tied to real world I/O first. Use the addresses as shown
below.
DI 1 is the Start PB
DI 0 is the Stop PB
DI 2 is the Reset PB
Adding the other variables for PV, CV, and the Counter Done.
129. Double click in the PV input box to open the Variable Selector.
130. Enter both the PV, and CV variable names as shown. (If you decide to add another block
latter , you can call them: B_PV, and B_CV.
131. Now add the Variables for the grey colored boxes. Hover over the UDFB, and you will see
that the top one needs linked to the CV, and the bottom will be the “done” bit.
Page 54 of 55
132. Build and Download your program.
133. Test your program. The yellow button in the top row should turn on DO 0, turn it off with the
red button.
The yellow light should come on after five “starts” reset it with the green button, DI 2.
134. Try to use your UDFB in the a new Function Block Diagram program
Page 55 of 55