lbillett Posted September 24, 2010 Share Posted September 24, 2010 I want to fetch information from an OPC Server and was hoping to use PHP to do it. However, googling hasn't gotten me very far. It doesn't appear to be a very popular thing to do, which I find strange considering the reasonably large presence and multitude of other connectors OPC seems to have. Anybody out there ever try something like this? My problem could be that it's so simple I just don't realize the way through. I'm trying to display values from a Foxboro DCS on our intranet with PHP via OPC. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/214301-can-php-connect-to-an-opc-server/ Share on other sites More sharing options...
roopurt18 Posted September 24, 2010 Share Posted September 24, 2010 I don't know much about OPC but if the server supports socket connections and you know the protocol you could always establish a read and write sockets and just talk to the server that way. Quote Link to comment https://forums.phpfreaks.com/topic/214301-can-php-connect-to-an-opc-server/#findComment-1115225 Share on other sites More sharing options...
lbillett Posted September 27, 2010 Author Share Posted September 27, 2010 I think establishing a direct connection sounds a little over my head. At this stage my experience has been limited to making sql connections/queries and coming up with cute customized output in our mediawiki installation. It looks like I might be able to connect to this same type of resource using ODBC, which would be preferable but I can't seem to get any meaningful data from it... It seems I could also purchase some kind of connector, but I'm not confident I could make it work either. I found one thread about folks using SOAP to connect to OPC, but I couldn't quite figure out wtf they were talking about. If somebody could embellish it I might have a chance, though I still don't really understand what SOAP accomplishes. Guess I may have to figure that out before too long. Quote Link to comment https://forums.phpfreaks.com/topic/214301-can-php-connect-to-an-opc-server/#findComment-1116310 Share on other sites More sharing options...
gizmola Posted September 28, 2010 Share Posted September 28, 2010 Let's demystify for a moment. This is windows operating system technology. When you get right down to it, you're talking about microsoft specific specifications allowing components to be used by a variety of different microsoft languages. All this stuff started out as DLL's, evolved into COM around the time that VB components were the rage, and then were enhanced into DCOM, once people got the idea that hey might want to make use of objects on other machines. PHP can be used for many things, but rarely do people seek to do something with it that is better done via a client application running under the windows OS. I'm not entirely clear what your aim is here, but I'll warrant a guess. You have a webserver that is not running on the same machine as your DCS terminal, that you want to interface to. The library the company pointed you to would certainly allow you to do what you stated you wanted... allow a php application running on a microsoft windows server to make a client connection to an OPC server by integrating the COM component they provide. I can't by any means tell you what parameters you would need to use to setup this in a true client/server application where the client and server are not on the same machine, but rather are networked together. If your PHP server is running on a windows server, then this looks like a viable solution. If however, your PHP server is a LAMP box, this would be of no use to you. The same company offers another toolkit that appears to setup a web interface that could be connected to by a web application. http://www.opclabs.com/Products/QuickOPCWeb.aspx The first thing you need to do is clarify for everyone you're talking to about this, what the specific architecture is of the various machines involved-- how they are networked together and what operating systems they are running. Quote Link to comment https://forums.phpfreaks.com/topic/214301-can-php-connect-to-an-opc-server/#findComment-1116673 Share on other sites More sharing options...
nick1 Posted February 11, 2011 Share Posted February 11, 2011 I am also interested in knowing how PHP can connect to an OPC server. Our PHP is running on unix with an Apache webserver. The OPC server is on Windows. Both systems are on the same network. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/214301-can-php-connect-to-an-opc-server/#findComment-1172970 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.