Compiler Warnings

These messages explain the cause of the warning messages from the compiler.

10001 - Macro Redefinition

This warning occurs when the same identifier is used for several definitions.

Example:

  • #define PI 3.14
  • #define PI 3.1416

This can also happen if the same identifier is used for a global definition and definition local to a program.

  • If an identifier is reused, the compiler uses the last definition.
  • If the identifier is defined both in global and local definitions, the local one is used.

10002 - Not IEC Compliant

This warning occurs when the use a semantic or block not compliant with the IEC 61131-3 standard.

This can occur in case of a specific block (e.g., blink) or some C-like operators (e.g., Addition + or EQ =).

10003 - Same Name to a Global Variable and a Local Variable

This warning occurs when the same name is used for a global variable and a variable local to a program.

  • If the variable name is used in the body of the program, it represents the local variable.
  • It is strongly not recommended to reuse names because this creates unclear programming and may lead to confusion and errors.

10014 - Empty Line Ignored in Signal Resource (No Time Defined)

This warning occurs when an empty line is inserted in the definition of a signal resource.

The compiler considers a line as empty if the line has no time value defined.

10015 - On Line Change may not be Possible: Too Many POUs or Variables

If Online ChangeClosed Applies to downloading PLC code changes while the applicaiton is running. is enabled, this warning occurs when more than 10 POUs in an application.

  • Ignore this warning.
    • This warning is for a future feature, when the number of additional POUs during Online Change is configurable.

10019 - Definition of the Block was Changed

This warning occurs when the set of arguments of a block used in a FBDClosed "Function Block Diagram" A function block diagram describes a function between input variables and output variables. A function is described as a set of elementary blocks diagram has changed and diagram was not updated with the new block interface.

Re-select the block and check its input and output parameters in the program referred to by the message.

10020 - Backward Jump may Block the Target Cycle

This warning highlights the use in an FBD diagram of:

When using these programming semantics, be very careful the loop is finite and it brings no risk to hang the PLCClosed "Programmable Logic Controller" A Programmable Logic Controller, PLC, or Programmable Controller is a digital computer used for automation of industrial processes, such as control of machinery on factory assembly lines. Used to synchronize the flow of inputs from (physical) sensors and events with the flow of outputs to actuators and events execution cycle.

10021 - FB Instance Missing (Unsafe)

This warning occurs when a function block is used in an FBD diagram without any instance specified.

  • In some conditions, the compiler may authorize this and an instance is automatically created.
    • This is not safe.
    • This can lead to unpredictable errors if you operate an On Line Change.
  • Always specify a valid declared instance for a function block call.

10022 - Output Used Before it is Set. Execution may be Unsafe

This warning occurs when a sub-program uses the value of a local variable before setting its value.

This can lead to unpredictable errors if you operate an On Line Change.

10023 - Loop Instructions may Block the Target Cycle

This warning highlights the use in an FBD diagram of:

When using these programming semantics, be very careful the loop is finite and it brings no risk to hang the PLC execution cycle.

10024 - Implicit Loops may be Unsafe

This warning indicates an implicit loop in a FBD diagram.

  • An implicit loop is a set of links in between functions without any variable specified in the entire flow.
    Example:
  • This can lead to unpredictable errors if you operate an On Line Change.
  • To avoid any problem, insert a variable on this link.

10025 - Input Parameters are not Considered as IN/OUT

This warning indicates that a sub-program assigns the value of one of its INPUT parameters.

  • This can be correct in some use cases.
  • Avoid any confusion by copying the input parameter to a temporary variable and use it in the sub-program.

10026 - Backward Jumps may Block the Cycle

This warning highlights the use in an FFLDClosed "Free Form Ladder Diagram" of a backward Jumps  JMP  JMPC  JMPNC  JMPCN instruction (i.e., a jump to a rung defined before).

When using these programming semantics, be very careful the loop is finite and it brings no risk to hang the PLC execution cycle.

10030 - Invalid PRINTF Format

This warning indicates a program uses a call to the printf function with a potentially unsupported “%” format.

Only “%ld”, “%lu”, “%lx” formats are supported by all systems.

10033 - LREAL# Prefix is Required to Avoid Loss of Accuracy

By default, REAL and LREAL constants are interpreted as REAL (single precision).

  • If this constant is used in an LREAL expression or statement, it is converted to LREAL (double precision) and this will lose its accuracy.
    • To avoid this, always specify the LREAL# prefix for LREAL expressions.
  • Floating-point numbers are store in memory in binary radix.
    • Even a simple decimal value(e.g., 1.3) is not finite when coded in binary.

10034 - Loop Instructions may Block the Target Cycle

This warning highlights the use in an STClosed "Structured text" A high-level language that is block structured and syntactically resembles Pascal Language program of a loop instruction:

10037 - The Same Modbus Address is Used for Several Variables

This warning indicates a MODBUSClosed ModBus is a serial communications protocol and is now the most commonly available means of connecting industrial electronic devices. ModBus is often used to connect a supervisory computer with a remote terminal unit in supervisory control and data acquisition (SCADA) systems. Versions of the ModBus protocol exist for serial port and Ethernet (it is widely used with TCP/IP over Ethernet) configuration (master or slave) contains two or more variables mapped to the same MODBUS address.

  • This can make sense in some use cases (e.g., map two variables on the same input) and can really highlight a configuration error.
    • Example: Two variables mapped on the same output bit or register.