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.

No method available to convert ProgID to CLSID error using PHP.

More
30 Aug 2024 13:12 #13090 by chris@innopak.com
Thank You.....it works!

For reference here is the correct string!

$Client2 = new COM("OpcLabs.EasyOpc.UA.EasyUAClient");

print $Client2->ReadValue("opc.tcp://192.168.223.57:4840","nsu=urn:CX-709B7F:BeckhoffAutomation:Ua:PLC1;ns=4;s=.stPlantPort.FromMWU.Realtime.ActualOrderCount");

Thanks again!
The following user(s) said Thank You: support

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

More
30 Aug 2024 13:06 - 30 Aug 2024 13:06 #13089 by support
Last edit: 30 Aug 2024 13:06 by support.

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

More
30 Aug 2024 12:39 #13088 by chris@innopak.com
Thanks for the quick response. But it is still not working. I get.

Failed to create COM object `EasyUAClient'

I tried.....

$Client = new COM("EasyUAClient");
$Client = new COM("EasyOpc.DataAccess.EasyUAClient");
$Client = new COM("DataAccess.EasyUAClient");

all produce COM errors.

Thank You

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

More
30 Aug 2024 12:30 #13085 by support
Hello.

In your PHP code, you are trying to access the server using the EasyDAClient class, which is for OPC "Classic" servers (COM/DCOM based). However, as it can be seen from your working VBA example, and from the URL of the server (which uses "opc.tcp:"), your server us actually an OPC UA server.

So you need to change your PHP code to actually *really* match the VBA code. I.e. you need to use the EasyUAClient object, and the ReadValue method.

I hope this helps.
Best regards

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

More
30 Aug 2024 12:21 #13084 by chris@innopak.com
Hi,
I am in the test phase of using the COM object in VBA and PHP. I have the VBA object working no problem. I have having issues with the PHP COM not working.

VBA WORKS WITH THIS.
Dim Client As New EasyUAClient
Debug.Print Client.ReadValue("opc.tcp://192.168.223.57:4840", "nsu=urn:CX-709B7F:BeckhoffAutomation:Ua:PLC1;ns=4;s=.stPlantPort.FromMWU.Realtime.TotalScrapSheets")



PHP CODE FAILS TO OUR SERVER BUT WORKS WITH YOUR DEMO SERVER.
<?php

$Client = new COM("OpcLabs.EasyOpc.DataAccess.EasyDAClient");

// THIS CALL TO YOUR DEMO SERVER WORKS
print $Client->ReadItemValue("", "OPCLabs.KitServer", "Demo.Single");


// THIS CALL TO OUR LOCAL SERVER FAILS. IT IS THE SAME SERVER THAT THE VBA WORKS ON.

print $Client->ReadItemValue("","opc.tcp://192.168.223.57:4840","nsu=urn:CX-709B7F:BeckhoffAutomation:Ua:PLC1;ns=4;s=.stPlantPort.FromMWU.Realtime.ActualOrderCount");

FAILS “No method available to convert ProgID to CLSID”

Any insight would be appreciated.

thank you

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

Moderators: support
Time to create page: 0.053 seconds