Anda di halaman 1dari 30

Lab: Intro to HMI

Lab: Intro to HMI Lab:


Hands-On Lab

T
Trraaiin
niin
nggL
Laab
bMMaan
nuuaall
HMI LAB 7

ABOUT THIS HANDS-ON LAB __________________________________________________ 7

LAB MATERIALS ___________________________________________________________ 7

BEFORE YOU BEGIN ________________________________________________________ 7

LAB 1: MODIFYING THE CONTROLLOGIX PROGRAM FOR PANELVIEW PLUS OPERATION _________ 8

ABOUT THIS LAB ___________________________________________________________ 8

LAB 2: CREATE A MACHINE LEVEL HMI APPLICATION _________________________________ 14

ABOUT THIS LAB __________________________________________________________ 14

CREATE A MACHINE EDITION APPLICATION ______________________________________ 14

SETUP COMMUNICATION PATH TO CONTROLLER __________________________________ 15

CREATE A 2-STATE INDICATOR TO DISPLAY STATUS OF THE PHOTOEYE _________________ 18

ADD A PUSHBUTTON TO TURN THE METER ON AND OFF _____________________________ 23

CREATE A RUNTIME FILE AND RUN IT ON A PANELVIEW PLUS OPERATOR TERMINAL _______ 27

EXTRA TASK #1 ___________________________________________________________ 29

EXTRA TASK #2: __________________________________________________________ 30

HMI Lab (Rev 1.01)


3/9/2011 Page 5 of 30
HMI Lab
About This Hands-On Lab

This lab provides you with an opportunity to explore machine level visualization solution.
Rockwell’s overall visualization platform expands from machine level to site level solution. The
PanelView Plus product line is designed for operators to view and control at machine level
applications.

The following sections explain what you’ll be doing in this lab session, and what you will need to do
to complete the hands-on exercises.
What You Will Accomplish In This Lab
ƒ Develop a machine level Human Machine Interface application
ƒ Run a machine level application on a PanelView Plus terminal

Lab Materials

For this Hands-On lab, we have provided you with the following materials that will allow you to
complete the labs in this workbook.
Hardware
This hands-on lab uses the following hardware:
ƒ 1796-CL11S ControlLogix® demo unit
ƒ PanelView Plus
ƒ RightSight Sharp Cutoff Diffused Photoelectric Sensor
Software
This hands-on lab uses the following software:
ƒ RSLogix™ 5000
ƒ FactoryTalk View Studio

Before You Begin

The following steps must be completed before starting the lab exercise:

1. This lab continues to build on the Analog_&_Beyond.acd from the DeviceNet lab section.

HMI Lab (Rev 1.01)


3/9/2011 Page 7 of 30
Lab 1: Modifying the ControlLogix Program for
PanelView Plus Operation
About This Lab

You will create tags in the ControlLogix processor that will refer to the PanelView Plus application.
You will also modify our ladder program to allow the PanelView Plus to control the meter and lights.

1. Open RSLogix 5000 software.

2. Go online with your controller in slot 1 running the “Analog and Beyond” project. Go to program
mode.

Create a tag called “photoeye” and alias it to our photoeye input bit from the DeviceNet lab.

3. Double click on “Controller Tags” in the project folder.

Double-click
here.

4. Select the “Edit Tags” tab on the bottom of the screen to go to edit tag mode.

5. Move the mouse down to the end of the tag list and enter a new tag, called “photoeye” in the
Tag Name column, but don’t hit enter yet.

6. Click in the Alias For column to the right of where you typed “photoeye.”

7. Click on the drop down arrow in the Alias For column. Drill down to your DeviceNet scanner. We
want to alias to the photoeye input bit that changes state when we break the photoeye.

HMI Lab (Rev 1.01)


3/9/2011 Page 8 of 30
8. After you select the bit, your screen should appear as follows.

9. Press enter on your keyboard and the tag will be complete. (Note: the Base Tag field will fill in
automatically for you. It keeps track of the original tag used in cases where alias tags reference
another alias tag.)

HMI Lab (Rev 1.01)


3/9/2011 Page 9 of 30
10. Create a tag called “start_stop_switch_from_PV.” Click in the Type column and change the type
from an DINT to a BOOL (boolean is another word for binary):

Select “BOOL” here to change


“start_stop_switch_from_PV
from a DINT to a BOOL.

11. When you are done press <enter>. Your completed tags should look like this:

Next we are going add a contactor to our existing ladder program to control the state of the
photoeye.

12. Double click on MainRoutine to bring up the ladder logic.

13. Right click on rung 0 and select “Start Pending Rung Edit”:

HMI Lab (Rev 1.01)


3/9/2011 Page 10 of 30
The “i’s” along the left hand side of the very top rung show that this is the rung being inserted.
The “r’s” along the left hand side of the rung below it show that this is the rung being removed.
That way, as you make a lot of changes to the very top rung, you’ll be able to look below it to
see the way the original rung looked.

14. Drag an XIC contact onto the inserted rung as shown below. Drop it when the circle to the right
of my_timer.dn turns green.

15. Double click on the question mark above the XIC contact and click on the drop down arrow.
Your screen should appear as follows: (notice that the “i’s” for insert change to “e’s” for edit
while the rung is being edited)

HMI Lab (Rev 1.01)


3/9/2011 Page 11 of 30
16. Scroll down until you find the tag name “start_stop_switch_from_PV” and select it. Your screen
should appear as follows:

HMI Lab (Rev 1.01)


3/9/2011 Page 12 of 30
17. Again, right click on rung 0. This time, select Accept Pending Rung Edits as shown below:

How will this rung work now? It will be similar to the way it worked before the change, except
that now the timer will be started and stopped through the PanelView Plus.

18. Select the save icon on the toolbar to save the project. Select “Yes” to upload current tag
values.

19. Put the project in Run mode. Notice that the photoeye logic still works, but the meter and lights
don’t work. That is because the contact we just added is currently off. We need to write our
PanelView Plus application so that we will be able to turn it on.

HMI Lab (Rev 1.01)


3/9/2011 Page 13 of 30
Lab 2: Create a Machine Level HMI Application
About This Lab

In this lab you will create a machine level HMI application that will tie to the project “Analog and
Beyond” in your slot 1 ControlLogix controller. The application will run on a PanelView Plus
terminal:
ƒ The application will read the status of the photoeye (beam broken or not)
This demonstrates how the operator can get information from the PanelView Plus to learn
status of a process (visualization of an event).
ƒ The application will turn on/turn off the meter and lights (with the help of a little modification in
our ladder logic)
This demonstrates how the operator can send information down to the controller from
PanelView Plus to control a process (the process will respond to an event that you initiate).

Create a Machine Edition Application

1. Double click the FactoryTalk View Studio icon on your desktop:

The following screen will appear:

2. Select Machine Edition, because our application is a machine level application. We would have
chosen one of the Site Edition applications if our application was to involve multiple computers,
machines and HMI devices.
HMI Lab (Rev 1.01)
3/9/2011 Page 14 of 30
3. Click Continue.

4. Click the New tab.

5. Enter application name “photoeye_and_startstop”:

6. Click Create to create your application.

Setup Communication Path to Controller

7. In the Application Explorer area on the left, click on the plus sign next to RSLinx Enterprise to
expand it. RSLinx Enterprise is the communication software for our HMI products to
communicate to our controllers.

8. Double click on “Communications Setup”.

9. Select “Create a new configuration” and click Finish. The following screen appears:

RSLinx Enterprise is a communication software for FactoryTalk View ME and SE.

HMI Lab (Rev 1.01)


3/9/2011 Page 15 of 30
If you are not familiar with the RSLinx Enterprise communication setup, here’s an explanation of
the Design (Local) and Runtime (Target) tabs:

Controller PanelView
Plus

ÅDesign pathÆ ÅRuntime path ->

Design tab: This defines the path from the controller (our data source) to the computer
running RSLinx Enterprise. In other words, the Design computer is the one on which we
are developing and testing our application.

Runtime tab: This defines the path from the controller (our data source) to the HMI
terminal running our ME application. In other words, the Runtime machine is where we
will download our ME application. In our case, the Runtime machine is the PanelView
Plus terminal.

10. Make sure you are in the Design (Local) tab.

11. Click the Add button under Device Shortcuts.

12. Change the name from “NEW SHORTCUT” to “A and B” and press Enter:

13. Let’s browse to our controller in the Design (Local) tab. Click on the plus sign next to the
Ethernet driver to expand it.

14. Find your station’s 1756-ENBT in the list and expand it.

15. Expand the backplane.

16. Select the 1756-L63 controller in slot 1, which is running our old friend Analog_and_Beyond
program. By selecting this, we are telling FTView Studio to go directly to this controller, over this
particular path, for our controller data. We’ll give a shortcut name to this path. From here on
out, we’ll be able to use the shortcut name to refer to this controller over this path.

HMI Lab (Rev 1.01)


3/9/2011 Page 16 of 30
17. Click Apply.

18. We want our Target device, the PanelView Plus, to use the same controller, so highlight the “A
and B” shortcut name.

19. Click the Copy from Design to Runtime button.

20. Click Yes to the following prompt to copy the same controller path for the Target device:

21. Go to the Runtime (Target) tab.

22. Collapse the EtherNet driver:

23. Click somewhere in the white space in the Device Shortcuts section:

HMI Lab (Rev 1.01)


3/9/2011 Page 17 of 30
24. Click on the “A and B” shortcut and notice the path to the controller is displayed.

25. Click OK to close the Communications Setup window. Our data source is now defined.

Create a 2-state Indicator to Display Status of the Photoeye

26. In the Application Explorer area, right click on Displays and select “New”. A display appears.
This is the screen where we will add our pushbuttons and indicators to allow us control and view
the machine.

27. We will create a Multistate Indicator to display the photoeye status. Go to the Menu bar, select
ObjectsÆIndicatorÆMultistate:

HMI Lab (Rev 1.01)


3/9/2011 Page 18 of 30
28. Draw an indicator on the display as shown below:

29. Double click on the Multistate Indicator to open its Properties.

30. We only need two states, States 0 and 1, to indicate the photoeye status, on or off. Click on the
States tab and select State3.

31. Click the Delete State button below it.

HMI Lab (Rev 1.01)


3/9/2011 Page 19 of 30
32. Delete State2 in the same manner.

33. Select State0 and fill in the Caption as shown below:

34. Click Apply.

35. Select State1.

36. Check the Blink checkbox. This will cause our message to blink.

37. Click the color square directly to the left of “Back color” and click on the red square. This will set
the indicator background color to red.

38. Type “Beam Broken” as the caption. The window looks like this:

39. Using the dropdown, change the Size to 18 and click Apply.

40. Click the Connections tab. This is where we will connect the Logix controller tag to the
Multistate Indicator.

HMI Lab (Rev 1.01)


3/9/2011 Page 20 of 30
41. Click the ellipses (the three dots) under the Tag column header.

42. In the Tag Browser, user can directly assign an HMI object to a tag inside the controller. Right
click photoeye_and_startstop and select Refresh All Folders:

43. Under “photoeye_and_startstop,” the shortcut communication path to our controller “A and B”
should appear. Expand the “A and B” folder.

44. Double click its Online folder.

45. In the right panel, select the tag “photoeye.” The tag should show up under the “Selected Tag”
box, as shown below:

46. Click OK. Notice the tag now shows up on the Connections tab. This is the real magic of the
ViewAnyWare products. With any other HMI, an “HMI” tag would have to be defined for the
multistate indicator, or for any other HMI object. Because ViewAnyWare products use
FactoryTalk Direct Tag Referencing, no separate HMI Tag Database needs to be created.

HMI Lab (Rev 1.01)


3/9/2011 Page 21 of 30
47. Click OK to close the Multistate Indicator Properties.

48. One last thing before we test our project. The default screen update is one second, which
seems like a long time. Right click on the white background of the display and select Display
Settings.

49. Change “”Maximum Tag Update Rate” to 0.05 seconds and click OK.

50. Click OK to the dialog.

51. Note the update rate will not change until the display is re-opened. Click OK:

52. Close our display and select Yes to the prompt to save:

53. Enter “PB and Indicator” for the display name and click OK.

54. Now, double click to reopen the PB and Indicator display from Application Explorer.

HMI Lab (Rev 1.01)


3/9/2011 Page 22 of 30
55. We have everything set up that we need in order to communicate with the controller, so let’s test
our work. FTView Studio has a Test Display button. Click it:

56. Pass your hand in front of the photoeye to break the beam. Then remove your hand. Notice the
indicator on your screen reflects the change. With an HMI application, text can be used to
describe what is happening. This is more descriptive than just turning a pilot light on and off.

57. Click the “Edit Display” button, also known as the stop button, which is directly to the right of
the Test Display button.

Add a Pushbutton to Turn the Meter On and Off

58. Click the Maintained Pushbutton icon as shown below:

HMI Lab (Rev 1.01)


3/9/2011 Page 23 of 30
59. Click and drag to draw the pushbutton as shown below:

60. Double click on the pushbutton to bring up its Properties.

61. Click on the States tab.

62. For State0, insert the Caption, “Press to Start”.

63. Click on State1.

64. If you desire, change the background color.

65. Change the Caption to “Press to Stop”.

HMI Lab (Rev 1.01)


3/9/2011 Page 24 of 30
66. Click Apply.

67. Click the Connections tab.

68. In the Value row, click the ellipses (the three dots) in the Tag column.

69. Select the “start_stop_switch_from_PV” tag, which resides right inside the controller. As
before, you will find the tag when you select the Online folder.

70. Click OK. We have just set up to write a value of 0 or 1 to the “start_stop_switch_from_PV” tag
in the controller. This can be observed on the States tab, in the Value field. The logic we
modified in RSLogix 5000 at the beginning of the lab will start and stop the timer based on this
push button.

71. Click OK to close the Pushbutton Properties.

72. Again, click the Test Display button and verify that the meter (AO0 in the demo box) starts and
stops based on clicking the push button.

73. Again, stop the display by clicking the Edit Display (stop) icon.

74. To exit the running HMI program on the PanelView Plus terminal, we’ll need to add a “Go to
Config” button to our screen. From the main menu, select ObjectsÆAdvancedÆGoto
Configure Mode.
HMI Lab (Rev 1.01)
3/9/2011 Page 25 of 30
75. Draw the Goto Configure Mode button somewhere on the screen, so that it is not touching the
other objects.

76. Double click on the Goto Configure Mode button.

77. Click on the Label tab.

78. Type the Caption, “Go to Configure Mode” or just shorten it to “Config”.

79. Click OK to close the Properties window. You screen should look similar to the following:

80. Close the display window.

81. Click Yes to save changes.

82. All we have to do now is set up which display we want the PanelView Plus to start with. In the
Application Explorer, double click “Startup” in the System folder.

HMI Lab (Rev 1.01)


3/9/2011 Page 26 of 30
83. Uncheck Alarms and Information messages check boxes, since we won’t need them in our
simple application.

84. Check the “Initial graphic” checkbox and use the dropdown to select “PB and indicator”:

85. Click OK.

Create a Runtime File and Run it on a PanelView Plus Operator Terminal

86. From the main menu, select ApplicationÆCreate Runtime Application. This will take the
project that we have been editing and create a runtime file which the PanelView Plus terminal
will actually run.

87. Click Save to accept the default file name, which is the name of your application. A “.mer”
(Machine Edition Runtime) file is created. This is the file that will be downloaded to the
PanelView Plus terminal.

HMI Lab (Rev 1.01)


3/9/2011 Page 27 of 30
88. From the main menu, select ToolsÆTransfer Utility. The following screen appears:

89. You should be in the Download tab.

90. For Source file, use the ellipses to select the photoeye_and_startstop.mer that you created
and click Open.

HMI Lab (Rev 1.01)


3/9/2011 Page 28 of 30
91. Under Select destination terminal, expand the Ethernet driver.

92. Select the IP address of your PanelView Plus operator terminal. Be careful not to select a
PanelView Plus at a different station.

93. Click the Download button.

94. Click Yes if you receive a Warning about overwriting a project which is currently in the
PanelView Plus.

95. Click OK to the dialog about the project being downloaded successfully.

96. Turn you attention to the PanelView Plus operator terminal. Touch the screen to wake it up
from screen saving mode. If you are using a PanelView Plus CE and seeing a Windows CE
desktop, double tap on the FactoryTalk View ME Station icon on the desktop.

97. At the ME Station Configuration Screen, press the Load Application button to load our runtime
application, photoeye_and_startstop.mer.

98. Using the up/down arrow buttons, select the “photoeye_and_startstop.mer” project that you just
downloaded.

99. Press the Load button the project.

100. Select Yes to update communications. Your application will now load.

101. Press Run Application to run the application.

102. Test the application with the blocking and unblocking the photoeye and starting and
stopping the timer from the PanelView Plus terminal.

Extra Task #1
Add a wall clock to your application. First, put the clock into your screen and test the screen.
You will find the clocks in the Application Explorer under LibrariesÆClocks. It will display the
time that is shown in the lower right hand corner of your computer monitor. Then, create a
runtime, download and run the application. The time that is displayed on the PanelView Plus
may or may not be the same as what was observed when you tested the display. To display the
correct time on the PanelView Plus, go to the Terminal Settings and set the time. Notice, under
Time Zones, that you can set the PanelView Plus to use Daylight Saving Time if you wish. Once

HMI Lab (Rev 1.01)


3/9/2011 Page 29 of 30
you set the time, close all the appropriate windows and run the application. The time that you
set will appear on your clock.

Extra Task #2:


Add a Numeric Display which displays the accumulated value of the timer. First test the screen,
then create a runtime and download and run the application. Notice how fast the accumulated
value updates on the PanelView Plus.

HMI Lab (Rev 1.01)


3/9/2011 Page 30 of 30

Anda mungkin juga menyukai