Create a user-defined function block element and variables

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.



0 comments :

Create a User-Defined Function Block (UDFB)

Before you begin

If you have not already done so, create a new project (Traffic_Light) that contains a Micro850 controller (2080-LC50-24QVB) and a plug-in memory module (2080-MEMBAK-RTC).

What you will accomplish

In this step, you will perform the following tasks.
  • Create a user-defined function block element and variables <View>
  • Add contacts to the first ladder rung <View>
  • Add an instruction block and time delay to the first ladder rung <View>
  • Add a second rung <View>
  • Add additional rungs and edit variable assignments <View>

0 comments :

Add a controller plug-in module

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

0 comments :

Create a new Connected Components Workbench project

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

0 comments :

Getting started with Connected Components Workbench™

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)


0 comments :

Setting up communication between AB & Siemens (Part. 3)

Configuring the MVI56-PDPS Module

Set Up the Project

To begin, start ProSoft Configuration Builder. If you have used other Windows configuration tools before, you will find the screen layout familiar. ProSoft Configuration Builder's window consists of a tree view on the left, an information pane and a configuration pane on the right side of the window. When you first start ProSoft Configuration Builder, the tree view consists of folders for Default Project and Default Location, with a Default Module in the Default Location folder. The following illustration shows the ProSoft Configuration Builder window with a new project.


Your first task is to add the MVI56-PDPS module to the project.

1. Use the mouse to select "Default Module" in the tree view, and then click the right mouse button to open a shortcut menu.

2. On the shortcut menu, choose "Choose Module Type". This action opens the Choose Module Type dialog box.


3. In the Product Line Filter area of the dialog box, select MVI56. In the Select Module Type dropdown list, select MVI56-PDPS, and then click OK to save your settings and return to the ProSoft Configuration Builder window.


Adding a Project

To add a project to an existing project file:

1. Select the Default Project icon.
2. Choose Project from the Project menu, then choose Add Project. A new project folder appears.

Adding a Module

To add a module to your project:

1. Double-click the Default Module icon to open the Choose Module Type dialog box.
2. On the Choose Module Type dialog box, select the module type.

Or

1. Open the Project menu and choose Location.
2. On the Location menu, choose Add Module.

[MODULE]

The module section contains the data that applies to the whole module and includes the backplane data transfer parameters.

[Module]
Module Name : MVI69-PDPS Communication Module DEFAULT


[BACKPLANE]
The backplane section contains the data that applies to the backplane data transfer parameters.

[Backplane]
Read Register Count : 122
#Number of words to move from MVI to
#Processor (PROFIBUS Output)

Write Register Count : 122
#Number of words to move from Processor to
#MVI (PROFIBUS Input)

Block Transfer Size : 60
#Number of data words for I/O transfer
#(60, 120 or 240)


[PROFIBUS SLAVE]
The PROFIBUS Slave section contains the data that applies to the PROFIBUS Slave parameters.

Slave Address
0 to 125
The parameter specifies the node address on the PROFIBUS network for the slave emulated in the module. Each node on the network must have a unique address.

Swap Input Bytes
Yes or No
This parameter specifies if the data in the input data area of the module is to be byte swapped. If the order of the bytes in the words stored in the database is not correct, use this option. A value of Yes causes the module's program to swap the bytes in each word. A value of No indicates no byte swapping will occur.

Swap Output Bytes
Yes or No
This parameter specifies if the data in the output data area of the module is to be byte swapped. If the order of the bytes in the words stored in the database is not correct, use this option. A value of Yes causes the module's program to swap the bytes in each word. A value of No indicates no byte swapping will occur.

Comm Failure Mode
No xfer on fail
xfer on comm fail
This parameter sets the data transfer mode of the module's PROFIBUS output image to the internal database when a communication failure on the PROFIBUS interface is detected. If the parameter is set to "No xfer on fail", the output image will continue to be transferred. If the parameter is set to "xfer on comm fail", the output image will not be transferred and the last values will be retained.

Comm Timeout Multiplier
1 to 10
This parameter sets the communication timeout value for the module. The value entered is multiplied by 125 milliseconds to determine the actual timeout value. For example, a value of 1 specifies a communication timeout of 125 milliseconds.

Download the Project to the Module

In order for the module to use the settings you configured, you must download (copy) the updated Project file from your PC to the module.

To Download the Project File

1. In the tree view in ProSoft Configuration Builder, click once to select the MVI69-PDPS module.
2. Open the Project menu, and then choose Module / Download. The program will scan your PC for a valid com port (this may take a few seconds). When PCB has found a valid com port, the following dialog box will open.


3. Choose the com port to use from the dropdown list, and then click the Download button.

The module will perform a platform check to read and load its new settings. When the platform check is complete, the status bar in ProSoft Configuration Builder will be updated with the message "Module Running".



0 comments :