Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Recipes for HMi

Technical Document

December 2006

Page 1 of 14 TDxxxxx
For more information visit www.eatonelectrical.com
Table of Contents
Section Page

Overview 3

System BOM 3

Software Configuration 3

Procedures 7

Sample Application 1: Two-Step HMI=>PLC 8

Sample Application 2: PLC Logic for Loading Recipes 9

Sample Application 3: One-Step HMI=>PLC 10

Sample Application 4: Edit the Selected Recipe from HMi 11

Sample Application 5: Save D-register Values to Recipe 12

Sample Application 6: Edit the Full Recipe Table 14

Page 2 of 14 TDxxxxx
For more information visit www.eatonelectrical.com
Overview
This technical document demonstrates using recipes for the HMi operator interface.
First, the software is configured for recipes and passwords. Procedures are given to
explain the flow of events. Then, examples are shown.

System BOM
HmiSoft Software
HMi unit
PLC (ELC recommended)

Software Configuration
1. In the HMiSoft Software, select Options->Configuration from the menu bar.

2. In the Control Block->Size drop down, change the value to 8. The Control Block
address for our examples is D0 and the Status Block is D10.

Page 3 of 14 TDxxxxx
For more information visit www.eatonelectrical.com
The Control Block sets aside the registers designated for the Control Area. The
registers in the Control Area are used to control HMi functions, such as screen
number, backlight status, buzzer status, history flags, and recipes from a PLC. In this
example, we selected registers D0-D7 as the control area. The highlighted registers
and bits in the tables below are used for recipes.

For Word Number 5, the following bits are significant:

In our example:

D5 Recipe Control Register (R/W)


Bit0 - Change
Bit1 - Read
Bit2 – Write

D6 Recipe No. (R/W)

Also, note the Status Block address. The Status Block contains registers that are
used by the HMi to report the state of the HMi and contains eight words.

For Word Number 5, the following bits are significant:

Page 4 of 14 TDxxxxx
For more information visit www.eatonelectrical.com
In our example:

D15 Recipe State Register (R)


Bit0 – Change
Bit1 – Read
Bit2 – Write

D16 Current Recipe No. (R)

3. Select Options->Recipe Setup from the menu bar.

4. Fill in the Recipe Setup Dialog box.

Check the Enable Recipe Check box. Select the first address to be set aside for
recipe values by clicking on the ellipsis following the Address box, selecting a register
type from the Device Type drop down, entering the starting register in the Address
text box, and clicking the OK button. Choose the length of the recipe and number of
recipes. Click the Input button. In this example, Address D100, Length 5, and
Recipe # 3 was selected. Fill in the values for your recipe or import from a .csv file
(MS Excel can be used to make .csv files. Click SaveAs when saving in Excel). It is
good engineering practice to save your recipe on disk. Click OK when done entering
the recipe.

Page 5 of 14 TDxxxxx
For more information visit www.eatonelectrical.com
In our example

D100- The values for the current recipe running in the PLC (R/W)
D103
D104 The current recipe number that is running (R/W)

The system also allows the programmer to access internal memory locations through
variables that act as pointers. The following picture shows the system variables
corresponding with recipes:

The first row of the table points to the recipe values found in RCPNO. The subsequent
rows point to the recipes stored in the HMi.

In our example

RCPNO The selected Recipe (R/W)

RCP0- The values stored in the selected Recipe (R/W)


RCP4

RCP5- The values stored in the first Recipe (R/W)


RCP9

RCP10- The values stored in the second Recipe (R/W)


RCP14

RCP15- The values stored in the third Recipe (R/W)


RCP19

If RCPNO=2, then RCP0 and RCP10 will be the same, RCP1 and RCP11 will be the
same, RCP2 and RCP12 will be the same, RCP3 and RCP13 will be the same, and
RCP4 and RCP14 will be the same. Any changes to one will affect the other.

Page 6 of 14 TDxxxxx
For more information visit www.eatonelectrical.com
Procedures
These procedures assume the control registers, status registers, and recipes are setup
as listed above.

In the following procedures, steps 1 and 2 are identical.


The purpose of steps 1 and 2 are to update the RCPNO HMi internal memory
location from the PLC. These steps are useful because some applications require an
extra step for confirmation before changing or editing the recipe. Steps 1 and 2 can be
skipped when writing directly to RCPNO in internal memory, which will bypass updating
the control and status registers RBIR (D6) and RBSR (D16).

1. Place requested Recipe No. in D6.


2. Place the value of 1 in D5 (turn bit 0 on). The following occurs automatically:
a. The bit 0 value of D5 returns to 0 and a value of 1 is copied to D15. (bit 0).
b. The HMi internal memory values for RCP common area are updated with the
selected recipe values (RCPNO and RCP0-RCP4) and the Recipe No. in D6 is
copied to D16.
c. The bit 0 value of D15 returns to 0.

To transfer Recipe values from HMi to PLC:


3. Place the value of 4 in D5 (turn bit 2 on). The following occurs automatically:
a. The bit 2 value of D5 returns to 0 and a value of 2 is copied to D15. (bit 1).
b. The values for D100-D104 are updated with the selected (RCPNO) recipe
values.
c. The bit 2 value of D15 returns to 0.

To transfer Recipe values from PLC to HMi:


3. Change the values in D100-D104.
4. Place the value of 2 in D5 (turn bit 1 on). The following occurs automatically:
a. The bit 1 value of D5 returns to 0 and Bit 1 is turned on in D15.
b. The recipe values (RCP0-RCP4) are updated with the values from D100-D104.
c. The bit 1 value of D15 returns to 0.

To change the Recipe values in the HMi without affecting the PLC:
3. Change the values of RCP0-RCP4.

In addition, the values in RCP5-RCP19 can also be changed directly.

Page 7 of 14 TDxxxxx
For more information visit www.eatonelectrical.com
Sample application one: Two-Step HMI=>PLC
This HMi screen shows the HMi selecting the Recipe Values to load. The arrow buttons
are increment/decrement elements, with a limit of one and three. The “select” button is a
set constant element and is setting the value of D5 to be a “1” (bit 0 on). The “confirm”
button is a set constant element and is setting the value of D5 to be “4” (bit 2 on). The
elements reading D registers are pre-stored message elements. In addition, the different
sections or steps should be placed on separate screens and password protected to
ensure proper flow and access.

Page 8 of 14 TDxxxxx
For more information visit www.eatonelectrical.com
Sample application two: PLC Logic for Loading Recipes
This ladder logic code fragment shows how the ELC can direct Recipe Values stored in
the HMi to load.

The HMi elements can close the M1 contact using a momentary button element.

Page 9 of 14 TDxxxxx
For more information visit www.eatonelectrical.com
Sample application three: 1-Step HMI=>PLC
This HMi screen shows the HMi selecting the Recipe Values to load. The arrow buttons
are increment/decrement elements, with a limit of one and three. The load button is a set
constant element and is setting the value of D5 to be “4” (bit 2 on). In addition, the
different sections or steps should be placed on separate screens and password protected
to ensure proper flow and access. Note, the control and the status registers D6/D16
are not updated in this example.

Page 10 of 14 TDxxxxx
For more information visit www.eatonelectrical.com
Sample application four: Edit the Selected Recipe in HMi
This HMi screen shows the HMi editing the Recipe value stored in the HMi. The D
register values are not affected in the PLC. The arrow buttons are increment/decrement
elements, with a limit of one and three. The Numeric Entry element writes to the HMi
internal memory locations RCP#. The input mode property for the Numeric Entry
element allows the operator to use the keypad if it selected to touch non pop up. In
addition, the different sections or steps should be placed on separate screens and
password protected to ensure proper flow and access. Note, the control and the status
registers D5/D6/D15/D16 are not updated in this example.

Page 11 of 14 TDxxxxx
For more information visit www.eatonelectrical.com
Sample Recipe Five: Save D-register Values to Recipe
In this example, the operator changes values in the D registers, and then decides to save
the current configuration as a Recipe in the HMi. The Numeric Entry element writes to
the ELC base port values of the D registers. The input mode property for the Numeric
Entry element allows the operator to use the keypad if it selected to touch non pop up.
The arrow buttons are increment/decrement elements, with a limit of one and three. The
Select button is a set constant element and is setting the value of D5 to be “1” (bit 0 on).
The Update with D Register Values button is a set constant element and is setting the
value of D5 to be “2” (bit 1 on). After Execute Macros are used to keep D104 and D6 the
same. In addition, the different sections or steps should be placed on separate screens
and password protected to ensure proper flow and access.

Page 12 of 14 TDxxxxx
For more information visit www.eatonelectrical.com
In order to ensure D104 stays equal to the recipe #, the following macro needs to be entered.
Select Before Execute Macro in the properties box for the Set Constant element that is labeled
Update with D-register values.

Enter the following lines in the macro editor. This macro takes the value in RCPNO and copies it
to D6. It will run once immediately following the operator pressing the button, but before the
constant is written. The 1@ selects the PLC station number.

Page 13 of 14 TDxxxxx
For more information visit www.eatonelectrical.com
Sample Application Six: Edit the Full Recipe Table
This sample application shows a screen that allows the operator to change the values of
the recipes inside the HMi directly. The Numeric Entry element writes to the internal
memory values of RCP#. The input mode property for the Numeric Entry element allows
the operator to use the keypad if it selected to touch non pop up. Note, the control and
the status registers D5/D6/D15/D16 are not updated in this example.

Page 14 of 14 TDxxxxx
For more information visit www.eatonelectrical.com

You might also like