Hi Gregor, i will look for your issue to write/read the basic types and arrays. At the moment the support for custom/dynamic types is not included into the OPC UA integration. If you could provide me there some example code, we could try to find there a solution for or at least the information if it is intentionally not included 😊
Greetings Matthias Matthias Strljic, M.Sc. Universität Stuttgart Institut für Steuerungstechnik der Werkzeugmaschinen und Fertigungseinrichtungen (ISW) Seidenstraße 36 70174 Stuttgart GERMANY Tel: +49 711 685-84530 Fax: +49 711 685-74530 E-Mail: [email protected] Web: http://www.isw.uni-stuttgart.de -----Ursprüngliche Nachricht----- Von: Gregor Minuge <[email protected]> Gesendet: Tuesday, September 15, 2020 2:20 PM An: [email protected] Betreff: Problems with Read/Write using PLC4J OPC UA driver Hi everyone, I have two questions regarding the PLC4J OPC UA driver. I am connecting to the Eclipse Milo Server using the standard syntax as described here<https://plc4x.apache.org/users/protocols/opc-ua.html>. 1. I'm not able to read arrays (or their elements). All other data types work fine, but I don't understand how to add array fields as items to the readRequestBuilder. I'm either (obviously) getting a ClassCastException when I'm trying .additem(.../BooleanArray) or an PlcInvalidFieldException when trying to access a field of the array like addItem(...BooleanArray[0]). The response.getObject(fieldName) call mentioned under the "Getting Started<https://plc4x.apache.org/users/plc4j/gettingstarted.html>" section on the website is not helping, because compilation already fails before getting the response. If the reading of arrays is already implemented, could you please point me in the right direction here? 1. Likewise, I'm not able to write all data types. Apart from unsigned types, I'm having problems with Array, CustomStructTypeVariable, CustomUnionTypeVariable, AnalogValue, Object, Byte, ByteString, DateTime, Guid, QualifiedName, SByte, UtcTime, Variant and XmlElement. I'm either getting an AccessDenied-error, probably because I'm trying to write the wrong data type to a field (which is especially strange for Byte), or a "java.lang.IllegalArgumentException: no field handler for class ... found" exception. I could provide my code if needed, but as I'm generally following the suggested path for writing a writeRequest/Response, and it is working fine for simpler file types, I'd like to know whether these other types are already supported by the PLC4J library or not. Lastly, if these features are not implemented in PLC4J, are there any plans to do so in the future, or would you recommend using Eclipse Milo to a wider extent, even if that meant neglecting the PLC4X-API in part? If it is the former and it would be appreciated, we could imagine helping you in your efforts. Thanks for your time! Best regards Gregor Minuge
