Dialog 'Input Configuration'

 

Symbol: _visu_icon_input_configuration.png

Function: This dialog is used for assigning input actions to specific input events. In addition, it includes specific settings for the selected input action.

Call: Click Configure in the Input configuration property.

Requirement: An element is selected in the editor.

See also

Input action 'User management'

 

Dialogs and actions

Configures which one of the possible user management dialogs or which action follows the input event.

Note: The actual dialog used is configured in the visualization manager (Dialog settings tab).

See also

  • Login dialog

  • Change password dialog

  • Change configuration dialog

Dialogs from the VisuUserManagement library are preset.

Login

Dialog prompt for logging in:

Preset: VisuUserManagement.VUM_Login in the Login dialog

Logout

The current user is logged out.

Change user password

Dialog for changing the password:

Preset: VisuUserManagement.VUM_ChangePassword in Change Password dialog

Open user configuration

The dialog opens for changing the password.

Preset: VisuUserManagement.VUM_UserManagement in the Change Configuration dialog

See also

Input action 'Close Dialog'

 

Dialog

The visualization of type Dialog that is closed.

_visu_icon_open_list.png: Drop-down list of all visualizations (type Dialog) available in the project.

Example:

Standard dialogs of the VisuDialogs library, which is commonly linked to the project.

  • FileOpenSave

  • Keypad

  • Login

  • Numpad

  • NumpadExtended

  • TextinputWithLimits

Note: The setting in the object property (Visualization tab) of a visualization determines whether or not a visualization can be used as a dialog.

Result

Return value for closing the dialog.

Note: If there are more input actions after closing, then they configured in the Input configuration ‣ OnDialogClosed property of the element.

None

_cds_icon_option_activated.png: No return value

OK

_cds_icon_option_activated.png: The activated return value is returned. The return value refers to the button in the dialog. The value OK is returned for the "OK" button. The value Cancel is returned for the "Cancel" button.

Cancel

Exit

Retry

Ignore

Yes

No

See also

Input action 'Open Dialog'

 

Dialog

Visualization (type Dialog). The dialog opens.

_visu_icon_open_list.png: Drop-down list with all dialogs available in the project.

Note: The VisuDialogs library provides visualizations (type Dialog).

  • VisuDialogs.FileOpenSave

  • VisuDialogs.Login

Transfer parameters of the dialog

Parameters

Interface parameter as declared in the interface editor of the visualization.

Example: filelistProvider

Type

Data type of the parameter as declared in the interface editor of the visualization.

Example: VISU_FBFILELISTPROVIDER

Value

Variable (data type conforms to data type of the parameter). The value of the variables is read when the dialog opens and transferred to the parameter.

Example: PLC_PRG.fileListProvider //Instance of function block VisuDialogs.Visu_FbFileListProvider

_visu_icon_open_input_assistant.png: The input assistance offers all variables available across the entire project.

The return value of the dialog is activated here for which the Var_OUTPUT variables and VAR_IN_OUT variables are written. Then the dialog closes.

Update _visu_icon_output.png and_visu_icon_inout_parameter.png parameter in case of result

Note: The parameters are updated before the dialog is closed. The values are stored temporarily until then. They are stored as a copy, not as a reference.

None

_cds_icon_option_activated.png: No return value

OK

_cds_icon_option_activated.png: Defines for which return value the transfer parameter is written.

Cancel

Exit

Retry

Ignore

Yes

No

Open in dialog mode

_cds_icon_option_activated.png: Only the dialog processes user inputs. The remaining visualizations are blocked to user input.

Position to open

Centered

The dialog opens in the center of the visualization.

Position

The dialog opens at the position defined by X and Y.

X

Position (in pixels) or as a variable (integer data type)

Y

Position (in pixels) or as a variable (integer data type)

See also

Input action 'Change language'

 

Language

Switched language

Example: en

_visu_icon_open_input_assistant.png: The input assistance offers all languages available in the project.

Input action 'Change visualization'

 

Go to visualization

Assign

Switched visualization from the project or a library.

Example: visMain

Assign expression

Variable (STRING). This is assigned the name of the switched visualization.

Example: strVisMain: STRING := 'PLC_PRG.visMain';

Tip: If a visualization change depends on a state, then the variable can be set accordingly.

The application saves the order that the visualizations are called. This can be used for

Previous visualization

_cds_icon_option_activated.png: Switch back to the previously displayed visualization.

Requirement: A visualization has already been switched.

Next visualization

_cds_icon_option_activated.png: Switch forward to the next visualization in the call order.

Requirement: There has already been a visualization change that was called by Previous visualization.

Go to visualization

Visualization that is displayed at the user input.

Assign

Visualization that is selected from all available visualizations in the project or libraries.

Example: visMain

Assign expression

Variable (STRING) that contains the name of the visualization.

Example: PLC_PRG.strVisu for the following application code: strVisu: STRING := 'visMain';

The order in which visualizations are displayed by user inputs is saved internally. For the options below use this information.

Previous visualization

_cds_icon_option_activated.png: Visualization that has already been displayed before the current one.

Requirement: A visualization has already been switched.

Next visualization

_cds_icon_option_activated.png: Visualization that is next in the call order after the current one.

Requirement: There has already been a visualization change that was called by Previous visualization.

Input action 'Execute command'

 

A list of commands is configured here with transfer parameters that the visualization processes upon specifying the input event.

Configure commands

Command from the drop-down list. Click the add symbol (_visu_icon_add.png) to include the command in the list.

_visu_icon_open_list.png 

  • Execute program on the PLC

  • Execute program on client

  • Print

  • Navigate to URL (WebVisu)

  • Create recipe

  • Read recipe

  • Write recipe

  • Save a recipe in a file

  • Load a recipe from a file

  • Delete recipe

_visu_icon_add.png 

This command in Configure commands is added to the list.

_visu_icon_remove_command.png 

The command is removed.

Requirement: A command is selected.

The order in the list defines the order of execution.

_visu_icon_down_command.png 

The selected command is shifted one position downwards in the list.

_visu_icon_up_command.png 

The selected command is shifted one position upwards in the list.

Command Execute program on the PLC

Command

1st parameter

2nd parameter

ExecutePlcProgram

'C:\\programs\\notepad.exe'

'Notes_A.txt'

EXE file that is executed on the PLC.

The program is executed on the PLC and therefore it must not be interactive or hay any user interfaces.

It is possible, for example, for a program to copy a file.

Program name with directory as STRING in single straight quotation marks

Arguments of the program as STRING in single straight quotation marks

Example: Name of the file that the program opens.

Command Execute program on client

Command

1st parameter

2nd parameter

ExecuteClientProgram

'C:\\programs\\notepad.exe'

'Notes_A.txt'

EXE file that is executed on the display variant Exception: WebVisu.

The program is executed in the context of the display variant. For this, the program can then be interactive with a user interface.

Program name with directory as STRING in single straight quotation marks

Arguments of the program as STRING in

Example: Name of the file that the program opens.

Notice

If the visualization is displayed as CODESYS WebVisu, then no program (*.exe file) can be started.

Command Navigate to URL (WebVisu)

Command

1st parameter

2nd parameter

NavigateURL

'http://de.wikipedia.org'

PLC_PRG.stURL

'replace'

The visualization navigates to the website of the URL.

Requirement: The visualization is executed as a CODESYS WebVisu.

URL

  • As a literal in single straight quotation marks.

  • As a variable (STRING)

If no parameter is provided, the web page is displayed in a new window or a new tab.

If 'replace' is given, then the CODESYS WebVisu is replaced by the web page.

Command Read recipe

Command

1st parameter

2nd parameter

ReadRecipe

'RecipeDefinitionForModules'

'RecipeModuleA'

Name of the recipe definition

  • As a literal

  • As a variable (STRING)

Name of the recipe

  • As a literal

  • As a variable (STRING)

At visualization runtime, the PLC reads the current values from the variables of the recipe definition and writes them to the given recipe. The values are saved implicitly (to a file on the PLC) and displayed in the recipe definition in the recipe manager of CODESYS. In other words, the recipe that is managed in CODESYS is updated with values from the PLC.

Command Write recipe

Command

1st parameter

2nd parameter

WriteRecipe

PLC_PRG.stRecipeDef

PLC_PRG.stRecipe

Name of the affected recipe definition

  • As a literal

  • As a variable (STRING)

Name of the recipe (from the recipe definition)

  • As a literal

  • As a variable (STRING)

At visualization runtime, the values of the recipe are written to the variables on the PLC as they are in the recipe manager.

Command Save a recipe in a file

Command

1st parameter

2nd parameter

SaveRecipeAs

PLC_PRG.stRecipeDef

PLC_PRG.stRecipe

Name of the affected recipe definition

  • As a literal

  • As a variable (STRING)

Name of the affected recipe that is updated and saved to a file.

  • As a literal

  • As a variable (STRING)

(optional parameter) If you do not specify a transfer parameter here, then the values from the recipe variables are saved in the specified file only. The implicit recipe files are not updated.

At visualization runtime, the Save Recipe as dialog opens and prompts the user for a storage location on the PLC and a file name. The file name <recipe>.<recipe definition> is not permitted. The file extension is .txtrecipe.

The user can then save the file that includes the actual values from the recipe variables. If no transfer parameter is given in the 2nd parameter, then the file is saved without changing an implicit recipe file. If a transfer parameter is given in the 2nd parameter, then the implicit recipe file is also updated.

Note: If the Save recipe changes to recipe files automatically option is selected in the Recipe Manager - General tab, then the recipe definition in CODESYS and the implicit recipe files are kept the same automatically.

Note: On the PLC, there are implicit (automatically generated) recipe files with the names <recipe>.<recipe definition>.txtrecipe. These are typically used in the application as a buffer when reading and writing recipe variables.

Command Load a recipe from a file

Command

1st parameter

2nd parameter

LoadRecipeFrom

PLC_PRG.stRecipeDef

PLC_PRG.stRecipe

Name of the affected recipe definition

  • As a literal

  • As a variable (STRING)

Name of the affected recipe

  • As a literal

  • As a variable (STRING)

In visualization runtime, the Load recipe dialog opens. It provides the visualization user with a file list that is located in the file system for control and filtered by the extension txtrecipe. The selected file can be downloaded. Then, the recipes from the file are written to the implicit files and read to the given recipe in the recipe definition of the recipe manager.

Requirement: The file was created with the SaveRecipeAs command.

Command Create recipe

Command

1st parameter

2nd parameter

WriteRecipe

PLC_PRG.stRecipeDef

PLC_PRG.stRecipe_New

Name of the affected recipe definition

  • As a literal

  • As a variable (STRING)

Name of the new recipe

  • As a literal

  • As a variable (STRING)

At visualization runtime, a new recipe is created in the given recipe definition.

Command Delete recipe

Command

1st parameter

2nd parameter

WriteRecipe

PLC_PRG.stRecipeDef

PLC_PRG.stRecipe

Name of the affected recipe definition

  • As a literal

  • As a variable (STRING)

Name of the recipe

  • As a literal

  • As a variable (STRING)

At visualization runtime, the given recipe is deleted from the recipe definition.

Command Print

Command

1st parameter

2nd parameter

Print

Optional: File name for the visualization screen to be printed (example: 'Start image')

A second parameter cannot be specified for the Print command.

The default dialog Printer opens when the visualization is in runtime mode. In the dialog, you select a printer and you configure more print settings. When you confirm the dialog, the currently displayed visualization screen is printed.

Note: The command cannot be executed in the WebVisu.

See also

Input action 'Switch Frame visualization'

 

When the input event occurs, the display switches to another visualiza­tion within one frame.

Selection type

Local visualization

The Frame selection group is visible.

Any visualization

The Frame and visualization selection group is visible.

Requirement: Local visualization is activated.

Frame selection

List of all frames that contain the active visualization. The referenced visualizations are listed below each frame, as determined in the Referenced visualizations property of the respective frame.

Example:

_visu_img_frame_selection.png 

Assign selection

The selection in the Frame selection input field is taken and it appears in the Selected frame and Selected visualization settings.

Requirement: A visualization is selected in the Frame selection input field.

Selected frame

Name of the switched frame.

Example: MainArea

Tip: Use the Assign selection command for changing the setting here.

Visualization selection

Name of the switched visualization.

Example: visMainArea

Tip: Use the Assign selection command for changing the setting here.

Requirement: Any visualization is activated.

Frame and visualization selection

Contains the switched frame.

Assign

Switched frame with complete path. The index determines the visualization.

Example: visMain.frameA.visB.frameB

The path is specified in the following format: <visualization name>.<frame name> { <visualization name>.<frame name> }

Note: Visualizations can be nested in any depth. The path is accordingly complex.

Assign expression

Variable (STRING). Contains the path of the switched frame.

Example: strFrane: STRING := 'visMain.frameA.visB.frameB';

Index to select

Index that determines which of the referenced visualizations is displayed.

  • As an integer

  • Variable (integer data type)

    Example :PLC_PRG.iIndex

Note: The referenced visualizations of a frame are indexed automatically by their sorting order.

Requirement: The project contains visualizations that form a structure.

See also

Input action 'Write variable'

 

The configuration of the input action defines how a visualization user specifies a value and to which variable the value is written.

Input type

How the input is prompted.

Default

An input field also opens, or a virtual keyboard if necessary (if the display variant does not have a physical keyboard.

Note: The default for text input in runtime mode is set in the Visualization Manager: Dialog settings tab, Settings for default text input.

Text input

An input field appears. It allows you to specify a number or text from the keyboard.

Requirement: The display variant is provided with a keyboard as input device.

Text input with limits

An input field appears. It allows you to specify a number or text from the keyboard. The field also shows the value range for the input. When a limit is exceeded, the input value is displayed in red.

Requirement: The display variant is provided with a keyboard as input device.

VisuDialogs.Keypad

A virtual keyboard opens. It allows you to specify a number or text.

VisuDialogs.Numpad

A virtual keyboard opens. It allows you to specify a number.

VisuDialogs.NumpadExtended

A virtual keyboard opens. It allows you to specify a number. The hexadecimal or exponential format is also permitted here.

Choose variable to edit

Use text output variable

_cds_icon_radiobutton_activated.png: The input value is written to the text output variable of the element. This is the variable that is assigned In the Text variable ‣ Text property.

Use another variable

_cds_icon_radiobutton_activated.png: Variable where the input value is written.

Example: PLC_PRG.iVariable

Initial display format

Placeholder with format definition. It determines the output format for the variable value and the input limits.

Example: %2.3f for displaying the value as a decimal fraction.

Min

Minimum value of the input limit. If a user specifies a lesser value, then it is not accepted.

  • as a fixed value

  • as a variable (data type conforms to selected variable)

Max

Maximum value of the input limit. If a user specifies a greater value, then it is not accepted.

  • as a fixed value

  • as a variable (data type conforms to selected variable)

Dialog title

Text displayed in the caption bar of the dialog. Optional.

  • as a fixed string

    Example: Insert value

  • as a variable (STRING)

    Example: PLC_PRG.stTitle : STRING := 'Insert value';

Password field

_cds_icon_option_activated.png: Invisible text input. *** is displayed instead of the input text.

Position where the input dialog opens

Use global settings (from Visualization Manager)

_cds_icon_radiobutton_activated.png: This option is effective for use in a TargetVisu or WebVisu only. The settings are used that are available in the Dialog settings tab in the Visualization Manager.

Centered

_cds_icon_radiobutton_activated.png: The dialog opens in the center of the visualization window.

Position

_cds_icon_radiobutton_activated.png: The dialog opens in the visualization at the position defined here.

X, Y: Variable or explicit number (in pixels) for the definition of the upper left corner of the dialog in the coordinate system of the visualization window.

You can use the placeholders ElementRectangle.ptTopLeft.iX and .iY ElementRectangle.ptBottomRight.iY. It is replaced in runtime mode by the coordinates of the calling element.

See also

Input action 'Execute ST code'

 

Input field

Editor for code as structured text

Input action 'Toggle variable'

 

Variable

Variable (BOOL). This switches between TRUE and FALSE for an input event.

Example: PLC_PRG.bSwitch

Input action 'File transfer'

 

Transfer

Direction

From PLC to visualization

From visualization to PLC

Type

File

Streaming

File name

Requirement: The type of transfer is File.

Name of the file in the file system of the controller. The file name can be specified as a variable of type STRING or it can be specified directly in single straight quotation marks.

An absolute or relative path with directory information can also be specified as the file name.

Examples:

'E:\\temp\\test.txt' -> absolute path.

'MyData/test.txt' -> relative path. The file is saved in the subdirectory PlcLogic/MyData. "PlcLogic" is the default resolution for the directory placeholder $PLCLOGIC$. This placeholder does not have to, but it can, also be specified: '$$PLCLOGIC$$/MyData/test.txt').

'$$VISU$$/test.txt' -> relative path. The file is saved in the subdirectory PlcLogic/visu. "visu" is the default resolution for the placeholder $VISU$). It could also be specified explicitly 'visu/test.txt'.

'$$PLCLOGIC$$/test.txt' -> relative path. The file is saved in the subdirectory PlcLogic. Note: If the path in the visualization is edited by means of a "Text field" element, then the masking character $ does not have to be given: $VISU$/dummy.txt

Streaming instance name

Instance name of the object that yields the data for the transfer in streaming mode. The object must implement the interface IVisuStreamReader (PLC --> visualization) or IVisuStreamWriter (visualization --> PLC).

Requirement: The type of transfer is Streaming.

Control flags

Variable of type DWORD. Options for the data transfer are controlled by means of these flags. This variable can be a combination of the following flags:

VisuElems.VisuEnumFileTransferControlFlags.UseOriginalFileName: Defines whether or not the selected file name is also used in the controller.

VisuEnumFileTransferControlFlags.ConfirmFileOverwriteInPlc: Defines whether or not the user has to confirm when overwriting an existing file.

Status variables

Transfer in progress

Boolean variable (optional)

TRUE: The transfer is in progress.

Transfer successful

Boolean variable (optional)

TRUE: The transfer completed successfully.

Error code

  • 0: No error

  • 1: Unspecified error

  • 2: Cancellation of file dialog

  • 3: Other file transfer active

  • 4: Error during file transfer

  • 5: Cancellation by timeout

  • 6: File read error – The file is not available or cannot be read.

  • 7: No device support for file transfer

    Possible causes:

    • CODESYS WebVisu: File transfer not possible by default.

    • Communication with a controller of a version < 3.5.11: Functionality not implemented.

    • Communication with a controller of a version >= 3.5.11: File transfer not acti­vated (device description).

      Note: In this case, contact the CODESYS support team.

Behavior in online mode (type File)