Cannot build or load application

The Instance view provides the button images/download/attachments/405733741/LoadProgram-version-1-modificationdate-1529910412582-api-v2.png (Build and Load Application) to load the application to the selected PLC. logi.CAD 3 cannot load the application under certain circumstances but reports one of the following messages:

  • Information on cause. The application for the PLC (resource "name", platform toolkit "name") cannot be created/loaded. Check the views "Error Log" and "Problems" for more information.

  • The application cannot be loaded onto the PLC. For more information open this file: name

  • An error occurred during compiling or linking the code image (error code: number).

  • Error loading code image (Error code: 0x10103)

The following tables give you some clues to identify the cause and to find the solution quickly. After the appropriate solution, try to load the application again.

Here the most common causes:

Cause

Solution

no correct code within the ST-objects, FBD-objects, LD-objects or PLC-object

One of these messages is displayed as information on the cause:

  • Faulty source files.

  • Faulty PLC-object.

  • Error resolving external variables.


You have temporarily deleted resources (such as PLC-objects) in a larger project and you add the resources again.

This message is displayed as information on the cause:

  • Faulty source files.

  1. In menu Project, select Clean... In the dialog, select the requested project, check Start a build immediately and click OK.

If it is still not possible to load the application:

  1. Exit and restart logi.CAD 3 with a new workspace.

  2. Import the project into this workspace.

Your virus scanner (e.g. avast) prevents the building or loading.

This message is displayed:

  • An error occurred during compiling or linking the code image (error code: 1).

  1. Deactivate the virus scanner.

  2. Now try to build and load the application. If this succeeds, configure your virus scanner so that logi.CAD 3 is defined as an exception for the following scans.

  3. Re-activate the virus scanner.

An old version of the runtime system is installed on the target system. logi.CAD 3 requires a more current version of the runtime system .

This message is displayed as information on the cause:

  • Version of runtime system is a.b.c but must be x.y.z.

Of this message is displayed:

  • Error loading code image (Error code: 0x10103)

Install and use the version of the runtime system which has been released for the current version of logi.CAD 3 .

See " Release-Notes für aktuelle Version " which version of the runtime system has been released for the current logi.CAD 3 v ersion.

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/information.svg The check of the required version of the runtime system is only provided for the standard kernel (RTS), it is not provided for the other variants, e.g for the microkernel (also known as µRTS).

no files with C-code or no header files for C-code available

This message is displayed as information on the cause:

  • Faulty source files.

In menu Project, select Clean... In the dialog, select the requested project and click OK.

You are using function blocks with in-out variables (= VAR_IN_OUT) that have been created in a logi.CAD 3 version < 3.1.0.

Perform all steps as listed under "Functions blocks with VAR_IN_OUT from version < 3.1.0 prevent the building of the application" .

too little storage space on the PLC

This message is displayed as information on the cause:

  • Error loading code image (Error code: 0x10103 (65795))

  • Timeout while closing a file.

  1. Make sure that there is sufficient space on the PLC.
    logi.cals recommends that there is at least twice the storage space as needed for the file RTSCode.so or RTSCode.dll (the file extension depends on the operating system on the PLC). The reason is that the file RTSCode.bak (as a backup file of the application previously loaded) or the file RTSCode.tmp (due to the above problem) might exist in addition to the file RTSCode.so or RTSCode.dll.

  2. If the file RTSCode.tmp exists on the PLC: Rename this file to RTSCode.so or RTSCode.dll.

no sufficient privileges on the PLC

This message is displayed as information on the cause:

  • Error loading code image (Error code: 0x10103 (65795))

Make sure that the runtime system has been started with superuser permissions so that the file RTSCode.so or RTSCode.dll can be copied to the file system of the PLC.

Here some additional causes:

Cause

Solution

too long installation path of logi.CAD 3

Perform all steps as listed under "An installation path too long prevents the building/loading of the application".

workspace of a previous version not compatible with the new version

See "Are my projects upwards and downwards compatible?".

More useful information:

There might be other causes – depending on the blocks that have been created in the application and depending on the used target systems:

Cause

Solution

You are using C-/C++-blocks in ST and/or you have created C-/C++-blocks.

This message is displayed as information on the cause:

  • Used blocks are not supported.

If you are using an C-/C++-block, check whether the Error Log view displays messages reporting errors in the objects. If yes, correct the reported errors (see "Errors when connecting to the PLC or loading, starting, stopping the application" for hints how to eliminate the errors).

If you are creating (developing) a C-/C++-block, check the content of the file compile_result.txt for listed errors. By default, the file compile_result.txt is not displayed within the project explorer. As a consequence, proceed as follows:

  1. Search for file compile_result.txt: menu Search, File..., enter compile_result.txt under File name patterns, check Consider derived resources and click Search
    Alternative: Have the file displayed within logi.CAD 3: Click images/download/attachments/451280970/IconViewMenu-version-1-modificationdate-1598000630466-api-v2.png in toolbar of the project explorer, select Filters and Customization... and uncheck target folder (under Filter).

  2. Within the Search view, double-click one of the found matches in order to open the appropriate file. Or within the project explorer, double-click the displayed file.
    The location of the file within the project depends on the items configuration-name and resource-name within the PLC-object:
    Example: In case of configuration RaspbianConfiguration and resource raspberry, the file compile_result.txt is positioned in this sub-folder of the project: target\RaspbianConfiguration\raspberry\

  3. Check the file contents for errors and correct your C-/C++-code accordingly.

    Good to know

    images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/lightbulb.svg If you have created using a C-/C++-block with →array variables within a logi.CAD 3 version preceding 2.0.0, a message, such as C:\MyProject01\src\lcfu___myfunction.c:128:14: error: unknown type name 'RTTypeNS_DimNode' , is listed within the file compile_result.txt .

    Reason: Starting with logi.CAD 3 version 2.0.0, redundant data is no longer generated (see under "When to update the version of the runtime system on the PLC?" for more information on the redundant data). In order to correctly build the application in the logi.CAD 3 version 2.0.0 or a following version again , you have to change the content of the mentioned C-/C++-file as follows:

    • Delete all lines with RTTypeNS_DimNode or RTTypeNS_ArrayNode respectively from the C-/C++-file.

    • Also, delete the preceding comments /* dimension nodes */ or /* array nodes */ respectively from the C-/C++-file.

    Example for lines to be deleted from a C-file
    /* dimension nodes */
    static const RTTypeNS_DimNode s_dim_nodes_V_CONVERT_VARNAME[] = {
    {0,99,100 * sizeof(LC_TD_USINT)}
    };
     
    /* array nodes */
    RTTypeNS_ArrayNode lcns_arrayNode___V_CONVERT_VARNAME = {1,s_dim_nodes_V_CONVERT_VARNAME};

You are using C-/C++-blocks in ST and you have specified an additional source file path that is already considered when building/loading the application.

  1. Check the content of the file compile_result.txt for errors (see above how to open this file).
    Error messages, such as Multiple Definition..., are indicating that the specified file is linked repeatedly. Such a message also specifies the path in which the file is searched for.

  2. Under Settings for C-Blocks check which paths are specified under Additional source file path.

  3. Delete the appropriate relative path from the specifications under Additional source file path. Save the changes.

  4. Now try to build and load the application.

error when loading onto a →Controllino or an →Arduino Nano; examples:

  • The target system has not been attached to the COM-port that has been entered in the PLC-object.

  • The application is too large for the target system.

  • The execution of the application requires more RAM memory than available.

Open the named file and fix the cause mentioned in the file.

runtime system and/or logi.CAD 3 not configured for 64 bit system of Linux

Perform all steps as listed under "64 bit linux".

too little storage space on the PLC

These messages are displayed:

  • Error loading code image (Error code: 0x10103 (65795))

  • Timeout while closing a file.

  1. Make sure that there is sufficient space on the PLC
    logi.cals recommends to have at least twice the size of the file RTSCode.so or RTSCode.dll (the file extension depends on the operating system of the PLC). The reason is that the file RTSCode.bak (as backup file of the application previously loaded) or the file RTSCode.tmp (as a temporary file that has not been correctly deleted due to failed loading) might exist in addition to the file RTSCode.so or RTSCode.dll on the PLC.

  2. If the file RTSCode.tmp exists on the PLC: Rename this file to RTSCode.so or RTSCode.dll .

More useful information:


images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/information.svg logi.cals recommends to install and use the most current versions of logi.CAD 3 and the runtime system so that the latest features and problem fixes according to the release notes are provided in the used version.


Did this article help you? Did you find the requested information in this user documentation?
If not, contact the support team of logi.cals. State your questions or suggestions to improve/enhance the user documentation as detailed as possible.