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: 1026
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: 1919

Currently Online:
50 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Heikki Tahvanainen: 402

hbrackel: 144

rocket science: 88

pramanj: 86

Francesco Zambon: 83

Ibrahim: 78

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

Member Stats:

Guest Posters: 0

Members: 726

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1529

Posts: 6471

Newest Members:

gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala, efrennowell431, wilfredostuart, caitlynfajardo, jeromechubb7, franciscagrimwad, adult_gallery

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0

Administrators: admin: 1