Errors while editing PLC-object in editor

This section quotes the errors that might occur when editing a PLC-object within the editor.
However, it is possible that errors/warnings occur for the PLC-object as when entering the ST-code. See "Errors and warnings in ST" for this message and its appropriate solution.

Messages for the mandatory items

  • Missing IEC-keyword or IEC-identifier

  • Unexpected character 'name'

  • Could not resolve reference to 'name'.

  • Unexpected end of file

  • Identifier "name" already declared

  • Value out of range

  • Invalid value for ADDRESS

  • Invalid value for PORT

  • Platform "name" does not exist

  • Invalid task priority (valid range: 0 - 65535).

  • Invalid cycle time (maximum: TIME#20d)

  • Cycle time too small (minimum: value)
    The minimum cycle time matches the default timer resolution. This default timer resolution is listed in "Properties and restrictions specific to the target system" per target system.

  • No task is defined for this resource.

  • No program instance is defined for this resource.

  • No communication channel is defined for this resource.

The solution for all these errors is: Delete the faulty characters/lines or replace them by the correct syntax for the PLC-object.
General recommendation: Use Quick Fix and Content Assist to correct the code more quickly. See section "PLC-specifications within editor for PLC-object" for points to observe when editing a PLC-object .

Cycle time is not aligned to grid of "number".
Additional information: Your logi.CAD 3 version has been configured by a system integrator or logi.cals so that only specific cycle times are allowed .
Solution: Correct the cycle time to the given number or a multiple of this number.

It is not possible to create an application for platform "name". The installation path might be too long. Use the setting "substPluginsFolder" to substitute the path for the compiler. (path for compiler)
Solution: Siehe "An installation path too long prevents the building/loading of the application".

The combination of absolute project path, configuration name and resource name exceeds the maximum length by number characters. or
The combination of absolute project path, configuration name, resource name and task name exceeds the maximum length by number characters.
or
The combination of absolute project path, configuration name, resource name and program instance name exceeds the maximum length by number characters.
or
The combination of absolute project path, configuration name, resource name and program type name exceeds the maximum length by number characters.

A result of this message is that the application cannot be built or loaded onto the PLC.
Solution for a project to be created: Shorten the name or path of the project by entering/selecting a shorter name/path when the project is created.
Solution 1 for an existing project: Shorten the name or path of the already existing project by e.g. renaming or moving the project accordingly.
Solution 2 for an existing project:
Shorten the names for the mentioned elements within the PLC-object; hence for the →configuration, →resource, →program type, program →instance or →task . As some of these names are used twice in the combination, it might be sufficient to shorten the name by about half of the mentioned characters. Example: If the combination exceeds the maximum length by 9 characters, it is sufficient to shorten the name for the configuration by 5 characters.
Solution 3 for an existing project: Combine solutions 1 and 2 as requested.

The target system parameters are too long (maximum: number characters).
Solution 1: Shorten the specifications between TARGET and END_TARGET as far as possible.
Solution 2: Contact the support team of logi.cals. Include your contact information, information on what you were doing in logi.CAD 3 and all messages listed in

the Error Log view, Problems view and/or PLC Logging view.

Application cannot be built due to an invalid project path.
and
Project path contains invalid characters. Path:
name. Valid characters: A-Z, a-z, 0-9, '.', '_', '-'
Solution: Make sure that there are no blanks or special characters (such as umlauts, e.g. ä, ö, ü) in a project name and in the installation path. If anyway, logi.CAD 3 will not be able to load the application onto the PLC.
For the paths and project names, letters A – Z or a – z, numbers 0 – 9, dots (character .), underlines (character _) and dashes (character -) are allowed. Examples for allowed project names: my.project, my-project, my_Project_01

This platform does not support communication via Gateway.
Solution: Enter a platform for which the communication via Gateway is possible. Examples for such platforms: ControllinoMINI, ControllinoMAXI, ControllinoMEGA, ArduinoNanoV3
Missing specifications for communication via Gateway
Solution: Complete the specifications as they are required for a communication via Gateway (see "Correct syntax for PLC-object" for more information).

C-code for metadata could not be generated. Make sure that there are no errors in the PLC-object.
Solution: Correct all errors in the PLC-object. Then save the PLC-object in order to have the required C-code generated.

Messages for the optional items

Some items within the PLC-object are optional. See "Correct syntax for PLC-object" to find those items listed with the comment: // optional...

Accessing an IO provider

IO service "Name": The value "Name" for the parameter "GLOBALS" is ignored. und
IO service "Name": The value "Name" for the parameter "PARAMS" is ignored.
Solution: Delete the specified parameters, if the generic IO provides is used
(see "Changing Revolution Pi projects or the runtime system for Revolution Pi to use the generic IO provider" for an example of a code block)

.

More messages on the IO provider are listed under "Messages when synchronizing using an IO provider".

Declaration of resource-global or configuration-global variables: VAR_GLOBAL ... END_GLOBAL

When declaring resource-global or configuration-global variables , errors might occur as when entering ST-code. See " Errors and warnings in ST" for the appropriate solution.

Moreover, the following errors might occur:

"name" included more than once. "name" already included in "name2".
Additional information: There are duplicates of the same INCLUDE_GLOBAL directive (= directives with the same GLOBALS section). Those duplicates exist in a program (within an ST-object) and in a resource (within a PLC-object).
Solution: Enter different names in the INCLUDE_GLOBAL directives. Alternative: Delete one of the duplicates. See "Declaration of global variables in global-object and its usage in ST" for information on the usage.

Declaration of additional tasks

Number tasks without IO-service for synchronizing IOs found but only one is supported..
Solution: Label just one of the tasks as IO task.
See "Declaring more tasks within PLC-object" for more information on tasks and IO tasks.

Several tasks are using the IO service "name" for synchronizing IOs found but an IO service must be used by one task only.
Solution: Use different IO services per IO task. Alternative, if no IO task has been specified without IO service yet: Delete the IO service for one IO task.

IO service "number" is not defined.
Solution: Enter an already defined IO service. An IO service is defined e.g. with the specification for IO_IMPORT.

More than number tasks are not allowed.
Solution: Reduce the number of entered tasks.
See "Properties and restrictions specific to the target system" for information how many tasks are possible for the used PLC.

Task "name" must have unique priority, but "number" is used multiple times.
Solution: Correct the priority of the specified task. Contact your system integrator, if you need more information.

Declaration of additional program instances

More than number program instances are not allowed.
Solution: Reduce the number of entered program instances.
See "Properties and restrictions specific to the target system" for information how many program instances are possible for the used PLC.

Multiple instances of a program with global variables are not allowed.
Solution: Delete the additional program instance or enter a different program in which program-→global variables are declared and that has not been instantiated in the resource yet. Reason: A program with global variables cannot be instantiated repeatedly in a resource
.

Instance specific assignments for symbolically represented variables

When assigning instance specific locations to symbolically represented variables, the following error as well as other errors as when entering ST-code might occur. See " Errors and warnings in ST" for the appropriate solution, if an error is not referenced in this section.

Element "name" within VAR_CONFIG section is repeatedly specified.
Solution: Rename the surplus elements so that there will be only one element with the specified name.

Element "name" within VAR_CONFIG section is ambiguous.
Solution: Rename the appropriate element so that it is declared with a unique →IEC-identifier as name. Alternative: Use the prefix VAR_GLOBAL or PROGRAM in order to specify whether the element is a global variable or a program instance. See "Declaring VAR_CONFIG sections within PLC-object" for details on the usage of the prefix.

Element "name" within VAR_CONFIG section cannot be resolved.
Solution: Make sure that the appropriate element has been declared. See "Declaring VAR_CONFIG sections within PLC-object" for details which elements are possible within the VAR_CONFIG section.

"name" included more than once.
Solution: Enter a different name at the INCLUDE_VARCFG directive. See "Declaring VAR_CONFIG section within a VarCfg-object" for details on the INCLUDE_VARCFG directive.

"name" may only be included on resource level.
Solution: Move the INCLUDE_VARCFG-directive onto the clipboad (= command "Cut") and paste the content from the clipboard in the suitable location of the resource within an PLC-object. See "Declaring VAR_CONFIG section within a VarCfg-object" for details on the INCLUDE_VARCFG directive.

"name" may only be included on configuration level.
Solution: Move the INCLUDE_VARCFG-directive onto the clipboad (= command "Cut") and paste the content from the clipboard in the suitable location of the configuration within an PLC-object. See "Declaring VAR_CONFIG section within a VarCfg-object" for details on the INCLUDE_VARCFG directive.

Identifier "name" declared with as well as without prefix.
Solution: Delete one of the elements or enter a prefix for the element without prefix. See "Declaring VAR_CONFIG sections within PLC-object" for details which prefixes are possible within a VAR_CONFIG section.

Cannot find element "name" of qualified name "name1.name2.name3...".
Solution: Make sure that the element (e.g. a structure element) exists in the specified name.

Nesting too deep for "name : type".
Solution: Reduce the nestings for the specified data type.

Element "name" of qualified name "name1.name2.name3..." is ambiguous.
Solution: Rename the appropriate element so that it is declared with a unique →IEC-identifier as name. Alternative: Use the prefix VAR_GLOBAL or PROGRAM in order to specify whether the element is a global variable or a program instance. See "Declaring VAR_CONFIG sections within PLC-object" for details on the usage of the prefix.

The IEC hardware address "address" is not valid for variable "name": missing byte offset.
Additional information: If you are using an IO-provider and/or IO-services (by the specification for IO_IMPORT within the PLC-object), it is compulsory to specify a byte offset within IEC hardware addresses. This means that you have to enter at least 2 integers for hardware addresses (such as %IB1.27 for input, byte at byte offset 27 of IO-service 1). Hardware addresses with one integer (such as z.B. %IB1) are invalid, if the PLC-object contains the specification for IO_IMPORT and the internal IO-service ID 1 is used
(this is the case e.g. under Windows EtherCAT, with Revolution Pi the generic service for the connected IO-modules, with Raspbian the PiFace module) .
Solution 1, if the specification for IO_IMPORT is required: Enter at least 2 integers for the hardware address (see "Necessary structure for physical address under "Declaration of global variables in ST", if you need information on the syntax).
Solution 2, if you do not use the IO-service: Delete the specification for IO_IMPORT.

The element "name" within the VAR_CONFIG section must not be initialized. or
The element "name" within the VAR_CONFIG section must have a physical address.
Solution: Delete the faulty characters or replace them by the correct syntax for the PLC-object.

Correct syntax for PLC-object

logi.CAD 3 supports the following syntax for the PLC-object:

Syntax
{
CHANNEL channel-name
// specifications in case of communication with a target system via TCP/IP, e.g. for the built-in PLC
TCP
ADDRESS := address; // example: 127.0.0.1
PORT := port; // examples: 1534 (= standard port for the built-in PLC)
// 1535 (= standard port for the communication via Gateway)
END_TCP
}
// optional: The specifications 'TARGET ... END_TARGET' are only necessary for a communication via Gateway.
{
TARGET target-name
// The system integrator provides the correct communication parameters 'string'.
PARAMS := 'string'; // example: see the following example for communication with Gateway
END_TARGET
}
CONFIGURATION_1 configuration-name
// optional: adding the declaration of configuration-global variables by referencing a global-object
{INCLUDE_GLOBALS name_1}
{INCLUDE_GLOBALS name_2}
...
// optional: declaration of configuration-global variables; A USING namespace directive is possible in front of this declaration.
VAR_GLOBAL (* optional_begin *) CONSTANT RETAIN NON_RETAIN {DMA := 'string'} (* optional_end *)
name_1, name_2, ..., name_n (* optional_begin *) {'key'} AT %address (* optional_end *) : data-type|FB-type := initial-value;
...
END_VAR
RESOURCE resource-name_1 ON platform-name { [ON_CHANNEL := channel-name]|[ON_TARGET := target-name, VIA_CHANNEL := channel-name]}
// The specification 'ON_CHANNEL' is required in case of a communication without Gateway (see example below).
// optional alternative: specifications 'ON_TARGET ... VIA_CHANNEL' - They are required in case of a communication via Gateway (see example below).
// optional: adding the declaration of resource-global variables by referencing a global-object
{INCLUDE_GLOBALS name_1}
{INCLUDE_GLOBALS name_2}
... 
// optional: declaration of resource-global variables; A USING namespace directive is possible in front of this declaration.
VAR_GLOBAL (* optional_begin *) CONSTANT RETAIN NON_RETAIN {DMA := 'string'} (* optional_end *)
name_1, name_2, ..., name_n (* optional_begin *) {'key'} AT %address (* optional_end *) : data-type|FB-type := initial-value;
...
END_VAR
TASK task-name1(INTERVAL := TIME#numberms, PRIORITY := number);
 
// optional: more tasks, max. 32 tasks.
// One task can be labeled for sychnronizing IOs. Several tasks can be labeled, if at least one IO service is specified for the additional IO tasks.
{ IO } TASK task-name2(INTERVAL := TIME#numberms, PRIORITY := number);
{ IO := EtherCAT} TASK task-name2(INTERVAL := TIME#numberms, PRIORITY := number);
 
...
TASK task-name32(INTERVAL := TIME#numberms, PRIORITY := number);
        PROGRAM instance-name_1 WITH task-name1 :
            program-type-name_1;
// optional: more program instances that are assigned to the same or a different task
PROGRAM instance-name_2 WITH task-name1 :
program-type-name_2;
...
PROGRAM instance-name_n WITH task-name32 :
program-type-name_n;
 
// optional for resource: instance specific location assignment for symbolically represented variables, inserted by a reference
{INCLUDE_VAR_CFG name}
// optional for resource: instance specific location assignment for symbolically represented variables, directly inserted in the resource
VAR_CONFIG
name AT %address (* optional_begin *) {SIZE := value} (* optional_end *);
...
END_VAR
    END_RESOURCE
 
RESOURCE resource-name_2 ON ...
...
END_RESOURCE
...
RESOURCE resource-name_n ON ...
...
END_RESOURCE
 
// optional for configuration: instance specific location assignment for symbolically represented variables, inserted by a reference
{INCLUDE_VAR_CFG name}
// optional für configuration: instance specific location assignment for symbolically represented variables, directly inserted in the configuration
VAR_CONFIG
name AT %address (* optional_begin *) {SIZE := value} (* optional_end *);
...
END_VAR
END_CONFIGURATION 
 
CONFIGURATION configuration-name_2
...
END_CONFIGURATION
...
CONFIGURATION configuration-name_n
...
END_CONFIGURATION

The following optional syntax allows to access hardware IOs:

    RESOURCE resource-name_1 ON platform-name {...}
// optional: accessing an IO provider
// possibility 1: accessing an IO provider for EtherCAT fieldbuses
// The declaration of resource-global variables is done based on a file (specified by attribute 'PARAMS').
// Due to the synchronization, the declaration is created within a global-object (specified by attribute 'GLOBALS') .
{ IO_IMPORT PROVIDER := EtherCatProvider, SERVICE := EtherCAT, PARAMS := 'path/name_A.xml', GLOBALS := 'path/name_1' }
{ IO_IMPORT PROVIDER := EtherCatProvider, SERVICE := EtherCAT, PARAMS := 'path/name_B.xml', GLOBALS := 'path/name_2' }
// Without the optional attribute 'GLOBALS', the resource-global variables are not automatically declared. This is useful,
// if you want to use e.g. the instance specific location assignments within a VAR_CONFIG section (see below).
{ IO_IMPORT PROVIDER := EtherCatProvider, SERVICE := EtherCAT, PARAMS := 'path/name_C.xml' }
// possibility 2: accessing a generic IO provider for Revolution Pi or PiFace
{ IO_IMPORT PROVIDER := GenericProvider, SERVICE := RevolutionPi|PiFace }
... 

See the following descriptions for more information on these possibilities:

Example for communication without Gateway

After you have created a project, the existing PLC-object local has the following contents:

Example
{
CHANNEL LocalChannel
TCP
ADDRESS := 127.0.0.1;
PORT := 1534;
END_TCP
END_CHANNEL
}
CONFIGURATION LocalConfiguration
RESOURCE local ON BuiltInPlc { ON_CHANNEL := LocalChannel }
TASK DefaultTask(INTERVAL := TIME#500ms, PRIORITY := 38229);
PROGRAM Program1 WITH DefaultTask :
Program1;
END_RESOURCE
END_CONFIGURATION

Example for communication with Gateway

The following example illustrates the required settings, if the Gateway communicates via RS-232 with the PLC.


Example for Controllino Mini
{
CHANNEL ControllinoMINIChannel
TCP
ADDRESS := 127.0.0.1;
PORT := 1535;
END_TCP
END_CHANNEL
}
 
{
TARGET targetControllinoMINI
PARAMS := '{
"transport": {
"type": "RS232",
"parameters": {
"port": 3,
"baud": 115200
}
},
"infrastructure": {
"programmer": "AVRDUDE",
"parameters": {
"port": 3,
"baud": 115200,
"programmer": "arduino",
"processor": "atmega328p"
}
}
}';
END_TARGET
}
 
CONFIGURATION ControllinoMINIConfiguration
RESOURCE controllinoMINI ON ControllinoMINI { ON_TARGET := targetControllinoMINI, VIA_CHANNEL := ControllinoMINIChannel }
TASK DefaultTask ( INTERVAL := TIME#500ms , PRIORITY := 38229 );
PROGRAM Program1 WITH DefaultTask :
Program1;
END_RESOURCE
END_CONFIGURATION