Open kdxq opened 1 month ago
I think the reson is in the opcua-server. I use 0.11.0, the opcua-server throw error as follow:
[nioEventLoopGroup-2-1] INFO org.apache.plc4x.java.opcua.context.SecureChannel - Active transaction Number 0
[nioEventLoopGroup-2-1] INFO org.apache.plc4x.java.opcua.context.SecureChannel - Active transaction Number 1
[nioEventLoopGroup-2-1] INFO org.apache.plc4x.java.opcua.protocol.OpcuaProtocolLogic - Decoding Message with Security policy None
[nioEventLoopGroup-2-1] INFO org.apache.plc4x.java.opcua.context.SecureChannel - Active transaction Number 2
[nioEventLoopGroup-2-1] INFO org.apache.plc4x.java.opcua.protocol.OpcuaProtocolLogic - Decoding Message with Security policy None
[nioEventLoopGroup-2-1] INFO org.apache.plc4x.java.opcua.protocol.OpcuaProtocolLogic - Public Key Length 1303
[nioEventLoopGroup-2-1] INFO org.apache.plc4x.java.opcua.context.SecureChannel - Active transaction Number 3
[nioEventLoopGroup-2-1] INFO org.apache.plc4x.java.opcua.protocol.OpcuaProtocolLogic - Decoding Message with Security policy None
[milo-shared-scheduled-executor-0] INFO org.apache.plc4x.java.opcua.context.SecureChannel - Active transaction Number 4
[milo-shared-scheduled-executor-0] WARN org.apache.plc4x.java.opcuaserver.backend.Plc4xCommunication - java.util.concurrent.TimeoutException Occurred while reading value, using timeout of 250ms
[nioEventLoopGroup-2-1] INFO org.apache.plc4x.java.opcua.protocol.OpcuaProtocolLogic - Decoding Message with Security policy None
[nioEventLoopGroup-2-1] ERROR org.apache.plc4x.java.opcua.protocol.OpcuaProtocolLogic - Read request ended up with ServiceFault:
╔═ExtensionObjectDefinition/ResponseHeader══════════════════════════════════════════════════════════════════════════╗
║╔═timestamp═══════════════════════════╗╔═requestHandle╗╔═serviceResult/StatusCode/statusCode═╗ ║
║║0x01dad8202780b370 133656771574150000║║ 0x00000002 2 ║║ 0x80270000 2150039552 ║ ║
║╚═════════════════════════════════════╝╚══════════════╝╚═════════════════════════════════════╝ ║
║╔═serviceDiagnostics/DiagnosticInfo═════════════════════════════════════════════════════════════╗╔═noOfStringTable╗║
║║╔═reserved╗╔═innerDiagnosticInfoSpecified╗╔═innerStatusCodeSpecified╗╔═additionalInfoSpecified╗║║ 0x00000000 0 ║║
║║║b0 false ║║ b0 false ║║ b0 false ║║ b0 false ║║╚════════════════╝║
║║╚═════════╝╚═════════════════════════════╝╚═════════════════════════╝╚════════════════════════╝║ ║
║║╔═localeSpecified╗╔═localizedTextSpecified╗╔═namespaceURISpecified╗╔═symbolicIdSpecified╗ ║ ║
║║║ b0 false ║║ b0 false ║║ b0 false ║║ b0 false ║ ║ ║
║║╚════════════════╝╚═══════════════════════╝╚══════════════════════╝╚════════════════════╝ ║ ║
║╚═══════════════════════════════════════════════════════════════════════════════════════════════╝ ║
║╔═additionalHeader/ExtensionObject══════════════════════════════════════════════════════════════════╗ ║
║║╔═typeId/ExpandedNodeId═══════════════════════════════════════════════════════════════════════════╗║ ║
║║║╔═namespaceURISpecified╗╔═serverIndexSpecified╗╔═nodeId/NodeIdTypeDefinition════════════════════╗║║ ║
║║║║ b0 false ║║ b0 false ║║╔═nodeType/NodeIdType═══╗╔═NodeIdTwoByte═══════╗║║║ ║
║║║╚══════════════════════╝╚═════════════════════╝║║0x0 0 nodeIdTypeTwoByte║║╔═id═══╗╭┄identifier╮║║║║ ║
║║║ ║╚═══════════════════════╝║║0x00 0║┆ 0 ┆║║║║ ║
║║║ ║ ║╚══════╝╰┄┄┄┄┄┄┄┄┄┄┄╯║║║║ ║
║║║ ║ ╚═════════════════════╝║║║ ║
║║║ ╚════════════════════════════════════════════════╝║║ ║
║║║╭┄identifier╮ ║║ ║
║║║┆ 0 ┆ ║║ ║
║║║╰┄┄┄┄┄┄┄┄┄┄┄╯ ║║ ║
║║╚═════════════════════════════════════════════════════════════════════════════════════════════════╝║ ║
║║╔═encodingMask/ExtensionObjectEncodingMask═══════════╗╭┄identifier╮ ║ ║
║║║╔═reserved╗╔═typeIdSpecified╗╔═xmlbody╗╔═binaryBody╗║┆ 0 ┆ ║ ║
║║║║ 0x0 0 ║║ b0 false ║║b0 false║║ b0 false ║║╰┄┄┄┄┄┄┄┄┄┄┄╯ ║ ║
║║║╚═════════╝╚════════════════╝╚════════╝╚═══════════╝║ ║ ║
║║╚════════════════════════════════════════════════════╝ ║ ║
║╚═══════════════════════════════════════════════════════════════════════════════════════════════════╝ ║
╚═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
0.12.0, the opcua-server throw error as follow:
The incompatible datatype exception means that value you expect to be a float is encoded differently. Try first switching getFloat
to getObject
to determine how it is being transmitted. Second step - with 0.12 you can also specify read value type in opc ua tag address.
add data type,but still get value none.
I used plc4x-opcua-server as server, and used ua_export as client.
when I add the url to ua_export client pop error as follow:
then, I ignore it, ua_export show the data structure as follow:
and get data in loop, error as follow
0.11.0 version,eip part got values , but opcua part still error。
@kdxq Can you try ns=1;s=FanSpeed;REAL
syntax for OPC UA tags?
@splatch do you mean like this? still failed
by the way. when I write data. only float type is ok, all others type all failed.as follow
@splatch did you mean like this? still failed
Hi,@ottlukas ,@splatch,I have tested the opcu ua server from 0.10.0 to 0.13.0, but none of them were able to read data, and none of the data types worked. Do you have any other testing suggestions? Additionally, the testing sources for the OPCUA I am using are publicly available online (https://github.com/node-opcua/node-opcua/wiki/publicly-available-OPC-UA-Servers-and-Clients). Can you provide some guidance on how to conduct the testing,Or publish a config. xml file that you believe can correctly read and write data related to OPC UA configuration? I want to make plc4x better and more stable.
@kdxq I’m going to work on some integration tests which will need working opc ua server. I’ll try to pull this issue as part of test setup. I’ll work on plc4j from 1st August.
@kdxq I've had a look on behavior of starfive demo server and there is something odd in there. I could not fully reproduce your issue. To be fair, I could not connect to demo server at all with 0.13-SNAPSHOT. Interestingly, local instance of node-opcua do not have this issue.
I've found that with 0.13 anonymous authentication differs between clients. We do not supply client nonce nor certificate for create session request if security mode is NONE. I'll try to fix connectivity issue first and then see if readout issue still remains.
I connected to your service and, based on the tool's view, the data type should be Double, not Float.
@kdxq I connected to your service and, based on the tool's view, the data type should be Double, not Float.
What happened?
uaExpert can read data,just like follow;![image](https://github.com/user-attachments/assets/4cd15245-5f8e-428e-9fe7-8d30c5c5a2ff)
I use opcua-server,config as follow:![image](https://github.com/user-attachments/assets/1397df40-e16e-4bb6-9b47-17f2337c5c02)
and the opcua server init. seems ok.![image](https://github.com/user-attachments/assets/31d199c5-6314-4f24-8747-92b44caec564)
and use opcua to read data from opcua-server, code as follow![image](https://github.com/user-attachments/assets/da59d055-b46d-4554-bc37-e1022c4a0e3a)
but the FanSpeed return Null![image](https://github.com/user-attachments/assets/78860660-8974-43ba-b0b7-81e0e587f990)
what's wrong? @splatch please give me some suggest, waiting for your replay, thank you very much!
Version
v0.12.0
Programming Languages
Protocols