- Posts: 152
- Thank you received: 0
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.
PHP opc retrieving signals
After installing everything and also PHP 7.2.8 and the latest OPC component sem that is workign we are still testing it but at least we don't have the previous error anymore until now I will keep you updated.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
But they should all work with respect to QuickOPC (this is not to say that they all should work in IIS etc. - that's not our concern).
Regards
Please Log in or Create an account to join the conversation.
VC15 x64 Non Thread Safe (2018-Jul-18 12:51:38)
or this one:
VC15 x64 Thread Safe (2018-Jul-18 12:51:20)
Please Log in or Create an account to join the conversation.
- php-5.6.36-Win32-VC11-x86
- php-7.2.8-nts-Win32-VC15-x64
Regards
Please Log in or Create an account to join the conversation.
which version of PHp on php.net did yo uinstalled x64 with NTS ?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Nevertheless, I suspect the issue might be what we have already addressed in the upcoming QuickOPC 2018.3. We have therefore projected the fix back into 2018.2, and made a new build that is now available on the Download page of our Web site. Please download the latest build (it should identify itself as 5.53.293.1 or later on the 1st page of Setup) and re-test.
It is also possible that the error was an inappropriate indication of some other problem. If you still get problems, but a different error message, we would need the new error text.
Regards
Please Log in or Create an account to join the conversation.
C:\php>php bdn.php
PHP Fatal error: Uncaught com_exception: Source: OpcLabs.BaseLib
Description: Attempt to add existing item into a set. in C:\php\bdn.php:12
Stack trace:
#0 C:\php\bdn.php(12): com->BrowseDataNodes('opcua.de...', 'nsu=http://te
st...')
#1 {main}
thrown in C:\php\bdn.php on line 12
Fatal error: Uncaught com_exception: Source: OpcLabs.BaseLib
Description: Attempt to add existing item into a set. in C:\php\bdn.php:12
Stack trace:
#0 C:\php\bdn.php(12): com->BrowseDataNodes('opcua.de...', 'nsu=http://te
st...')
#1 {main}
thrown in C:\php\bdn.php on line 12
FYI bdn.php is the renamed example that you provide under console example of php named Browsedatanodes.php
Please Log in or Create an account to join the conversation.
Server is 2012 R2 so it is fully compatible and we use the latest COM opc component downloaded today
so when I use this in PHP DON'T WORK:
<?php
$opcServer = "opc.tcp://XXX.XXX.XXX.XXX:49320";
$opcPath = 'ns=2;s=MOYNORHB1.RHB1';
$client = new \COM("OpcLabs.EasyOpc.UA.EasyUAClient");
$monitoringParameters = new \COM("OpcLabs.EasyOpc.UA.UAMonitoringParameters");
try {
$nodeElements = $client->BrowseDataNodes($opcServer, $opcPath);
} catch (\Exception $e) {
echo $e->getMessage();
}
foreach ($nodeElements as $nodeElement) {
echo $nodeElement->BrowseName.' '.$nodeElement->NodeId.PHP_EOL;
}
the similar code in delphi on the same machine:
var
Client: OpcLabs_EasyOpcUA_TLB._EasyUAClient;
Count: Cardinal;
Element: OleVariant;
NodeElement: _UANodeElement;
NodeElementEnumerator: IEnumVariant;
NodeElements: _UANodeElementCollection;
begin
// Instantiate the client object
Client := CoEasyUAClient.Create;
NodeElements := Client.BrowseDataNodes(
'opc.tcp://XXX.XXX.XXX.XXX:49320/',
'ns=2;s=MOYNORHB1.RHB1');
NodeElementEnumerator := NodeElements.GetEnumerator;
while (NodeElementEnumerator.Next(1, Element, Count) = S_OK) do
begin
NodeElement := IUnknown(Element) as _UANodeElement;
Memo1.Lines.Add(NodeElement.BrowseName.ToString+ ' : ' + NodeElement.NodeId.ToString);
end;
end;
WORKS PERFECLT
so what is the issue ?
ah I got this error in PHP:
Source: OpcLabs.BaseLib
Description: Attempt to add existing item into a set.
C:\inetpub\wwwroot\opc>
PS. Your BroseDataNodex example return excatly same error .... this is with version of PHP 7.0.7 with 7.2.2 don't give me any error and no node showed... (Nice)
Please Log in or Create an account to join the conversation.