OPC NET API 2.00
을 사용하는 OPC 클라이언트 응용 프로그램에 문제가있어서 ABB Freelance OPC Server Opc.Server.Connect(Opc.ConnectData)
메서드를 호출 할 때 예외를 throw합니다.ABB Freelance OPC 서버에 연결할 수 없습니다. [해당 인터페이스가 지원되지 않습니다 (HRESULT : 0x80004002 (E_NOINTERFACE)에서 예외)]
예외 :
Unable to cast COM object of type 'System.__ComObject' to interface type 'OpcRcw.Comn.IOPCServerList2'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{9DD0B56C-AD9E-43EE-8305-487F3188BF7A}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
될 수 있습니다 문제는 IOPCServerList2
인터페이스 관련 : 여기
#region Assembly OpcRcw.Comn.dll, v1.10.2.0
// C:\Windows\assembly\GAC_MSIL\OpcRcw.Comn\1.10.2.0__9a40e993cbface53\OpcRcw.Comn.dll
#endregion
using System;
using System.Runtime.InteropServices;
namespace OpcRcw.Comn
{
[Guid("9DD0B56C-AD9E-43EE-8305-487F3188BF7A")]
[InterfaceType(1)]
public interface IOPCServerList2
{
void CLSIDFromProgID(string szProgId, out Guid clsid);
void EnumClassesOfCategories(int cImplemented, Guid[] rgcatidImpl, int cRequired, Guid[] rgcatidReq, out IOPCEnumGUID ppenumClsid);
void GetClassDetails(ref Guid clsid, out string ppszProgID, out string ppszUserType, out string ppszVerIndProgID);
}
}
예, Yokogawa 또는 Matrikon과 같은 다른 OPC 서버 브랜드에 연결할 때 예상대로 작동하지만 ABB OPC 서버에서는 작동하지 않습니다. –
일부 opc 테스트 클라이언트에서 연결을 시도 했습니까? – apr
예, Matrikon 및 일부 상용 opc 클라이언트는 데이터를 연결하고 읽을 수 있지만 .Net API는 연결에 실패했습니다. –