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: 1009
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: 1009
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: 1009
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: 1009
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: 1009
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: 1009
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

I sent you some email.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
22 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 680

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6260

Newest Members:

sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma, fidelduke938316, Jan-Pfizer, DavidROunc, fen.pang@woodside.com, aytule

Moderators: Jouni Aro: 1009, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1