Repository navigation
Access Function Block under Interface variable #436
|
Hello everyone, I'm wondering if it's possible to access function block variables not directly from the instance of the FB itself, but through an interface to which the FB is assigned. For example, I have the following setup:
In the main program:
Currently, I can access IsPressed via ADS using the path MAIN.toggleButton.IsPressed. Is it possible to access the IsPressed variable through the interface variable myButton instead of directly using the toggleButton instance? |
Replies: 2 comments 1 reply
|
I think I remember reading something about this, let me see if I can dig this out |
|
I just looked into this, unfortunately this is not possible (in pyads or otherwise). ADS itself does not support this, it doesn't expose the inner values over the interface, i.e. the interface's index and offset just point to the "concrete" FB, so ADS does not "resolve" the correct index and offset for the actual variable of interest. |




I just looked into this, unfortunately this is not possible (in pyads or otherwise). ADS itself does not support this, it doesn't expose the inner values over the interface, i.e. the interface's index and offset just point to the "concrete" FB, so ADS does not "resolve" the correct index and offset for the actual variable of interest.