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.

Read not Completed

More
11 Aug 2014 13:29 #2152 by support
Replied by support on topic Read not Completed
I do not see anything obviously wrong with your code, although of course I could not analyze it in full, just "scan it" on its surface. One thing that somewhat puzzles me is the use of Mutex which looks heavyweight here, if it serves just to work as a C# "lock" statement (a critical section), plus the way it is coded is not safe (exceptions will leave the mutex in an incorrect state) - but unless you see the code being deadlocked somewhere, this should not be related to the problem reported.

Therefore I do not currently know what the reason for the errors can be. One possible thing to do involves some extra work, and it would be to deploy an OPC Analyzer (which we can provide to you) to monitor the communication between the client and the server. Doing so should at least allow deciding with reasonable certainty whether the problem is on the client side or the server side. However the OPC analyzer acts as a middle OPC client/server piece in the communication therefore it needs a modification in your client app (to point to a different server), and can sometime introduce new issues. Let me know how you would like to proceed.

Best regards

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

More
08 Aug 2014 15:33 #2145 by philgerm
Replied by philgerm on topic Read not Completed
thank' s for your answer

1) I have one thread to communicate with one instance of EasyDAClient.
2) I have only one Instance of EasyDAClient.
3) First the application call SubscribeMultipleItems for all flags ( bool item in plc )

In the Main thread( Surveille) , whe tested the state at 1 of all the flags for message trigerring( several items in plc).
If one Flag is set with goog quality, the application
call a ReadMultipleItems to read the value from that message in the plc. Normaly all flags state from that plc must be "Good Quality".

I have add the 2 files
1) DrvOPC.cs the class with all functions for OPC operations.
2) The main thread Surveille.cs the important lines are:

166 : SubscriptFlagsValueList(..)
352 : GetAsyncFlagValueList(..)
369 : Test On Flags state( for message triggering)
375 : GetTagValueList(...) // Read the tags in the plc

Thanks for your Help

Best regard's

Philgerm
Attachments:

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

More
08 Aug 2014 14:43 #2144 by support
Replied by support on topic Read not Completed
To me, that looks more like an accident rather than a solution.

Can you please answer the following questions:

1. Is your app multi-threaded?
2. Are you creating more than one EasyDAClient instance?
3. Can you describe in general items what the app is doing with regard to EasyDAClient calls (the "usage pattern") - the sequence of methods it executes.
4. When you wrote "I specify that reading and writing multiple items are only made on running PLC without bad quality items, and not on the stoped PLC." - how is that achieved? Do you sequentially first call ReadMultipleItems for items that reside on one PLC, and then for a second PLC, or is there a different approach?

Thank you

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

More
08 Aug 2014 07:53 #2143 by philgerm
Replied by philgerm on topic Read not Completed
it's OK with 10000 ! ( 10s )

Best regards

philgerm

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

More
07 Aug 2014 15:43 #2139 by philgerm
Replied by philgerm on topic Read not Completed
Whe have set the timeout on 50000 ( 50 sec) and whe received always the error message
"Read not completed" on reading good Items.

Thanks for your help.

Philgerm.

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

More
07 Aug 2014 13:20 #2138 by philgerm
Replied by philgerm on topic Read not Completed
Thank you for your answer,

We are going to test with a bigger TimeOut value. On the other hand, I specify that reading and writing multiple items are only made on running PLC without bad quality items, and not on the stoped PLC.
When whe restarded the stoped PLC, whe don't have any error message "Not completed".

Best regard,

philgerm

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

More
07 Aug 2014 09:29 #2137 by support
Replied by support on topic Read not Completed
Have you considered that this may be a genuine timeout, i.e. that the server truly takes more than 5 seconds to fulfill the request? Remember that it has to work on multiple items at once, and can only return the results when it has the data for all of them, and (depending on the implementation of the server) in the case of PLC down, it may take longer than usual - a time is needed to determine that there is a communication problem.

What happens if you increase the timeout significantly?

Best regards

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

More
06 Aug 2014 16:41 #2132 by philgerm
Read not Completed was created by philgerm
We have an application that communicating with 20 PLC ( 5400 tags) over OPC TopServer 5.13.191/
The application is on NET 4.0 with opcda.classic 5.12 from Software Toolbox.
When a PLC is down with Bad Quality items , whe receiving the exception message"Read not completed:...., or "Write not completed:This Error... "on good items from another PLC that on Multiple items reading or writing.
The read and write Timeout operation is set on 5s

m_ReadWriteTo = 5000;
m_ClientOPC.Timeouts.BrowseAccessPaths = m_ReadWriteTo; /
m_ClientOPC.Timeouts.WriteItem = m_ReadWriteTo;
m_ClientOPC.Timeouts.ReadItem = m_ReadWriteTo;
m_ClientOPC.Timeouts.BrowseServers = m_ReadWriteTo;
m_ClientOPC.Timeouts.GetProperty = m_ReadWriteTo

Thanks in advance...
philgerm

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

Moderators: support
Time to create page: 0.070 seconds