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
Add new item by code
January 6, 2015
17:33, EEST
Avatar
gkobler
Member
Members
Forum Posts: 15
Member Since:
January 6, 2015
sp_UserOfflineSmall Offline

Hello

How can i create an new item, that is requested from a OPC-Client. Is there a event that are triggered?

My idea are, the client give me the item-name, and my OPC-Server should add the new item with this name!

For an Exampel:
the OPC-Client are requesting the follow OPC-Item: “KSA.DB200.DBW0”
Now the OPC-Server should add this to the variable list

May somebody can give me a hint!

Thanks
Gregor

January 8, 2015
9:26, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 851
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

You can use TPsOPCProvider.OnFindItem event for that.

If an item already exists, it is provided as Component for the event handler. If it is nil, you can create a new item and return that one back as Component.

January 8, 2015
12:37, EEST
Avatar
gkobler
Member
Members
Forum Posts: 15
Member Since:
January 6, 2015
sp_UserOfflineSmall Offline

Jouni Aro said

You can use TPsOPCProvider.OnFindItem event for that.

If an item already exists, it is provided as Component for the event handler. If it is nil, you can create a new item and return that one back as Component.

Hello Jouni

Thanks for your answer, thats exactly what i need!

Gregor

January 8, 2015
13:20, EEST
Avatar
gkobler
Member
Members
Forum Posts: 15
Member Since:
January 6, 2015
sp_UserOfflineSmall Offline

Hello Juoni

How can i create a OPC-Item, that are has the datatyp SmallInt

When i use TPsInteger, it will create a “Long Integer” at the client side.

And i also want to create a Array of SmallInt. There is a Object called TPsByteArray, but this will create not that what i want!

Thanks
Gregor

January 8, 2015
14:21, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 851
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

gkobler said
How can i create a OPC-Item, that are has the datatyp SmallInt

When i use TPsInteger, it will create a “Long Integer” at the client side.

And i also want to create a Array of SmallInt. There is a Object called TPsByteArray, but this will create not that what i want!

Prosys Central only uses “major” data types in the variables, so it is not possible to create SmallInt items. There is no real requirement to save memory with alternative data types. The client can, however, request data as SmallInt (using OPC Item DataType/RequestedDataType) and the OPCProvider will do the required conversions. I am not sure how the arrays will convert, though.

January 12, 2015
8:09, EEST
Avatar
gkobler
Member
Members
Forum Posts: 15
Member Since:
January 6, 2015
sp_UserOfflineSmall Offline

Jouni Aro said

gkobler said
How can i create a OPC-Item, that are has the datatyp SmallInt

When i use TPsInteger, it will create a “Long Integer” at the client side.

And i also want to create a Array of SmallInt. There is a Object called TPsByteArray, but this will create not that what i want!

Prosys Central only uses “major” data types in the variables, so it is not possible to create SmallInt items. There is no real requirement to save memory with alternative data types. The client can, however, request data as SmallInt (using OPC Item DataType/RequestedDataType) and the OPCProvider will do the required conversions. I am not sure how the arrays will convert, though.

Hello Jouni

Thanks for it, i think i got what i want. It’s not in matter to save space. But the Siemens-OPC-Server makes thes Datatypes, when he creates his OPC-Items.

I have made a heredity of the type TPsInteger and changed the datatype to SmallInt, and i did it also with TPsByteArray.

Regards
Gregor

January 12, 2015
9:55, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 851
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

OK, yes I did not pay attention to the “client side”. But note that Sentrol will convert data types automatically, as it normally does not matter that much any more on the client application what the original data type was. I think TPsFloatArray should also work with SmallInt arrays.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 267

Currently Online:
5 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