Page 99

Petruzella_ProgrammableLogicControllers__5e

Block 1 ... Block 2 ... Block 3 ... Feedback loop Assume Data Available indicator FBD Programming Figure 15-105 illustrates the setup procedure for FBD programming. The steps to be followed can be summarized as follows: • Right click on the MainProgram file and select New Routine from the pop-up menu. • Select the Function Block diagram entry from the Type window. • Enter a name for the Routine (e.g., FDB_Sample). • You will now see the new program (FDB_Sample) listed under MainProgram. • Left clicking the FBD_Sample twice opens the graphic development window. • FBD instructions selected from the Language Element toolbar are used in the development of the program. • Extra sheets can be added when the current sheet is full by clicking the add sheet icon. Movement between sheets is provided by left and right arrows. The MainRoutine is always a ladder logic program in RSLogix 5000 software, and all other routines are called from the MainRoutine. Therefore, the MainRoutine will have one unconditional rung with a jump to subroutine (JSR) calling FBD_Sample. The FBD program will IREF OREF ICON MainProgram 388 Part 6  Function Block Programming execute from the JSR instruction. No subroutine or return subroutine instruction in the FBD is necessary. Function block programs are similar to ladder logic programs, except that the process is visualized in the form of function blocks instead of ladder rungs. Figure 15-106 shows a comparison between ladder logic and the FBD equivalent for a three-input AND ladder logic rung. The operation of the FBD can be summarized as follows: • When the inputs represented by Sensor_1, Sensor_ 2, and Sensor_3 are true (value 1) the BAND (Boolean AND) function block will be true. • The BAND block executes to set output Caution_PL true and switch the pilot light on. • The 0 to the right of the input reference and out pin indicates its logic state. A 0 indicates the state of the tag is false, while a 1 signifies it is true. • The same field input sensors and output pilot light devices and tags can be used with either program. • The XIC and OTE contact and coil instructions have been replaced by the BAND function block. Figure 15-107 shows a comparison between ladder logic and the FBD equivalent for a two-input OR ladder logic rung. As with ladder OR logic, if any of the two inputs is true the BOR function block will be true. In this example, with the BOR function block true, the output reference tag SOL_1 will be true, energizing the solenoid. Figure 15-108 shows a comparison between ladder logic and the FBD equivalent for a combination of multiple inputs. The operation of the FBD can be summarized as follows: • The alarm will be energized if either input In1 or In2 to the BOR block is true. Figure 15-104  Assume Data Available indicator marker. OCON Function blocks Add sheet Move Sheet Figure 15-105  Setup procedure for FDB programming. Source: Image Courtesy of Rockwell Automation, Inc. Other function blocks Program Tags MainRoutine FBD_Sample


Petruzella_ProgrammableLogicControllers__5e
To see the actual publication please follow the link above