Join us today!
Notifications
Clear all
FB_INIT Methode - Pass reference to variable on to a FB
Topic starter
Sep 29, 2023 1:45 am
(@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:
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':
How do I do this correctly? My attempt is not working...
Thanks for your help!
Reply
2 Replies
Topic starter
Sep 29, 2023 1:47 am
(@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
Oct 11, 2023 8:18 am
(@unchained)
Active Member
Joined: 2 years ago
Hi,
This is how I declare references into my FB which will use that references :
This is how I take reference into the FB_Init :
And finally that is how I declare that FB in a Program:
I hope it helps!
Reply
Forum Information
- 17 Forums
- 267 Topics
- 942 Posts
- 0 Online
- 722 Members
Our newest member: giordano.ceccarini
Latest Post: Beckhoff Automation at SPS 2024
Forum Icons:
Forum contains no unread posts
Forum contains unread posts
Topic Icons:
Not Replied
Replied
Active
Hot
Sticky
Unapproved
Solved
Private
Closed