Showing posts with label CCW. Show all posts

Create a user-defined function block element and variables

0 comments
In this task you will create a user-defined function block and then add input and output variables.

1. In the Project Organizer, right-click User-Defined Function Blocks, select Add, and then select New LD: Ladder Diagram.


2. Rename the Ladder Diagram UDFB:

Right-click UntitledLD and select Rename.
Type TRAFFIC_CONTROLLER_FB, and press Enter.



3. Under TRAFFIC_CONTROLLER_FB, double-click Local Variables to display the Local Variables grid as a tab in the workspace. Note the tab name (TRAFFIC_CONTROLLER_FB-VAR), which is the user-defined function block name with -VAR added to the end.


4. Arrange how columns appear in the Local Variables grid (optional):

Right-click the header row and click Hide Column to remove a column from the display
Click Show Column and select a column name to add a column
Click and hold a column header and drag it to an alternate location to move a column;
Click Reset Settings to display all the columns in the default layout.


5. If necessary, arrange the columns so they appear as shown in the following example.


6. Enter four input variables to represent a car sensor in each of the four positions in the intersection (N, S, E, W) as shown in the following table:

Name
Data Type
Direction
N_CAR_SENSOR
BOOL
VarInput
S_CAR_SENSOR
BOOL
VarInput
E_CAR_SENSOR
BOOL
Var Input
W_CAR_SENSOR
BOOL
VarInput

7. Enter six output variables to represent red, yellow and green traffic lights in each of two directions (NS, EW) as shown in the following table:

Name
Data Type
Direction
NS_RED_LIGHTS
BOOL
VarOutput
NS_YELLOW_LIGHTS
BOOL
VarOutput
NS_GREEN_LIGHTS
BOOL
VarOutput
EW_ RED_LIGHTS
BOOL
VarOutput
EW_ YELLOW_LIGHTS
BOOL
VarOutput
EW_ GREEN_LIGHTS
BOOL
VarOutput

8. Verify your input and output variables are the same as those listed in the following the Local Variables grid example.



Read More »

Add a controller plug-in module

0 comments
Before you begin

If you have not already done so, create a new project that contains a Micro800 controller (2080-LC50-24QVB) and save the project (Traffic_Light).

What you will accomplish

In this task, you will add a plug-in module to the Traffic_Light project, which will provide a real-time clock for the project.

To add a controller plug-in module

1. View and modify the Controller properties:

From the Controller tree, click the plus (+) sign next to Controller to expand the selection.
Click General to view the Controller properties.
Type Traffic Light in Description.


2. From the Controller tab (Micro850), right-click the first slot (slot 1) of the controller, and then select a plug-in module (2080-MEMBAK-RTC).


3. Add a second plug-in module:

From the Controller tree, click the plus (+) sign next to Plug-In Modules to expand the selection.
Right-click the second slot and click a plug-in module (2080-IF4).


4. Note the controller now has two plug-in modules ((2080-MEMBAK-RTC and 2080-IF4).


5. Click the first slot of the controller to display the Plug-in module properties, and note the configuration options for the plug-in module (2080-MEMBAK-RTC).


6. Save your project.

Result

You added several plug-in modules to your controller in your Traffic_Light project. The following tasks remain:

Status
Step No.
Task
X
1
X
2

3
Create a User-Defined Function Block (UDFB)

4
Create a new ladder program

5
Establish communications to the Micro850 controller

6
Configure Password Protection for the controller

7
Download the project to the controller

8
Test the running program

Read More »

Create a new Connected Components Workbench project

0 comments
Before you begin

If you have not already done so, install Connected Components Workbench.

Tip: Set focus on a specific item within the application and press F1 to display context-sensitive help for the item.

Open Connected Components Workbench

1. On the Start menu, click Programs, Rockwell Automation, CCW, and then Connected Components Workbench.
2. Familiarize yourself with the main areas of Connected Components Workbench as shown in the following figure.


No.
Name
Description
1
Device Toolbox
Contains the Discover, Catalog and Toolbox tabs.
2
Discover
Displays all the devices that are connected to your computer and have been found by the software.
3
Catalog
Contains all the controllers and other devices for your project.
4
Catalog device folders
Each folder contains all available devices of that type.
5
Toolbox
Contains elements you can add to a LD, FBD and ST programs. The program category changes based on the program type you are currently working in.
6
Workspace
Use to view and configure devices, and build programs. Contents depend on the tab you select, which are added when you add devices and programs to your project.
7
Output
Shows the results of program builds, included success or failure status.
8
Project Organizer
Contains all the controllers, devices and program elements within your project.

3. Customize the layout of the Connected Components Workbench environment by clicking and dragging any window to an alternate location. You can also dock any window into another window that has tabs (optional).

Tip: To restore the layout to its default settings, click Reset Window Layout from the Window menu.

4. From the Device Toolbox, double-click the Micro800 controller (2080-LC50-24QVB) to add it to the Project Organizer.

Tip: You can also drag an item from the Device Toolbox to the Project Organizer.


5. Save the project:
  • On the File menu, click Save Project As.
  • In the Save Project As dialog box, type a project name (Traffic_Light).
  • Click OK.

6. From the Project Organizer, double-click the controller (2080-LC50-24QVB) to open a controller tab in the workspace.


Result
You created a new Connected Components Workbench project for the traffic light example, added a Mcicro850 controller to control operations, and named the project Traffic_Light. The following tasks remain:

Status
Step No.
Task
X
1

2
Add a controller plug-in module

3
Create a User-Defined Function Block (UDFB)

4
Create a new ladder program

5
Establish communications to the Micro850 controller

6
Configure Password Protection for the controller

7
Download the project to the controller

8
Test the running program

Read More »

Getting started with Connected Components Workbench™

0 comments
In this section, you will use Connected Components Workbench™ to perform the following tasks:

  • Create a Traffic Light project that includes a Micro850™ controller (2080-LC50-24QVB) and a 2080-MEMBAK-RTC plug-in module.
  • Configure a Micro850 controller program to run during peak hours and cycle traffic lights through green, yellow, and red in the North-South and East-West directions.
  • Configure the Micro850 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).
    The Micro850 controller program will use four inputs and six outputs - the inputs will be based on car sensors placed in each of the four directions at an intersection.
What you will learn

After working through the steps in the Getting started section, you will be familiar with the Connected Components Workbench environment and its features. You will also learn how to perform the following tasks:

Step No.
Task
1
2
3
Create a User-Defined Function Block (UDFB)
4
Create a new ladder program
5
Establish communications to the Micro850 controller
6
Configure Password Protection for the controller
7
Download the project to the controller
8
Test the running program

Hardware and software components

The following list summarizes the hardware and software components referenced in the Getting Started tasks.

  • Connected Components Workbench
  • RSLinx Classic, which installs automatically with Connected Components Workbench.
  • Micro850 controller (2080-LC16QWB)
  • 24-volt DC power supply (2080-PS120-240VAC or equivalent)
  • Plug-in module (2080-MEMBAK-RTC)


Read More »