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
Corupt tree then adding manual.
February 20, 2013
14:27, EET
Avatar
Fjonson
Member
Members
Forum Posts: 9
Member Since:
January 3, 2013
sp_UserOfflineSmall Offline

Hello.
Is this a bug or.

formulas:=OPCServer.AddressSpace.AddModule(Self,RootIndex,’Formulas’);
formulasBase:=OPCServer.AddressSpace.AddModule(Self,formulas,’Minute’);
formulas10Min:=OPCServer.AddressSpace.AddModule(Self,formulas,’10_minute’);
formulas30Min:=OPCServer.AddressSpace.AddModule(Self,formulas,’30_minute’);

OPCServer.AddressSpace.AddVariable(formulasBase,TPsFloat.Create(nil),’Test1′);
OPCServer.AddressSpace.AddVariable(formulas10Min,TPsFloat.Create(nil),’Test11′);
OPCServer.AddressSpace.AddVariable(formulas30Min,TPsFloat.Create(nil),’Test111′);

OPCServer.AddressSpace.AddVariable(formulasBase,TPsFloat.Create(nil),’Test2′);
OPCServer.AddressSpace.AddVariable(formulas10Min,TPsFloat.Create(nil),’Test22′);
OPCServer.AddressSpace.AddVariable(formulas30Min,TPsFloat.Create(nil),’Test222′);

Whis will result in a tree
Testserver
Formulas
Minute
Test1
Test2
Test22
10_minute
Test11
Test222
30_minute
Test111

The Tree i expected was
Testserver
Formulas
Minute
Test1
Test2
10_minute
Test11
Test22
30_minute
Test111
Test222

I can achieve this results by changing the code.

formulas:=OPCServer.AddressSpace.AddModule(Self,RootIndex,’Formulas’);
formulasBase:=OPCServer.AddressSpace.AddModule(Self,formulas,’Minute’);
OPCServer.AddressSpace.AddVariable(formulasBase,TPsFloat.Create(nil),’Test1′);
OPCServer.AddressSpace.AddVariable(formulasBase,TPsFloat.Create(nil),’Test2′);
formulas10Min:=OPCServer.AddressSpace.AddModule(Self,formulas,’10_minute’);
OPCServer.AddressSpace.AddVariable(formulas10Min,TPsFloat.Create(nil),’Test11′);
OPCServer.AddressSpace.AddVariable(formulas10Min,TPsFloat.Create(nil),’Test22′);
formulas30Min:=OPCServer.AddressSpace.AddModule(Self,formulas,’30_minute’);
OPCServer.AddressSpace.AddVariable(formulas30Min,TPsFloat.Create(nil),’Test111′);
OPCServer.AddressSpace.AddVariable(formulas30Min,TPsFloat.Create(nil),’Test222′);

/Fjonson

February 21, 2013
14:56, EET
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 960
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Yes it seems to be a bug in the AddressSpace object. Very good, if you can live with your workaround. If you need a fix, please contact our support.

February 22, 2013
11:51, EET
Avatar
Fjonson
Member
Members
Forum Posts: 9
Member Since:
January 3, 2013
sp_UserOfflineSmall Offline

I can live with it for nowWink

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 267

Currently Online:
16 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 124

pramanj: 86

ibrahim: 74

rocket science: 65

kapsl: 57

Sabari: 51

gjevremovic: 49

Xavier: 43

fred: 41

TimK: 41

Member Stats:

Guest Posters: 0

Members: 1749

Moderators: 15

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1323

Posts: 5649

Newest Members:

WalterFOUNC, datafastproxiespx01, LenkaLok, seoninet, justinevillanuev, namtrott5457, DonaldWibip, AlfredoEthix, andreidla, everangel7021

Moderators: Jouni Aro: 960, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 860, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 25, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 222, Lusetti: 0

Administrators: admin: 1