OPC UA write to BaseDataType is not supported

9 ビュー (過去 30 日間)
Andrea Alexandra
Andrea Alexandra 2024 年 12 月 9 日
回答済み: Mguirhi 2025 年 3 月 18 日
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

回答 (2 件)

Govind KM
Govind KM 2024 年 12 月 10 日
編集済み: Govind KM 2024 年 12 月 10 日
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 2025 年 3 月 18 日
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!

カテゴリ

Help Center および File ExchangeUnified Architecture についてさらに検索

製品


リリース

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by