Join us today!

FB_INIT Methode - P...
 
Notifications
Clear all

FB_INIT Methode - Pass reference to variable on to a FB

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

Hi Community,
I was wondering if someone can give me a hint. I have a FB called 'FB_Filter'.
In FB_INIT I hand this FB two references over:

FB_INIT_Filter.JPG

In the declaration part of the Function Block 'FB_Filter' I declare a a function called 'fbFlackvalve' that needs to get a reference to the Structure 'stValve':

FB_Filter.JPG

How do I do this correctly? My attempt is not working...
Thanks for your help!

Reply
2 Replies
Posts: 4
Topic starter
(@nhtec)
Active Member
Joined: 1 year ago

I just wanted to mention that the Function Block 'fbFleckvalve' will change the values int he passed on structure. So I need to pass on the reference.

Norbert

Reply
Posts: 9
(@unchained)
Active Member
Joined: 1 year ago

Hi,

 

This is how I declare references into my FB which will use that references :

image

 

 

This is how I take reference into the FB_Init :

 

image

 

And finally that is how I declare that FB in a Program:

image

 

 

I hope it helps!

Reply
Share: