opcua-asyncio icon indicating copy to clipboard operation
opcua-asyncio copied to clipboard

Cannot get OPC attribute "ArrayDimensions" to show up with Python list

Open LB767 opened this issue 1 year ago • 0 comments

There is seemingly no way to get ArrayDimensions to be something else than None/Null when creating a fixed size array variable.

The following does not work:

await cfg.add_variable(idx, "test", [1,2])
await cfg.add_variable(idx, "test", ua.Variant([1,2], ua.VariantType.Int32, 2))
await cfg.add_variable(idx, "test", ua.Variant([1,2], ua.VariantType.Int32, [2]))

or any combination of None for some arguments, in fact, the 2 last ones do not even set is_array to true

These result in ValueRank set to OneOrMoreDimensions and ArrayDimensions set to None while I would expect to see ValueRank = OneDimension and ArrayDimensions = [2]

It could be due to this line which should maybe be >= instead of >

Python 3.10.4 asyncua 1.0.2

LB767 avatar Jul 09 '23 14:07 LB767