Join us today!

Notifications
Clear all

[Solved] Building a Property with Methodes similar to ipArguments of the TwinCat Event Logger

3 Posts
2 Users
1 Likes
247 Views
Posts: 4
Topic starter
(@nhtec)
Active Member
Joined: 1 year ago

Dear Community,

I would like to build a Function Block that has a similar function as the ipArguments of the FB_TcEventBase. The property "ipArguments" has some methods that allows to add several arguments (like with AddString, AddInt etc):

fbTcAlarm.ipArguments.Clear().AddInt(1).AddInt(2);

How would the structure of a function block looks like if I want to realize it myself? I am not looking for a finished source code, but more how the structure/declaration of a function block would look like.

Thanks for your valuable input.

Norbert

Reply
2 Replies
2 Replies
twinControls
Admin
(@twincontrols)
Joined: 2 years ago

Member
Posts: 114

@nhtec 

Hi, 

Please check this post: 

Fluent interface

Reply
(@nhtec)
Joined: 1 year ago

Active Member
Posts: 4

@twincontrols That is great. A big help. Now I am figuring out to give an property the desired methods.

Reply
Share: