Open dirk-zimoch opened 1 year ago
Interesting.
I have never seen a write-only variable before. That will need some effort...
Things I see in your configuration:
bini=read
cannot work if the node is not readablemonitor=y
neitherHow should we get the right definition of the OPC UA data type, if the node is not readable? Does a client like UA Expert still show the type?
bini=read
cannot work if the node is not readablemonitor=y
neither
I think those are simply the defaults. The OUT
link reads:
field (OUT, "@SUB1 ns=2;s=$(SetParam)")
This is what uaexpert sees. The type is "Boolean":
I know these are the defaults - just saying that these defaults will not work for write-only variables, as they configure the client to read at connection-up and set up a monitor.
Ok. So UaExpert can read the type without having read access to the data. I need to find out how I can get to that information.
The only things uaexpert logs for this are:
Attribute Plugin | OPC UA Server | Read attributes of node 'NS2|String|Data.Node2' succeeded [ret = Good].
Reference Plugin | OPC UA Server | Browse succeeded.
"Read attributes" - sounds good.
Found it. I need to use the browse (introspection) interface of the server to do that. That gets me access to all the attributes of a node without reading the value.
Up to now I was just reading the value, which also gets me the data type.
Maybe do that only if initialRead fails because of BadNotReadable?
Yes. Otherwise I would have to always add a lot of OPC UA traffic just to cover that rare case.
We have an OPC UA server with some write-only variables. Writing to them causes the error message:
unsupported conversion for outgoing data
The data type is Null. This type is deduced from
incomingData
, which of course had not been set during startup, because the variable is not readable. See also:status=BadNotReadable.