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, EEST
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, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 853
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, EEST
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:
12 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