OPC UA write to BaseDataType is not supported

9 visualizaciones (últimos 30 días)
Andrea Alexandra
Andrea Alexandra el 9 de Dic. de 2024
Respondida: Mguirhi el 18 de Mzo. de 2025
I have a simulink model that exchanges data through OPC UA blocks, my model was working correctly but I closed it and reopened it and now when I run it I get the following error:
MATLAB System block 'RealTime_BSM1_WSAN_1/OPC UA Write1/opcInternalBlock' error occurred when invoking 'outputImpl' method of 'opcUAWrite'. The error was thrown from '
'C:\Program Files\MATLAB\R2024a\toolbox\icomm\opc\opcblks\opcuablks\opcUAWrite.p' at line 0'.
Writing to BaseDataType type nodes is not supported.
Español: Tengo un modelo simulink que intercambia datos a través de bloques OPC UA, mi modeloe staba funcionando correctamente pero lo he cerrado y vuelto a abrir y ahora al ejecutarlo me aparece el error que se menciona anteriormente

Respuestas (2)

Govind KM
Govind KM el 10 de Dic. de 2024
Editada: Govind KM el 10 de Dic. de 2024
Hi Andrea,
I encountered a similar issue when trying to write to a node using OPC UA blocks in Simulink. The node in question was a Variable node with a Server Data Type of BaseDataType. As per OPC UA specifications, the BaseDataType is Abstract, which does not have an encoding and is hence not supported by the Industrial Communication Toolbox. A solution that worked for me was to update the server to set the node data type as one of the supported OPC UA server data types mentioned here:
Details on BaseDataType are mentioned in documentation from the OPC Foundation:
Hope this helps!

Mguirhi
Mguirhi el 18 de Mzo. de 2025
I'm facing the same issue. I am working on a Simulink model and exchanging data with my PLC through OPC read and write blocks. When I start the simulation, everything works fine, but after 3 to 5 minutes, I get this error:
"C:\Program Files\MATLAB\R2024a\toolbox\icomm\opc\opcblks\opcuablks\opcUAWrite.p at line 0."
I adapted each variable data type going to and coming from the PLC as the documentation suggests (REAL → SINGLE, etc.), but the issue persists.
For the record, I deleted the OPC UA Write block and tested with just the OPC UA Read block, and I encountered the same error, but now it mentions opcUARead instead of opcUAWrite.
Can anyone help with this? Thanks in advance!

Productos


Versión

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by