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
OPC client hangs during connection to server
March 13, 2017
14:43, EEST
Avatar
kursar
Member
Members
Forum Posts: 4
Member Since:
April 13, 2016
sp_UserOfflineSmall Offline

Hi,

I created OPC server in Builder C++ XE10.1 and I registered it by function Register(). But “Prosys PC Client” hangs when I try to make connection to my server. When I click Connect button my server starts but client hangs.

I used following code to implement server::
OPCProvider = new TPsOPCProvider();
OPCProvider->AutoRun = true; // Default = True
OPCProvider->CLSID = “{A7F15532-1439-46D4-91E4-D50838BC88BE}”;
OPCProvider->ServerName = “ZREMB.TESTOPC1”; // ProgID
OPCProvider->Description = “ZREMB.TESTOPC1”;
OPCProvider->Vendor = “ZREMB”;
OPCProvider->VendorInfo = “ZREMB”;
OPCProvider->AddressSpace->IncludeProps = true;
OPCProvider->ThreadingModel = System::Win::Comobj::tmBoth; // Default = tmBoth
OPCProvider->Initialize();

What could be the reason?

March 13, 2017
16:40, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 545
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

HI,

This might be similar problem http://forum.prosysopc.com/for…..-xe2/#p279 does setting the Application.DelayInitialize to True help?

– Bjarne

March 13, 2017
17:11, EEST
Avatar
kursar
Member
Members
Forum Posts: 4
Member Since:
April 13, 2016
sp_UserOfflineSmall Offline

Thanks for reply.

I found that it works fine if I create and initialize TPsOPCProvider before: Application->Initialize()

But I will also verify how it will work with DelyInitialize.

March 14, 2017
23:23, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 851
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Oh great. Yes, it should be initialised before the Application is initialized. DelayInitialize applies only to the Service application (it’s in TServiceApplication)

http://docwiki.embarcadero.com…..Initialize

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 267

Currently Online:
15 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: 1105

Moderators: 14

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1009

Posts: 4268

Newest Members:

user1290, gregp, mariohetheringto, normagalindo47, aurelia27u, isobel41d356980, michaeldegli, gqbdolores, kez1399, jaclynmcvay358

Moderators: Jouni Aro: 851, Otso Palonen: 32, Tuomas Hiltunen: 5, janimakela: 0, Pyry: 1, Terho: 0, Petri: 0, Bjarne Boström: 545, Heikki Tahvanainen: 402, Jukka Asikainen: 1, Teppo Uimonen: 20, Markus Johansson: 19, Matti Siponen: 53, Lusetti: 0

Administrators: admin: 0