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:
Type: TwinCAT .Ads Beckhoff
ID: ID assigned
Name suffix: Name control
Create: Press button to generate object
DisplayName: Name control
NetID: Enter the NetID
+: Adding data areas to be used for communication
DataBlockID: ID for this data block.
Length: Length of the data area
Name: Name of the data area
Dir: Definition of input or output data
IndexGroup, IndexOffset, VariableName: Parameters are automatically set by the controller
UpdateList: Updating the variable list from the controller
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).
Set: By ‘Set’ the now given parameters are set.
Here is an example configuration of the data areas:
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.
Selection of the communication direction
Selection of the control ID
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.