Replies: 1 comment
-
|
I was able to get it to write to the server. From the Program.cs I can also get the value back and decode the bytes to the type. Both write and read have StatusCode Good. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Type of issue
Current Behavior
To summarize: I can't write a custom datatype to the server, because I get a BadTypeMismatch.
In more detail:
I tried to break the structure of the custom datatype down to a minimum and then read the value on the server and write it back directly. Using console output the value and datatype of the read and the written value are the exact same, but I get a BadTypeMismatch.
Below I have listed some other approaches I have tried (I'm sorry for the huge text, but I hope I didn't miss anything important):
Additional info:
Reading works fine, I can see the results in the Softing OPC UA Client or in the terminal (here as XML Element).
The custom datatype variable has Access Level and User Access Level "CurrentRead, CurrentWrite" (3).
Code:
In the following code I changed the TypeName, FieldName and NodeIds to symbolic names.
From the Program.cs code:
Additionally, here are the Variable and Type definition:
Thank you for your help :)
Expected Behavior
The behavior I expect is to be able to write to a custom datatype on the server, or at least to it's fields.
In the end I would have more fields including nested structures.
Steps To Reproduce
No response
Environment
Anything else?
I also tried various different approaches:
a) here I then first tried something similar to #790 (the constructor creates new instance with FieldName initializes to 0):
b) Then I thought I might need to make use of the Encoding, thus I changed it to:
c) I also tried to manually recreating the value:
The XML now looks like this:
Beta Was this translation helpful? Give feedback.
All reactions