WEBfactory 2010

Filtering WEBfactory items using the Beckhoff PLC software

In order to be able to filter Beckhoff PLC items when importing them in WEBfactoryStudio, a special comment must be added in the Beckhoff PLC software, next to each desired item.

In the following example, the process of commenting code in Beckhoff PLC software and importing filtered items in WEBfactoryStudio will be described in a step-by-step manner. The Beckhoff PLC software used in this guide is TwinCAT PLC Control.

Use case

For demonstration purposes, we will assume we have a list of 10 variables in the PLC program, and we need to automatically filter 5 variables to be imported in WEBfactoryStudio (using the Import configuration (WEBfactory symbols only)).

Use case solution
  1. In the TwinCAT PLC Control software (or any other Beckhoff PLC software), open the desired PLC program.

    The example PLC program in TwinCAT PLC Control

    The demo program contains 10 variables. The first 5 represent signals that we don't need in WEBfactoryStudio. The last 5 variables need to be imported in the WEBfactoryStudio Beckhoff connector configuration, and from there, in WEBfactoryStudio Beckhoff connector as WEBfactory signals.

    In order to achieve automatic filtering at import, a special WEBfactory comment needs to be placed inline with the variable to be imported. The next step describes the procedure.

  2. Place the (*~ (WEBfactory : 1 : enabled for WF ) *) comment next to the variables that need to be imported in WEBfactoryStudio (as .tpy configuration).

    The items with comments will be filtered in by WEBfactoryStudio

    The variables can also be imported with custom name and custom description. This will require additional parameters in the comment syntax:

    (*~ (WEBfactory  : 1 : enabled for WF
    Name = Example_signal_name 
    Description = Description of the Signal_name)*) 

    The same PLC program code with custom names and comments will look like this:

    The comments containing custom signal name and description

    The custom name will be available in WEBfactoryStudio as Signal name and the custom description as Signal description.

  3. From the menu bar, select Project and click on Build (or press Ctrl+F8). The program will be built and the necessary files can be located in the program's folder. Locate the .tpy file in the build folder.

    The .tpy file is needed for importing Beckhoff items in WEBfactoryStudio

  4. In WEBfactoryStudio, select the WEBfactory .Beckhoff.Ads.Connector and open the Connector Configuration panel. Select the Beckhoff device to import the configuration to, or create a new device by clicking the New button.

    The Beckhoff device to which the items will be imported to

  5. With the desired Beckhoff device selected, click on the Import drop-down menu and select Import configuration (WEBfactory symbols only).

    Importing filtered items only from the configuration

  6. Select the .tpy file from the Beckhoff PLC program build folder and click Open. WEBfactoryStudio will display a dialog confirming the import of the 5 signals from the configuration. The signals are now available in the Signals tab of the Connector Configuration panel. The connector can new be browsed and the signals used in WEBfactoryStudio.

    The newly imported signals in the Beckhoff ADS connector.

    If custom names and descriptions are available for the imported items, the signals resulting from the imported items will have the custom name displayed as Alias and the custom description as Description.