Dialog ‘Input Configuration’

Symbol: 35cbc225cefb46b4c0a8640e01a2dd85_2829692a22109786c0a8640e01c7de2c

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.

35cbc225cefb46b4c0a8640e01a2dd85_6c80907022213968c0a8640e018f589e : 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 35cbc225cefb46b4c0a8640e01a2dd85_9a3f06830c0506c5c0a8640e012f0ace : No return value
OK 35cbc225cefb46b4c0a8640e01a2dd85_9a3f06830c0506c5c0a8640e012f0ace : 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.

35cbc225cefb46b4c0a8640e01a2dd85_6c80907022213968c0a8640e018f589e : 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

35cbc225cefb46b4c0a8640e01a2dd85_eb671bf522752375c0a8640e00296a93 : 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 35cbc225cefb46b4c0a8640e01a2dd85_710d569d227e43e2c0a8640e0050b40c and 35cbc225cefb46b4c0a8640e01a2dd85_c42d519c2282c036c0a8640e00677601 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 35cbc225cefb46b4c0a8640e01a2dd85_9a3f06830c0506c5c0a8640e012f0ace : No return value
OK 35cbc225cefb46b4c0a8640e01a2dd85_9a3f06830c0506c5c0a8640e012f0ace : Defines for which return value the transfer parameter is written.
Cancel
Exit
Retry
Ignore
Yes
No
Open in dialog mode 35cbc225cefb46b4c0a8640e01a2dd85_9a3f06830c0506c5c0a8640e012f0ace : 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

35cbc225cefb46b4c0a8640e01a2dd85_eb671bf522752375c0a8640e00296a93 : 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.

Go to visualization
The application saves the order that the visualizations are called. This can be used for
Previous visualization

35cbc225cefb46b4c0a8640e01a2dd85_9a3f06830c0506c5c0a8640e012f0ace : Switch back to the previously displayed visualization.

Requirement: A visualization has already been switched.

Next visualization

35cbc225cefb46b4c0a8640e01a2dd85_9a3f06830c0506c5c0a8640e012f0ace : 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

35cbc225cefb46b4c0a8640e01a2dd85_9a3f06830c0506c5c0a8640e012f0ace : Visualization that has already been displayed before the current one.

Requirement: A visualization has already been switched.

Next visualization

35cbc225cefb46b4c0a8640e01a2dd85_9a3f06830c0506c5c0a8640e012f0ace : 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 ( 35cbc225cefb46b4c0a8640e01a2dd85_d1052d5d22c4cf34c0a8640e01cb234a ) to include the command in the list.

35cbc225cefb46b4c0a8640e01a2dd85_6c80907022213968c0a8640e018f589e

  • 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
35cbc225cefb46b4c0a8640e01a2dd85_d1052d5d22c4cf34c0a8640e01cb234a This command in Configure commands is added to the list.
35cbc225cefb46b4c0a8640e01a2dd85_2d6c024222c68fc8c0a8640e00b216ea

The command is removed.

Requirement: A command is selected.

The order in the list defines the order of execution.
35cbc225cefb46b4c0a8640e01a2dd85_c97f069122c75d1ec0a8640e0037c5de The selected command is shifted one position downwards in the list.
35cbc225cefb46b4c0a8640e01a2dd85_00767f5922c80c8ac0a8640e0101a3a1 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.

Attention

If the visualization is displayed as CODESYS Web Visualization, 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 Web Visualization.

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 Web Visualization 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.

See also

Input action ‘Switch Frame visualization’

When the input event occurs, the display switches to another visualization 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:

../_images/4017ad3f4be6497cc0a8640e00e4b0a9
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 35cbc225cefb46b4c0a8640e01a2dd85_331ba40060e030ffc0a8640e014c3b3b : 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

35cbc225cefb46b4c0a8640e01a2dd85_331ba40060e030ffc0a8640e014c3b3b : 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 35cbc225cefb46b4c0a8640e01a2dd85_9a3f06830c0506c5c0a8640e012f0ace : Invisible text input. \*\*\* is displayed instead of the input text.
Position where the input dialog opens
Use global settings (from Visualization Manager) 35cbc225cefb46b4c0a8640e01a2dd85_331ba40060e030ffc0a8640e014c3b3b : 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 35cbc225cefb46b4c0a8640e01a2dd85_331ba40060e030ffc0a8640e014c3b3b : The dialog opens in the center of the visualization window.
Position

35cbc225cefb46b4c0a8640e01a2dd85_331ba40060e030ffc0a8640e014c3b3b : 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

Variable of type STRING that describes the file name on the controller. The file name can also be input directly between single straight quotation marks.

Requirement: The type of transfer is File.

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.

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 the file transfer

    Possible causes:

    • CODESYS Web Visualization: By default, file transfer is not possible.

    • Communication with a controller with version < 3.5.11: The feature is not implemented.

    • Communication with a controller with version >= 3.5.11: The file transfer is not enabled (device description).

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

Behavior in online mode (type File)

  • Transfer from the controller to the operator panel: The Save file dialog opens. The file with the name from the File name setting can be saved as any name on the operator panel.
  • Transfer from the operator panel to the controller: The Open file dialog opens. Any file can be selected that is saved on the controller as the name from the File name setting.