Beckhoff TwinCat ADS

TwinCAT controllers from Beckhoff are integrated via TwinCAT.Ads.

Before a Beckhoff controller can be added within Viper, suitable TwinCAT Router software must be installed and configured on the computer. The software version depends on the installed software on the controller and the compatibility to the Viper version (see Viper.NET Dependencies).

In order to add a new Beckhoff controller via the Hardware Explorer, a new hardware must be added by right-clicking on “HW” and then proceeding as follows:

../../../_images/gio-beckhoff-CreateNewHW.png
  1. Type: TwinCAT .Ads Beckhoff

  2. ID: ID assigned

  3. Name suffix: Name control

  4. Create: Press button to generate object

  5. DisplayName: Name control

  6. NetID: Enter the NetID

  7. +: Adding data areas to be used for communication

../../../_images/gio-beckhoff-CreateNewHW-EditDatablock.png
  1. DataBlockID: ID for this data block.

  2. Length: Length of the data area

  3. Name: Name of the data area

  4. Dir: Definition of input or output data

  5. IndexGroup, IndexOffset, VariableName: Parameters are automatically set by the controller

  6. UpdateList: Updating the variable list from the controller

  7. Dropdown List: Display of available variables (by clicking on the dropdown list, you can search for variable names by clicking in the top empty row).

  8. Set: By ‘Set’ the now given parameters are set.

Here is an example configuration of the data areas:

../../../_images/gio-beckhoff-CreateNewHW-example.png

Afterwards the hardware has to be initialized via the button “Init” and closed via the button “OK”.

As a last step the data areas for input and output data under “Data” in the hardware explorer have to be linked with the “dataBlockIds” configured in the hardware.

../../../_images/gio-beckhoff-ConfigData.png
  1. Selection of the communication direction

  2. Selection of the control ID

  3. Selection of the dataBlockId assigned in the hardware

Finally all changes within the hardware explorer have to be saved via “Save”. Without saving, all changes made will be lost.