Professional OPC
Development Tools

logos

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.

Newbie Question #2: Concsistent data-transfer

More
18 Jan 2016 16:13 #3786 by support
You are right in the sense that if you really want the guarantees, then you have to go the way with Device reads. I am just saying what the recommendations are; they exist for a reason (performance, blocking, ...).

OPC DA does not address the atomicity issue outside of a single item. It is either not achievable at all, or is vendor-specific. Inside a single item (value), even when it is a complex data type (such as an array or string), I would expect it to be a consistent reading of device values, and it probably says so somewhere in the OPC specs, but I cannot provide an evidence to that out of my head.

Best regards

Please Log in or Create an account to join the conversation.

More
18 Jan 2016 16:02 #3784 by Hanssing

support wrote: - in DAReadItemArguments.ReadParameters. DAReadItemArguments are passed to EasyDAClient.ReadMultiple[Values].
- in some EasyDAClient.ReadItem[Value] overloads: they take DAReadParameters as an argument.

Thanks, did not find it in concepts, but I kinda figured it would be there since teh structure still existed. I will try it our.

support wrote: Note that use of Device reads (and especially Sync ones) is considered a bad practice in OPC.

Yes, but they are usefull if you want a responsive application.

How else would you ensure Device-initiated consistent transfer of multiple values?
- All data have time-stamps newer than Flag transfer-trigger or older by more than Age-value?

Can we in general be sure that OPC-reads/subscriptions of complex data-types (Arrays, strings etc) are atomic in nature or is this vendor-specific from Device to Device?

Hanssing

Please Log in or Create an account to join the conversation.

More
18 Jan 2016 15:21 #3783 by support
The functionality you refer to has not been removed, the parameter has just been moved to a different object. It is now in DAReadParameters.DataSource.

You can set this e.g.

- in DAReadItemArguments.ReadParameters. DAReadItemArguments are passed to EasyDAClient.ReadMultiple[Values].
- in some EasyDAClient.ReadItem[Value] overloads: they take DAReadParameters as an argument.


Note that use of Device reads (and especially Sync ones) is considered a bad practice in OPC.

Best regards

Please Log in or Create an account to join the conversation.

More
18 Jan 2016 14:35 #3780 by Hanssing
I the old days, there was a DeviceRead-method which could be used to ensure consistent, immediate and current datatrasfer:
EasyDaClient.ClientMode.DataSource = DADataSource.Device;

This was changed in newer versions og the library.
How does one ensure consistent transfer of multiple items including the read-order in newer versions where this method has been removed?

Example:
PLC assigns data (In time-order) to ItemA, ItemB, ItemC, and afterwards signals New Data available in FlagD

OPC-application should read (in time-order) FlagD, ItemC, ItemB, ItemA
If FlagD is signalled, then data data allways contain consistent values.

If using subscription, then the application would have to wait a full agetime after seing the signal before data would be consistent. So the transfer-cycle is two times longer than it actually needs to be.

Can a reading of certain subscribed values be forced ?
Or can the behavior of DeviceReads be triggered somehow?

Regards
Hanssing

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.047 seconds