Using the Variables window
to access CODESYS variables
Once you have defined your devices, you can use the Workbench to access the variables that reside in those devices.
- From the Workbench left pane, click Variables tab.
The Variables window appears as the
right pane.
The Variables window provides a tree format that lists the started devices in the node. The devices must be in the Started state to be included in the Variables window. Each device can be expanded to show the variables that reside in that device. - You can expand or collapse the tree format to zoom
in or out on a device’s variables. When you select
either an individual data variable or a group of
variables, the Read button will become
enabled, providing the function to read the current
value for the selected device tag elements. Likewise,
the Write button will become enabled
providing the function to write values to the device
tag elements. For information on data types and data
conversion supported by the CODESYSl driver,
see CODESYS
supported access.
- You must ensure that the appropriate levels of security access privileges are in place to restrict the access to data elements to those personnel who have the proper knowledge and understanding when reading or writing device data elements. For more information, see System administration > Security. Some of the data elements may also be configured to be read only within the device using the device’s programming tools. The driver will report an error when attempting to write to variables that have been configured to be read only.