Register    Login
 
Professional OPC Development Tools
And Services
 
 
ProductsQuickOPC-COMPHP
 
 
Links: Related Pages
 
Links: Related Services Maximize
 
Links: Related Products
 
Links: Related Resources
 
Catalog Listings
 
Integrating PHP and OPC

Are you having difficulties incorporating the OPC data into your PHP solution? Need to do it quickly and in quality? If so, QuickOPC-COM comes to the rescue.

QuickOPC-COM is a set of components that simplify the task of integrating OPC into applications. Reading a value from OPC Data Access server, or writing a data value can be achieved in just one or two lines of code!

QuickOPC-COM is a radically new approach to access OPC data. Traditionally, OPC programming required complicated code, no matter whether you use OPC custom or automation interfaces. OPC Server objects must be instantiated, OPC Group objects must be created and manipulated, OPC Items must be added and managed properly, and subscriptions must be established and maintained. Too many lines of error-prone code must be written to achieve a simple goal – reading or writing a value.

New: QuickOPC can now connect to OPC UA (Universal Architecture) servers.

QuickOPC-COM Price List

 
Software Download

You can download the product from the Downloads page.

The downloaded software runs with a trial license, and can be upgraded to full version by simply adding a commercial license, without reinstallation.

 
Code Samples

QuickOPC is unbelievably easy to use - here is a PHP example which reads and displays OPC data from a common OPC server:
<?php
  // Create EasyOPC-DA component
  $EasyDAClient = new COM("OPCLabs.EasyDAClient.5.0");

  // Read item value and display it
  print $EasyDAClient->ReadItemValue("", "OPCLabs.KitServer", "Demo.Single");
?>
Do you think it can be any simpler? But the simplicity is not the only advantage; the component is also very powerful. Using complex heuristic algorithms to optimize itself on the fly, it provides the most efficient, fastest access to the OPC data.

Application-side subscriptions are possible, too. The PHP example below shows how subscribe to changes of a single item and display the value of the item with each change.

<?php
class DEasyDAClientEvents {
    function ItemChanged($varSender, $varE)
    {
       print $varE->Vtq->ToString();
       print "\n";
    }
}

$EasyDAClient = new COM("OPCLabs.EasyDAClient.5.0");
$Events = new DEasyDAClientEvents();
com_event_sink($EasyDAClient, $Events, "DEasyDAClientEvents");

$EasyDAClient->SubscribeItem("", "OPCLabs.KitServer.2", "Simulation.Random", 1000);

print "Processing item changed events for 1 minute...\n";
for ($time = 0; $time < 60; $time++) com_message_pump(1000);
?>

 
Tips and Tricks
 
 
 
 
 

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