Project example – Lenze VisiWinNet VisiWinNET Smart Benutzerhandbuch

Seite 222

Advertising
background image

Project example

Defining visualisation recipes

4

l

222

SHP−VWNS DE/EN 6.1

Properties for control elements

No. Control element

type/Property

Value

Comments

1

VarIn

Display/Text

VarIn1

VisiWinNET/VwItem

Variable "w1"

2

VarIn

Display/Text

VarIn2

VisiWinNET/VwItem

Variable "w2"

3

CommandButton

Display/Text

Save

VisiWinNET/Events

The click event is to be logically linked to calling of the "GetRecipe"
function of the "RecipeClassHandler" component. Click the [...] button in
the "Events" property to open the ""Event Processing" dialog. Select the
Click event and click the Select command button. In the function selection
dialog which now appears, select the above−named function. After closing
the function selection dialog, make sure that the function appears in the
function list and that its "Provider" parameter refers to the
"RecipeClassHandler" component of the form.

4

CommandButton

Display/Text

Load

VisiWinNET/Events

The click event is to be logically linked to calling of the
"ShowLoadRecipeDialog" function of the "RecipeClassHandler"
component.

5

RecipeClassHandler

VisiWinNET/Events

l

The"GetDoneSucceeded" event is to be logically linked to calling of the
"ShowSaveRecipeDialog" function of the "RecipeClassHandler"
component.·

l

The "LoadDoneSucceeded" event is to be logically linked to calling of
the "SetRecipe" function of the "RecipeClassHandler" component.

After being saved, the results of the events thus parameterised are as
follows:·

l

The Click event triggers the "GetRecipe" function. As a result, the values
of the variables defined as recipe elements are loaded into the recipe
buffer.·

l

Conclusion of the reading−in process is signalled by the
RecipeClassHandler in the "GetDoneSucceeded" event. This, in turn, is
logically linked to the "ShowSaveRecipeDialog" function. This is how
saving of the recipe file is handled during the runtime, whereby a
dialog for entering the name and description appears before saving is
carried out.

The reverse procedure is triggered by means of the Load command button.
First, a selection dialog is used to load a recipe file into the recipe buffer,
from where it is then transferred to the process.

VisiWinNET/ReceipeClass

RecipeClass 1

The name of the recipe definition
from the project database.

This example makes practically no use of the recipe buffer. In many applications, it may be
sufficient if recipes are created and optimised directly in the process.

However, use of the recipe buffer make sense if production settings that are not permitted
to change the values in the process during the setting procedure are to be made by means
of the application. Only after completion of the settings can the data be transferred in one
go to the process.

In the "SmartDemo" project, an example is given of how to use the recipe buffer.

Advertising