Transferring Recipe Data with Variables

Use the variable to select the recipe and transfer recipe data to external device.

Example Operation

Setting Workflow

  1. Add Variables
  2. Set the Recipe Control
  3. Add Recipe Family
  4. Add Recipe Group
  5. Add Recipes
  6. Add Ingredients
  7. Set Ingredient Values
  8. Set up Parts
  9. Set up Scripts

 

Add Variables

Project Explorer : [Variables] ➞ [All Variables]

Add the following variables.

Variables properties :

[Name] [Data Type] [Source] [Device Address] [Number of Bytes/Words]

Var1

[STRING]

'Schneider Modbus Serial Equipment'

400001 10

Var2

[BOOL]

400010,00 -

Var3

[INT]

400020 -

Var4

[INT]

400021 -

Var5

[INT]

400022 -

Var6

[BOOL]

400010,01 -

Var15

[INT]

400025 -

Var16

[INT]

400026 -

Var17

[INT]

400027 -

Set the Recipe Control

Project Explorer : [Recipes] ➞ [Control]

Set the Recipe Control as follows.

[Control] properties :

Tab Property Value

[Basic]

[Recipe Family ID] [Variable] [Name]: Var15
[Recipe Group ID] [Variable] [Name]: Var16
[Recipe ID] [Variable] [Name]: Var17

Add Recipe Family

Project Explorer : [Control]

Add the following recipe family.

Recipe Family (Name : RecipeFamily1) properties :

Tab Property Value

[Basic]

[Label] Product A

Add Recipe Group

Project Explorer : [RecipeFamily1]

Add the following recipe group to [RecipeFamily1].

Recipe Group (Name : RecipeGroup1) properties :

Tab Property Value

[Basic]

[Label] X Series

Add Recipes

Project Explorer : [RecipeGroup1]

Add the following Recipes to [RecipeGroup1].

[Recipe] properties :

[Name] Property Window
Tab Property Value
[Recipe1] [Basic] [Label] Model1
[Recipe2] Model2
[Recipe3] Model3

Add Ingredients

Project Explorer : [RecipeGroup1]

Add the following ingredients to [RecipeGroup1].

[Ingredient] properties :

[Name] Property Window
Tab

Property

Value
[Ingredient1] [Basic] [Label] Code
[Value] [Variable] [Name]: Var1
[Ingredient2] [Basic] [Label] Coating
[Value] [Variable] [Name]: Var2
[Ingredient3] [Basic] [Label] Temperature
[Value] [Variable] [Name]: Var3
[Min Input] 0
[Max Input] 100
[Ingredient4] [Basic] [Label] Time
[Value] [Variable] [Name]: Var4
[Min Input] 0
[Max Input] 100
[Ingredient5] [Basic] [Label] Weight
[Value] [Variable] [Name]: Var5
[Min Input] 0
[Max Input] 200

Set Ingredient Values

Project Explorer : [RecipeGroup1]

To set recipe values of ingredients, from Document View click [Select Recipes] [Select All Recipes] ➞ [OK].

 

The Recipe1, Recipe2, and Recipe3 columns display to the right of the Document View.

Properties of the Columns of [Recipe1][Recipe2] and [Recipe3] :

[Name] Document Window

Property

Value

[Ingredient1] [Recipe1] AAAAA
[Recipe2] BBBBB
[Recipe3] CCCCC
[Ingredient2] [Recipe1] On
[Recipe2] Off
[Recipe3] Off
[Ingredient3] [Recipe1] 40
[Recipe2] 37
[Recipe3] 38
[Ingredient4] [Recipe1] 60
[Recipe2] 20
[Recipe3] 30
[Ingredient5] [Recipe1] 120
[Recipe2] 60
[Recipe3] 90

Set up Parts

Project Explorer : [Screen Design] ➞ [Screens] ➞ [Screen1]

Drag and drop the following objects from the [Tool Chest] to the screen.

Numeric Display object (Name: NumericDisplay1) properties : D-1

Tab Sub Tab Property Value

[Function]

[Basic]

[Current Value]

[Variable] [Name]: Var15

Numeric Display object (Name: NumericDisplay2) properties : D-2

Tab Sub Tab Property Value

[Function]

[Basic]

[Current Value]

[Variable] [Name]: Var16

Numeric Display object (Name: NumericDisplay3) properties : D-3

Tab Sub Tab Property Value

[Function]

[Basic]

[Current Value]

[Variable] [Name]: Var17

Ingredient Viewer object (Name: IngredientViewer1) properties : B-1

Default value.

Switch object (Name: Switch1) properties : C-1

Default value.

Set up Scripts

Project Explorer : [Screen1]

Set the following script on the object.

From the [Tool Chest] drag and drop the script to the Script editor.

Switch object (Name: Switch1) script : C-1

Legend Block

1

[Triggers] [Touch] [Touch]

2

[Operations] ➞ [HMI Functions] [Recipe]

3

[Values] [Screen Object]

Scripts for Transferring Recipes :

Legend Block

1

[Triggers] [Conditional] [Condition]

2

[Values] [Variable]

3

[Values] [Constant]

4

[Operations] ➞ [HMI Functions] [Recipe]