Handling complex types #3378
Unanswered
JaxMcCleary
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello lads and gents,
i am currently trying to figure out how to access variables from an S7 which are published through a opc server. The variables itself are within a root user defined structure. This user defined structure has multiple user defined structures with additional variables.
structure
I wanted to use monitoredItem and a subscription to monitor them with their node id.
The registration of the monitored items aparrently succeeds but when I change their values over another opc client (different session) the callback method (RootItemSates_Notification) won't be triggered within my client code.
The callback for the monitored items look like this.
It works fine when I use it for variables that are not defined within user defined structures.
Do i have to define a monitored Item for the entire User Defined Structure?
I also tried to read and write variables within those user defined structures:
I don't get an exception while reading but the DataValueCollection has zero entries. Which should not be the case since there are values in those variables.
If I try to write into the variables within the structure I run into an exception:
I have searched for quiet some time. Sadly there are not many results for user defined structures with the OPCFoundation library. Especially if you want to monitore them.
#243
I have seen this issue. But in the sample he is reading a function and also he is not monitoring them.
Beta Was this translation helpful? Give feedback.
All reactions