hmi integration hmi basics and adding a screen tutorial · 2019. 10. 16. · hmi integration hmi...

27
HMI Integration HMI Basics and Adding a Screen Tutorial Pg 1 of 29 Human Machine Interface Tutorial By: Wayne Leideker, Matthew Jourden and Caleb Seiter (Class of 2019) Brighton High School Brighton, MI Section 1 Creating the HMI Interface Project 1. Open CCW and Start a New Project > Project Name HMITutorial 2. From the Add Device window: a. Select the Micr850 family. b. Select 2080-LC50-24QBB c. Version 9 d. Select Add to Project

Upload: others

Post on 09-Mar-2021

16 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: HMI Integration HMI Basics and Adding a Screen Tutorial · 2019. 10. 16. · HMI Integration HMI Basics and Adding a Screen Tutorial Pg 6 of 29 BUT MAKE NO CHANGES- leave everything

HMI Integration HMI Basics and Adding a Screen Tutorial

Pg 1 of 29

Human Machine Interface Tutorial

By: Wayne Leideker, Matthew Jourden and Caleb Seiter (Class of 2019) Brighton High School Brighton, MI Section 1 Creating the HMI Interface Project

1. Open CCW and Start a New Project > Project Name HMITutorial

2. From the Add Device window: a. Select the Micr850 family. b. Select 2080-LC50-24QBB c. Version 9 d. Select Add to Project

Page 2: HMI Integration HMI Basics and Adding a Screen Tutorial · 2019. 10. 16. · HMI Integration HMI Basics and Adding a Screen Tutorial Pg 6 of 29 BUT MAKE NO CHANGES- leave everything

HMI Integration HMI Basics and Adding a Screen Tutorial

Pg 2 of 29

3. On the configuration screen for the M850 > Select the General tab and enter “HMI_Interface” for the name of this controller a. Set the IP Address (NOTE: This will be used later to connect the PLC to the HMI)

Select Ethernet

1. Select Configure IP address and Settings

2. Type in the IP Address

USE IP ADDRESS MARKED HMI

(NOTE Subnet Mask should automatically

fill in

Page 3: HMI Integration HMI Basics and Adding a Screen Tutorial · 2019. 10. 16. · HMI Integration HMI Basics and Adding a Screen Tutorial Pg 6 of 29 BUT MAKE NO CHANGES- leave everything

HMI Integration HMI Basics and Adding a Screen Tutorial

Pg 3 of 29

4. Assign Plug-In IO

a. Go to “Plug-In Modules and “Expansion Modules” and configure the I/O modules of your system as you have in previous labs.

Be sure to configure the properties of each I/O module as you did in previous lab as you will be rewriting ladder code to reuse these modules in the same fashion as in previous labs

5. Build and Save this portion

a. “Build” the Project b. “Save” the Project as “HMI_Interface”

OF4

TC-2 MEMBAK

IF4

Page 4: HMI Integration HMI Basics and Adding a Screen Tutorial · 2019. 10. 16. · HMI Integration HMI Basics and Adding a Screen Tutorial Pg 6 of 29 BUT MAKE NO CHANGES- leave everything

HMI Integration HMI Basics and Adding a Screen Tutorial

Pg 4 of 29

Adding the Human Machine Interface (HMI)

1. Select View drop down Menu > select “Device Toolbox” or Select Device Tool Box from the Right Hand Menu a. Expand “Graphic Terminals” b. Expand PanelView Component c. Double click on 2711C-T6T to add it to the Project.

Select Device Toolbox

in either Location

Engineering Lab has two Models

2711C-T6T

2711C-T7T

Difference between the two is

screen size. NOTE: Tutorial is

written for 2711C-T6T, but can be

adapted for 2711C-T7T. Be sure to

choose the proper HMI

Page 5: HMI Integration HMI Basics and Adding a Screen Tutorial · 2019. 10. 16. · HMI Integration HMI Basics and Adding a Screen Tutorial Pg 6 of 29 BUT MAKE NO CHANGES- leave everything

HMI Integration HMI Basics and Adding a Screen Tutorial

Pg 5 of 29

2. Double Click on PVc Application1 to open its properties

This is the configuration page for the HMI to Read & Write data to a specific controller.

3. A quick tour:

MAKE NO CHANGES- leave everything at default values at this time.

Take a moment to also explore the settings in “User Accounts”, Languages” and “Advanced”-

Communication Protocol to use with the PLC

Name, Type and address of the target PLC

Page 6: HMI Integration HMI Basics and Adding a Screen Tutorial · 2019. 10. 16. · HMI Integration HMI Basics and Adding a Screen Tutorial Pg 6 of 29 BUT MAKE NO CHANGES- leave everything

HMI Integration HMI Basics and Adding a Screen Tutorial

Pg 6 of 29

BUT MAKE NO CHANGES- leave everything at default values at this time.

4. Notice In the Project Organizer window, under PVc Application 1 there is a “Tags” database file.

We will be building these shortly. Tag names (addresses) in the HMI are very similar to those in the PLC- but they are

not the same identical tags. The tags from the HMI will be linked with the PLC

components.

PLC addresses (i.e. IO_EM_DI_00 (Push Button) turns on IO_EM_DO_00

(Physical Button) are already identifiable by their name and we know where they’re going

to & coming from. IO_EM is Inputs/Outputs Embedded in the PLC and DI or DO is digital IN

and OUT. In the HMI, we will create objects (indicators, push buttons, and analog displays)

that have tag names specific to and within the HMI and not in common to the PLC. These

HMI Tags will be mapped to a specific PLC to Write or Read data within that PLC (i.e HMI

Tag Example Mach_On which will get sent to the PLC linked to a tag (variable name)

HMI_PB_Mach_Start). This will give us the ability to use the HMI code on many machines,

all we need to do is make the I/O connections of the HMI mapped to the I/O connections of

the PLC. You should always name the HMI objects Tags and the mapped tag in the PLC in an

easy to understand format-and knowing that vernacular.

Example: If I have a pushbutton object on an HMI, and I want that button to turn on a motor. I name the HMI object, assign it a HMI tag name in the HMI Tags file, then map the HMI Tag name to a PLC Global Address. I touch the object, it turns on the HMI tag that has a mapped address in a specific PLC

In the HMI

Mach Start PB

Mapped address in PLC

HMI_PB_Mach_Start

Target PLC1

In PLC1

Global Connection in PLC

HMI_PB_Mach_Start

HMI Tag Name

To this PLC

Mapped to this address in the PLC

Global Input for Ladder Programming

Page 7: HMI Integration HMI Basics and Adding a Screen Tutorial · 2019. 10. 16. · HMI Integration HMI Basics and Adding a Screen Tutorial Pg 6 of 29 BUT MAKE NO CHANGES- leave everything

HMI Integration HMI Basics and Adding a Screen Tutorial

Pg 7 of 29

5. In the Project Organizer a. Double click on Screen 1 > Right click on the red box and ‘zoom in’ as much as you can > Then right click

again and select “Set as Startup”. This page will be the first page of possibly many to display.

6. If not already displayed a. Click on the “View’ pulldown tab > Select Toolbox > Then position the Toolbox close to Screen 1.

7. What is in that red box will be the objects of Screen 1 that we will create and map to the PLC. a. Highlight ‘Momentary Push Button’ and drag it over on the build pallet as shown.

Double Click on 1-Screen_1

To Open Window Right Click > Select Set as Startup

View Drop Down Menu > Select Toolbox

HMI Toolbox

Drag and Drop Momentary Push

Button on to Screen Area

HMI Screen Working Area

Page 8: HMI Integration HMI Basics and Adding a Screen Tutorial · 2019. 10. 16. · HMI Integration HMI Basics and Adding a Screen Tutorial Pg 6 of 29 BUT MAKE NO CHANGES- leave everything

HMI Integration HMI Basics and Adding a Screen Tutorial

Pg 8 of 29

8. Assigning Objects: Properties of this “Push Button” a. Double click on the blue box called “Released” > This brings up the “States” of this Momentary Push

Button, its ON state color, OFF state color, what it says when it’s OFF vs when it’s ON…Font, font size…etc. a. Change the following

1. Value 0 1. Background Color = Red 2. Caption Text = Off

2. Value 2 1. Background Color = Green 2. Caption Text = Start

b. Click on OK when finished

Your Momentary Push Button should look like this

c. Right click on the button and select Properties. This will bring up the properties of this object on Screen 1

At this time, please only change what the steps instruct you to change. You can make modifications later, but let’s keep your project looking like the instructions for the moment.

Appearance attributes of the Object

Location, Size & Name*

Connections to the PLC*

Navigation

*In Red denotes initial edits we will make in this lab

Changing Color

Select Color

Select box with … > this will

open color menu

Select Color > Select OK

This will change the color of

the button when pressed to

show the perpherial (i.e

motor) is running

State 3 is used if something goes wrong with this

connection it will throw an error message. It is

important to have a state that will represent an

error if something a link breaks between the HMI

and PLC

Drag Handholds to change

size or type in size in the

properties menu

Page 9: HMI Integration HMI Basics and Adding a Screen Tutorial · 2019. 10. 16. · HMI Integration HMI Basics and Adding a Screen Tutorial Pg 6 of 29 BUT MAKE NO CHANGES- leave everything

HMI Integration HMI Basics and Adding a Screen Tutorial

Pg 9 of 29

9. Object Name a. Under the ‘Properties’ for this object. b. Under Common- and at Name. c. Edit its name to “StartButton”.

10. Connections

a. Under the Connections Properties

b. Click on ‘Write Tag’

c. Click on ‘New’

d. Assigning HMI Tag Addresses

- This brings up the Tag Editor within the HMI Application.

- By setting a ‘Write Tag’ we’ll be mapping the HMI Object ‘StartButton’ to a Global tag in the PLC.

We can either use an existing PLC Global Tag or we can create one.

- Tag Name Mach_ON_PB_Req

- Data Type Boolean

Rename: StartButton

Select Write Tag > Select Down Arrow

Select New

Page 10: HMI Integration HMI Basics and Adding a Screen Tutorial · 2019. 10. 16. · HMI Integration HMI Basics and Adding a Screen Tutorial Pg 6 of 29 BUT MAKE NO CHANGES- leave everything

HMI Integration HMI Basics and Adding a Screen Tutorial

Pg 10 of 29

e. Click on Address

Your see the User Global Variable Tags that are in the PLC being displayed.

We could map the HMI Object Tag of Mach_ON_PB_Req directly to the IO_EM_DIO output that turns on the

Machine, but we would have no control over such direct connection, no ability to monitor, difficult to

troubleshoot, wouldn’t be able to duplicate the HMI code to work with other PLCs because their Input/Output

addresses may differ and worst of all- since this is a “Momentary” Push Button…

So- we will create a User Defined Tag in the PLC that we will map the HMI input to.

2.9 Assigning the PLC Tag that this HMI Tag writes to.

Type in the Name of “HMI_BP_Mach_ON”

Select Boolean for Type

This HMI tag

Mapped to

This PLC address

Click OK to close the PLC Tag entry

Back to the HMI Tag Properties, enter the following:

Name (tag Name)

This is a pulldown of the Controller(s) you assigned the HMI to communicate to.

Description

Descriptive text of the HMI tag, useful in determining what the Tag is or does

Page 11: HMI Integration HMI Basics and Adding a Screen Tutorial · 2019. 10. 16. · HMI Integration HMI Basics and Adding a Screen Tutorial Pg 6 of 29 BUT MAKE NO CHANGES- leave everything

HMI Integration HMI Basics and Adding a Screen Tutorial

Pg 11 of 29

2.10 Adding more HMI Tags and PLC Addresses

While we’re in the HMI Tag editor

Click on “Add” and add 2 more tags:

Go back to Screen1 pallet

Add another Momentary Push Button

and set its State Properties as follows

Assign the following Name and Tag

o Name: Stop Button

o Write Tag: Mach_Off_PB_Req

(Notice the HMI Write Tag was already there

in the tags in the pull down.

That’s because we created it in the HMI in the

previous step.

Name: Stop Button

Write Tag: Mach_Off_PB_Req

Page 12: HMI Integration HMI Basics and Adding a Screen Tutorial · 2019. 10. 16. · HMI Integration HMI Basics and Adding a Screen Tutorial Pg 6 of 29 BUT MAKE NO CHANGES- leave everything

HMI Integration HMI Basics and Adding a Screen Tutorial

Pg 12 of 29

2.11 Multistate Indicators

Add a Multistate indicator

By default, a Multistate indicator has (4) states.

We can add more if we wanted to- but the ‘read’

tag from the PLC would have to be BCD, Integer-

or something other than Boolean in order to

provide multiple states.

All we want is an On/OFF indicator

Double Click on the Multi-State Indicator on the

Highlight and delete States 3 & 4

o Select the State > Press Delete Key > Yes

Program the Multi-Indicator States as follows

Although we only need (2) states (OFF & ON), the best practice is to always be sure to leave the last state as an “Error”

state on all HMI Objects.

Your MultiState Indicator should look like this. OR OR

Depending on what state is actively selected from the properties menu of the button

Page 13: HMI Integration HMI Basics and Adding a Screen Tutorial · 2019. 10. 16. · HMI Integration HMI Basics and Adding a Screen Tutorial Pg 6 of 29 BUT MAKE NO CHANGES- leave everything

HMI Integration HMI Basics and Adding a Screen Tutorial

Pg 13 of 29

Problem is…the Height and Width isnt big enough to display the text.

3.0 Programminmg to Specifications

In HMI coding the the “customer’ of the machine gives the maching builder ‘specs’- guidlines or ‘standards’ to

follow for not only the PLC coding but also the HMI coding. Functionaliity, appearance, order of excution, colors and

layouts are all part of the “build specs’.

Industry standard it to keep everything uniform. Not only on all screen displays and their associated objects, but

also from maching to machine. So that no matter what screen or machine you’re on- the sizes, colors, locations, and

functionality are all the same.

So lets set a simple ‘spec’

Operator Pushbutton functionality:

All Pushbuttons are to be “Momentary” in scope

Number of STATES shall be 3 0=OFF, 1=ON, 3=Error

All PushButton Write Tags shall write to the Global Defined tags in the PLC database NOT directly to a DI or

DO assigned to the PLC.

Background and text color of standard control function BP’s shall be

STATE is OFF Blue background color / Black text /Arial Font size 14

STATE is ON Green background color / Black text /Arial Font size 14

Background and text color of STOP or EMERGENCY STOP function BP’s shall be

STATE is OFF Red background color / Black text /Arial Font size 14

STATE is ON Red background color / Black text /Arial Font size 14

Operator Multistate Indicators

Number of STATES shall be 3 0=OFF, 1=ON, 3=Error

Background and text color of standard control function Multistate indicators shall be

Informational State;

STATE is OFF Blue background color / Black text /Arial Font size 14

STATE is ON Green background color / Black text /Arial Font size 14

Safety State;

Not SAFE STATE OFF= Red background color / Black text /Arial Font size 14

SAFE STATE ON = Green background color / Black text /Arial Font size 14

Caution STATE;

Not SAFE STATE OFF= Red background color / Black text /Arial Font size 14

SAFE STATE ON = Yellow background color / Black text /Arial Font size 14

Background and text color of STOP or EMERGENCY STOP function BP’s shall be

STATE is OFF= Red background color / Black text /Arial Font size 14

STATE is ON = Red background color / Black text /Arial Font size 14

Multi-State Indicator Properties

Select Multi-State Indicator > Select

Properties > Set Read Tag to Mach_is_ON

Page 14: HMI Integration HMI Basics and Adding a Screen Tutorial · 2019. 10. 16. · HMI Integration HMI Basics and Adding a Screen Tutorial Pg 6 of 29 BUT MAKE NO CHANGES- leave everything

HMI Integration HMI Basics and Adding a Screen Tutorial

Pg 14 of 29

For commonality between all screens the screen layout shall consist of the following.

Using the programming ‘standard’, before we go any further on our HMI code:

3.1 On Scteen1:

From the Toolbox Select Rectangle and Drag a rectangle in the space below

Add the following (2) rectangles to the screen and set accordingly its attributes in the property field.

For the top rectangle

And for the bottom rectangle

Operator Information

And Process Function Read / Write

data

Machine Function Status & Message area Machine Status heads up display area

Basic Machine Control area

Color of Infill

Color of Perimeter of rectangle

Type of line for perimeter of rectangle

Height of Rectangle based on Font Size

Justification

Spaces down from the top

Width of Rectangle based on Font Size

Page 15: HMI Integration HMI Basics and Adding a Screen Tutorial · 2019. 10. 16. · HMI Integration HMI Basics and Adding a Screen Tutorial Pg 6 of 29 BUT MAKE NO CHANGES- leave everything

HMI Integration HMI Basics and Adding a Screen Tutorial

Pg 15 of 29

Position the objects as shown,

(drag and drop using each objects properties box to adjust the

‘top’ height so the buttons are even and symmetrical in

appearance)

NOTE: May resize the buttons by selecting the button and

dragging the handholds

NOTE: If the button passes behind the gray rectangle border >

right click on the button > Select Bring to Front

In the top rectangle, enter a text box that says

MACHINE STATUS

Button Behind Object Select Button > Right

Click > Bring To Front

Button in Front of Object

Page 16: HMI Integration HMI Basics and Adding a Screen Tutorial · 2019. 10. 16. · HMI Integration HMI Basics and Adding a Screen Tutorial Pg 6 of 29 BUT MAKE NO CHANGES- leave everything

HMI Integration HMI Basics and Adding a Screen Tutorial

Pg 16 of 29

Edit its properties as follows

Final Screen should look as follows

Final Steps and then we’ll test this (1) screen

Change each of

the marked

features to what is

shown

NOTE: For Size

may drag

handholds to

resize

Page 17: HMI Integration HMI Basics and Adding a Screen Tutorial · 2019. 10. 16. · HMI Integration HMI Basics and Adding a Screen Tutorial Pg 6 of 29 BUT MAKE NO CHANGES- leave everything

HMI Integration HMI Basics and Adding a Screen Tutorial

Pg 17 of 29

In the Project Orginizer

Right click on the PVc Application1

Click on Validate

Validating the HMI program checks for ojjectts

with missing tags, overlapping, missing PLC paths,

ect.

Correct errors you may have.

If all your code is good and validates-

you should get only (1) warning that says

“…must contain at least 1 GOTO Config Button

If the Operator needs to access the configuration

screen”

The ability to stop the screens from running on the

HMI (called the runtime application) and return to

the “Configuration Screen” is something we need

during development and debug.

Select the PVcApplication1 > Right Click > Select Validate

Page 18: HMI Integration HMI Basics and Adding a Screen Tutorial · 2019. 10. 16. · HMI Integration HMI Basics and Adding a Screen Tutorial Pg 6 of 29 BUT MAKE NO CHANGES- leave everything

HMI Integration HMI Basics and Adding a Screen Tutorial

Pg 18 of 29

Section 3: Download HMI Program to HMI Interface

In the final code we can prevent the customer from accessing the HMI Configuration screen by always having our

“runtime’ execute on power up of the HMI, by removing access to stopping it, or requesting a password to access the

Configuration of the HMI.

1. Add the GoTo Congiguration button

a. Close the Validation window

b. From Toolbox >Drag and Drop

GoTo Terminal Configuration object

c. Place it on the screen as shown below

d. Change the name to ‘Config’

e. Re-Validate your Vc Application- you should

have no errors or warnings.

Invalid code may not download

or may not run corrwectly.

Wire the Ethernet PLC to HMI

Wire the a ethernet cord into the back of the HMI and connect it to the Ethernet port in the PLC

Ethernet to PLC Ethernet to HMI

Page 19: HMI Integration HMI Basics and Adding a Screen Tutorial · 2019. 10. 16. · HMI Integration HMI Basics and Adding a Screen Tutorial Pg 6 of 29 BUT MAKE NO CHANGES- leave everything

HMI Integration HMI Basics and Adding a Screen Tutorial

Pg 19 of 29

Download Code using USB Port 1.Plug in USB Drive to Computer

2.Right Click on PVcApplication1 > Select Export > Navigate to USB Port save file. (NOTE file extentsion is a .cha)

2. Downloading the HMI ‘runtime’ application

a. Main Screen:

a. File Manager: Allows user to run various programs

downloaded to HMI

b. Communications: Allows user to setup IP address for

ethernet communication

c. Display: Allows user to adjust brightness, timeout (sleep)

Calibration of Touchscreen, etc.

d. System Information: Allows user to see firmware version

and open memory

e. Date and Time: Allows user to integrate year, day

and time into their program

b. Select (Press) File Manager > Following screen will appear

HMI T6T Models ONLY: DO NOT ever delete this file. It

controls the setup for the HMI

Page 20: HMI Integration HMI Basics and Adding a Screen Tutorial · 2019. 10. 16. · HMI Integration HMI Basics and Adding a Screen Tutorial Pg 6 of 29 BUT MAKE NO CHANGES- leave everything

HMI Integration HMI Basics and Adding a Screen Tutorial

Pg 20 of 29

c. Select the up arrow from the USB until the source is USB > Programs (.cha files) should show up (If not

unplug the USB and replug it in) > Select (Press) Copy to transfer the code to the HMI to run the program >

Switch Source to Internal > Highlight Program > Run

d. After Copied program to HMI > Switch Source back to Internal

e. Highlight the program to be run > Select (Press) Run

Move Arrow to select

USB Source

Select Run when the program to

run is selected from the USB

Select Copy to transfer file to HMI

Harddrive

Page 21: HMI Integration HMI Basics and Adding a Screen Tutorial · 2019. 10. 16. · HMI Integration HMI Basics and Adding a Screen Tutorial Pg 6 of 29 BUT MAKE NO CHANGES- leave everything

HMI Integration HMI Basics and Adding a Screen Tutorial

Pg 21 of 29

2. Setup IP Address on HMI to communicate to the PLC

a. Select Main to get back to the Main Screen > Select Communications > Select (Press) Set Static IP Address

b.IP Address: Type in the following IP Address USE IP Address Marked on HMI

(NOTE: IP address is different from the PLC so the two machines will be able to talk to each other without

overwriting each others data.)

c.Mask: Subnet Mask will be the same for both the PLC and HMI at See HMI

Select Set Static IP Address

USE IP Address and Subnet

Marked on PLC Training Board

Page 22: HMI Integration HMI Basics and Adding a Screen Tutorial · 2019. 10. 16. · HMI Integration HMI Basics and Adding a Screen Tutorial Pg 6 of 29 BUT MAKE NO CHANGES- leave everything

HMI Integration HMI Basics and Adding a Screen Tutorial

Pg 22 of 29

Write the PLC Code Create the following ladder program called Machine Ops and enter the following;

Build, download and test your HMI screens.

Save your Project

Response time may seem a little slow.

That’s because of the priority given to the local I/O updates, PLC housekeeping and Class 3 packet priority.

Within 1 scan (or update) interval of a PLC it must prioritize what is the most important data to handle first, then

housekeeping, followed by non-critical updates, and it will repeat that cycle on every update interval.

These are defined by (3) types of Class Messaging

Updating the I/O is called the “I/O Update Interval.

In PLCs it’s referred to as “Class 1 Messaging” which means priority scan time is reserved to read in the Inputs,

execute the PLC code, and write the Outputs to local I/O first.

The time it takes to do that is not a user adjustable time. It is what it is.

If a system has 100 Inputs, 100 lines of Code and 50 outputs the I/O update interval could be 10ms.

If a system has 1000 Inputs, 1000 lines of Code and 150 outputs the I/O update interval could be 250ms.

Poor programming practices or large function blocks that move or do large mathematical functions on a large data

file can eat up a lot of time. To cut down on the scan time of the ladder, prioritize the importance of the rungs.

i.e. if a push button is to start a multiplication instruction on a large file or word, then comparison of the resultant

to another file, then turn on an Output- put the condition in the beginning of the rung.

If the condition is false, then the whole rung is skipped. If true, only then does the processor execute it.

In programming any PLC controlling a machine the I/O update time is a critical element of the functionality and

safety of a machine.

? Why?

? What could happen if the time to read Inputs, update ladder and write outputs is excessively long?

Class 2 Messaging in a PLC is reserved for ‘housekeeping’ which means after the local I/O scan the PLC takes care

of internal priorities i.e. clearing buffers, clock update, processor status etc..

This is called the PLC’s “Overhead Time Slice” and is shared with the Class 3 Messaging. While this time (in some

PLC’s) is adjustable, the minimum it can be adjusted to is the minimum it takes to take care of the housekeeping.

Page 23: HMI Integration HMI Basics and Adding a Screen Tutorial · 2019. 10. 16. · HMI Integration HMI Basics and Adding a Screen Tutorial Pg 6 of 29 BUT MAKE NO CHANGES- leave everything

HMI Integration HMI Basics and Adding a Screen Tutorial

Pg 23 of 29

Class 3 Messaging in a PLC is reserved for non-critical I/O update and is taken care of with whatever time is left

over, or shared with Class 2 Messaging, the Overhead Time Slice.

Class 3 messages are user triggered events like a print instruction, end of shift reports and HMI communications.

The % or Overhead Time slice allowed for class 3 messaging will determine how much time is allowed to take care

of these types of I/O update- before the scan has to stop and go back and execute class 1 and class 2 update. So it

is possible that it could take several system scans for a Class 3 message to complete.

If the Class 3 message is a very large data packet, and time runs out, then a marker is placed where the processor

left of and the processor executes the Class 1 and 2 again- then continues where it left off on the class 3 packet.

? Why then, would you NEVER want to put an Emergency Stop Button on an HMI screen?

Read in all Inputs

Scan Logic

Write all Outputs

Internal Operations (Class 2)

Class 3 HMI

1 Processor Scan

Start

Page 24: HMI Integration HMI Basics and Adding a Screen Tutorial · 2019. 10. 16. · HMI Integration HMI Basics and Adding a Screen Tutorial Pg 6 of 29 BUT MAKE NO CHANGES- leave everything

HMI Integration HMI Basics and Adding a Screen Tutorial

Pg 24 of 29

Now, let’s put in some permissive conditions

When the Start Machine button is depressed, it turns on the machine but in order to keep the machine on it must

also turn in the air compressor and achieve a certain amount of pressure.

Air pressure below or above certain set points may cause damage to the machine or produce inferior parts and/or

operation.

Next you will add some PLC code that will simulate turning on an air compressor and monitoring the pressure to

allow the machine to remain on.

You will write PLC code:

• If the air pressure does not achieve a preset value, the machine will not turn on.

• If the air pressure is not maintained at a certain minimum- the machine shuts off.

• If the air pressure exceeds a certain maximum- the machine shuts off.

The 10v potentiometer will simulate the pressure switch

You will write HMI code to:

Display on the HMI what the actual air pressure reading is.

Turn on indicators that the air pressure is Off, LOW, OK, or HIGH

PLC Code

Enter the Ladder into Machine_Ops (as shown on the following page)

PLC tag names will be as follows

Pay attention to the preset values you are to enter and the data types

Page 25: HMI Integration HMI Basics and Adding a Screen Tutorial · 2019. 10. 16. · HMI Integration HMI Basics and Adding a Screen Tutorial Pg 6 of 29 BUT MAKE NO CHANGES- leave everything

HMI Integration HMI Basics and Adding a Screen Tutorial

Pg 25 of 29

Page 26: HMI Integration HMI Basics and Adding a Screen Tutorial · 2019. 10. 16. · HMI Integration HMI Basics and Adding a Screen Tutorial Pg 6 of 29 BUT MAKE NO CHANGES- leave everything

HMI Integration HMI Basics and Adding a Screen Tutorial

Pg 26 of 29

Local Variables

Global Variables

? Why should you program some of the User defined addresses only Local to Machine Ops while others are in the

Global Variables?

6.2 In the HMI – add the following:

You can also take this time to cosmetically clean up the screen if you want.

Was the white background too bright? – try grey.

Buttons to small? Change height and width.

But everything must be kept symmetrical as this will be a template in later labs.

On Screen 1, from the toolbox add a multi-level indicator set it for

Page 27: HMI Integration HMI Basics and Adding a Screen Tutorial · 2019. 10. 16. · HMI Integration HMI Basics and Adding a Screen Tutorial Pg 6 of 29 BUT MAKE NO CHANGES- leave everything

HMI Integration HMI Basics and Adding a Screen Tutorial

Pg 27 of 29

? What should the ‘Read Tag” be set to for this Multistate Indicator?

Hint- we want the Air Pressure status word

Add a Numeric Input to read “AirPressure” with a number of digit set to 5 and decimal point of 1.

Your screen should look like this

Validate and download (either via Ethernet or USB)

Download the PLC code to the M850

SAVE YOUR PROJECT

Turn the pot down to 0

Press and hold the start button

? Does the HMI show the Machine stays ON?

Using the potentiometer to simulate air pressure-

Press and hold the start button

Increase the pot. to simulate an air pressure between the low and high set points of 100-120psi

? When you let go of the Start Button- does the Machine stay on?

? What happens if the pressure goes above or below set points?

? Explain rung 3- what are we looking for.

? Why is Air status OFF is considered to be less than 1? Why not 0?

Build, download and test your HMI screens.

Save your Project