Issue of the topic:
Iam building a homeautomation with an RPI 3.
For digital IO´s i use
Beckhoff EK1100 as Ethercat Coupler
Beckhoff EL1008 as DI
Beckhoff EL2008 as DO
EthercatMaster is installed and working.
I need help to connect on DI to one DO with Openhab.
Hi
tanks for your link.
now i try a different way, and run in an other error.
I try to communicate throu shell scrips to my ethercat slaves.
But the exec binding is not working
i do it by the following steps:
install exec binding
create my script Test.sh
“halcmd setp.0.2.dout-2 1”
withlisted the script in /etc/openhab2/misc/exec.whitelist
/path/to/my/script/Test.sh
Can’t help much unless you trace what happens in logs. Take a look to /var/log/openhab2 and see if you have any error there. If not try setting up log level to DEBUG for org.openhab.addons.exec (as far I remember).
@Tecko - -openhab-beckhoff integration have certain semantics in order to reflect all configuration options required by PLC.
That’s why you need to follow discovery step by step or create elements manually with required options. The end result is like below:
co7io-plc4x-ads:ams, this is receiving AMS interface. You set openhab AmsNetId at this level as well as decide which IP address to use for AMS/ADS communication.
co7io-plc4x-ads:network, this level defines a AMS/ADS connection to Beckhoff device - it depends on parent element which specifies openhab AmsNetId for communication with PLC.
co7io-plc4x-ads:ads, this is an grouping structure where you can read specific PLC fields by defining channels.
This is very short introduction - in order to get any data from PLC you need to define all above elements and then add channels to ads thing. Channels are defined in two formats - <index>/<offset>:ads-type (or 0x<index>/0x<offset>:ads-type for hex notation) or <symbol-name>:type. Symbol resolution is an experimental feature. I noticed that it did not work properly with some TwinCat 2 devices, so safest option is to use index/offset notation. List of known ads types is available here: [co7io] Industrial integrations with Beckhoff ADS/Siemens S7, with a small note - that not all of them are tested and handling of these is subject of incoming updates. You should be safe with int/decimal variants and bit/boolean types.
In your screenshot for example I see that you have Beckhoff ADS Device stuck in initializing phase. Please make sure it is linked to valid network element which enables connection.
Not sure if checked our PDF manual which might be a help to get a working configuration.