Section: Visu
SEC Visu //optional: yes, modifier: [UPDATE] Toplevel_Tab; //optional: yes, type: bool Embedded := [%PAGE_VISU%, <visu1>,...]; //optional: yes, type: VisuList Embedded_Proxy := [%PAGE_VISU%, <visu1>,...]; //optional: yes, type: VisuList Page =: [<visu1>, <visu2>,...]; //optional: yes, type: VisuList SEC DefaultEmbeddings //optional: yes SEC Embedding : <visu identifier> //optional: yes, modifier: [HIDE, UPDATE] VisuName := <visu name>; //optional: no, type: literal Target := <target name>; //optional: yes, type: literal ProxyVisuName := <visu name>; //optional: yes, type: literal LinkId := <linkID>; //optional: yes, type: literal END_SEC END_SEC SEC Toplevel_Tab_Hotkey //optional: yes Hotkey := <keycode>; //optional: no, type: literal Modifiers := <modifier>; //optional: yes, modifier: [SHIFT, CONTROL, ALT] END_SEC END_SEC
Details regarding the syntax of definition types are described in the section Module Declaration.
Toplevel_Tab
defines if the check box Create top-level tab in the HMI editor is activated or deactivated by default.Page
defines a list of available visualization objects for the module.Embedded
defines a list of available visualization objects of the submodule that will be embedded in other visualization screens.Using the placeholder
%PAGE_VISU%
instead of the visualization name allows that generated visualization screens optionally can be embedded in other screens.Embedded_Proxy
defines a list of available visualization objects of the module. The list is only used if adecoupled module
is inserted in adecoupled slot
and if it is not created below the controller of its father module instance (as a proxy).For modules, which import another module, the placeholder
%NONE%
can be used instead of the visualization name. This effects that the imported visualizations are hidden. This approach is possible for the list of visualization screens as well as for embedded (proxy-)visualization screens.Section:
DefaultEmbeddings
: This section serves for the specification of default embeddings, which then will appear as a pre-configuration on the HMI tab of a submodule (similar to section "Default_Allocation", seeSection: Slots
). The desired default embeddings are to be described in subsectionsEmbedding
.Requirement: The specified visualization object and the proxy must be available in the list of possible embeddings for the module (see above:
Embedded
andEmbedded_Proxy
).Section:
Toplevel_Tab_Hotkey
: This section defines a hotkey as default setting for the toplevel page. Keyboard shortcuts must not be used more than once. This setting can be adjusted in the module editor on the HMI tab.
SEC Visu Toplevel_Tab ; Page := [VISU_CNC_Machine_1, VISU_CNC_Machine_2]; Embedded := [%PAGE_VISU%]; SEC DefaultEmbeddings SEC Embedding : No1 VisuName := SubModule_Emb; Target := '../../TopLevel_2'; END_SEC SEC Embedding : No2 VisuName := SubModule_Emb_2; //ProxyVisuName := SubModule_Emb_1; Target := '';// leave empty for next ancestor END_SEC END_SEC SEC Toplevel_Tab_Hotkey Hotkey := T; Modifiers := SHIFT | CONTROL; END_SEC END_SEC
The visualization name is the name of the respective visualization object (not case sensitive). The visualization object must be in the same hierarchical level as the module function block.
All visualization objects and embedded visualization objects can have a VAR_IN_OUT variable with the name
inst
, which can be of the type of the module function block or of a base class. The variable name is not case sensitive.VAR_IN_OUT
inst : <MODULE_FB> ;
END_VAR
As an alternative to the option described here with VAR_IN_OUT, a VAR_INPUT variable can also be used. This variable must meet the following requirements:
Name:
inst
Type: Interface which the module function block implements
Embedded visualization objects can have two additional variables (the variable names are not case sensitive):
VAR_INPUT
paVisuFB : POINTER TO POINTER TO AC_Visu_Base ;
iOwnFrameIndex : INT ;
END_VAR
These variables must be defined together; it is not allowed to define one without the other. These two variables give embedded visualizations the ability to switch the central frame in the top-level visualization.
paVisuFB
is an array of pointers onAC_Visu_Base instances
. Use the global visualization variableCURRENTCLIENTID
to access the correct instance of the current client. The frame switching is performed by an ST action of the form:paVisuFB[CURRENTCLIENTID]^.uiFrameIdx := iOwnFrameIndex ;
iOwnFrameIndex
is the index that the visualization image of the own module has in this toplevel frame. (If the own module does not define a visualization image this index is -1.)Apart from the variables mentioned above, no other VAR_INPUT, VAR_OUTPUT or VAR_INOUT variables are allowed.
The
AC_Visu_Base
instances provide the additional functionGetModuleFrameIndex
. This function returns the index of the visualization screen (if present) in the top-level visualization for a module instance (seeIModule
inAC_Module_Base.library)
. With this function, you can jump to any visualization screen in the module instance tree. To also enable the navigation within the code of a module, the environment of the module (seeIModule
inAC_Module_Base.library
) possesses a member,Environment.visus
, which corresponds to the above-mentionedpaVisuFB
pointer.
Tip
To be able to use the variable CURRENTCLIENTID
, the library VisuGlobalClientManager
(category "Intern|Visu") must be added to the project.
The first visualization will be used as the default setting.