Programming Manual Logix5000 Controllers Function Block Diagram Catalog Numbers 1756 ControlLogix, 1769 CompactLogix, 1789 SoftLogix, PowerFlex 700S with DriveLogix
Important user information Read this document and the documents listed in the additional resources section about installation, configuration, and operation of this equipment before you install, configure, operate, or maintain this product. Users are required to familiarize themselves with installation and wiring instructions in addition to requirements of all applicable codes, laws, and standards.
Summary of changes This manual contains new and updated information. This table contains the changes made to this revision. Change Topic Updated the PIDE graphic to include the AutotuneTag parameter. Define program/operator control on page 17 Updated the instructions on how to create a text box instructions. Create a text box on page 21 Updated the steps and and graphic to match changes in software version 24. Create and assign a new tag on page 25 Added Tag Browser graphic to the instructions.
Table of contents Preface Studio 5000 environment ..................................................................................... 7 Additional resources............................................................................................... 7 Chapter 1 Program a Function Block Diagram Introduction ....................................................................................................... 9 Choose the function block elements ........................................................
Preface This manual shows how to program Logix5000 controllers with the function block diagram (FBD) programming language. This manual is one of a set of related manuals that show common procedures for programming and operating Logix5000 controllers. For a complete list of common procedures manuals, refer to the Logix5000 Controllers Common Procedures Programming Manual, publication 1756-PM001. The term Logix5000 controller refers to any controller that is based on the Logix5000 operating system.
Preface Resource Description Product Certifications webpage, available at http://ab.rockwellautomation.com Provides declarations of conformity, certificates, and other certification details. You can view or download publications at http://www.rockwellautomation.com/literature. To order paper copies of technical documentation, contact your local Rockwell Automation distributor or sales representative.
Chapter 1 Program a Function Block Diagram To make it easier to navigate through a function block routine, divide the routine into a series of sheets. Introduction Example: • Sheets help you organize and find your function blocks. They do not affect the order in which the function blocks execute. • When the routine executes, all the sheets execute.
Chapter 1 Program a Function Block Diagram To control a device, use these elements. Choose the function block elements To choose the function block elements, use these guidelines.
Program a Function Block Diagram For a: Specify: Element of a two dimension array tag_name[x,y] Element of a three dimension array tag_name[x,y,z] Element of an array within a structure tag_name.member_name[x] Member of an element of an array tag_name[x,y,z].member_name Chapter 1 where: x is the location of the element in the first dimension. y is the location of the element in the second dimension. z is the location of the element in the third dimension.
Chapter 1 Program a Function Block Diagram In this example, the value of tagA is stored at the beginning of the execution of the routine. The stored value is used when Block_01 executes. The same stored value is also used when Block_02 executes. If the value of tagA changes during execution of the routine, the stored value of tagA in the IREF does not change until the next execution of the routine. This example is the same as the previous example.
Program a Function Block Diagram Chapter 1 The new tagA value of 50.9 is not used by any IREFs in this routine until the start of the next scan. Order of execution The Logix Designer application automatically determines the order of execution for the function blocks in a routine. • When you verify a function block routine. • When you verify a project that contains a function block routine. • When you download a project that contains a function block routine.
Chapter 1 Program a Function Block Diagram The order of execution is only relative to the blocks that are wired together. The two groups of blocks in this example are not wired together. The blocks within a specific group execute in the appropriate order in relation to the blocks in that group. Resolve a loop To create a feedback loop around a block, wire an output pin of the block to an input pin of the same block.
Program a Function Block Diagram Chapter 1 To identify which block to execute first, mark the input wire that creates the loop (the feedback wire) with the Assume Data Available indicator. In this example, block 1 uses the output from block 3 that was produced in the previous execution of the routine. The Assume Data Available indicator defines the data flow within the loop. The arrow indicates that the data serves as input to the first block in the loop.
Chapter 1 Program a Function Block Diagram This is OK This is NOT OK In this example, neither wire uses the Assume Data Available indicator. In this example, only one wire uses the Assume Data Available indicator. In this example, both wires use the Assume Data Available indicator. Create a one scan delay Use the Assume Data Available indicator to produce a one scan delay between blocks. In this example, block 1 executes first.
Program a Function Block Diagram Identify any connectors Chapter 1 Like wires, connectors transfer data from output pins to input pins. Use connectors when: • The elements that you want to connect are on different sheets within the same routine. • A wire is difficult to route around other wires or elements. • You want to disperse data to several points in the routine. To use connectors, use these rules. Define program/operator control • Each OCON requires a unique name.
Chapter 1 Program a Function Block Diagram Program or Operator control is determined by using these inputs: Input Description .ProgProgReq A program request to go to Program control. .ProgOperReq A program request to go to Operator control. .OperProgReq An operator request to go to Program control. .OperOperReq An operator request to go to Operator control. To determine whether an instruction is in Program or Operator control, examine the ProgOper output.
Program a Function Block Diagram Chapter 1 example, the operator sets the OperOperReq input from a faceplate to take control of that instruction. This example shows how to lock an instruction into Program control. Operator request inputs to an instruction are always cleared by the instruction when it executes. This lets operator interface work with these instructions by setting the desired mode request bit. You do not have to program the operator interface to reset the request bits.
Chapter 1 Program a Function Block Diagram Example: Add a sheet When the TIC101AutoReq button is pressed, one-shot latch ProgAutoReq for the PIDE instruction TIC101. TIC101 is configured with the ProgValueReset input set, so when the PIDE instruction executes, it automatically clears ProgAutoReq. To add a sheet to a function block routine: 1. On the Sheet toolbar, click Add Sheet . 2. In the Description box, type a description of the sheet. Follow the IEC-1131 naming standard.
Program a Function Block Diagram Chapter 1 2. Drag the element to the desired location. Tip: You can also drag the button for the element directly to the desired location. Important: Create a text box Use caution when copying and pasting components between different versions of the Logix Designer application. The application only supports pasting to the same version or newer version. Pasting to a prior version of the application is not supported.
Chapter 1 Program a Function Block Diagram 5. To attach the text box to a specific element, click the pin symbol in the text box and click the corresponding element. A green dot shows a valid connection point. Language switching With version 17 and later of the application, you have the option to display project documentation, such as tag descriptions and rung comments for any supported localized language.
Program a Function Block Diagram Chapter 1 For more information on enabling a project to support multiple translations of project documentation, see the online help. Connect elements Show or hide a pin When you add a Function Block instruction, the block appears with a set of pins for the default parameters. The rest of the pins are hidden. You can show or hide a pin on the Parameters tab in the Properties dialog box. 1. In the block, click Properties . 2.
Chapter 1 Program a Function Block Diagram Wire elements together Wire (connect) two elements together by clicking the output pin of the first element and clicking the input pin of the other element. A green dot shows a valid connection point. Item Description Output pin of the first element Input pin of the second element Mark a wire with the Assume Data Available indicator When there are a group of blocks in a loop, identify which block executes first.
Program a Function Block Diagram Assign a tag Chapter 1 Create and assign a new tag to the connector or assign an existing tag to the connectors. Create and assign a new tag 1. Double-click the operand area to enter a name. 2. In the box, type a name for the tag and press Enter. 3. Right-click the tag name, and click New . 4. On the New Parameter or Tag dialog box, in the Usage list, click a usage value for the tag. The default is a local tag. 5. In the Type list, click the tag type.
Chapter 1 Program a Function Block Diagram 6. In the Data Type box, click . 7. On the Select Data Type dialog box, click the data type for the tag. 8. If the tag is an array, in the Dim 0 box, type or select the number of elements in each dimension. 9. Click OK. 10. On the New Parameter or Tag dialog box, in the Scope list, click the scope for the tag. 11. Click Create. Assign an existing tag 1. Double-click the operand area. 2. In the box, click the down arrow 26 to select the tag.
Program a Function Block Diagram Chapter 1 3. On the Tag Browser, click the tag, or select the bit by clicking the down arrow to the right of the tag and clicking the bit. 4. Press Enter or click a different spot on the diagram. Assign an immediate value (constant) You can assign a constant value instead of a tag value to an input parameter.
Chapter 1 Program a Function Block Diagram Enter a value in the tag of a block Complete these steps to assign a value to a parameter when on wire connects to its pin. 1. In the block, click Properties . 2. On the Parameters tab, in the Value box of the desired parameter, type the value. 3. Click OK. Connect blocks with an OCON and ICON Use an output wire connector (OCON) or input wire connector (ICON) to transfer data between sheets or in complex wiring situations. Add an OCON 1.
Program a Function Block Diagram Chapter 1 2. Wire the ICON to the input pin. 3. Double-click the operand area of the ICON. 4. In the box, click the down arrow and click the name of the OCON that supplies the value to this connector. 5. Click Enter or click a blank spot on the diagram. Rename a wire connector Edit the name of an input wire connector or an output wire connector in a routine. 1. Right-click the operand area of the desired ICON or OCON, and click Rename Element. 2.
Chapter 1 Program a Function Block Diagram Verify the routine As you program your routine, periodically verify your work. 1. On the Standard toolbar, click . If there are errors, they are listed in the Output window on the Errors tab at the bottom of the Logix Designer application. 2. Press F4 to go to the first error or warning. 3. Correct the error according to the description in the Errors tab. 4. Repeat steps 1...3 until all of the errors are corrected. 5. To close the Output window, press Alt + 1.
Index A assume data available 14, 15, 16, 24 C create tag function block diagram 25 E enter ICON 28 OCON 28 execution order function block diagram 11 F feedback loop function block diagram 14 function block diagram connect elements 24 create a scan delay 16 hide a pin 23 latching data 11 order of execution 11 rename a connector group 29 rename a wire connector 29 resolve a loop 14 resolve data flow between blocks 15 resolve loop 24 show a pin 23 I L latching data function block diagram 11 O OCON add 2
Index routine 30 W wire function block diagram 11, 14 32 Rockwell Automation Publication 1756-PM009E-EN-P - October 2014
Rockwell Automation support Rockwell Automation provides technical information on the web to assist you in using its products. At http://www.rockwellautomation.com/support you can find technical and application notes, sample code, and links to software service packs. You can also visit our Support Center at https://rockwellautomation.custhelp.com for software updates, support chats and forums, technical information, FAQs, and to sign up for product notification updates.