- Posts: 3
- Thank you received: 1
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.
- chris@innopak.com
-
Topic Author
- Offline
- Junior Member
-
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!
Please Log in or Create an account to join the conversation.
Look here:
opclabs.doc-that.com/files/onlinedocs/OPCLabs-OpcStudio/Late...Read%20a%20single%20value.html
(COM part, switch to "PHP" tab)
Best regards
Please Log in or Create an account to join the conversation.
- chris@innopak.com
-
Topic Author
- Offline
- Junior Member
-
- Posts: 3
- Thank you received: 1
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.
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.
- chris@innopak.com
-
Topic Author
- Offline
- Junior Member
-
- Posts: 3
- Thank you received: 1
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.