gst_isa5

76
Rockwell Automation, Inc. 1 Getting Started with Connected Components WorkbenchIn this getting started module, you will use Connected Components Workbenchto create a Traffic Light project that includes a Micro830controller (2080-LC16QWB) and a 2080-MEMBAK-RTC plug-in module. In the Traffic Light project, using four inputs and six outputs, you will configure the Micro830 controller program to run during peak hours and cycle traffic lights through green, yellow, and red in the North-South and East-West directions. The inputs are based on car sensors placed in each of the four directions at an intersection. The traffic sequence begins when an automobile is waiting at a red light in either the North-South or East-West direction. Later, you will configure the Micro830 controller program to support off-peak hours (where the traffic lights will change to blink yellow in the North-South direction and blink red in the East-West direction). This Getting Started includes the following steps: Note: If you have any questions while working with the Connected Components Workbench, you can press F1 to display the online help. Step Task 1 Create a new Connected Components Workbench project 2 Add a controller plug-in module 3 Create a User-Defined Function Block (UDFB) 4 Create a new ladder program 5 Use Simulation mode to test the ladder program 6 Establish communications to the Micro830 controller 7 Download the project to the controller 8 Test the running program 9 Make runtime program changes 10 Connect to the existing controller

Transcript of gst_isa5

  • Getting Started with Connected Components WorkbenchIn this getting started module, you will use Connected Components Workbench to create aTraffic Light project that includes a Micro830 controller (2080-LC16QWB) and a2080-MEMBAK-RTC plug-in module. In the Traffic Light project, using four inputs and sixoutputs, you will configure the Micro830 controller program to run during peak hours andcycle traffic lights through green, yellow, and red in the North-South and East-West directions.The inputs are based on car sensors placed in each of the four directions at an intersection. Thetraffic sequence begins when an automobile is waiting at a red light in either the North-Southor East-West direction. Later, you will configure the Micro830 controller program to supportoff-peak hours (where the traffic lights will change to blink yellow in the North-South directionand blink red in the East-West direction).

    This Getting Started includes the following steps:

    Note: If you have any questions while working with the Connected Components Workbench,you can press F1 to display the online help.

    Step Task

    1 Create a new Connected Components Workbench project2 Add a controller plug-in module 3 Create a User-Defined Function Block (UDFB)4 Create a new ladder program5 Use Simulation mode to test the ladder program6 Establish communications to the Micro830 controller7 Download the project to the controller8 Test the running program9 Make runtime program changes10 Connect to the existing controllerRockwell Automation, Inc. 1

  • Hardware and Software Components:

    The following summarizes the hardware and software components used in this getting startedmodule:

    Connected Components Workbench v1.00

    Micro830 controller (2080-LC16QWB)

    24-volt DC power supply (2080-PS120-240VAC or equivalent)

    Plug-in module (2080-MEMBAK-RTC)

    RSLinx Classic version 2.57

    Standard (Type A to Type B) USB cable (3 meter maximum)2 Connected Components Workbench 1 - Getting Started with Con-

  • Create a new Connected Components Workbench project

    Prerequisites:

    To begin this step, Connected Components Workbench must be is installed on your computer.

    Introduction:

    In this step, you will do the following:

    Open Connected Components Workbench

    Create a new Connected Components Workbench project

    Add a Micro830 controller to the project

    Name the Connected Components Workbench project for the traffic exampleRockwell Automation, Inc. 3

  • Step:

    1. From the Start menu, click Programs, then Rockwell Automation, then CCW, and thenConnected Components Workbench.

    Connected Components Workbench is displayed in its default screen configuration,displaying the Project Organizer, Device Toolbox, and Properties windows.

    Note: You can customize the layout of the Connected Components Workbench environmentby clicking and dragging any window to an alternate location. You can also dock any windowinto another window that has tabs.4 Connected Components Workbench 1 - Getting Started with Con-

  • 2. In the Device Toolbox, double-click the 2080-LC30-16QWB (Micro830 controller).

    The selected Micro830 controller is displayed in the Project Organizer:

    3. In the Name field of the Project Organizer, rename the project by typing TrafficLight.Rockwell Automation, Inc. 5

  • Result:

    You have created a new Connected Components Workbench project for your traffic lightexample, added a 2080-LC30-16QWB Micro830 controller to control the traffic operations,and named the project Traffic Light.

    Step 1 of the Connected Components Workbench Getting Started is complete. The followingsteps remain:Status Step Task

    Completed 1 Create a new Connected Components Workbench project2 Add a controller plug-in module 3 Create a User-Defined Function Block (UDFB)4 Create a new ladder program5 Use Simulation mode to test the ladder program6 Establish communications to the Micro830 controller7 Download the project to the controller8 Test the running program9 Make runtime program changes10 Connect to the existing controller

  • Add a controller plug-in module

    Prerequisites:

    A Connected Components Workbench project named Traffic Light that contains a2080-LC30-16QWB Micro830 controller.

    Introduction:

    In this step, you will add a 2080-MEMBAK-RTC plug-in module to the Traffic Light project.

    Steps:

    1. In the Project Organizer, double-click the Micro830 controller. The following isdisplayed:Rockwell Automation, Inc. 7

  • 2. In the Controller Tree, right-click Plug-in Modules and select a2080-MEMBAK-RTC plug-in module.

    Note: You can also right-click an empty slot in the Controller Overview graphic, and thenselect a 2080-MEMBAK-RTC plug-in module.8 Connected Components Workbench 1 - Getting Started with Con-

  • Note: The 2080-MEMBAK-RTC plug-in module can only be added to the first slot (slot 1).

    When complete, the graphic in the Controller Overview pane changes to reflect the newlyadded 2080-MEMBAK-RTC plug-in module and the Controller Configuration Propertiespane displays the configuration options for the 2080-MEMBAK-RTC plug-in module.

    Result:

    You have added a 2080-MEMBAK-RTC plug-in module to the Traffic Light project.

    Step 2 of the Connected Components Workbench Getting Started is complete. The followingsteps remain:Status Step Task

    Completed 1 Create a new Connected Components Workbench projectCompleted 2 Add a controller plug-in module Rockwell Automation, Inc. 9

  • 3 Create a User-Defined Function Block (UDFB)4 Create a new ladder program5 Use Simulation mode to test the ladder program6 Establish communications to the Micro830 controller7 Download the project to the controller8 Test the running program9 Make runtime program changes10 Connect to the existing controller

    Status Step Task10 Connected Components Workbench 1 - Getting Started with Con-

  • Create a User-Defined Function Block (UDFB)

    Prerequisites:

    A Connected Components Workbench project named Traffic Light that contains a2080-LC30-16QWB Micro830 controller and a 2080-MEMBAK-RTC plug-in module.

    Introduction:

    In this step, you will do the following:

    Create a user-defined function block

    Add a ladder diagram

    Add input and output variables

    Populate the ladder diagram

    Build and save the Traffic Light project

    Steps:

    1. In the Project Organizer, select Function Blocks, then Add, and then New LD :Ladder Diagram.

    By default, the ladder diagram is named Untitled LD.Rockwell Automation, Inc. 11

  • 2. Right-click UntitledLD, and select Rename.

    3. Name the ladder diagram TRAFFIC_CONTROLLER_FB, and then press Enter.

    4. Under TRAFFIC_CONTROLLER_FB, double-click Local Variables.

    The Variable Editor is displayed.12 Connected Components Workbench 1 - Getting Started with Con-

  • 5. In the Variable Editor, enter four Boolean inputs (for a car sensor in each of the fourpositions in the intersection) and six Boolean outputs (for red, yellow and green lights ineach of the two directions). When complete, the Variable Editor is displayed as follows:

    Note: To add columns in the Variable Editor, right-click the header row, select Show Column,and then select the column name. To move columns, click and hold a column header, and thendrag it to an alternate location.

    Note: Inputs must have a Direction of VarInput and outputs must have a Direction ofVarOutput.Rockwell Automation, Inc. 13

  • 6. In the Project Organizer, double-click TRAFFIC_CONTROLLER_FB to beginediting the ladder logic program.

    The Ladder Editor is displayed with an empty first rung: 14 Connected Components Workbench 1 - Getting Started with Con-

  • 7. For this example, the first rung must work as follows:

    If the North/South red lights and East/West green lights are on, and a car trips either theNorth Sensor or the South Sensor for at least five seconds, then change the East/WestLights from green to yellow.

    To begin the creation of your ladder program, click Toolbox, and then click the plus sign(+) in front of Ladder to list the available ladder elements.Rockwell Automation, Inc. 15

  • 8. To implement the first part of our example, you must create two direct contacts in series(since the logic is North/South red lights and East/West green lights). To create the firstdirect contact, click and drag a Direct Contact element from the Toolbox to the first rungand release.

    When you release the mouse, the Variable Selector is displayed.16 Connected Components Workbench 1 - Getting Started with Con-

  • 9. In the Variable Selector, select the NS_RED_LIGHTS variable and click OK.

    10. Repeat steps 8 and 9 to add a second direct contact and assign theEW_GREEN_LIGHTS variable to this contact.

    At this point, your first rung is displayed as follows:Rockwell Automation, Inc. 17

  • 11. To implement the second part of our example, you must create two direct contacts inparallel (since there is either an North Car Sensor or a South Car Sensor).

    From the Toolbox, click and drag a Branch to the end of the first rung and release.

    12. From the Toolbox, click and drag a Direct Contact element to the upper branch andrelease. To this contact, assign the N_CAR_SENSOR variable.

    13. From the Toolbox, click and drag a Direct Contact element to the lower branch andrelease. To this contact, assign the S_CAR_SENSOR variable.

    At this point, your first rung is displayed as follows:

    14. Next, you must enter a five second time delay. From the Toolbox, click and drag a Blockelement to the right of the existing branch and release.

    The Instruction Block Selector is displayed. 18 Connected Components Workbench 1 - Getting Started with Con-

  • Note: From the Category column, you can select Time to display all of the time-basedinstruction blocks.

    15. From the Name column, click TON for the On-delay timing instruction block and thenclick OK.

    Note: You can press F1 to display the context-sensitive online help that describes theinstruction block inputs and outputs.

    16. Click the top of the input block, type the programmed/preset time of T#5s (for a timeformat of 5 seconds), and then press Enter.

    Now your first rung is displayed as follows:Rockwell Automation, Inc. 19

  • 17. To implement the final part of our example, you must create two coils in parallel (sinceyou need to turn off the East/West green lights and turn on the East/West yellow lights).

    From the Toolbox, click and drag a Branch element to the end of the rung and release.

    18. From the Toolbox, click and drag a Reset Coil element to the upper branch and release.Assign the EW_GREEN_LIGHTS variable to this coil (to turn off the East/West greenlights).

    19. From the Toolbox, click and drag a Set Coil element to the lower branch and release.Assign the EW_YELLOW_LIGHTS variable to this coil (to turn on the East/Westyellow lights).

    Now your completed rung is displayed as follows:

    20. Document the rung by double-clicking in the green block above the rung and entering thefollowing rung comment:

    If the North/South red lights and East/West green lights are on anda car trips either the North sensor or the South sensor for atleast five seconds, then change the East/West lights from green toyellow.20 Connected Components Workbench 1 - Getting Started with Con-

  • 21. For our example, the second rung must work as follows:

    If the East/West yellow lights are on for at least two seconds, then change the East/WestLights from yellow to red and the North/South Lights from red to green.

    Use steps 11 through 20 to enter the second rung so that it displays as follows:

    22. The third and fourth rungs of our example have the same form as the first two rungs, soyou can cut and paste the existing rungs, and then edit the variable assignments for eachelement.

    Select the rungs 1 and 2 by clicking the dark blue region to the left of rung 1, then holdthe Shift key down and click the dark blue region to the left of rung 2. Right-click andselect Copy.

    23. Click rung 1, then right-click and select Paste.

    The two copied rungs are pasted before the existing two rungs. Rockwell Automation, Inc. 21

  • 24. Double-click the TON instruction block in rung 3. Within the Instruction BlockSelector, change the Instance from TON_1 to TON_3, and then click OK.

    25. Repeat step 24, but change the Instance of the TON instruction block in rung 4 fromTON_2 to TON_4.

    26. In rungs 3 and 4, change each EW variable to NS and each NS variable to EW, and thenenter respective rung comments. The new rungs should be displayed as follows:22 Connected Components Workbench 1 - Getting Started with Con-

  • 27. To finish our example, you must add one more rung to handle initial conditions. Whenthe program is first downloaded to the controller and run, none of the lights are initiallyturned on. This last rung will check for this condition (all lights off) and turn on theNorth/South red lights and the East/West green lights.

    From the Toolbox, click and drag a Rung element to the white space below rung 4 andrelease.

    28. From the Toolbox, click and drag six Reverse Contacts onto the new rung and assignone LIGHTS variable (see step 5) to each contact. When complete, the rung shoulddisplay as follows:Rockwell Automation, Inc. 23

  • 29. From the Toolbox, add two Set Coils in parallel to turn on the NS_RED_LIGHTS andthe EW_GREEN_LIGHTS variables. Additionally, complete rung 5 by documenting itsoperation in a rung comment. When complete, the rung should display as follows:

    When complete, the entire program displays as follows:

    30. From the Build menu, select Build Project.

    The Build operation is verified in the Output window.24 Connected Components Workbench 1 - Getting Started with Con-

  • 31. From the File menu, select Save to save your project.

    Your project is saved to the following location:C:\Documents and Settings\\My Documents\CCW\Traffic Light\TrafficLight.ccwsln

    Result:

    You have developed a user-defined function block using ladder programming and addedvariables for the inputs and outputs to control the lights in both North-South and East-Westdirections. Additionally, you have saved your project.

    Step 3 of the Connected Components Workbench Getting Started is complete. The followingsteps remain:Status Step Task

    Completed 1 Create a new Connected Components Workbench projectCompleted 2 Add a controller plug-in module Completed 3 Create a User-Defined Function Block (UDFB)

    4 Create a new ladder program5 Use Simulation mode to test the ladder program6 Establish communications to the Micro830 controller7 Download the project to the controller8 Test the running program9 Make runtime program changes10 Connect to the existing controllerRockwell Automation, Inc. 25

  • Create a new ladder program

    Prerequisites:

    A Traffic Light project that includes a user-defined function block namedTRAFFIC_CONTROLLER_FB.

    Introduction:

    In this step, you will do the following:

    Create a ladder program

    Populate the ladder program with the user defined function block created in the previousstep

    Assign input and output variables

    Build and save project

    Steps:

    1. In the Project Organizer, right-click Programs, select Add, and then select New LD :Ladder Diagram.

    By default, the ladder diagram is named Untitled LD.26 Connected Components Workbench 1 - Getting Started with Con-

  • 2. Right-click UntitledLD and select Rename.

    3. Type Traffic_Light_Control and press Enter.

    4. In the Project Organizer, double-click Traffic_Light_Control to start editing theladder program.Rockwell Automation, Inc. 27

  • 5. From the Toolbox tab, click the plus sign (+) in front of Ladder to list the availableladder elements.28 Connected Components Workbench 1 - Getting Started with Con-

  • 6. From the Toolbox, click and drag a Block element onto the first rung.

    When you release the mouse, the Instruction Block Selector is displayed:Rockwell Automation, Inc. 29

  • 7. In the Name column, type tr. Only instruction blocks starting with tr are listed. ClickTRAFFIC_CONTROLLER_FB and view all of the Parameters associated with thisuser-defined function block.30 Connected Components Workbench 1 - Getting Started with Con-

  • 8. Select TRAFFIC_CONTROLLER_FB in the list and click OK. The Traffic Controlleruser-defined function block is displayed on rung 1:Rockwell Automation, Inc. 31

  • Note: Instruction blocks display inputs on the left side of the block and outputs on the rightside of the block. In order to see the full names and data types of the variables that areassociated with these inputs and outputs, hover your cursor over the instruction block and atooltip is displayed:

    The first function block input that connects directly to the ladder rung is the functionblock enable (EN) bit. The remaining four function block inputs are real world inputsthat indicate whether a car is waiting at a red light in any of the four possible directions North, South, East and West. These inputs get mapped to four Boolean input variablesthat are local to the function block: N_CAR_SENSOR, S_CAR_SENSOR,E_CAR_SENSOR and W_CAR_SENSOR. You must assign four Micro830 controllerinputs to these function block inputs.32 Connected Components Workbench 1 - Getting Started with Con-

  • 9. Click the top of the input variable block that connects to N_CAR_SENSOR; a dropdownmenu of all the existing variable names that can be assigned to N_CAR_SENSOR aredisplayed. Scroll down and select _IO_Embedded_Digital_Input_0, and then pressEnter.

    Note: To see the entire _IO_Embedded_Digital_Input_0 name, hover your cursor over thefunction block and a tooltip is displayed: Rockwell Automation, Inc. 33

  • Note: An alternate method is to assign shorter Alias names to these variables. Double-clickthe first input block and the Variable Selector is displayed. In the Alias column, type in Aliasnames for the six outputs (DO0-DO5) and the first six inputs (DI0-DI5).34 Connected Components Workbench 1 - Getting Started with Con-

  • 10. Assign the remaining three input variable blocks as follows:

    When complete, the instruction block is displayed as follows:

    Boolean input variables Variable nameS_CAR_SENSOR _IO_Embedded_Digital_Input_1E_CAR_SENSOR _IO_Embedded_Digital_Input_3W_CAR_SENSOR _IO_Embedded_Digital_Input_4Rockwell Automation, Inc. 35

  • 11. The first function block output that connects directly to the ladder rung is the functionblock output enabled (ENO) bit it reflects the status of the input enable (EN) bit. Theremaining six function block outputs are real world outputs that connect to the red,yellow and green traffic signal lights for each direction. Assign the first six Micro830digital outputs as follows:

    When complete, the instruction block is displayed as follows:

    Boolean output variables Variable nameNS_RED_LIGHTS _IO_Embedded_Digital_Output_0NS_YELLOW_LIGHTS _IO_Embedded_Digital_Output_1NS_GREEN_LIGHTS _IO_Embedded_Digital_Output_2EW_ RED_LIGHTS _IO_Embedded_Digital_Output_3EW_ YELLOW_LIGHTS _IO_Embedded_Digital_Output_4EW_ GREEN_LIGHTS _IO_Embedded_Digital_Output_536 Connected Components Workbench 1 - Getting Started with Con-

  • 12. Double-click on the green block just above the rung and type the following rungcomment:This rung assigns the Micro830 I/O to the TRAFFIC_CONTROLLERfunction block.

    13. From the Build menu, select Build Project.

    The Build operation is verified in the Output window.

    14. From the File menu, select Save to save your project.

    Result:

    You have developed a new ladder program named Traffic_Light_Control using theuser-defined function block created in the previous step of the Getting Started. At this point,the ladder program can now control when the North-South traffic light is red or the North -South sensor is tripped. When that occurs, the traffic light in the East - West direction changesto yellow after five seconds, and then to red in two more seconds.

    Step 4 of the Connected Components Workbench Getting Started is complete. The followingsteps remain:Status Step Task

    Completed 1 Create a new Connected Components Workbench projectCompleted 2 Add a controller plug-in module Completed 3 Create a User-Defined Function Block (UDFB)Completed 4 Create a new ladder program

    5 Use Simulation mode to test the ladder programRockwell Automation, Inc. 37

  • 6 Establish communications to the Micro830 controller7 Download the project to the controller8 Test the running program9 Make runtime program changes10 Connect to the existing controller

    Status Step Task38 Connected Components Workbench 1 - Getting Started with Con-

  • Use Simulation mode to test the ladder program

    Prerequisites:

    A Connected Components Workbench project named Traffic Light that contains a user-definedfunction block named TRAFFIC_CONTROLLER_FB (including defined variables) and aladder program named Traffic_Light_Control that uses it.

    Introduction:

    In this step, you will debug the Traffic_Light_Control program using Simulation mode. Thebenefit of using Simulation mode is that can test the Traffic_Light_Control program without aMicro830 controller. This can save you alot of time because you can test your program at anytime during the development phase.

    Steps:

    1. In the Project Organizer, double-click the Traffic_Light_Control program.

    The following is displayed:Rockwell Automation, Inc. 39

  • 2. From the Connected Components Workbench toolbar, select Simulation.

    3. From the Project Organizer, right-click the Micro830 controller and select Build.

    4. From the File menu, select Save to save your project.

    5. From the Debug menu, click Start Debugging.

    You will notice four task bar entries, including one for the I/O Panel Simulation Tool.You will use the I/O Panel Simulation Tool to simulate the change of state of any variablein the program.40 Connected Components Workbench 1 - Getting Started with Con-

  • 6. From the task bar, click I/O Panel Simulation Tool.

    The I/O Panel Simulation Tool is displayed. On the left, you will see entries for each ofyour digital and analog I/O variables. For this example, double-click 1:digitIn_Base todisplay the digital inputs.

    7. Change the state of digital input 0 to TRUE. To change from FALSE to TRUE,double-click on the cell to the right of (000)%Embedded.Digital.Input.0.Rockwell Automation, Inc. 41

  • 8. Monitor the values of digital outputs 2 and 3. A few seconds after changing the state ofdigital input 0, digital outputs 2 and 3 will go to TRUE in the ladder program.

    9. From the Debug menu, select Stop Debugging. This will stop Simulation mode and youcan make modifications to your program again.

    10. From the Connected Components Workbench toolbar, select Online.42 Connected Components Workbench 1 - Getting Started with Con-

  • Result:

    You have tested the Traffic_Light_Control ladder program that you created in the previous stepand verified proper operation of the program in Simulation mode.

    Step 5 of the Connected Components Workbench Getting Started is complete. The followingsteps remain:Status Step Task

    Completed 1 Create a new Connected Components Workbench projectCompleted 2 Add a controller plug-in module Completed 3 Create a User-Defined Function Block (UDFB)Completed 4 Create a new ladder programCompleted 5 Use Simulation mode to test the ladder program

    6 Establish communications to the Micro830 controller7 Download the project to the controller8 Test the running program9 Make runtime program changes10 Connect to the existing controllerRockwell Automation, Inc. 43

  • Establish communications to the Micro830 controller

    Prerequisites:

    A Connected Components Workbench project named Traffic Light that contains a user-definedfunction block named TRAFFIC_CONTROLLER_FB (including defined variables) and aladder program named Traffic_Light_Control that uses it. Additionally, theTraffic_Light_Control ladder program has been verified in Simulation mode.

    Introduction:

    In this step, you will do the following to get RSLinx Classic communicating with yourMicro830 controller using USB:

    Connect the USB cable from the Micro830 controller to your computer

    Add a USB driver in RSLinx Classic

    Verify communications between the Micro830 controller and your computer usingRSWho

    Note: These steps assume that you have installed RSLinx Classic v2.57 or later on yourcomputer.

    Steps:

    1. Power-up the Micro830 controller.

    2. Plug the USB cable directly between your computer and the Micro830 controller.44 Connected Components Workbench 1 - Getting Started with Con-

  • 3. Microsoft Windows discovers the Micro830 controller automatically and the Found NewHardware Wizard is displayed.

    Select No, not this time, and then click Next. Rockwell Automation, Inc. 45

  • 4. On the next screen of the Found New Hardware Wizard, select Install the softwareautomatically (Recommended) and click Next.

    The Found New Hardware Wizard searches for the Rockwell Automation USB CIPdriver.46 Connected Components Workbench 1 - Getting Started with Con-

  • 5. Once the Rockwell Automation USB CIP driver has been found, the appropriate driversoftware is automatically installed to your computer. Click Finish.

    6. Launch RSLinx Classic and click the icon to launch RSWho.

    The Micro830 controller is automatically displayed under the USB driver.

    Result:The Rockwell USB CIP communication driver is installed to your computer and RSLinx Classic is properly configured to communicate with your Micro830 controller through a USB cable.Rockwell Automation, Inc. 47

  • Step 6 of the Connected Components Workbench Getting Started is complete. The followingsteps remain:Status Step Task

    Completed 1 Create a new Connected Components Workbench projectCompleted 2 Add a controller plug-in module Completed 3 Create a User-Defined Function Block (UDFB)Completed 4 Create a new ladder programCompleted 5 Use Simulation mode to test the ladder programCompleted 6 Establish communications to the Micro830 controller

    7 Download the project to the controller8 Test the running program9 Make runtime program changes10 Connect to the existing controller48 Connected Components Workbench 1 - Getting Started with Con-

  • Download the project to the controller

    Prerequisites:

    You have successfully connected to, and communicated with, the Micro830 controller usingRSLinx Classic.

    Introduction:

    In this step, you will do the following:

    Connect to the Micro830 controller

    Download the Traffic Light project to the Micro830 controller

    Change the controller to Remote Run mode

    Steps:

    1. In Controller Details, click Connect.

    2. In the Project Organizer, right-click the Micro830 controller and then select Build.Rockwell Automation, Inc. 49

  • 3. In the Output window, verify that the build has completed successfully.

    Note: If you have errors, you must return to your ladder program and fix the errors before youcan complete the download.

    4. From the File menu, select Save to save your project.

    5. In the Project Organizer, right-click the Micro830 controller and select Download.

    6. If your controller is in Remote Run mode, the following message is displayed:

    Click Yes to continue.50 Connected Components Workbench 1 - Getting Started with Con-

  • 7. After the download is complete, the following message is displayed asking if you want tochange the Micro800 controller to Run mode:

    Click Yes to begin running your program.

    Note: If you want to make further modifications to your ladder program, click No.

    Result:

    The Traffic Light project is running in the Micro830 controller.

    Step 7 of the Connected Components Workbench Getting Started is complete. The followingsteps remain:Status Step Task

    Completed 1 Create a new Connected Components Workbench projectCompleted 2 Add a controller plug-in module Completed 3 Create a User-Defined Function Block (UDFB)Completed 4 Create a new ladder programCompleted 5 Use Simulation mode to test the ladder programCompleted 6 Establish communications to the Micro830 controllerCompleted 7 Download the project to the controller

    8 Test the running program9 Make runtime program changes10 Connect to the existing controllerRockwell Automation, Inc. 51

  • Test the running program

    Prerequisites:

    The Traffic Light project has been successfully downloaded to, and is running on, theMicro830 controller.

    Introduction:

    In this step, you will do the following in the running Traffic_Light_Control program:

    Debug and monitor the program in the Micro830 controller

    Force inputs

    Monitor outputs

    Note: In an earlier step, you monitored inputs and outputs in Simulation mode. In this step, youwill monitor inputs and outputs on the actual controller.

    Steps:

    1. Confirm that you are in Run mode. In the Remote Run field of the Controller DetailsHeader, verify that Run is selected.

    2. From the Debug menu, select Start Debugging.52 Connected Components Workbench 1 - Getting Started with Con-

  • In the ladder editor, the running Traffic_Light_Control program is displayed:

    3. In the Project Organizer, double-click Global Variables.

    The Variable Selector is displayed:Rockwell Automation, Inc. 53

  • 4. Left-click the variable you want to force (for example, _IO_Embedded_Digital_Input_0).Then, in the Lock column, select the checkbox to lock _IO_Embedded_Digital_Input_0.54 Connected Components Workbench 1 - Getting Started with Con-

  • 5. In the Logical Value column, select the checkbox.

    On your Micro830 controller, the output LEDs change state. In the ladder editor, theoutputs change state in the Logical Value and Physical Value columns.

    6. To stop forcing the variable, clear the checkbox in the Logical Value column.

    Note: To allow the program or external sources to change the value, you must clear thecheckbox in the Lock column.Rockwell Automation, Inc. 55

  • 7. From the Debug menu, click Stop Debugging.

    Result:

    The Traffic_Light_Control ladder program has been tested and is working correctly.

    Step 8 of the Connected Components Workbench Getting Started is complete. The followingsteps remain:Status Step Task

    Completed 1 Create a new Connected Components Workbench projectCompleted 2 Add a controller plug-in module Completed 3 Create a User-Defined Function Block (UDFB)Completed 4 Create a new ladder programCompleted 5 Use Simulation mode to test the ladder programCompleted 6 Establish communications to the Micro830 controllerCompleted 7 Download the project to the controllerCompleted 8 Test the running program

    9 Make runtime program changes10 Connect to the existing controller56 Connected Components Workbench 1 - Getting Started with Con-

  • Make runtime program changes

    Prerequisites:

    The current single rung Traffic_Light_Control program is loaded and running in the Micro830controller. Additionally, the Traffic_Light_Control program has been tested and is workingcorrectly.

    Introduction:

    In this step, you will do the following:

    Make program modifications that will flash the traffic lights between 11PM and 5AMevery day (for example, the North/South lights will flash red and the East/West lights willflash yellow)

    Download these modifications as Run-time Downloads (meaning the controller remainsin Run mode throughout the process)

    Verify that the Traffic_Light_Control project is working as expectedRockwell Automation, Inc. 57

  • Steps:

    1. From the Project Organizer, select the Traffic_Light_Control program.

    The following is displayed:58 Connected Components Workbench 1 - Getting Started with Con-

  • 2. From the Toolbox, click and drag a Block onto the rung between the left-hand rail andthe TRAFFIC_CONTROLLER_FB instruction block, and release.

    The Instruction Block Selector appears.Rockwell Automation, Inc. 59

  • 3. From the Instruction Block Selector, select the Time of Week (TOW) instruction blockand then click OK.

    4. Create a local variable for TimeA, a local variable that will disable TimeB, TimeC andTimeD, and a TOW is enabled local variable. In the Project Organizer, underTraffic_Light_Control, click Local Variables.

    The Variable Editor appears.

    5. In the Variable Editor, create a new variable named Off_Peak_Hours of the typeTOWDATA.60 Connected Components Workbench 1 - Getting Started with Con-

  • 6. Expand the Off_Peak_Hours variable and enter in the Initial Values shown to start peakhours at 11PM and end off-peak hours at 5AM every day.

    7. In the Variable Editor, create another new variable named Disabled of the typeTOWDATA, expand it, and select FALSE for the Disabled.Enable parameter.

    8. In the Variable Editor, create a new variable named Off_Peak_Enabled of the typeBOOL.Rockwell Automation, Inc. 61

  • 9. In the Project Organizer, go to the Traffic_Light_Control ladder program and assignthe following:

    When complete, the Traffic_Light_Control ladder program is displayed as follows:

    10. From the Toolbox, drag a Reverse Contact onto the rung following the TOW instructionand assign local variable Off_Peak_Enabled to it.

    Parameter Variable nameTimeA Off_Peak_HoursTimeB DisabledTimeC DisabledTimeD DisabledTOW Off_Peak_Enabled62 Connected Components Workbench 1 - Getting Started with Con-

  • Note: This will prevent the rest of this rung from executing whenever Off_Peak_Enabled isTRUE (which is between the hours of 11PM and 5AM).

    11. From the Toolbox, drag a Return to the end of the rung so that whenever theTRAFFIC_CONTROLLER_FB function block is enabled, no other rungs in thisprogram get executed. When complete, your first rung is displayed as follows:Rockwell Automation, Inc. 63

  • 12. Add a rung that will flash the traffic lights during off peak hours (whenOff_Peak_Enabled is TRUE). From the Toolbox, click and drag a Rung beneath rung 1,and then release..

    13. Add a one-second on/one-second off timer to control the flashing of the red lights in theNorth/South direction and the yellow lights in the East/West direction. From theToolbox, click and drag a Block to the new rung, and then release.

    The Instruction Block Selector is displayed.

    14. From the Instruction Block Selector, select a TONOFF instruction block, and thenclick OK.

    The second rung is displayed as follows:

    As long as the Input (IN) to the TONOFF instruction block is true, then the Elapsed Time(ET) begins timing until the Elapsed Time equals the Preset Time (PT) and the Output(Q) becomes true. When the IN goes false, the ET resets and begins timing until the ETequals the Preset Time Off (PTOF), at which time Q becomes false.64 Connected Components Workbench 1 - Getting Started with Con-

  • Note: The caution triangles icon next to PT and PTOF indicate that either a variable nameor a constant value must be entered into these input blocks.

    Note: You can press F1 to display the context-sensitive online help that describes theinstruction block inputs and outputs.

    15. Since you want this timer to be a one-second on/one-second off timer, click the top of thePT input block and type T#1s (where T# means this is a Time constant and 1s indicatesone second).

    16. Repeat step 15 for the PTOF input block.

    17. When the on-timer has timed out and the output Q becomes true, you want theNS_RED_LIGHTS (DO0) and EW_YELLOW_LIGHTS (DO4) outputs to turn on. Sinceboth outputs will be controlled by output Q, you must add a parallel branch on the rung.To add a parallel branch, from the Toolbox, drag a Branch onto the rung (just right of theTONOFF instruction block).Rockwell Automation, Inc. 65

  • 18. From the Toolbox, drag a Direct Coil to the upper branch and assign variable_IO_Embedded_Digital_Output_0 to it. Then, drag a second Direct Coil to the lowerbranch and assign variable _IO_Embedded_Digital_Output_4 to it. When complete, therung should be displayed as follows:

    19. In order to trigger the off timer, the IN bit needs to turn off when the Q bit turns on. Fromthe Toolbox, drag a Reverse Contact to the left of the TONOFF block.

    The Variable Selector appears.

    20. In the Variable Selector, click the Local Variables Traffic_Light_Control tab. Thefollowing is displayed:66 Connected Components Workbench 1 - Getting Started with Con-

  • 21. Click the plus (+) sign to the left of TONOFF_1 instruction block to expand its variables.Select TONOFF_1.Q and click OK.

    22. To document the rung, double-click in the green block above the rung and type thefollowing rung comment: When the TRAFFIC_CONTROLLER function block is disabled, this rungflashes the North/South red lights and the East/West yellow lights 1 second on and 1 second off.

    When complete, rung 2 should be displayed as follows:Rockwell Automation, Inc. 67

  • 23. To make sure the other four lights (controlled by DO1, DO2, DO3 and DO5) are turnedoff, repeat steps 12 through 22 to add a third rung. When complete, rung 3 should bedisplayed as follows:

    24. In the Project Organizer, right-click the Micro830 controller and then click Build.

    25. From the File menu, select Save to save your project.

    26. In the Project Organizer, right-click the Micro830 controller again and then clickRun-time Download.

    27. In the Output window, verify that the Run-time Download completed successfully.68 Connected Components Workbench 1 - Getting Started with Con-

  • Note: You can test the program by changing the time of the 2080-MEMBAK-RTC plug-inmodule to10:59PM and verifying that embedded outputs 0 and 4 flash on and off starting oneminute later.

    Note: When testing is complete, synchronize the 2080-MEMBAK-RTC plug-in module withthe clock on the computer.

    28. From the File menu, click Exit to close Connected Components Workbench.

    Result:Without placing the Micro830 controller in Program mode, you confirm that the traffic lights change as expected to support non-peak hours in the example.

    Step 9 of the Connected Components Workbench Getting Started is complete. The followingstep remains:Status Step Task

    Completed 1 Create a new Connected Components Workbench projectCompleted 2 Add a controller plug-in module Completed 3 Create a User-Defined Function Block (UDFB)Completed 4 Create a new ladder programCompleted 5 Use Simulation mode to test the ladder programCompleted 6 Establish communications to the Micro830 controllerCompleted 7 Download the project to the controllerCompleted 8 Test the running programCompleted 9 Make runtime program changes

    10 Connect to the existing controllerRockwell Automation, Inc. 69

  • Connect to the existing controller

    Prerequisites:

    The saved Traffic Light project from the previous step that has been downloaded to theMicro830 controller.

    Introduction:

    In this step, you will verify that the Traffic_Light_Control program running on the Mico830controller is the program that you created in this Getting Started.

    Steps:

    1. Open Connected Components Workbench.

    2. From the Device Toolbox, click the plus sign (+) next to Discover.70 Connected Components Workbench 1 - Getting Started with Con-

  • 3. Click Browse Connections.

    The Connection Browser is displayed with the 2080-LC30-16QWB selected:Rockwell Automation, Inc. 71

  • 4. In the Connection Browser, click OK. The Project Organizer is updated to reflect theTraffic Control project.

    5. In the Project Organizer, right-click the Micro830 controller and select Upload. 72 Connected Components Workbench 1 - Getting Started with Con-

  • Note: If the following popup appears, click Yes.

    6. In the Output window, verify that the upload operation completed without any errors.

    7. In the Controller Details Header, verify that you are connected to the2080-LC30-16QWB controller.

    8. In the Project Organizer, double-click the Traffic Control program. The program codematches the work that you downloaded to the Micro830 controller in the previous step ofthe Getting Started.

    Result:The Traffic Light project in the online Micro830 controller matches the offline Traffic Light project that you created earlier.

    You have completed the Connected Components Workbench Getting Started!Status Step Task

    Completed 1 Create a new Connected Components Workbench projectCompleted 2 Add a controller plug-in module Completed 3 Create a User-Defined Function Block (UDFB)Completed 4 Create a new ladder programCompleted 5 Use Simulation mode to test the ladder programCompleted 6 Establish communications to the Micro830 controllerRockwell Automation, Inc. 73

  • Completed 7 Download the project to the controllerCompleted 8 Test the running programCompleted 9 Make runtime program changesCompleted 10 Connect to the existing controller

    Status Step Task74 Connected Components Workbench 1 - Getting Started with Con-

  • Rockwell Automation, Inc. 75

  • 76 Connected Components Workbench 1 - Getting Started with Con-

    Getting Started with Connected Components WorkbenchCreate a new Connected Components Workbench projectAdd a controller plug-in moduleCreate a User-Defined Function Block (UDFB)Create a new ladder programUse Simulation mode to test the ladder programEstablish communications to the Micro830 controllerDownload the project to the controllerTest the running programMake runtime program changesConnect to the existing controller