Showing posts with label AB. 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 »

Create a User-Defined Function Block (UDFB)

0 comments
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>

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 »

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

0 comments
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".



Read More »

Program Ladder Diagram

0 comments
On a program ladder diagram are two basic types of instructions:

Input Instructions: An instruction that checks, compares, or examines specific conditions in your machine or process.

Output Instructions: An instruction that takes some action, such as turn on a device, turn off a device, copy data, or calculate a value.


Branch
A branch is two or more instructions in parallel.


There is no limit to the number of parallel branch levels that you can enter. This example shows a parallel branch with five levels. The main rung is the first branch level, followed by four additional branches.


You can nest branches to as many as 6 levels. This example shows a nested branch. The bottom output instruction is on a nested branch that is three levels deep.


Rung Condition
The controller evaluates ladder instructions based on the rung condition preceding the instruction (rung-condition-in).



Only input instructions affect the rung-condition-in of subsequent instructions on the rung.

If the rung-condition-in to an input instruction is true, the controller evaluates the instruction and sets the rung-condition-out to match the results of the evaluation.
  • If the instruction evaluates to true, the rung-condition-out is true.
  • If the instruction evaluates to false, the rung-condition-out is false.

An output instruction does not change the rung-condition-out.
  • If the rung-condition-in to an output instruction is true, the rung-condition-out is set to true.
  • If the rung-condition-in to an output instruction is false, the rung-condition-out is set to false.

Read More »

Programming Languages

0 comments
The ControlLogix controller supports these programming languages, both online and offline.

ControlLogix Controller Programming Languages

Language
Is best-used in programs with
Relay ladder
Continuous or parallel execution of multiple operations (not
sequenced)
Boolean or bit-based operations
Complex logical operations
Message and communication processing
Machine interlocking
Operations that service or maintenance personnel may have to interpret in order to troubleshoot the machine or process
Function block diagram
Continuous process and drive control
Loop control
Calculations in circuit flow
Sequential function chart (SFC)
High-level management of multiple operations
Repetitive sequence of operations
Batch process
Motion control using structured text
State machine operations
Structured text
Complex mathematical operations
Specialized array or table loop processing
ASCII string handling or protocol processing


File name: PLC-25_PL.pdf
File size: 379.36 KB

Read More »

Absolute Value (ABS)

0 comments
The ABS instruction takes the absolute value of the Source and places the result in the Destination.

Available Languages
-    Ladder Diagram

-    Function Block
-    Structured Text

dest := ABS(source);

Operands
-    Ladder Diagram
Operand
Type
Format
Description
Source*
SINT
INT
DINT
REAL
Immediate
tag
value from which to take the absolute value
Destination
SINT
INT
DINT
REAL
tag
tag to store the result
*Data Conversion: SINT and INT tags are sign-extended.
   
-    Function Block
Operand
Type
Format
Description
ABS tag
FBD_MATH_ADVANCED
structure
ABS structure

-    Structured Text
Use ABS as a function. This expression computes the absolute value of source and stores the result in dest.

dest := ABS(source);

FBD_MATH Structure
Input Parameter
Data Type
Description
EnableIn
BOOL
Enable input. If cleared, the instruction does not execute and outputs are not updated.
Default is set.
Source
REAL
Value of which to take the absolute value.
Valid = any float

Output Parameter
Data Type
Description
EnableOut
BOOL
Enable output.
Dest
REAL
Result of the math instruction. Arithmetic status flags are set for this output.

Example
Place the absolute value of value_1 into value_1_absolute. In this example, the absolute value of negative four is positive four.

-    Ladder Diagram
-    Function Block
-    Structured Text

value_1_absolute := ABS(value_1);

File name: PLC-24_IS_CMI-ABS.pdf
File size: 412.69 KB

Read More »

Negate (NEG)

0 comments
The NEG instruction changes the sign of the Source and places the result in the Destination.

Available Languages
-    Ladder Diagram
-    Function Block
-    Structured Text
This instruction is not available in structured text. *

* There is no equivalent structured text instruction. Use the operator in an expression.
Operands

Operands
-    Ladder Diagram
Operand
Type
Format
Description
Source
SINT
INT
DINT
REAL
Immediate
tag
value to negate
Destination
SINT
INT
DINT
REAL
tag
tag to store the result

-    Function Block
Operand
Type
Format
Description
NEG tag
FBD_MATH_ADVANCED
structure
NEG structure

-    Structured Text
Use the minus sign "-" as an operator in an expression. This expression changes the sign of source and stores the result in dest.

dest := -source;

FBD_MATH Structure
Input Parameter
Data Type
Description
EnableIn
BOOL
Enable input. If cleared, the instruction does not execute and outputs are not updated.
Default is set.
Source
REAL
Value to negate.
Valid = any float

Output Parameter
Data Type
Description
EnableOut
BOOL
Enable output.
Dest
REAL
Result of the math instruction. Arithmetic status flags are set for this output.

Example
Change the sign of value_1 and place the result in negate_result.

-    Ladder Diagram
-    Function Block
-    Structured Text
negate_result := -value_1;

File name: PLC-23_IS_CMI-NEG.pdf
File size: 408.47 KB

Read More »