bamf

Omron NA VB : Access buttons from global subroutines

3 posts in this topic

Hello,

In sysmac studio, for a NA hmi, is there a way to access a button in Visual basic from a global subroutine ?

I always get this when i compile : error BC30456: 'MyPage' is not a member of 'My_NA_HMI'.

the code is : My_NA_HMI.MyPage.myButton.IsEnabled = True

 

Regards,

Share this post


Link to post
Share on other sites

From what I know, global subroutines do not interact with page components. So I would just assign a global variable to the button variable property you need to enable and set it to True directly with the global variable.

Share this post


Link to post
Share on other sites

I finally moved my global subroutines locally to the concerned pages. and used global variables to enable the ones I need.

Thank you.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now