iobroker-community-adapters / ioBroker.beckhoff

ioBroker Adapter to Communicate with Beckhoff Automation System over ADS
MIT License
22 stars 5 forks source link
ads beckhoff iobroker smarthome twincat

Logo

ioBroker.beckhoff

GitHub license Downloads GitHub repo size Translation status
GitHub commit activity GitHub commits since latest release (by date) GitHub last commit GitHub issues
Version:
NPM version Current version in stable repository Number of Installations
Tests:
Test and Release CodeQL

BECKHOFF Adapter for ioBroker

This adapter for ioBroker can Communicate with a Beckhoff Automation System (Twincat 2 or 3) over the ADS Protocol. The ADS Protocol is implemented in every System of Beckhoff and can be used without any License on ioBroker or Automation System.

This Project is not affilate to Beckhoff in any way

Description

Requirements

PLC Configuration

  1. Enable ADS on your PLC project. To do this click on your task and then enable the checkbox before Create symbols. Download the new configuration and make sure you reboot your PLC. The reboot is only needed when you are using TwinCat 2.

    createSymbols

  2. Now add a static route to our Beckhoff PLC. The route should point to your server that will run the proxy application.

    Here an example to add a Static Route directly on PLC u can add this Route also from your EngineeringPC to the PLC.

    createSymbols

    Important is that the AmsNetId and the AdressInfo (IP-Adress) matches with the Adapter Settings. For further Information about TwinCat Router and Security read Documentation on Synchronisierung Beckhoff Information System

  3. On TwinCat 2 Create a Struct and fill in your needed Symbols. Then add this Struct to a GlobalVariableTable.

    Currently Supported Types: BOOL, BYTE, WORD, DWORD, SINT, USINT, INT, UINT, DINT, UDINT, REAL, LREAL, TIME, TIME_OF_DAY, TOD, DATE, DATE_AND_TIME, DT, STRING

    OPTIONAL: You can create a Variable in root of Struct with the exact name -> ioBrokerResync (Not Casesensitiv and not matter which Type) -> Every time this Variable changes his value the Table get resynced in ioBroker.

  4. On TwinCat 3 Create a GlobalVariableTable and fill in your needed Symbols.

    Currently Supported Types: BOOL, BYTE, WORD, DWORD, SINT, USINT, INT, UINT, DINT, UDINT, REAL, LREAL, TIME, TIME_OF_DAY, TOD, DATE, DATE_AND_TIME, DT, STRING

    OPTIONAL: You can create a Variable in root of Variable Table with the exact name -> ioBrokerResync (Not Casesensitiv and not matter which Type) -> Every time this Variable changes his value the Table get resynced in ioBroker.

Adapter Configuration

Twincat 3 and Twincat 2

  1. Choose your Runtime Version
  2. Fill in Target IP-Adress and AMS-Net-ID.
  3. On TwinCat 2 fill in the Instance Name of Struct.
  4. On TwinCat 3 fill in the correct Tablename of the before created GlobalVariableTable.
  5. All other Points u mostly not need to Change.

Twincat 2 <= v2.11.2240

Upload your *.tpy File from your PLC Project -> Every Time you change something on the Struct u communicate with the ioBroker, you need to Upload it again.

Dataexchange

Attention

  1. TwinCAT AMS Router doesn't allow multiple TCP connections from the same host. So when you use two instances on the same host to connect to the same TwinCAT router, you will see that TwinCAT will close the first TCP connection and only respond to the newest.
  2. The Adapter Sync the complete GlobalVariableTable. U have different options to trigger a resync:
    • Create a resync Variable in PLC (See here)
    • When the PLC are not in Run longer your Resync Intervall -> Then the Sync will triggered after the start of PLC.
    • Every Time you Download the Project to your PLC except "OnlineChange"
    • Restart the Adapter
  3. Sync never meant the Dataexchange of the Symbols. Sync is the create or delete the States in ioBroker dependent on the GlobalVariableTable in the PLC.

Changelog

1.6.0 (2024-04-02)

1.5.3 (2023-10-29)

1.5.3-alpha.0 (2023-10-29)

1.5.2 (2023-03-21)

1.5.1 (2022-03-19)

1.5.0 (2021-09-28)

1.4.1 (2021-06-13)

1.4.0 (2021-01-25)

1.3.0 (2021-01-25)

1.2.2 (2020-05-30)

1.2.1 (2020-04-20)

1.2.0 (2020-01-02)

1.1.0 (2019-11-12)

1.0.7 (2019-10-25)

1.0.6 (2019-08-11)

1.0.5 (2019-08-10)

License

The MIT License (MIT)

Copyright (c) 2024 iobroker-community-adapters iobroker-community-adapters@gmx.de Copyright (c) 2018-2023 dkleber89 dkleber89@gmail.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.