Thank you very much for a test drive! Much appreciated given very short technical introduction.
The error you found is definitely my fault - I didn’t check configuration syntax despite of XML validation failures. I will be uploading a new version.
As I did not manage to get documentation yet, the easiest way is to click through inbox and adding devices via paper ui.
The configuration for Beckhoff in things file should look similar to this:
Bridge co7io-plc4x-ads:network:SomeNetworkInstance [host, port, targetAmsId, targetAmsPort, sourceAmsId, sourceAmsPort, refreshInterval*] {
Thing co7io-plc4x-ads:ads:SomePlcInstance [refreshInterval*] {
Channels:
Type switch : input01 "Label for 01" [field, refreshInterval*]
}
}
Configurations with a star character are optional. Ams parameters are passed to connection string and are coming from protocol requirements. Currently only channels of switch type are supported.
The field value is depends on PLC kind, for Beckhoff it is:
'symbolicAddress':'adsDataType'['numberOfElements']*, number of elements is optional0x'indexGroup'/0x'indexOffset':'adsDataType'['numberOfElements']*- if index is formatted in hex'indexGroup'/'indexOffset':'adsDataType'['numberOfElements']*- if index is formatted as decimal
You can mix hex notation at index group and offset, but for clarity of this little help I keep it in these three variants.
Supported ADS data types are:
- BIT
- BIT8
- BITARR8
- BITARR16
- BITARR32
- INT8
- INT16
- INT32
- INT64
- UINT8
- UINT16
- UINT32
- UINT64
- FLOAT
- DOUBLE
- BOOL
- BYTE
- WORD
- DWORD
- SINT
- USINT
- INT
- DINT
- UDINT
- LINT
- ULINT
- REAL
- LREAL
- STRING
- TIME
- TIME_OF_DAY
- DATE
- DATE_AND_TIME
- ARRAY // not sure how this gets mapped
- POINTER
- ENUM
- STRUCT
- ALIAS
- SUB_RANGE_DATA_TYPE
Data types vary on each PLC (Siemens uses slightly different set), however there is an ongoing effort in the PLC4X to align some of the standard ones.
I will work on getting some VPN connection, so I will be able to test changes on Ads devices too.
Updated version 20200102 - 2.5.0-SNAPSHOT - Introduced support for contact items and numeric values, fixes in channel config descriptors for Beckhoff ADS.
Cheers,
Łukasz