Tải bản đầy đủ (.pdf) (19 trang)

13 LAB SFC

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (296.33 KB, 19 trang )

AB CONTROLLOGIX – SYSTEM OPERATION AND PROGRAMMING COURSE

INTERPRETING SFC
Summary Tasks
After completing this lesson, you will be able to:
 Add SFC Elements
 Create Simultaneous Branch
 Create Selection Branch
 Rename Step
 Configure Step
 Add Action
 Rename Action
 Configure Action
 Configure The Execution of SFC
In this Lab Work, you will learn:
 The different of Qualifier Type
 How to make a simple Flip Flop Function using SFC
 The different of Last Scan of Active Step
-

Don’t Scan Option

-

Programmatic Scan Option

-

Automatic Scan Option

To add SFC elements, use the SFC toolbar



Lab. Work - Sequential Function Chart

1


AB CONTROLLOGIX – SYSTEM OPERATION AND PROGRAMMING COURSE

Qualifier
In this exercise you will learn how to add an element to your SFC and at the
end of this exercise you will see the different between Non-Stored (N) Qualifier,
Stored (S) Qualifier and Reset (R) Qualifier. At the end of this section, you will
have following SFC:

1. Open existing project, namely: BBFE_Training_Day2.

Lab. Work - Sequential Function Chart

2


AB CONTROLLOGIX – SYSTEM OPERATION AND PROGRAMMING COURSE

2. Create a new routine in Main Program, namely: Qualifier. Select type:
Sequential Function Chart.

3. Double click Qualifier routine then SFC worksheet editor will appear. By
default, there will be Step_000 and Tran_000.
4. Rename Step_000 by clicking


button of the step.

-

Click Tag Tab

-

Type the new name for the step: Start_Sequence

-

Click

Button

5. Enter a Bool expression in Tran_000 by double-click the text area of
the transition

-

Type Bool expression: Start_Sequence.DN

-

To close the text entry window, press [Ctrl] + [Enter]

6. On the SFC toolbar, click the Step button
-


Drag the Step element to the required location on the SFC

Lab. Work - Sequential Function Chart

3


AB CONTROLLOGIX – SYSTEM OPERATION AND PROGRAMMING COURSE

-

To wire (connect) two elements together, click a pin on one of
the elements

and then click the pin on the other element

. A green dot shows a valid connection point.
-

Rename Step_001 as Store_Light0

-

Assign Preset Time for Store_Light0 by click

button

a. Type the time for the step: 1000 milliseconds
b. Click OK


7. Add an action of Store_Light0 Step by right click this step

-

Change the qualifier of the Action_000 as following steps
a. Click the

button of the action

Lab. Work - Sequential Function Chart

4


AB CONTROLLOGIX – SYSTEM OPERATION AND PROGRAMMING COURSE

b. Choose qualifier as Stored (S)
c. Click OK
-

Program an Action by enter structured text
a. Double click the text area of the action
b. Type following structured text:
Light0 := 1;

c. To close the text entry window, press [Ctrl] + [Enter]
8. Add Selection Branch by clicking

button. Then drag new branch to


the desired location
-

To wire the selection branch to the preceding step, click the
bottom pin of the step
the branch

-

and then click the horizontal line of

A green dot shows a valid connection point

Enter a Bool expression in Tran_001 by double-click the text
area of the transition. Type : SW0

-

Enter a Bool expression in Tran_002 by double-click the text
area of the transition. Type : NOT SW0

-

Click

button to add new Step
a. Wire this step to transition: Tran_001
b. Rename this step: Reset_Light0
c. Add action for this step. Change the qualifier as Reset
(R). Change the name of this action to Action_000

by double click this action and select the drop down tag
menu.

Lab. Work - Sequential Function Chart

5


AB CONTROLLOGIX – SYSTEM OPERATION AND PROGRAMMING COURSE

d. Add another action, choose qualifier as Non-Stored
(N), type action: Light0 := 0;
-

Click

button to add new transition
a. Enter bool expression: Reset_Light0.DN
b. At the end of this section, you will have the following
result:

-

Click

button to add another new Step
a. Wire this step to transition: Tran_002
b. Rename this step: Not_Reset_Light0
c. Add action for this step. Select the qualifier as NonStored (N). Type action: Light0 := 0;


-

Click

button to add another new transition
a. Enter bool expression: Not_Reset_Light0.DN
b. At the end of this section, you will have the following
result

Lab. Work - Sequential Function Chart

6


AB CONTROLLOGIX – SYSTEM OPERATION AND PROGRAMMING COURSE

-

End Selection Branch
a. Select the last transition of each path in the branch.
Click the first transition (Tran_003) and then press
and hold [Shift] and click the rest of the transitions that
you want to select (Tran_004)

b. On the SFC toolbar, click the

button

9. Return to previous step.
-


Click the top pin of the step to which you want to go
(Start_Sequence). A green dot shows

-

Then click the lower pin of the transition that signals the jump.

Lab. Work - Sequential Function Chart

7


AB CONTROLLOGIX – SYSTEM OPERATION AND PROGRAMMING COURSE

10. In Main Routine add JSR (Jump to Sub Routine) ladder to call Qualifier
Routine. Add new tag SW_Qualifier that has same format with SW0

11. Save this SFC.

EXERCISE
1. Download and go online to the project.
2. Place processor in remote run mode.
3. Toggle SW_Qualifier to bit = 1. Make sure other switches in MainRoutine
are switch off.
4. Open Qualifier routine. Notify the green color of each step. The green color
of step means that the step is active. What does step that always active
during all scan?
_________________________________________________________


What is qualifier for that action?
_________________________________________________________
5. Monitor the SW0 Tag. What is this tag value?
_________________________________________________________

Lab. Work - Sequential Function Chart

8


AB CONTROLLOGIX – SYSTEM OPERATION AND PROGRAMMING COURSE

6. Monitor the Light0 Tag. What is this tag value?
_________________________________________________________
7. Toggle SW0 Tag to 1.
8. Monitor the Light0 Tag. What is this tag value?
_________________________________________________________
9. Give your conclusion from this exercise!
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
______________________________

Differences between Ladder and SFC

In this exercise you will see the difference between how to program using
SFC and ladder.

The following figure so ladder diagram

Lab. Work - Sequential Function Chart

9


AB CONTROLLOGIX – SYSTEM OPERATION AND PROGRAMMING COURSE

EXERCISE
1. Open project: SFC_Ladder from your hard drive.
2. Download and go online the project to controller
3. Place processor in remote run mode
4. Double click SFC routine in Main routine. You will have following figure.
This following figure has the same logic with previous ladder diagram
figure.

Lab. Work - Sequential Function Chart

10


AB CONTROLLOGIX – SYSTEM OPERATION AND PROGRAMMING COURSE

5. Interpret the instruction in the program file by answering the following
question:
A. Go to Controller Tags for monitoring tags.

B. Close SW0 (by Toggle this tag to bit = 1). When SW0 is closed,
which light(s) turn on?
__________________________________________________
C. Open SW0 (by Toggle this tag to bit = 0). When SW0 is open,
what happen to Light1 and Light2?
__________________________________________________
D. Close SW1. What happen to Light3?
__________________________________________________

Lab. Work - Sequential Function Chart

11


AB CONTROLLOGIX – SYSTEM OPERATION AND PROGRAMMING COURSE

E. Open SW1. What happens?
__________________________________________________
F. Close SW2. What happens?
__________________________________________________
G. Open SW2. What happens?
__________________________________________________
H. What must be done to turn Light4 of?
__________________________________________________

Simple Flip Flop
In this exercise you will learn how to make a simple flip flop using SFC.

1. Open existing project, namely: BBFE_Training_Day2.
2. Create a new routine in Main Program, namely: Flip_Flop. Select type:

Sequential Function Chart.
3. Double click Flip_Flop routine then SFC worksheet editor will appear. By
default, there will be Step_000 and Tran_005.
4. Rename Step_000 to : Lamp_A
-

Add action of Lamp_A step. Rename this action to: Lamp_A_ON.
Select qualifier as Non-Store (N). Type the following structured
text for this action: Light1 := 1;

-

Add another action of Lamp_A step. Rename this action to:
Lamp_A_OFF. Select qualifier as PO (Pulse Falling Edge). Type
the following structured text: Light1 := 0;

-

At this section you will have following SFC:

Lab. Work - Sequential Function Chart

12


AB CONTROLLOGIX – SYSTEM OPERATION AND PROGRAMMING COURSE

5. Enter a Bool expression in Tran_005 by double-click the text area of the
transition. Type Bool expression: Lamp_A.T > 1500. At this section you
will have following SFC


6. Repeat some previous sections until you have following SFC

Lab. Work - Sequential Function Chart

13


AB CONTROLLOGIX – SYSTEM OPERATION AND PROGRAMMING COURSE

7. In MainRoutine add JSR (Jump to Sub Routine) ladder to call Flip_Flop
Routine. Add new tag SW_Flip_Flop that has same format with SW0

8. Download and go online to the project.
9. Place processor in remote run mode.
10. Toggle SW_Flip_Flop to bit = 1. Make sure other switches in MainRoutine
are switch off

11. Monitor the Tags value of Light1, Light2 and Light3 from Controller Tags .
What is your value of these tags?
________________________________________________________
________________________________________________________
________________________________________________________
________________________________________________________
________________________________________________________
________________________________________________________
________________________________________________________
________________________________________________________

12. Check that your program is running correctly.


Lab. Work - Sequential Function Chart

14


AB CONTROLLOGIX – SYSTEM OPERATION AND PROGRAMMING COURSE

Difference between Automatic Scan, Programmatic Scan and
Don’t Scan Option
In this exercise you will learn the difference between Automatic Scan,
Programmatic Scan and Don’t Scan option of Last Scan of Active Steps.

Exercise of Don’t Scan Option
1. Open project: FLIP_FLOP_SFC from your hard drive.
2. Open Controller properties by click button as shown on following figure:

Click this button
3. Select SFC Execution tab and choose Last Scan of Active Steps: Don’t
Scan

4. Click OK.
5. Download and go online the project to controller
6. Place processor in remote run mode.
7. Open MainRoutine. Toggle Switch_1 (Set Switch_1 bit to 1)
Lab. Work - Sequential Function Chart

15



AB CONTROLLOGIX – SYSTEM OPERATION AND PROGRAMMING COURSE

8. Monitor tags of Lamp1, Lamp2 and Lamp3. What is the value of each
these tags?
________________________________________________________
9. Open MainRoutine. Toggle Switch_1 again (Set Switch_1 bit to 0). Then
toggle Switch_2 (Set Switch_2 bit to 1)

10. Monitor tags of Lamp1, Lamp2 and Lamp3. What is the value of each
these tags?
________________________________________________________
11. Open MainRoutine. Toggle Switch_2 again (Set Switch_2 bit to 0). Then
toggle Switch_3 (Set Switch_3 bit to 1)

12. Monitor tags of Lamp1, Lamp2 and Lamp3. What is the value of each
these tags?
________________________________________________________

Exercise of Programmatic Scan Option

Lab. Work - Sequential Function Chart

16


AB CONTROLLOGIX – SYSTEM OPERATION AND PROGRAMMING COURSE

1. Open Controller properties
2. Select SFC Execution tab and choose Last Scan of Active Steps:
Programmatic Scan

3. Click OK
4. Download and go online the project to controller
5. Place processor in remote run mode.
6. Open MainRoutine. Toggle Switch_1 (Set Switch_1 bit to 1)

7. Monitor tags of Lamp1, Lamp2 and Lamp3. What is the value of each
these tags?
________________________________________________________
8. Open MainRoutine. Toggle Switch_1 again (Set Switch_1 bit to 0). Then
toggle Switch_2 (Set Switch_2 bit to 1)

9. Monitor tags of Lamp1, Lamp2 and Lamp3. What is the value of each
these tags?
________________________________________________________

Lab. Work - Sequential Function Chart

17


AB CONTROLLOGIX – SYSTEM OPERATION AND PROGRAMMING COURSE

10. Open MainRoutine. Toggle Switch_2 again (Set Switch_2 bit to 0). Then
toggle Switch_3 (Set Switch_3 bit to 1)

11. Monitor tags of Lamp1, Lamp2 and Lamp3. What is the value of each
these tags?
________________________________________________________

Exercise of Automatic Scan Option

1. Open Controller properties
2. Select SFC Execution tab and choose Last Scan of Active Steps:
Automatic Scan
3. Click OK
4. Download and go online the project to controller
5. Place processor in remote run mode.
6. Open MainRoutine. Toggle Switch_1 (Set Switch_1 bit to 1)

7. Monitor tags of Lamp1, Lamp2 and Lamp3. What is the value of each
these tags?
________________________________________________________
8. Open MainRoutine. Toggle Switch_1 again (Set Switch_1 bit to 0). Then
toggle Switch_2 (Set Switch_2 bit to 1)

Lab. Work - Sequential Function Chart

18


AB CONTROLLOGIX – SYSTEM OPERATION AND PROGRAMMING COURSE

9. Monitor tags of Lamp1, Lamp2 and Lamp3. What is the value of each
these tags?
________________________________________________________
10. Open MainRoutine. Toggle Switch_2 again (Set Switch_2 bit to 0). Then
toggle Switch_3 (Set Switch_3 bit to 1)

11. Monitor tags of Lamp1, Lamp2 and Lamp3. What is the value of each
these tags?
________________________________________________________

12. Give your conclusion from this exercise
________________________________________________________
________________________________________________________
________________________________________________________
________________________________________________________
________________________________________________________
________________________________________________________
________________________________________________________
________________________________________________________
________________________________________________________
________________________________________________________
________________________________________________________
________________________________________________________
________________________________________________________

Lab. Work - Sequential Function Chart

19



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Tải bản đầy đủ ngay
×