Global variables mapping to hardware
Global variables must be mapped to hardware variables, because the HW variables alone can not be used in programs.
Click the „Compile“ button and click the „PLC“ item in Solution explorer twice. This opens the PLC editor at the main workspace. In the editor, select the “I/O mapping” tab in the lower part of the window. In the tab, find your I/O module, and assign the created variables to the module I/Os. In the „IO⇒ST“ column, input variables are assigned, such as temperature sensors, and in the „ST⇒IO“ column, the output variables, such as relays and valves.
Another option is to have the variables generated and assigned automatically. When clicking on the device, you can set the automatic generation of variables, the “autogen” function can also be set for individual HW variables. After entering the variable name in the “Name for Autogen” field, you can right-click on a row or select multiple rows and then click and select “Set Autogen”.
Then check “Enable Autogen” and click OK and the variable will be generated and automatically mapped to the selected HW variable.
More about Autogen you can find in chapter Autogen