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.

Sync read and hold periods in PowerBuilder Application

More
05 Oct 2020 14:51 #8970 by support
Great - thank you for letting me know.

Best regards

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

More
05 Oct 2020 13:19 #8968 by spaxman
We found the issue, is was on the virus scanner on our Databsase Server it was scanning all of Oracle processes.. Caused the slow down. Thanks you for all your help!!!

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

More
05 Oct 2020 06:44 #8965 by support
Hello.

As long as the thing starts communicating OK, I am not aware about any virus scanner issues, or a need to configure the virus scanner.
There is no separate process. The QuickOPC components run inside the process that instantiates the objects - that is, in your application.

Some questions:

1. When you say "...slows down periodically...", is there truly an observed, more or less regular period in which it happens, or is it random?
2. When it happens, does the slow-down affect all communications, or just some? If everything had appeared "blocked", one possible cause would be the .NEt GC (Garbage Collector).

Best regards
The following user(s) said Thank You: spaxman

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

More
05 Oct 2020 00:04 #8964 by spaxman
Thank you for your reply, we are having some odd issues where it slows down periodically, can you tell me if there is any virus scanner issues? Do we need an exception tin the virus scanner? What is the name of the client when in runs in the background? I would like to see it in task mgr. Since I have isolated set to true will I have multiple exe running in taskmgr. Thanks for your help...

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

More
02 Oct 2020 07:20 #8962 by support
Hello.
The code snippets you provided are correct for what you intended to achieve.

The OPC asynchronous method are meant to allow the client proceed with other work, while the server fulfills the request. The EasyDAClient does not, however, expose asynchronous API to make use of this. All ReadXXXX and WriteXXXX method calls on EasyDAClient are synchronous. Even if OPC async calls are used internally, the way the programmer "sees" them through EasyDAClient is synchronous.

I do not expect any measurable speed difference between the two approaches.

Best regards

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

More
01 Oct 2020 16:47 #8961 by spaxman
Thanks for your response, Let me ask another question. Is async reads faster then sync reads? It is critical I read from device but I just want the fastest method. Which works faster. And if I wanted to change to async reads I would
change this
g_opclabs.InstanceParameters.Mode.AllowAsynchronousMethod = false // only do sync reds
g_opclabs.InstanceParameters.Mode.AllowSynchronousMethod= true
to this
g_opclabs.InstanceParameters.Mode.AllowAsynchronousMethod = true
g_opclabs.InstanceParameters.Mode.AllowSynchronousMethod= false

is that correct

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

More
01 Oct 2020 13:59 #8959 by support
Do I understand it correctly that you are connecting to just one Kepware server? The remainder of my answer is based on this assumption; let me know if the assumption is not correct.

With the default settings, yes, no matter whether use just one EasyDAClient instances or multiple instances, connections to the same server will be shared - so there will be just one connection.

If you want separate connections, set the Isolated property to 'true'. From the code you posted earlier it looks like that you are doing so, so if this is the case on (all) your EasyDAClient instances, then there will be separate connection to the target OPC server for each of them.

The issue you are observing (random delays), however, may be on the server side, and not related to one operation "blocking" another. If you keep getting it with all Isolated=true settings, one way to find out more would be to use OPC Analyzer and check how long it takes the server itself to respond.

Best regards

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

More
30 Sep 2020 18:09 #8958 by spaxman
Ok thank you. I have another question on this same topic.

I have upwards of 10 machines on a line all talking through kepware. They each have their own channel/thread in kepware.
We are reading and writing multiple tags (50 to 100) in the plc every second in most cases. But then randomly we will get up to 5 sec delay on one machine on the write. It seems like opc labs is sharing all the 10 connections is that true. How can I speed up and have dedicated connections to each plc.

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

More
30 Sep 2020 12:22 #8957 by support
Hello.

Your code does multiple things, but yes, what you have done should force the component to do synchronous reads/writes only.

Regarding the remaining questions, is there any issue with cleaning up, or what is it that you are trying to achieve? Normally, it should be enough to set the g_opclabs to variable to whatever is the equivalent of NULL in PowerBuilder.

Best regards

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

More
29 Sep 2020 15:54 - 30 Sep 2020 12:22 #8952 by spaxman
I have the following settings in my PowerBuilder Client app. I want to do a synchronous device read/writes. Am I missing any settings? do you have any other suggestions on settings that I should be using? Also how do I close my client app cleanly. I haven't been able to call the dispose method successfully.

g_opclabs = CREATE OLEObject
g_opclabs.ConnectToNewObject("OpcLabs.EasyOpc.DataAccess.EasyDAClient")
g_opclabs.Isolated = true
g_opclabs.InstanceParameters.Mode.AllowAsynchronousMethod = false // only do sync reds
g_opclabs.InstanceParameters.Mode.AllowSynchronousMethod= true
g_opclabs.InstanceParameters.Mode.DesiredMethod = 0
g_opclabs.InstanceParameters.UpdateRates.ReadAutomatic = -1 //System.Threading.Timeout.Infinite
g_opclabs.InstanceParameters.UpdateRates.WriteAutomatic = -1 //System.Threading.Timeout.Infinite
g_opclabs.InstanceParameters.HoldPeriods.TopicRead = 600000 //keep tags active for 10 MIN  after each read
g_opclabs.InstanceParameters.HoldPeriods.TopicWrite = 600000 ////keep tags active for 10 MIN after each write
Last edit: 30 Sep 2020 12:22 by support.

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

Moderators: support
Time to create page: 0.059 seconds