# OOP Global instance Question

**URL:** <https://community.br-automation.com/t/oop-global-instance-question/8314>\
**Category:** Programming\
**Tags:** automation-studio\
**Created:** [September 10, 2025, 1:57pm UTC](https://community.br-automation.com/t/oop-global-instance-question/8314 "2025-09-10T13:57:05Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aaron\_Rice](https://avatars.discourse-cdn.com/v4/letter/a/FF8800/32.png) [@Aaron\_Rice](https://community.br-automation.com/u/Aaron_Rice)\
**Post date:** [September 10, 2025, 1:57pm UTC](https://community.br-automation.com/t/oop-global-instance-question/8314/1 "2025-09-10T13:57:05Z")

</div>

I’ve created a function block with object-oriented elements (using `.fub` and `.stpp` files). I’m able to create and use an instance of it (`MyFUBInstance`) within the same package where the function block is defined.

My goal is to be able to access this same instance from other programs and packages in my project. I’ve tried a few methods but haven’t been successful.

---

<div class="post-metadata">

**Author:** ![michael.bertsch](https://dub1.discourse-cdn.com/brcommunity/user_avatar/community.br-automation.com/michael.bertsch/32/239_2.png) [@michael.bertsch](https://community.br-automation.com/u/michael.bertsch)\
**Post date:** [September 10, 2025, 3:17pm UTC](https://community.br-automation.com/t/oop-global-instance-question/8314/2 "2025-09-10T15:17:18Z")

</div>

Hello,  
i did a little search on the current documentation.  
[SToop](https://help.br-automation.com/#/de/6/ascode/introduction/coding/iec-st-oop_language_support.html)

But i could not find a hint about global usable Library Objects in SToop. In reference to Standard ST i would expect to have a possibility to add them to a IEC-Library but this seams currently not possible.

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/5/51b9d2be822b3759b9447e524a4ccd0c0a646dab.png)

The Help does mention the not finalised implementation Status of SToop…

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/d/d8fb8d27ab295876946236388d44580385f145e1.png)

So lets see if someone else does have a deeper look in the Technology and the Roadmap.

Greetings  
Michael

---

<div class="post-metadata">

**Author:** ![Aaron\_Rice](https://avatars.discourse-cdn.com/v4/letter/a/FF8800/32.png) [@Aaron\_Rice](https://community.br-automation.com/u/Aaron_Rice)\
**Post date:** [September 10, 2025, 3:33pm UTC](https://community.br-automation.com/t/oop-global-instance-question/8314/3 "2025-09-10T15:33:12Z")

</div>

I have also tried adding them to a library without any success. The other thing i have noticed is it seems I can not use B&R Function blocks inside of the OOP Function Block. I tried to create a variable of type MpAxisBasic and i keep getting the error that no such filie or directory exists and i have added the MpAxis Library to the project and it is in the .cpu.

---

<div class="post-metadata">

**Author:** ![michael.bertsch](https://dub1.discourse-cdn.com/brcommunity/user_avatar/community.br-automation.com/michael.bertsch/32/239_2.png) [@michael.bertsch](https://community.br-automation.com/u/michael.bertsch)\
**Post date:** [September 10, 2025, 4:20pm UTC](https://community.br-automation.com/t/oop-global-instance-question/8314/4 "2025-09-10T16:20:17Z")

</div>

In the previous Thread about SToop here in the Community we used the TON-Functionblock in SToop successfuly, so its not a general Problem with Libraries. It must be a more spezific issue to your current implementation or the MpAxisBasic.

Can you make a Printscreen of the Error message?

Greetings  
Michael

---

<div class="post-metadata">

**Author:** ![Aaron\_Rice](https://avatars.discourse-cdn.com/v4/letter/a/FF8800/32.png) [@Aaron\_Rice](https://community.br-automation.com/u/Aaron_Rice)\
**Post date:** [September 10, 2025, 4:36pm UTC](https://community.br-automation.com/t/oop-global-instance-question/8314/5 "2025-09-10T16:36:01Z")

</div>

Michael,

Here is a screenshot of the error. Also I did create a variable of type MpAxisBasic in the .var file and it didnt give me any issues so i know the MpAxis library is in and working.

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/b/b85f2500972cea9c00b8bf4f58752560b6a1bbd5.png)

---

<div class="post-metadata">

**Author:** ![michael.bertsch](https://dub1.discourse-cdn.com/brcommunity/user_avatar/community.br-automation.com/michael.bertsch/32/239_2.png) [@michael.bertsch](https://community.br-automation.com/u/michael.bertsch)\
**Post date:** [September 11, 2025, 6:46am UTC](https://community.br-automation.com/t/oop-global-instance-question/8314/6 "2025-09-11T06:46:35Z")

</div>

Hello,

ok that Filename looks quite strange. The normal Headerfiles which, for example are used if you program in ANSIC are just Named MpAxis.h (Libraryname.h).

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/7/70ac200297617034b96d8bfde8bc93d484f771c2.png)

As the technology is quite new for B&R i do not have much expierience with it… and so the community as well. I think this must be clarified with the official B&R Support.

Greetings  
Michael Bertsch

---

<div class="post-metadata">

**Author:** ![kovarj](https://dub1.discourse-cdn.com/brcommunity/user_avatar/community.br-automation.com/kovarj/32/537_2.png) [@kovarj](https://community.br-automation.com/u/kovarj)\
**Post date:** [October 10, 2025, 10:45am UTC](https://community.br-automation.com/t/oop-global-instance-question/8314/7 "2025-10-10T10:45:23Z")

</div>

Hi @Aaron_Rice, have you found solution for your issue, can you update us?

---

<div class="post-metadata">

**Author:** ![Aaron\_Rice](https://avatars.discourse-cdn.com/v4/letter/a/FF8800/32.png) [@Aaron\_Rice](https://community.br-automation.com/u/Aaron_Rice)\
**Post date:** [October 10, 2025, 12:22pm UTC](https://community.br-automation.com/t/oop-global-instance-question/8314/8 "2025-10-10T12:22:24Z")

</div>

Yes I contacted B&R Support and they told me that dynamic variables have not been implemented yet since it is still beta.
