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.
Data Change
Currently this option is recorded, but not in any plans - sorry.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
In order for this to work, two things will have to be fulfilled:
1. You will need to have a non-compliant OPC server that does this. Some servers do...
2. Currently, I think that QuickOPC also ignores such notifications - so we will have to provide some option.
Best regards
Please Log in or Create an account to join the conversation.
I have noticed the same issue using the OPC DA client. I would like any update to trigger a subscription, like the example above, if a tag has an existing value of 10 but the next written value is also 10. I would like this to cause the subscription callback to trigger.
At the moment this doesn't happen for me, is there a setting I can edit to ensure that all updates are captured?
Thanks
Please Log in or Create an account to join the conversation.
Ad 1, 4. The sampling interval tells the server how often to collect the values from the underlying system. The publishing interval tells the server how often to send the changes to the client. In the simpler overloads of SubscribeXXXX methods, we let you specify just the sampling interval, and determine the publishing interval by some heuristics from it automatically, but when you need to go the "detailed" route, you need to provide more info, and this is one of them.
Ad 2. No, UADataChangeTrigger.Status would basically inform you just when the status changes from Good to Bad or vice versa. My understanding is that you need UADataChangeTrigger.StatusValue. The default is UADataChangeTrigger.StatusValueTimestamp.
Ad 3. Hmmm... I would have to go deep to OPC-UA specs to be completely sure, but I think that this kind of condition is not in the specs, and therefore if you want a notification with a timestamp when there was no value change (though the item has been written into), you need to stay with being informed about ALL timestamp changes - the way it behaves by default already.
Best regards
Please Log in or Create an account to join the conversation.
- adid@contel.co.il
- Topic Author
- Offline
- Platinum Member
- Posts: 106
- Thank you received: 0
i have few questions :
1. what is the samplingInterval ? what does it mean when i use datachange event ? why i need it ?
2. from the example you mention i understand that if i want to get only the value change than i use DataChangeTrigger.Status, correct ?
3. in addition to value change i try to get the timestmp change only when someone wrote again to the tag, for example if someone wrote 10 to tag and after 1 minute wrote another time 10 to the same tag.
i don't undertand how to accomplish this by the possibilites you mention. i try to monitor tag with same value using DataChangeTrigger.StatusValueTimestamp and saw that even the tag wasn't changing i am getting datachange event every 1 second ( when the samplingInterval was 1000 ).
4. what is the publishingInterval ? what does it mean when i use datachange event ? why i need it ?
thank you,
Adi Damty
Please Log in or Create an account to join the conversation.
easyUAClient.SubscribeMonitoredItem(
new EasyUAMonitoredItemArguments(
new UAAttributeArguments(endpointDescriptor, nodeDescriptor),
new UASubscriptionParameters(publishingInterval),
new UAMonitoringParameters(samplingInterval,
new UADataChangeFilter(UADataChangeTrigger.StatusValue))));
Here is how UADataChangeTrigger is defined:
using Opc.Ua;
using OpcLabs.BaseLib.Annotations;
namespace OpcLabs.EasyOpc.UA
{
/// <summary>
/// Specifies the conditions under which a data change notification should be reported.
/// </summary>
/// <remarks>
/// If the <see cref="UADataChangeFilter"/> is not applied to the monitored item, <see cref="StatusValue"/> is the default
/// reporting behaviour.
/// </remarks>
[Designable]
public enum UADataChangeTrigger
{
/// <summary>
/// Report a notification ONLY if the StatusCode associated with the value changes.
/// </summary>
Status = DataChangeTrigger.Status,
/// <summary>
/// Report a notification if either the StatusCode or the value change. The Deadband filter can be used in addition for
/// filtering value changes.
/// </summary>
/// <remarks>
/// This is the default setting if no filter is set.
/// </remarks>
StatusValue = DataChangeTrigger.StatusValue,
/// <summary>
/// Report a notification if either StatusCode, value or the SourceTimestamp change. The Deadband filter can be used in
/// addition for filtering value changes.
/// </summary>
StatusValueTimestamp = DataChangeTrigger.StatusValueTimestamp,
}
}
Please Log in or Create an account to join the conversation.
- adid@contel.co.il
- Topic Author
- Offline
- Platinum Member
- Posts: 106
- Thank you received: 0
i use OPC-UA with quickOPC 5.23 dll.
so if i want just the value to cause raise the event what should i do ?
i saw that the function SubscribeMonitoredItem has some ways to call it, but none of them answer my question.
thank you,
Adi Damty
Please Log in or Create an account to join the conversation.
- The Exception property (success when null, versus any non-null indicating an error)
- in "Classic" OPC, the Vtq object - all its subproperties: Value, Timestamp, or Quality are considerd
- OPC-UA, the AttributeData object - all its subproperties: Value, ServerTimestamp, SourceTimestamp, StatusCode
So, it might be e.g. that the timestamp has changed - check all the above to see if they differ.
Notes:
1. In OPC "Classic", we do additional filtering on the callbacks that come from the server. So, if the server sends the same VTQ combination repeatedly, we recognize it, and do not raise the event. This kind of filtering is not done in OPC-UA (yet), though.
2. In OPC-UA, there is a way to tell the server what precisely should trigger the server to return new data (e.g. Value or StatusCode change, or also include the Timestamp, etc.) - it's in the parameters to the subscription.
Best regards
Please Log in or Create an account to join the conversation.
- adid@contel.co.il
- Topic Author
- Offline
- Platinum Member
- Posts: 106
- Thank you received: 0
i listen to the datachange event and it's all working fine,
but there is tag that i get from him data change event, when the tag doesn't change ( i save the tag value and saw several times it doesn't changed ).
what is the reasons i can get change event even if the tag value doesn't changed ? maybe if the status changed or something like this ?
thank you,
Adi Damty
Please Log in or Create an account to join the conversation.