Register    Login
 
Professional OPC Development Tools
And Services
 
 
SupportOnline Forums
 
Links: Related Pages
 
Links: Related Services
 
Links: Related Support
 
Links: Related Resources
 
Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see link in upper right corner) in order to Post questions. You do not have to be a licensed user.

OPC Labs team is actively monitoring the forums, and provides answers as soon as possible. For your convenience, we have also assembled a Frequently Asked Questions page.

Please do not use the Contact page for technical support.

HINT: You may use the Search feature (magnifier icon below) in the forums to locate the information you need. You can also search our entire Web site (the search box in the upper right corner of every page).

 
 
SupportSupportDiscussions (re...Discussions (re...QuickOPC-ClassicQuickOPC-ClassicQuickOPC-COM  QuickOPC-COM OPC in PHPOPC in PHP
Previous Previous
 
Next Next
New Post
 12/13/2011 11:32 AM
 
 Modified By OPC Labs Technical Support  on 12/13/2011 9:32:47 PM

From: .....
Sent: Tuesday, December 13, 2011 7:15 PM
To: Zbynek Zahradnik
Subject: OPC in PHP

When I try the simplest PHP example on your website, I don't get any response back. It seems that the web server (IIS) hangs on:

$EasyDAClient = new COM("OPCLabs.EasyDAClient.5.0");

And never gets to:

print $EasyDAClient->ReadItemValue("", "ICONICS.SimulatorOPCDA", "Extension_4001")

I have changed the OPC Server reference to "ICONICS.SimulatorOPCDA" and the tag to "Extension_4001". This is both a valid OPC-DA server and a valid tag on the OPC server.

When I use my command-line OPC tool to write the tag it works fine (so the server name is correct and so is the tag name). But through PHP using your Client, I get no response.

The IIS web server and the OPC Server are running on the same machine.

Any ideas what the problem might be?
Submitted By: O.

New Post
 12/13/2011 11:41 AM
 
 Modified By OPC Labs Technical Support  on 12/13/2011 9:43:22 PM

First of all, I must say that the example on our Web site is actually obsolete, and you have allowed me to discover this. The example is for versions 5.0x, while we are currently shipping versions 5.1x. This means that the line you are referring to should actually be

$EasyDAClient = new COM("OPCLabs.EasyDAClient.5.1");

I will fix it on the Web.

Some more notes:

  • I suppose that you are using some software recently downloaded from our side, and not the "old" version 5.0x.
  • I do not understand what you mean by "command-line OPC tool". Is it something that uses our component, too? It would be weird if it were referring to the component in the same way but worked.
  • If the code is not getting past certain statement, then it is probably throwing some exception. The best help for troubleshooting would be to catch the exception and obtain information from it, such as the associated message.

If this does not help, or if you need more assistance, please let me know.

Best regards,

Zbynek Zahradnik

New Post
 12/14/2011 4:40 AM
 

Hello,

.....

> I suppose that you are using some software recently downloaded from our side, and not the "old" version 5.0x.

Correct. I will try correcting the line as per your suggestion.

> I do not understand what you mean by "command-line OPC tool". Is it something that uses our component, too? It would be weird if it were referring to the component in the same way but worked.

No. The "Command Line OPC" tool is something that I wrote in VB6 that does not use your control. It is basically a small program, intended to be used from the command line, that allows you to write OPC tags. It is intended to be a testing tool to verify that a server or tags on the server are working correctly. The only reasons why I mentioned it was to show that I did verify that the server and server tags were working and were accessible when accessed using other software.

> If the code is not getting past certain statement, then it is probably throwing some exception.
> The best help for troubleshooting would be to catch the exception and obtain information from it, such as the associated message.

Thanks for the suggestion. I will try that and, if successful, will post what error I am getting.

Best Regards,

O.

New Post
 12/14/2011 7:26 AM
 

I added some Try/Catch code and the error that I get is an Access Denied error when trying to use the Client. I do not get any error when establishing the COM object.

I have enclosed a screen shot of my testing...

The top left corner is my browser (in this case FF but gives same problem in IE) still showing the error message that occured when I ran the page. Bottom left is my PHP code. Top right is my OPC Server that I am trying to connect to. Bottom right is a command prompt where I have use my OPC tool (not realed to the OPCLabs client) to prove that the server name and OPC tag is correct.

I am logged in as Administrator with administrator priviledges.

I also verified, using RegEdit, that the name of the client (currently installed), indeed, is "OPCLabs.EasyDAClient.5.1".

New Post
 12/14/2011 9:57 AM
 

Hello,

the picture resolution is too low - I cannot read anything - can you please attach a better picture? (it appears to be a problem with the original image file uploaded, not with the fact that it gets resized when displayed on the forums page; I have looked at the original file, too).

Thank you

Previous Previous
 
Next Next
SupportSupportDiscussions (re...Discussions (re...QuickOPC-ClassicQuickOPC-ClassicQuickOPC-COM  QuickOPC-COM OPC in PHPOPC in PHP

 
 
 
 
 

 
 
 
 
Home|Services|Products|Purchase|Downloads|Support|Resources|Company|Contact
Copyright 2007-2012 by OPC Labs Terms Of Use Privacy Statement May 20, 2012