Академический Документы
Профессиональный Документы
Культура Документы
5
6 7
7 8
10
10 12 13 16 19 19 22 23 24
27 34
34
35
39 40 42 45
46 46
48 49
52
52 54 56 58 60 61
III
Programming the M 90
Setting a Start Time 61
Enabling a Keypad-entry Start Time To Format a Keypad Time Entry Variable To create a Jump To review: Setting an End Time Enabling a Keypad-entry End Time To Format a Keypad Time Entry Variable To review:
61 62 64 66 66 66 68 69
70
70 71 75 75 75 79 79 82 86
87
87
88
88
90 91
93
93 93 94 94 95 95 96 96 97 97 98 99 99 100
The enclosed sample application U90 Ladder software An M90 OPLC controller Displays Timers Math Functions Store Functions
T T T
After completing this tutorial, you will be familiar with the use of:
T T T T
Once you are familiar with these principles and how they are used in U90 software, you will be ready to begin writing and running your own project application.
Programming the M 90
The number of boxes per bundle 1 hour each day when the system will not be able to run A running box count A message when the set number of boxes per bundle is reached Error messages
When the machine is running, the M90s LCD screen will display:
T T T
Your program will also prevent the machine from running over the weekend.
Note that the function of the photocell in this application is filled by the +/- key on the M90 keypad. This allows you to download the tutorial into your M90 controller and run it without connecting the M90 to anything other than your PC.
Getting Started
First, you need to open a new project.
Open U90 Ladder. Click the New icon on the HMI toolbar.
Figure 1.
New Icon
You can have only one U90 project open at a time. Before a new project will open, you will be prompted to save any changes to a currently open project. A new project will open with the M90 Hardware Configuration window.
3
Select your controller model from the M90 list. The selected model name now appears above the M90 picture.
Programming the M 90
Figure 2.
For this project you will not be using the Digital and Analog expansion options.
4
To save a project:
1 2 3 4
Select Save As from the Project drop-down menu. The Save As window opens. Select the desired folder. Enter Factory Tutorial as the file name. Note that the file extension will be .U90.
Figure 3.
5
Click Save.
Programming the M 90
You need:
T T T T
An initial Display A Display to approve ID entry A Display to deny ID entry A way to convert a positive ID into an activated coil.
To do this you will use Display screens, Variables, List Variables and Display Jumps.
Click the Display icon on the Ladder toolbar. Display 1 opens in the Display editor. Name the Display Initial Log-in Display by typing this title in the title bar and then pressing ENTER. You will see the Display 1 title in the Project Navigation window.
10
Figure 4.
8
Initial Display
Figure 5.
Enter ID Number
11
Programming the M 90
You have now created a Displaybut this Display is not yet an interactive Display. Your initial Display asks the operator to enter his/her ID number. To register the ID number, you create a Linked Variable.
Figure 6.
10 11
Click Attach Variable on the HMI toolbar. The Attach Variable dialog box opens.
Figure 7.
12
Attach a Variable
12
Press OK
Figure 8.
14
Display 1 now appears with the Variable-linked spaces as red pound signs.
Figure 9.
You have attached a variable to a Display. Now you need to format the Variable for its use.
To format a Variable
This Variable will accept a two-digit number between one and ninety. The operator enters the number using the M90 keypad.
15
13
Programming the M 90
Figure 10.
16
Select Integer from the Variable Type list, then click on the Link To button. The Set Link to Int box opens.
Figure 11.
17
14
Figure 12.
18 19
Select Keypad Entry from the Variable Information list. Select Start with Clear Field. This will erase any previous user ID numbers entered, and prevent them from being viewed on the M90 display screen. If you do not select Start with Clear Field, the last ID number entered will be displayed. Set Entry Limits from one to ninety.
20
Figure 13.
15
Programming the M 90
You have a Display. You have an attached Variable. Together, the Display and the attached Variable create an interactive Display. Now, after an operator has entered an ID number, you must approve the ID entry. To do this, you must create a Jump condition.
Figure 14.
22
Click to open the first Jump Condition. The Define Jump to Condition box opens.
16
Figure 15.
23
Figure 16.
24 25
The Define to Display Jump box opens. Enter DS 2 Number Confirmation. Click OK.
17
Programming the M 90
Figure 17.
26
The Display now appears with the linked Variable and Jump condition.
Figure 18.
18
To review:
For one Display, you have created:
T T T
A fixed text Display. A keypad-enabled Variable. A Jump condition to respond to the keypad entry.
Now you want to create a Display that will verify the entered ID number. This will be Display 2. There are two options for the ID number: access okayed or access denied. These two options are similar to a bit option: on (1) or off (0). Depending on access permission, you want to continue on to Display 3 or return to Display 1. Display 2 will contain two types of text:
T T
Fixed this text will be part of all Display 2 screens. Variable this text will vary with the conditions in Display 2.
To format Display 2:
27 28 29 30 31
Title Display 2 Number Verification. Enter the text Access. This will be Fixed text in the message. Enter the text verify. This will be variable text in the message. Select verify. Click the Attach Variable icon on the HMI toolbar.
Figure 19.
32
19
Programming the M 90
Figure 20. Next, you want to set your JUMP Condition. Your JUMP Conditions will not depend on an external keypad entry. They will be internal conditions in the Ladder project.
33
Click to open the first Jump Condition. The Define Jump to Condition box opens. Enter MB 7 Time to jump to 3. Click OK.
34
Figure 21.
35 36
The Define to Display Jump box opens. Enter DS 3 Present the worker name. Click OK.
20
Figure 22. Repeat the same process for Jump Condition 2 using MB 8 Time to return to 1 with Display 1.
Figure 23. Now you need to format the Variable attached to Display 2.
21
Programming the M 90
To format Variable 9:
37 38
Open Variable 9 through the Navigation editor. Select Bit for the Variable Type list. The Set Link to Bit box opens. Enter MB 20 System can work. Click OK.
39
Figure 24.
40 41
Enter denied in the Text for off (0) box. Enter okayed in the Text for on (1) box.
22
Figure 25. You have created two Displays. If you will remember, at the beginning, you needed:
T T T
Now you see that the Display to confirm and the Display to deny ID entry are only one Display with Variable conditions to change part of the text message. Create one final Display for the log-in process. This Display will read Welcome ______ with the Operators name. This is another Display where part of the text is constant and part is variable. You cannot use a Bit Variable in this instance because you do not have an on or off condition. Instead, you will use List Variables for the Operators names.
To format Display 3:
42 43 44
Title Display 3 Present worker name. Enter the fixed text Welcome. Select eight spaces for the variable text and attach Variable 7 Name of worker.
23
Programming the M 90 45
Set one Jump condition for an active keyboard to jump to Display 4 using SB 6 Keyboard is Active.
Figure 26. Now you format the Variable attached to Display 3. You have ninety factory workers but only three that are permitted to operate the conveyor belt. For the sake of expediency, you will not enter ninety names in the List Variable.
To format Variable 7:
46 47
Open Variable 7 from the Project Navigation Window. Select List from the Variable Type list. The Set Link to List box opens. Enter MI 4 Worker Name List. You will remember that we created this Memory Integer for Variable 6, page 14.
48
24
Figure 27.
49
Enter 90 in the Variable Information: Lines box. You will remember that the factory has 90 workers Click APPLY. Enter names in List Variables 0, 1 and 2. You do not need to enter ninety worker names in this sample program.
50 51
Figure 28.
52
Scroll down to List Variables 10, 11 and 12. These will be the three workers allowed to operate the conveyor belt.
25
Programming the M 90 53
Figure 29. You have created all of the Displays needed for the Log-in process. If you download your Factory Tutorial project at this point, you will see your first Display: Enter ID no. _. No matter what two-digit number you enter, you will see Display 2: Access denied. You have not written Ladder conditions that could turn MB 20 ON, the Memory Bit linked to Display 2. Therefore, MB 20 remains OFF (logic 0). You also have not written Ladder nets that could turn ON either MB7 or MB 8, your Display 2 Jump conditions. MB 7 and MB 8 remain OFF (logic 0). You cannot jump out of Display 2. Now, you need to write the Ladder program that will create the conditions 6 to turn MB 7, MB 8 and MB 20 ON.
26
Two Equal function blocks (If and and) One Set coil.
Click on the Compare menu, and then click on Equal as shown below. The Equal function block is now attached to your cursor.
Figure 30.
2 Place the function block on the left side rung of the Ladder as shown below. Note that in order to allow power to flow from the rung, the function block must touch the left rung.
Figure 31.
27
Programming the M 90 3 Click on the rung. The Equal function block drops into place. The Select Operand and Address box opens as shown below.
Figure 32.
4 Click on the rung. The Equal function block drops into place. The Select Operand and Address box opens. Enter SI 2 Current HMI Display for the A integer value as shown below, then click
OK. The Select Operand and Address box opens.
Figure 33.
28
U90 Ladder T u torial Select #, constant value as the B operand type. Constant values are values that you enter when you create your project. They are not affected by your application. Enter the constant integer value by typing 2, and then click OK as shown below.
Figure 34.
8 The Equal function block now appears with both integer values in place as shown below.
10 Place this function block so that it touches the first one as shown below. Note that in order to allow power to flow between them, the function blocks must touch
29
Programming the M 90
Figure 36.
11 Enter MI 4 Worker Name List for the A integer value, then click OK. The Select Operand and Address box opens. 12 Select #, constant value as the B operand type. Enter the constant integer value by typing 10, then click OK.
Figure 37.
13 The net now appears as shown below.
30
Figure 39
15 Click in the net to place the Set Coil. The Select Operand and Address box opens. 16 Enter MB 10 Worker number 10 is in as shown below.
Figure 40
17 Click OK. The Set Coil now appears with its operand and address.
Note the space between the Set Coil and the function block. If the elements do not touch, there will be no power flow to the Set Coil. You can use the Draw Line tool to connect them.
18 Click on the Draw Line button as shown below.
31
Programming the M 90
Figure 41
19 Use the pencil to draw a line between the two elements as shown below.
Figure 42 Note that you can also use the Draw Line tool to use one condition to drive a number of coils by connecting parallel elements within a net. Net One, shown below, is now complete. Net One reads: If the Current Display (SI 2) is Display 2 (#2) and the entered integer value in MI 4 equals 10, then turn MB 10 ON.
32
Figure 36 This net is the first net used in the Error! Cannot open file., section of this tutorial.
33
Programming the M 90
MB 20 MB 7 MB 8
Conveyor system can work Jump to Display 3 for an approved worker ID number Jump to Display 1 for an denied worker ID number
You need to write the Ladder conditions for: 1. If you are in Display 2 and worker ID number is approved then turn MB 20 ON. 2. If you are in Display 2 and MB 20 is ON then turn ON MB 7 and jump to Display 3. 3. If you are in Display 2 and MB 20 is not ON then turn ON MB 8 and jump to Display 1.
Condition 1
If you are in Display 2 and worker ID number is approved then turn MB 20 ON. Ladder net for worker ID number 10 consists of:
T T
Two Equal function blocks (If and and) One Set coil.
34
Log-in Ladder
If the Current Display (SI 2) is Display 2 (#2) and the entered integer value in MI 4 equals 10 then Set MB 10 ON. Using a Set coil means that MB 10 remains ON, and you can use it to drive further conditionseven after the Current Display changes to Display 3. Use the COPY and PASTE functions to build Ladder nets for worker ID numbers 11 and 12. Remember that Copy and Paste operate differently in U90 Ladder.
Figure 45.
35
Programming the M 90
Figure 46.
21 Click COPY on the Standard toolbar. 22 Click PASTE on the Standard toolbar. 23 Move the pointer to the net in which you want to paste, then click.
Figure 47.
36
Figure 48.
Figure 49.
37
Programming the M 90
Figure 50.
38
Figure 51.
39
Programming the M 90
These three nets create the condition if you are in Display 2 and worker ID number 12 is entered. Now you need to create the resultthen turn MB 20 ON. This net consists of:
T T
If MB 10, MB 11 or MB 12 is logic 1 then turn MB 20 (System can work) ON. Note that in Net One MB 10 was a Set coil and in Net Four it is a Direct contact.
Condition 2
If you are in Display 2 and MB 20 is ON then turn MB 7 ON and jump to Display 3. The Ladder nets for jumping to Display 3 consist of:
T T
40
If the Current Display (SI 2) is Display 2 (#2) and the system can work (MB 20 is ON) then turn Timer 7 ON. Timer 7 will then begin count down from 4 seconds. Remember that timers also have a bit value. Direct coil T7 will turn ON when T7 finishes counting down from 4 seconds and reaches 0.
41
Programming the M 90
Figure 54. Net Six reads: When Timer 7 counts down to 0 seconds and turns ON, turn ON MB 7. Remember that MB 7 provides the Jump condition from Display 2 to Display 3. Timer 7 allows the Display to be on the M90s screen for four seconds. Without this time delay, the message Access okayed would flash on the screen too quickly to be read.
Condition 3
If you are in Display 2 and MB 20 is not ON then turn MB 8 ON and jump to Display 1. The Ladder nets for jumping to Display 1 consist of:
T T T
42
Figure 55. Net Seven reads: If the Current Display (SI 2) is Display 2 (#2) and MB 20 is 0, then turn Timer 8 ON. Remember that Direct coil Timer 8 will turn ON only when it has finished counting down from 4 seconds and reaches 0.
43
Programming the M 90
Figure 56. Net Eight reads: When Timer 8 counts down to 0 seconds and turns ON, turn MB 8 ON. Remember that MB 8 provides the Jump condition from Display 2 to Display 1. Without this time delay, the message Access denied would flash on the controller screen too quickly to be read. You have written the Displays for the Log-in process and you have built the Ladder nets to activate the Display jump conditions. Next, close the open loops in your Ladder nets.
T T
You used a Set coil for each allowed worker ID number. A Set coil must be used with a Reset coil. You used a Store Direct function block with the value of MI 4. This value is stored until overwritten by another value. The MI 4 value should be cleared with each scan.
Build the reset conditions at the beginning of the project. Then they will not be forgotten as your project grows.
44
To reset coils
Each Set coil must:
T T
Have a Reset coil with the same Operand and address - and Be in a net that can conduct power flow. One Equal function block One Direct coil One Positive Transition contact Three Reset coils One Store Direct function block
Figure 57.
1
Click the INSERT NEW NET icon on the Ladder toolbar. The cursor changes into cross-hairs. Place the cursor in Net One. Click to insert a new net.
45
Programming the M 90
Figure 58.
3
Repeat the process and add another net for a total of 2 new nets. What was Ladder Net 1 is now Ladder Net 3.
Figure 59. Net One reads: When the Current Display (SI 2) is Display 1 (#1), turn MB 30 ON.
46
U90 Ladder T u torial Place Ladder elements into Net Two as shown in the figure below. To allow the single, one-shot connection to reset the parallel series of coils, you must connect them. Double-click on the LINE DRAW icon. Connect the Reset coils to the Positive Transition contact.
Figure 60.
47
Programming the M 90
Reset conditions
When MB 30 turns ON, reset MB 10, MB 11 and MB 12. You have given Reset coil conditions to each Set coil condition. Those set reset loops are closed. Next, reset the MI 4 value to 0 after each scan.
To Reset MI 4
As the program is written now, when an access-okayed worker ID number is entered, that number is stored in MI 4. When the full program (including operating the conveyor belt and error handling) is run and completed, it will return to Display 1: Enter ID no. The ID number entered at the beginning of the last scan is still stored in MI 4. If the next worker does not enter an ID number and only pushes Enter while in Display 1, the worker will be allowed access on the previous workers ID number.
48
You can include this function block in the same net as the reset coils, Net 2.
Figure 62. Net Two now reads: When MB 30 turns ON, reset MB 10, MB 11 and MB 12 AND store integer 0 in MI 4. Your project now includes 11 nets and 4 HMI displays. You can now download your project and test it. Keep in mind that, because you have not yet formatted Display 4, pressing ENTER after Display 3 Welcome _______ will bring up a blank screen. Use the Debug feature to reset SI 2 Current HMI Display to 1.
To download a project
Make sure that the controller is turned on and that U90 Ladder is in Ladder Editor view.
7 8 Click the DOWNLOAD Icon on the HMI toolbar. Download all sections.
49
Programming the M 90
You will see Display 1. The screen will go blank after you press Enter. You can reset the program on-line using the de-bugging feature.
9 Click the DEBUG Icon on the HMI toolbar.
Figure 63.
10 The net power flow will appear in red. The current Operand value of the CURRENT HMI DISPLAY appears above the Operand and Address.
Figure 64.
11 Click on the OPERAND AND ADDRESS to open debugging dialog box. 12 Enter 1 in the NEW box and click SEND.
50
Figure 65. The new value of 1 will appear above the Operand and Address. This causes Display 1 Enter ID No: __ to return to the M90 display screen.
Figure 66.
51
Programming the M 90
Create two interactive displays that allow the operator to: -set the number of boxes in a specific bundle. -set a start time and an end time for system maintenance. Create a Display that shows a running box count.
To allow the operator to set the number of boxes per bundle, you need to create a Display and link it to a keypad entry variable.
Click the Display icon on the Ladder toolbar. Display 1 opens in the Display editor. Name this Display Set Box Quantity, by typing the name in the title bar, then pressing ENTER. You will see the Display 1 title appear in the Project Navigation window, as shown in Figure 67 below
55
52
Figure 67
56
Naming a Display
Enter the Display text Set Box Qty. in the Display window, as shown in Figure 68 below.
Figure 68
To allow the operator to set the number of boxes per bundle, you need to link a Variable to your Display. This Variable will contain a number entered from the M90 keypad. Remember that the maximum number of boxes per bundle is 99, so you must create a space in your Display that can hold two digits.
53
Programming the M 90
Select two spaces in the Display text by clicking and dragging, as shown below.
Figure 69.
58
Figure 70.
Attaching a Variable
54
Figure 71.
60
Enter VR 5 Set Box Quantity, then press OK. Display 4 now appears with the Variable-linked spaces as red pound signs as shown in Figure 72 below.
Figure 72.
You have attached a variable to a Display. Now you need to format the Variable to accept a number that the operator enters from the M90 keypad.
55
Programming the M 90
Figure 73.
62
Select Integer from the Variable Type list, then click on the Link To button. The Set Link to Int box opens as shown in Figure 74.
56
Figure 74.
63
Linking an MI to a Variable
Enter MI 11 Set Box Quantity, then Click OK. The Variable is now linked to MI 11. You will format MI 11 later. Select Keypad Entry from the Variable Information list. Select Start with Clear Field. If you do not select Start with Clear Field, the last number entered in MI 11 will be displayed. Select Enable Limits. In the Min box, enter 1; enter 99 in the Max box. When you are finished formatting Variable 5, the screen will look like Figure 75, page 58 below.
64 65
66
57
Programming the M 90
Figure 75.
You have a Display. You have an attached Variable. Together, the Display and the attached Variable create an interactive Display. Now, after an operator has entered the number of boxes that are required for this bundle, you want the operator to set maintenance time. To do this, you must create a Jump condition.
Click on Display 4 in the Project Navigation Window. Display 4 appears as shown below.
58
Figure 76.
68
Click on the first Jump condition in the Jumps box. The Define Jump to Condition box opens. Enter SB30 Keypad entries complete, as shown in Figure 77.
69
Figure 77.
70 71
Click OK. The Define to Display Jump box opens. Enter DS 5 Enter Start Time as shown below.
59
Programming the M 90
Figure 78.
72
Click OK. The Display now contains the linked Variable and Jump condition as shown below. You can also see Display 5, Enter Start Time, in the Project Navigation Window.
Figure 79.
Completed Display
To review:
For this Display, you have created:
T
A text Display.
60
Now you need to create the Jumps destination Display. This Display will allow the operator to set a start time for maintenance procedures.
Click Display 5 in the Project Navigation window. Display 5, Enter Start Time, opens in the Display editor. . Enter the Display text Start Time:_____ in the Display window, as shown in Figure 80 below.
74
Figure 80
Select 5 spaces in the display text by clicking and dragging. Click Attach Variable. The Attach Variable box opens as shown below.
61
Programming the M 90
Figure 81.
77
Attaching a Variable
Enter VR 2 Start Time, then press OK. Display 5 now appears with the Variable-linked spaces as red pound signs as shown in Figure 82 below.
Figure 82.
You have attached a variable to a Display. Now you need to format the Variable for its use.
Open Variable 2 by clicking it in the Project Navigation Window. Select Time Functions from the Variable Type list. The Set Link to Time function box opens.
62
Enter MI 2 Start Time, then click OK as shown below. Variable 2 is now linked to MI 2. You will define MI 2 when you write the Ladder program for Maintenance Time.
Figure 83
81
Linking a Variable
Select Hour (CT) and Keypad Entry from the Variable Information list as shown in Figure 84.
Figure 84.
You now have an interactive display that enables the operator to enter a Start Time for maintenance. Once the operator has set the Start Time, he must also set an End Time.
63
Programming the M 90
You need to create a jump condition that will bring the operator to the End Time Display.
To create a Jump
After an operator enters the Start Time (s)he presses the ENTER key. This will fulfill the Jump condition and cause the Display to change.
82 83
Open Display 5 by clicking it in the Project Navigation window. Click on the first Jump condition in the Jumps box. The Define Jump to Condition box opens. Now enter SB30 Keypad entries complete, as shown below.
Figure 85.
84 85
Click OK. The Define to Display Jump box opens Enter DS 6 Enter End Time as shown below.
64
Figure 86.
86
Click OK. The Display now appears together with the linked Variable and Jump condition as shown below. You can also see Display 6, Enter End Time, in the Project Navigation Window.
Figure 87.
Completed Display
65
Programming the M 90
To review:
For this Display, you have created:
T T T
A text Display. A keypad-enabled Variable. A Jump condition to respond to the keypad entry.
Now, you need to create the destination screen for the Jump condition. Now you need to create the Jumps destination Display. This Display will allow the operator to set an end time for the maintenance period.
Click Display 6 in the Project Navigation window. Display 6, Enter End Time, opens in the Display editor. Enter the Display text End Time: in the Display window, as shown in Figure 80 below.
88
Figure 88
66
Click Attach Variable. The Attach Variable box opens as shown below.
Figure 89.
91
Attaching a Variable
Enter VR 3 End Time, then press OK. Display 6 now appears with the Variable-linked spaces as red pound signs as shown in Figure 82 below.
Figure 90.
67
Programming the M 90
You have attached a variable to a Display. Now you need to format the Variable for its use.
Open Variable 3 by clicking it in the Project Navigation Window. Select Time Functions from the Variable Type list. The Set Link to Time Function box opens. Enter MI 32 End Time, then click OK as shown below. Variable 3 is now linked to MI 3. You will define MI 3 when you write the Ladder program for Maintenance Time.
94
Figure 91
95
Linking a Variable
Select Hour (CT) and Keypad Entry from the Variable Information list as shown in Figure 84, page 63.
68
Figure 92.
You now have an interactive display that enables the operator to enter an End Time for system maintenance. After an operator enters the End Time (s)he presses the ENTER key. This will fulfill the Jump condition and cause the Display to change. We will set up the jump condition for this screen in @@@@
To review:
In this section, you made Interactive Displays that enable the operator to use the M90 keypad to:
T T T
Set the amount of boxes per bundle. Set the starting time for system maintenance. Set an ending time for system maintenance.
69
Programming the M 90
Identify himself to the M90 by entering a password. Set the number of boxes per bundle. Define maintenance time for the system.
Now, you must create Displays that will show the operator what is happening within the system. How do I display run-time Data? In this part of the application, you will:
T T
Create a Display that shows a running box count. Create a Display that allows the operator to track events or errors within the system.
The running box count display will contain 2 variable values. The first variable is the actual number of boxes that are counted as they pass a photocell. This variable will be linked to an MI which serves as a counter in your Ladder program. The second variable is the number of boxes per bundle. This number has been set by the operator in Display 4, Set Box Quantity.
Click the Display icon on the Ladder toolbar. Display 7 opens in the Display editor. We will name this Display Box Count. Type the name in the title bar, then press ENTER. You will see the name appear in the Project Navigation window, as shown in Figure 67 below.
97
70
Figure 74
98
Naming a Display
Enter the Display text Box___out of___ in the Display window, as shown in Figure 68 below. The spaces in the text will contain the variable values.
Figure 75
Select 3 spaces in the Display text by clicking and dragging, as shown below.
71
Programming the M 90
Figure 76.
100 Click Attach Variable on the HMI toolbar. 101 The Attach Variable dialog box opens as shown in Figure 71.
Figure 77.
102 Enter VR 4 Boxes Counted, then press OK. Display 7 now appears
with the Variable-linked spaces as red pound signs as shown in Figure 72 below. Now format Variable 4.
103 Click on Variable 4 in the Program Navigation Window, and then
72
You will use MI 10 to create the box counter in your Ladder application.
Figure 78.
Formatting a Variable
Now, you attach the second variable, which contains the preset number of boxes per bundle.
105
Select 3 spaces in the Display text by clicking and dragging, as shown below.
Figure 79.
106 Click Attach Variable on the HMI toolbar. 107 The Attach Variable dialog box opens as shown in Figure 71.
73
Programming the M 90
Figure 80.
108 Enter VR 1 Amount of Boxes per Bundle, then press OK. Display 7
now appears with the Variable-linked spaces as green pound signs as shown in Figure 72 below.
Figure 81.
Now format Variable 1.
74
U90 Ladder T u torial 110 Click on the LINK TO button, and then link MI 11 Set Box Quantity.
Remember that MI 11 contains the number of boxes per bundle that is set by the operator.
111 Click OK. Variable 1 is complete as shown below.
Figure 82.
Formatting a Variable
To review:
In this section, you made a Display that enables the operator to:
T
View the counted number of boxesthe number of boxes that have passed a photocell. Compare it to the preset number of boxes per bundle.
Jump conditions
There will be 3 Jump conditions that will cause a Jump to a new Display. Each condition will cause Display 10, the message screen, to be displayed.
Jump to Condition box opens. Now enter MB 41 Error Message 1, as shown below.
75
Programming the M 90
Figure 83.
114 Click OK. The Define to Display Jump box opens. 115 Enter DS 10 Operator Messages as shown below.
Figure 84.
116 Click OK. The Display now appears together with the linked Variable
and Jump condition as shown below. You can also see Display 10, Operator Messages, in the Project Navigation Window.
76
Figure 85.
Now, you must set two additional Jump conditions. 117 Click on the second Jump condition in the Jumps box. The Define
Jump to Condition box opens. Now enter MB 2 Bundle Complete, as shown below.
77
Programming the M 90
Figure 86.
121
Click OK. The Define to Display Jump box opens. then click OK.
123 The completed display, together with all three Jump conditions, looks
78
Figure 87.
Completed Display
To review:
In this section, you made a Display that:
T
Enables the operator to receive messages regarding the status of the system.
Now you will create the operator messages. Display 8 contains one variablewhich can show one of 3 messages. This is possible because the variable is a List Variable. The text of a List Variable changes according to the value of the MI to which it has been linked.
79
Programming the M 90 124 Open Display 8 by clicking it in the Project Navigation window. 125 Create a placeholder for the message text by selecting the entire
screen, then clicking the Attach Variable button. The Attach Variable box opens.
126
Figure 88.
Attaching a Variable
127 Click OK. Display 8 appears with red pound signs as shown below.
Figure 89.
Attached Variable
Now, you will format Variable 8, Operator Messages. 128 Open Variable 8 from the Project Navigation Window. 129 Select List from the Variable Type list. The Set Link to List box
opens.
80
U90 Ladder T u torial 130 Enter MI 5 Operator Message List as shown in Figure 90
Figure 90.
131 Click OK. List Variable 8 opens.
81
Programming the M 90
Figure 91.
The final Display in your HMI is completeexcept for Jump conditions. The Jump conditions will cause this Display to change if:
T T T
An operator presses the M90s ENTER key. The bundle of boxes is complete. An operator message is displayed for a preset amount of time.
82
Figure 92.
137 The Display now appears together with the linked Variable and Jump
condition.
Now, you must set two additional Jump conditions. 138 Click on the second Jump condition in the Jumps box. The Define
83
Programming the M 90
Figure 93.
140 Click OK. The Define to Display Jump box opens. 141 Enter DS 1 Initial Log-in Display. 142 Click ENTER. The screen appears with the two Jump conditions as
shown below
84
Figure 94.
143 Click on the third Jump condition in the Jumps box. The Define
85
Programming the M 90
Figure 95.
To review:
Your HMI is now complete. In this section, you:
T T
Defined operator messages. Set Jump conditions that allow exit from this final display.
86
MI 2 and MI3 define the time range for this Indirect Time function. Remember that in the previous section, you defined two Displays to allow the operator to set times for system maintenance. These Displays use variables to accept time values that are entered by the operator via the M90 keypad. In Display 5, Variable 2 Start Time was linked to MI32. In Display 6, Variable 3 End Time was linked to MI 3. When the current RTC1 time is within this range, power will not flow through the function block. The power flow drives a direct coil, linked to MB 6. This condition prevents the machine from running during maintenance time.
RTC: Real Time Clock. The M90 has an internal RTC that is used to handle time and date functions.
87
Programming the M 90
If the current time falls after the time contained in MI 2 and before the time contained in MI3, then energize MB 6 to logic 1. In other words, during this time, the machine cannot run, and cannot accidentally be turned on during maintenance.
The machine can be started only by an approved operator The machine cannot run over the weekend A Direct Contact linked to MB 20, energized when an approved operator logs in A Direct Time function block: Day of the Week.
88
U90 Ladder T u torial 15 Select the days on which you want the application to run, then click OK. 16 The function block appears with the days of the week marked as shown below.
Figure 94. Net 12Day of the Week The second part of this net fills these conditions:
T T
The machine cannot run during maintenance times The machine cannot run if Displays 1-6 are displayed An Indirect Direct Contact linked to MB 6, which is energized during maintenance time A Compare function block, which checks if the Current Display is higher than 6. A Direct Coil, linked to Output 0, Start Machine If an approved operator has logged in, and If the operator has entered system parameters.
89
Programming the M 90
Figure 94. Net 12, Start Machine This part of Net 12 reads as follows: If MB is on, and it is not Sunday or Saturday, and MB6 is off, and a Display higher than 6 is being Displayed, Start the machine.
Creating a Counter
You used the conditions in Net 12 to start the bundling machine. You can also use them to drive the box counter. The counter is connected to a photocell. Each time the photocell sees a box, the counter increments by one. SB 50, which is linked to the +/- key on the M89 keypad, acts as the photocell. The third part of this net fills these conditions:
T
When the box passes the photocell, the counter increments by one. A Positive Transition Contact linked to SB 50, which is energized when the +/key is pushed An Add function block, which acts as a counter.
Each time SB 50 is energized, the constant 1 is added to the current number of boxes stored in MI 10. The result is stored in MI 10 as shown below. In other words, each time you press the M90s +/- key, the counter increments by 1.
90
Figure 94. Net 12, Counter Net 12 is now complete. It reads as follows: If MB 20 is energized, and it is a weekday, and MB6 is off, and the current Display is higher than 6, Start the machineTHEN when SB 50 is on, add 1 to the current value in MI 10, then store the result in MI 10. Before the counter in Net 12 can work, you must initialize (zero) the counter value.
When an approved operator has logged in, place the value 0 in the counter. A Positive Transition Contact linked to MB 20, which is energized when an approved operator logs in. A Store function block, which stores 0 in MI 10.
91
Programming the M 90
92
A box is stuck The conveyor belt is not delivering boxes into the system A bundle of boxes has been completed
To build these nets, place the Ladder elements as shown in the figures below.
Stuck BoxTimer
This net contains:
T T
The net reads: When a box passes the photocell and the machine is running, start Timer 0. The bit condition of this timer will be used in another net to display an operator message.
93
Programming the M 90
When the first box passes the photocell, set MB 31. MB 31 remains on. This condition will be used in the next net to start a timer, which in turn will cause an operator message to be displayed.
Conveyor StoppedTimer
The net shown below uses three contacts to activate Timer 1, Conveyor Stopped. Note that SB 50, the photocell is now linked to an Inverted Contact, Normally Off. This means that power can flow to the other side only when the M90s +/- button is not pushed. In other words, when the photocell does not detect a box. The net reads: When the first box passes the photocell, and when the photocell does not detect a box, and when the machine is on, start Timer 1. The bit condition of this timer will be used in another net to display an operator message.
94
When the Current Number of Boxes equals the Set Quantity of Boxes, and the current Display is 7, turn MB 2 on.
About Display 8
Remember that Display 8 Operator Message is linked to List Variable 8, which contains 3 text messages. This variable is linked to MI 5. The value in MI5 determines which message is displayed on the M90s screen, according to the number of the message
95
Programming the M 90
This net reads: When MB 41 turns on, Store 1 in MI 5. The result is that message 1 of List Variable 8 is displayed on the M90s screen: Box is Stuck!
96
This net reads: When Timer 1 is finished, and the bundle is not complete, turn MB42 on. MB 42 will be used to display the Conveyor Stopped error message.
97
Programming the M 90
This net reads: When MB 42 turns on, Store 2 in MI 5. The result is that message 2 of List Variable 8 is displayed on the M90s screen: Conveyor Stopped.
Determines the length of time an operator message is displayed on the M90s screen Whose condition is used to exit Display 8 Operator Messages
This net reads: When the Current Display is 8, and MI 5 is equal to 0, start Timer 3 In other words, when the Bundle Complete message is on the M90s screen, Timer 3 starts.
98
The error messages are displayed when MB 41 and MB42 are on. When the errors have been fixed, these MBs will be off. The net below reads: When MB 41 and MB42 are off, and the current Display is 8, turn on Timer 4.
99
Programming the M 90
Exit Display 8
The net below allows a Jump from Display 8 Operator Messages. This net reads: When Timer 4 is finished, turn MB5 on. MB 5 is used as a Jump condition in Display 8. When MB 5 turns on, the Jump condition will be fulfilled and Display 7 Box Count will appear on the M90s screen.
100