-

Safety Semantic Error: The variable '...' is read before written.

Basically, variables must be written before they can be read. Otherwise, the safety-related application may show a storing behavior because the result of writing a value would not be effective until a later cycle.

Remedy:
  1. Double-click the error in the Error List to jump to the suspected worksheet (where the variable concerned is marked).
  2. Modify the code accordingly.

    Consider the execution order for eliminating the error:

    • Networks are executed from top to bottom.
    • Inside each network, the execution order is from left to right and top to bottom.
    • Is the 'Feedback' flag set for variables involved?

    This means that the variable is read in a preceding network or, if only one network exists, left of the write access.

    The CROSS REFERENCES window supports you in finding the relevant code positions.
    Create the cross references and filter the list for the variable concerned. See topic "CROSS REFERENCES Window" for details.