Online Forums
Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.
Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.
Do not use the Contact page for technical issues.
- Forum
- Discussions
- QuickOPC-UA in COM
- Reading, Writing, Subscriptions
- Writing Mapped object Receives Callback after calling writing method of UAClientMapper
Writing Mapped object Receives Callback after calling writing method of UAClientMapper
Ad 3) It is possible to map to timestamps etc. separately, but you are right, in this case it would make it fairly difficult to combine the pieces back together. It would therefore be better to map the whole AttributeData.
If you can guarantee precise-enough synchronization of the times used by the client and by the server (comes for free if they are on the same machine), then you can simply note the time when you have issued a Write, and discard any incoming values (from Subscription or Read) that have their timestamp earlier than the time of the Write. Note: OPC UA itself demands certain level of time synchronization (required e.g. for security reasons), but that may not be good enough.
Regards
Please Log in or Create an account to join the conversation.
- Captain_Dash
- Topic Author
- Offline
- Platinum Member
- Posts: 69
- Thank you received: 0
to 2) How can I determine when the first subscribe arrives? I am doing the mapping in this way
[UANode(BrowsePath = ".Initialize"),
UAData(Operations = UADataMappingOperations.All, Kind = UADataMappingKind.Value),
UAMonitoring(SamplingInterval = 250), UASubscription(PublishingInterval = 500)]
public bool Initialize
{
get { return initialize; }
set { SetProperty(ref initialize, value); }
}
How do I get notice about the arriving of the first subscription? Does this link to 3) and I need to observe the timestamp of a value?
To 3)
I know I can map to other mapping kinds like timestamp, but how do I know that this callback refers to the subscription or how is it possible to identify this? Or do you mean by that, that I know this implicit by getting a value which is older then the one I got from the reading? This also means, I need to Bind to AttributeData, otherwise a value could be set before i receive the timestamp.
Best regards
Please Log in or Create an account to join the conversation.
There is no specific "Subscribe with Read" - but in fact, the Subscribe tells the server to always sent the initial data, which is thus equivalent to Read; the problem is only that you do not how much time it'll take the server to send this data.
There may be more possibilities to solve the issue, and frankly, I have not tried them out or analyzed in details. They are e.g.:
1. The artificial delay after Subscribe. Not sure about the right value either.
2. Introduce a "wait", until the first subscribe arrives (that is, have a delay, but the delay would be only as long as needed).
3. Use the timestamps on the incoming values to determine the age of the value and whether or how it should be interpreted (or discarded).
4. Introduce a "high-level protocol" which would not have this kind of timing glitch; probably involving more than one tag for a "handshaking". Requires a change on the OPC server/device side, though.
Of course, all of this complicates the otherwise "nice and clean" code - but there probably isn't a way to do it otherwise.
Best regards
Please Log in or Create an account to join the conversation.
- Captain_Dash
- Topic Author
- Offline
- Platinum Member
- Posts: 69
- Thank you received: 0
I will try to get all the required informations tomorrow and answer your questions in detail. We maybe have an idea, but i will do some further investigation to correctly explain it.
best regards
Please Log in or Create an account to join the conversation.
thank you for the files.
Unfortunately, you have not followed the instructions (kb.opclabs.com/Collecting_information_for_troubleshooting ), and therefore I cannot do meaningful analysis; assets missing are:
2. Extended tracing output (for OPC UA only).
3. EasyUAClient.LogEntry records (for OPC UA only).
4. A log of relevant occurrences in your own application.
5. OPC server log(s), if available.
All of them are important, but I am specifically missing #4: You should provide an information (with timestamps) about when your properties were set from the Live Mapping and to what values, and which Live Mapping operations (Read, Write, Subscribe( you have called and when.
Other observations and questions:
A. Have the properties been actually improperly set (with version 2017.1 = 5.50) when you took this particular trace?
B. You have included some image (without further explanation) that were supposedly meant to show differences between the two versions. If you wanted to point to the fact of different sequence of the WriteRequest/response and ReadRequest/Response, then this should not be a problem, because the "Read" is for an internal housekeeping variable used to check the status of the subscription, and not for any of your own data items.
C. Even though I have not seen it in the particular trace with version 5.50, I can imagine a situation where the client sends a PublishRequest followed by a WriteRequest, receives WriteResponse, but then receives a PublishResponse with the "old" values. Client would then issue another PublishRequest, and the server would send a PublishResponse with proper, "new" values. Whether this will happen or not depends on the server implementation, and will tend to happen mainly shortly after the subscription is created, if it is followed quickly by a Write, because at that point the server may not yet have sent the initial value. But I would have to actually see that in the traces in order to be able to identify it as a cause.
Regards
Please Log in or Create an account to join the conversation.
- Captain_Dash
- Topic Author
- Offline
- Platinum Member
- Posts: 69
- Thank you received: 0
Please Log in or Create an account to join the conversation.
Best regards
Please Log in or Create an account to join the conversation.
- Captain_Dash
- Topic Author
- Offline
- Platinum Member
- Posts: 69
- Thank you received: 0
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- Captain_Dash
- Topic Author
- Offline
- Platinum Member
- Posts: 69
- Thank you received: 0
I saw that the order of some requests was switched, but I am not aware why this is happening. Our Code was the same in both versions, I only updated the quickOpc nuget package.
Added short snapshots of the order of requests which are different.
Please Log in or Create an account to join the conversation.
- Forum
- Discussions
- QuickOPC-UA in COM
- Reading, Writing, Subscriptions
- Writing Mapped object Receives Callback after calling writing method of UAClientMapper