Skip to main content

Reading and Writing of Variables on the PLC

Reading and writing of parameters

. Reading and writing of parameters
  • Your project contains a symbol configuration with symbols for project variables.

  • The same state of the project and the boot application exists on the CODESYS Automation Server as on the PLC.

  • The CODESYS Automation Server is connected to a PLC.

  1. In the CODESYS Automation Server, click PLCs → List View.

  2. Select the tile view _cas_icon_table_view.png and click the _cas_icon_details.png button (Details) for the corresponding PLC.

    The PLC Details view opens.

  3. Select the Configuration tab.

  4. In the Synchronization group, select the Synchronize parameters option and click the Save Configuration button.

    Note: If this option is not selected, then the write described in the following steps cannot be performed successfully on the PLC.

  5. Select the General tab.

  6. Click the _cas_icon_parameter_black.png (Parameters) button.

    The Parameters for PLC: <PLC name> dialog opens and shows the project variables that can be read and written. The value after Value notification is the current value of the variable on the PLC.

    _cas_img_write_parameters.png
  7. Click into the input line and type in a new value.

    When the first character is typed in, the display is extended and the Old value and New value displays appear.

    For Old value, the value is displayed that was used when the variable was written previously.

  8. To write the new value to the PLC, click Confirm.

    The CODESYS Automation Server reports whether or not the write operation was successful.