Skip to content

Beckhof TwinCAT driver

Driver to communicate with Beckhof TwinCAT plcs using the ADS protocol, and the python library pyads.

Parameters

Aside from the common parameters described in the communication_driver docs, this driver includes:

  • net_id: The Beckhoff twincat route to the PLC. Default = "192.168.0.1.1.1"
  • port: Port to connect to. Default = 851

Setup data

The setup data will give values to the parameters required and will specify the I/O variables info.

{
    "parameters": {
        "net_id": "192.168.1.160.1.1",
        "port": 851,
    },
    "variables": {
        "GVL.Digital_In1": {
            "datatype": "bool", 
            "size": 1,
            "operation": "write"
        },
        "GVL.Digital_Out1": {
            "datatype": "bool", 
            "size": 1, 
            "operation": "read"
        }
    }
}