Semantic Error (SEM1036): The variable '...' does not exist.
In a code worksheet, a variable is used (read/written) which is not yet declared in any variables table (neither local nor global).
The easiest way to enter the declaration directly from the code worksheet into a 'Variables' table is using the variable's context menu.
In the code editor, right-click the variable to be declared and select 'Create New Variable' from the context menu. In the appearing submenu, you can select the scope and type of the new declaration.
Depending on the selected command, the declaration is written into the respective table (local 'Variables' table or Data List of the controller runtime) using the appropriate declaration keyword ('Usage' = Local, Input, Output, InOut). The declaration is inserted without opening the 'Variables' table/Data List.
For specifying further attributes (e.g., RETAIN), an address declaration or an initialization, the 'Variables' table or Data List must be opened.
Further Info
For information on variables and how to declare them refer to the topic "Declare Variables/FB Instances" |