set_param on OPC UA Read
Mostrar comentarios más antiguos
Hi,
I need to connect a model running on 2025a to an OPC UA server. I was able to connect, but Matlab crashes every time I use the Namespace Browser to select the nodes to read or write. I analyzed the stack trace with Copilot and it says that the OPC server is old (true) and most probably answer with some bad data that the browser is uncapable of handling.
I actually could avoid using the browser since I already have a list of nodes with identifiers I can use, and I was able to test read a couple of nodes on Matlab. What I would do is provide the OPC UA Read and OPC UA Write blocks with a NodeList with a set_param, and yet I just can't find the correct way to mke it work.
I tryed set_param(blk, 'NodeList', myNodeList) where myNodeList is:
- a single OPCnode object
- a cell array of node object
- a node object converted to string
- the identifier of a node object
Nothing work, and I couldn't find any useful information in the documentation
Here below I copy a couple of exemples of code I tried to use.
Can anyone help me find the correct syntax? Is what I'm trying to do even possible?
set_param(gcb, 'NodeList', ...
'{struct(''NamespaceIndex'',2,''IdentifierType'',''GUID'',''Identifier'',''18C1C030-A8AC-409C-8D86-48D8C9B4D34F''), ...
struct(''NamespaceIndex'',2,''IdentifierType'',''GUID'',''Identifier'',''D1124F70-FE42-4FC1-92AE-AAE44C21026E'')}');
myNodeList = '{struct(''NamespaceIndex'',2,''IdentifierType'',''GUID'',''Identifier'',''18C1C030-A8AC-409C-8DB6-4BD8C9B4D34F'')}';
Respuestas (0)
Categorías
Más información sobre Server Connection and Browsing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!