Skip to main content

Object: External File

An External File is any file that you add to the project in the POUs view or Devices view. Click Project → Add Object to open the Add External File dialog and define how the file belongs to the project.

The Transfer with Download/Online Change option can be used to configure the transfer of external files.

When an external file is downloaded to the controller, it is not updated in the project.

For more information, see: Tab: Synchronized Files

Dialog: Add External File

File path

Path of the external file

The _cds_icon_three_dots.png button opens a dialog for selecting a file in the local file system.

Name

Object name for the file in CODESYS

If you leave it blank, then the file revert to its previous name.

File Handling

Determines how the external file is saved in the CODESYS project

Remember the link

_cds_icon_radiobutton_acitvated.png: The file link which points to the external file in the Windows file system is saved.

Note: Access via the file link will fail if the external location of the file changes. The file is available in the project only as long as it exists in the defined storage location.

Remember the link and embed into project

_cds_icon_radiobutton_acitvated.png: The file link which points to the external file in the Windows file system is saved. Additionally, to increase security, a copy of the file is stored in the project.

Note about behavior on access:

  • The copy in the project is accessed only if the access via the link fails.

  • If the external file changes, then the copy is handled according to the option selected under Change Tracking.

Embed into project

_cds_icon_radiobutton_acitvated.png: A copy of the external file is saved in the CODESYS project.

Note

The copy is always accessed. If the external file changes, then the project-internal copy will not be updated.

When the external file is opened in CODESYS Development System (Edit Objectcommand), a temporary file is created for editing.

Change Tracking

Type of update for the copy saved in the project for which a file link was saved at the same time

Requirement: The Remember the link and embed into project option is selected.

Reload the file automatically

_cds_icon_radiobutton_acitvated.png: If the external file changes, then the copy stored in the project is automatically updated.

Prompt whether to reload the file

_cds_icon_radiobutton_acitvated.png: If the external file changes, then a dialog prompt opens for you to decide whether or not the copy should be updated in the project.

Do nothing

_cds_icon_radiobutton_acitvated.png: Although the external file changes, the copy in the project remains unchanged.

Button: Display File Properties

Opens the default Properties of <file name> dialog of the external file in the Windows file system

This dialog is identical with the Properties dialog which can be opened in Windows from the context menu of the file.

Online handling

Handling of the file in online mode

Transfer with Download/Online Change

_cds_icon_checked.png: When a download and online change takes place, the external file is downloaded to the controller and stored in the Target path.

Note: External files which are inserted in the POUs view are transferred to all controllers in the project during the download.

This option has no effect on external files in libraries. As a rule, these files are not transferred.

Target path (relative to "$PlcLogic$" on the device)

The target path can be specified in the following way:

  • For the $PlcLogic$ root directory: Leave the input field blank

  • Individual folders (not available yet) in the root directory

    Example: MySubDirectory

  • Folder of the application (below $PlcLogic$)

    Example for the "App123" application: App123

  • Nested folder structure below the application folder

    Example: App123/Sub01/SubSub01

  • Use another available placeholder, for example the one for the visualization: $visu$

Note

When using available paths, pay attention to uppercase and lowercase.

Button Add

Inserts a new _cds_icon_external_file.png object (type External File).

For more information, see: Properties – External File