Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Connot connect to remote OPC Client at runtime
March 29, 2012
12:16, EEST
Avatar
Rainer Versteeg
Member
Members
Forum Posts: 32
Member Since:
March 21, 2012
sp_UserOfflineSmall Offline

Hello !

I want to connect remote to an OPC Server with TPSOPCServer.
I can connect to the Server by changing the Property Connected from false to true in the Delphi IDE.

When i start my Delphi example Client and set Server.connect then follwing error apears “OPC Error in Method IconnectionPoint.Advise Code 0x8000FFFF (Catastrophic failure)

Why I can connect at the Delphi IDE and not by runtime ?

Br
Rainer

March 29, 2012
12:30, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 853
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Rainer Versteeg said

Hello !

I want to connect remote to an OPC Server with TPSOPCServer.
I can connect to the Server by changing the Property Connected from false to true in the Delphi IDE.

When i start my Delphi example Client and set Server.connect then follwing error apears “OPC Error in Method IconnectionPoint.Advise Code 0x8000FFFF (Catastrophic failure)

Why I can connect at the Delphi IDE and not by runtime ?

Br
Rainer

The error means that the server failed to register the callback interface in the server. This is probably because of DCOM configuration does not enable the call from the server to client. This can also come from an OPC group – or OPCConnector in practice.

At design time, the components may not function exactly the same – to prevent bad problems of crashing the Delphi IDE – so it may also be that the callback is not connected to server at design time.

March 29, 2012
14:03, EEST
Avatar
Rainer Versteeg
Member
Members
Forum Posts: 32
Member Since:
March 21, 2012
sp_UserOfflineSmall Offline

Hi Jouni !

Thank you.

We have two Windows 7 PC´s. The OPC Server is running on a Windows 7 system with the Workgroupname Workgroup.
The Client is running on a Windows 7 System in a domain.

I have check all DCOM settings in firewall settings. There are all O.K

I have make a new project with only the TPSOPCServer component and make remote connect to the client.

Is there a problem with workgroup and domain ?

Br,

Rainer

March 29, 2012
15:21, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 853
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Yes it is difficult to get callbacks to work between domains and/or workgroups. You should have the same user account and password in both computers, so that the server can also call back to the client.

But, you can set the connectors to Async=False, which should help as well.

March 29, 2012
15:27, EEST
Avatar
Rainer Versteeg
Member
Members
Forum Posts: 32
Member Since:
March 21, 2012
sp_UserOfflineSmall Offline

Hello Jouni !

Which connecotor ?

I have only a TPSOPCServer componenent on the Client example ! Here I cannot set any property to async.

Br, Rainer

March 29, 2012
16:40, EEST
Avatar
Rainer Versteeg
Member
Members
Forum Posts: 32
Member Since:
March 21, 2012
sp_UserOfflineSmall Offline

Hello Jouni !

Is it psiible that the server runs on a Windows 7 system with Username: Administrator, Password: 1 and Workgroup: WORKGROUP, and
the client on a Windows 7 system with Username: Testuser, Password: test and Domain: testdomain ?

if Yes Laugh, which DCOM settings I must set ?

Br,
Rainer

March 30, 2012
8:09, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 853
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Are you using TPsOPCServer.ReadItemValue or such?

It seems these methods use an internal group, which could possibly give this error for you.

March 30, 2012
8:28, EEST
Avatar
Rainer Versteeg
Member
Members
Forum Posts: 32
Member Since:
March 21, 2012
sp_UserOfflineSmall Offline

Hello Jouni !

My problem is the different Network configuration. If i have two PC with the same workgroup, username and password, than the above error not appears.

My question is: Is ist possible to connect a opc client (PC in a domain) with a OPC server (Pc in a workgroup with different username and password as the PC in a domain). The client is set to Async=True, because we have to much items.

Br,
Rainer

March 30, 2012
10:39, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 853
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

I am not a very good expert on domain configurations (we do not use them ourselves). But I am afraid that it makes it more difficult and it may not be possible, because the domain computer will only use domain user accounts, which are different from the workgroup accounts. In this case, it may not help if you have the same user and password either.

June 5, 2013
14:23, EEST
Avatar
Rainer Versteeg
Member
Members
Forum Posts: 32
Member Since:
March 21, 2012
sp_UserOfflineSmall Offline

Hello Jouni !

The 3 Clients are Panel PC. The customer makes a Power Reset on the Panel PC ! Then restart the Panel PC and then the Server hangs sometimes !
I dont know why the server hangs ? That the OPC Server cleans open connections. Can I see that the OPC Server is cleaning. Can I disconnect the cleaning ?

Rpcrt4.dll, is used by windows to send and receive RPC (Remote Procedure Call) requests.

Br, Rainer

June 5, 2013
17:53, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 853
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

OK, thanks for the details. I got it now.

The server is not doing any automatic cleaning.

Do you know if the clients are using async connections? I can think that the server could fail calling the client callback, although that is done in a separate thread, and should not hang or crash the application.

June 6, 2013
6:06, EEST
Avatar
Rainer Versteeg
Member
Members
Forum Posts: 32
Member Since:
March 21, 2012
sp_UserOfflineSmall Offline

Yes I uses async connections !

June 6, 2013
6:38, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 853
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

I sent you some email.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 267

Currently Online:
14 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 103

pramanj: 86

ibrahim: 70

kapsl: 57

gjevremovic: 49

TimK: 41

Fransua33: 39

fred: 38

Rainer Versteeg: 32

Thomas Reuther: 31

Member Stats:

Guest Posters: 0

Members: 1118

Moderators: 14

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1034

Posts: 4352

Newest Members:

aldayr, Python techie, emanuel45q, Patrick, sammycontrols, hellema, linoy, subranna, ray, richN9177

Moderators: Jouni Aro: 853, Otso Palonen: 32, Tuomas Hiltunen: 5, janimakela: 0, Pyry: 1, Terho: 0, Petri: 0, Bjarne Boström: 559, Heikki Tahvanainen: 402, Jukka Asikainen: 1, Teppo Uimonen: 21, Markus Johansson: 24, Matti Siponen: 64, Lusetti: 0

Administrators: admin: 1