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.

ReadMultipleItemValues not very fast

More
04 Mar 2011 18:11 #316 by support
Thanks for details.
For PHP and ASP, we recommend to use the out-of-process option (Local Server). This is because otherwise a new copy of the component might get loaded with each new request, causing unnecessary connections to/ and disconnections from the OPC server.
To do so, run the EasyOPC-DA Options utility (from the Start menu), and on the System Parameters tab, uncheck the "COM Registration: In-process server" box, and make sure that the "Local server" box is checked, as on the attached picture.
If you already have the settings precisely as on the picture, let me know and we will have to search for another cause.
When measuring the times, please exclude the the first call - that one may take longer, because of the same extra work needed to set up the connenction initially.
Untitled.png

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

More
04 Mar 2011 14:42 #315 by Markus

Hello!
1. I tested with 2 up to 5 items
2. Didn't know how to see this
3. No, I didn't
4. Yes, works faster
5. the code ...
<?php
header ("Content-Type:text/xml");
function getMultipleValues($signals){
$EasyDAClient = new COM("OPCLabs.EasyDAClient.5.0");
$values = $EasyDAClient->ReadMultipleItemValues("", "Softing.OPC.ModbusTcp.DA.1", $signals);
$i=0;
$res = '';
foreach ($signals as $p) {
$res .= ''. $values[$i]->Value() .'';
$i++;
}
$res.='';
return $res;
}
$server = new SoapServer(NULL, array('uri' => "http://192.168.150.95:8080/"));
$server->addFunction('getMultipleValues');
$server->handle();
?>
Regards
Markus

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

More
04 Mar 2011 14:12 #314 by support
Hello.
In general, I would consider 2-10 seconds to be quite slow. However, let me please ask some additional questions, and I will then give you better targeted reply:

How many items are you reading roughly (in one call)?
Are you using QuickOPC-COM component registered as Local Server, or In-process?
Have you changed any QuickOPC settings from their defaults (either using the EasyOPC-DA Options utility, or by setting properties in your code)?
Have you tried to reach your OPC server using some other OPC client, and if so, what kind of performance do you see?
Can you post the relevant parts of your code?

Many thanks

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

More
04 Mar 2011 08:57 #312 by Markus
Hello!
I'am using Quick OPC COM with PHP 5.3.
I've written an SOAP Server with answers my Requests. Because the OPC Server don't run on the same Machine as the PHP Script. I Use ReadMultipleItemValues, it runs every 3 Seconds. But it works not very fast. The QuickOPC Requests needs between 2 and 10 seconds to Answer.
Do you have any Idea why, or is that normal?
Best Regards
Markus

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

Moderators: support
Time to create page: 0.047 seconds