You are on page 1of 6

System 800xA Training

Exercise 10.1 - 1
Exercise 10.1 Creating Logic in Function Block Diagram
10.1.1 Description
Create a new program, become familiar with the Function Block Diagram (FBD)
editor and write simple logic in FBD.
Connect variables to I/O channels and test programming logic online and in Test
mode. Connections will be made to the switches and lamps on the operator panel.

10.1.2 Legend
> Indicates when you go from one menu to a sub-menu
Italic Indicates object and file names
Indicates dialog box buttons, tabs, menus etc.
Bold Indicates important topics
Indicates start/explanation of student activity

T314-10 Exercise 10.1 - RevE

Exercise 10.1 - 2
10.1.3 Exercise Steps
This exercise will require Sxx_PrgProject to be open in the Control Builder.

10.1.3.1 Create Simple Logic
Lamp9 will light if switch7 is true and switch8 is false
OR
Lamp9 will light if switch9 is true.
F Verify that Control Builder is in the offline mode.
F At the SxxPrg_Reactor application, declare the following six global variables:

F Create a new program, name it Sxx_Additions, within the SxxPrg_Reactor application.
F Open the editor for Sxx_Additions and change the name of the code block from Code
to FBD_Ex10_1

F Change the language of FBD_Ex10_1 from ST to FBD.

F Select the Insert Function / Function Block button from the toolbar to insert an
AND and an OR gate into the code pane.

System 800xA Training

Exercise 10.1 - 3
F Connect the blocks and parameters as indicated below.

F Save and close the program. Resolve any errors, if necessary.


10.1.3.2 Use the Test Mode
F Select Test Mode from the Control Builder toolbar.
F Open the online editor for Sxx_Additions then test the logic by using the context menu
for the switch input variables to set and reset their values.

F Return to Offline mode.


10.1.3.3 Insert Standard Function Blocks
Lamp10 will stay lit for 8 seconds when Switch10 goes from false to true. Switch10
being reset should not affect the 8 second timer. An edge detector (R_Trig) and a
timer-off (Tof) will be used.
F Use the Help to look up information about R_Trig and Tof.
F Declare a local variable for the 8 second delay. The initial value of 8s will establish
the delay time.

F In the FBD_Ex10_1 code pane, insert an R_Trig function block and name it
Sw10_Trig.
T314-10 Exercise 10.1 - RevE

Exercise 10.1 - 4
F Repeat the previous steps for inserting the TOf, name it Lamp10_Timer and make the
connections

F Save and close the program then verify the program logic in Test Mode.

F Return to Offline mode.


10.1.3.4 Connect Variables to I/O Channels
Connecting the four switches and two lamps to hardware I/O will enable the use of the
operator panel for the programs inputs and outputs. The DI810 and DO810 in the
ModuleBus will be used.

F Open the editor for the DI810 and select the Connections tab.
F Select the Variable field for Input 7 then select the Insert Path from Tree button or
press <Ctrl + T>.

System 800xA Training

Exercise 10.1 - 5
F Expand SxxPrg_Reactor then double click on gSw7 to insert the path into the field.
F Repeat for inputs 8, 9, and 10 connecting them to gSw8, gSw9, and gSw10.

F Save and close the editor.
F Open the DO810 editor and connect outputs 9 and 10 to gLamp9 and gLamp10.

F Save and close the editor.


10.1.3.5 Download and Test Online
F Download the application and choose Continue for any dialog boxes that appear.
F Test program logic by using the switches on the operator panel.

T314-10 Exercise 10.1 - RevE

Exercise 10.1 - 6
F Further test by forcing selected I/O. Force the gSw10 variable to true and check the
high state gLamp10 output within 8 seconds.

F Reset any forced bits then return to the Offline mode.

You might also like