![kepserverex 5 kepserverex 5](https://img.automationworld.com/files/base/pmmi/all/image/2011/09/aw_585_kepware.png)
![kepserverex 5 kepserverex 5](https://docplayer.net/docs-images/46/21629686/images/page_4.jpg)
Finally, I figured out I need to twist two settings in the IIS7 to make it run properly.ġ. I spent two days to search online and did some try and error. Retrieving the COM class factory for component with CLSID failed due to the following error: 80040154.And here is the second error:Įrror HRESULT E_FAIL has been returned from a call to a COM component.I believed these errors coming from the dll. The above codes were running fine in the VS2008, but when I deployed to IIS7, I encountered some errors. OpcGroupNames.SyncWrite(6, ref ItemServerHandles, ref ItemServerValues, out ItemServerValues.SetValue("Test Op 3", 6) ItemServerValues.SetValue("Test Op 2", 5) ItemServerValues.SetValue("Test Op 1", 4) Write some values into the server for those tags.Īrray ItemServerValues = Array.CreateInstance(typeof(object), 7) Label4.Text = (string)ItemServerValues.GetValue(6) Label3.Text = (string)ItemServerValues.GetValue(5) Label2.Text = (string)ItemServerValues.GetValue(4) ItemServerHandles, out ItemServerValues, out ItemServerErrors, out a, out b) Read the values from the server for those tags.Īrray ItemServerValues = Array.CreateInstance(typeof(string), 10) ItemServerHandles, out ItemServerErrors, RequestedDataTypes, AccessPaths) (6, ref OPCItemIDs, ref ClientHandles, out OPCServer ConnectedOpc = new OPCServer() Īrray OPCItemIDs = Array.CreateInstance(typeof(string), 10) Īrray ItemServerHandles = Array.CreateInstance(typeof(Int32), 10) Īrray ItemServerErrors = Array.CreateInstance(typeof(Int32), 10) Īrray ClientHandles = Array.CreateInstance(typeof(Int32), 10) Īrray RequestedDataTypes = Array.CreateInstance(typeof(Int16), 10) Īrray AccessPaths = Array.CreateInstance(typeof(string), 10) ĬonnectedOpc.Connect("5", "") I got a dll, OPCDAAuto.dll, from a client and I need to utilize this dll to access the KepServerEX 5.2 in order to read and write some values into the PLC module.įor practice purpose, I created a regular website in Visual Studio 2008 and added the reference of the dll, then I used using OPCAutomation in my project to start coding the OPC client. Net website to read and write against Kepware KepServerEX and then deploy the website to IIS7.
![kepserverex 5 kepserverex 5](https://s.yimg.com/ny/api/res/1.2/D0tsQAOLzJ9UUocPusBo1g--/YXBwaWQ9aGlnaGxhbmRlcjt3PTQyMDtoPTQ0NS40NTQ1NDU0NTQ1NDU0NA--/https://s.yimg.com/uu/api/res/1.2/N5rl2njJGYURChFwaJv2pA--~B/aD0yODA7dz0yNjQ7c209MTthcHBpZD15dGFjaHlvbg--/http://globalfinance.zenfs.com/images/US_AFTP_MarketWire_XHTML/TN-102227_KEPServerEXEFM_ABBTotalFlowElectronicFlowMeasurementCustodyTransferEFMFisherROCControlLogixv21_original.jpg)
The goal is to create an OPC client in Asp.