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.
Hello,
i did a little search on the current documentation. SToop
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.
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.
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.
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.
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).
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.