How to access an array from an OPC-UA client #1304
Replies: 2 comments 43 replies
-
https://reference.opcfoundation.org/v104/Core/docs/Part6/5.1.6/ python-opcua/opcua/ua/uatypes.py Line 708 in 8582747 from opcua import ua
# ua.Variant(value, varianttype)
ua.Variant([1,2,3], ua.VariantType.UInt16) |
Beta Was this translation helpful? Give feedback.
-
Hi @AndreasHeine With your advice, I have been able to work with 1D arrays on the OPC-UA server. Now, I am facing issues with models having 2D arrays. When I connect to these models using a Python OPC-UA client, it works fine during the simulation. However, at the end of the simulation, I get an array of invalid pointer as shown below: The same model works perfectly fine without an OPC-UA server. But when I simulate it on the OPC-UA server, I get this error, as shown above. That's why it makes me believe that the simulation has something to do with OPC-UA only. Could you please provide me with some insights into this? |
Beta Was this translation helpful? Give feedback.
-
Hello everyone!
I am working on a server-client model for my project. In this project, I have a plant/ system running in OpenModelica (an open-source tool for simulating complex systems), which has a built-in OPC-UA server. I invoke this server for my model and then try to connect it with an OPC-UA client. For the client, I am making use of the Python opcua package.
In my server-client model, I have an array of elements on the server. For my project, I need to access this array on the client-side. Accordingly, I need to modify some of its elements and write them back to the server. In the past, I have worked on accessing single values from the client. However, I am not able to figure out how to access an array using the OPC-UA client. Could you please help me with this?
Regards,
Sudhakar
Beta Was this translation helpful? Give feedback.
All reactions