04-25-2024 03:35 AM
Hello everybody
I want to read and write variables via OPC UA to my Codesys PLC in one file. Reading is working perfectly as you see in the image below. But everytime i want to write somethin the error message: Bad_TypeMismatch is coming. I tried the MultipleRead with Variant and with String (my node is a String right when the nodeID is s=) but none of the are working.
This is my Labview block diagram:
What is wrong with my block diagram?
PS Here is the UAExpert POV from that node:
Thanks for helping
mgele
Solved! Go to Solution.
04-25-2024 05:01 AM - edited 04-25-2024 05:02 AM
If your data type is Int16:
why you trying to put String here? Of course, you will get Type Mismatch, it is expected.
Try to write Int16, the types should match:
Variant after proper cast will also work, but I would to recommend to use dedicated type as configured in PLC. Read and write in one command is not possible with NI OPC UA Toolkit (and not sure if this possible with OPC UA at all by design, but this needs to be checked).
11-25-2024 03:54 AM - edited 11-25-2024 04:13 AM
@Andrey_Dmitriev wrote:
Variant after proper cast will also work, but I would to recommend to use dedicated type as configured in PLC. Read and write in one command is not possible with NI OPC UA Toolkit (and not sure if this possible with OPC UA at all by design, but this needs to be checked).
As far as I see it is not a feature of the OPC UA specification. Except the method call of course but that is a different service interface.