-

Error (Safety Specific Code Generator): Unknown variable.

A variable is used in the code which is not declared. Possibly, there is a typing error.

Remedy:

  1. Double-click the error in the Error List (MESSAGES window) to jump to the suspected code worksheet (where the variable is marked).
  2. Right-click on the variable and select 'Create New Variable > Variable type' from the context menu, or left-click the variable and select the appropriate in-place button:

    local variable
    input variable in an FB POU
    output variable in an FB POU
    external variable

  3. Set the variable properties (data type, initial value, various flags, etc.) in the 'Variables' table.

Further Info
Refer to the topics "Variable Properties ‣ Variable/Port Properties
×‣ Variable Declaration Keywords (Usage)
×
" and Variable Declaration Keywords ‣ Variable/Port Properties
×‣ Variable Declaration Keywords (Usage)
×
" for details.