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-Classic in .NET
- Connections, Reconnections, COM/DCOM
- Sync read and hold periods in PowerBuilder Application
Sync read and hold periods in PowerBuilder Application
Best regards
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
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
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
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.
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.
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.
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.
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.
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
Please Log in or Create an account to join the conversation.
- Forum
- Discussions
- QuickOPC-Classic in .NET
- Connections, Reconnections, COM/DCOM
- Sync read and hold periods in PowerBuilder Application