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 Reactions
386 Views
Posts: 4
Topic starter
(@nhtec)
Active Member
Joined: 2 years 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: 2 years 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: 2 years 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: