Jump to content

Recommended Posts

Posted

Hello,

 

I'm working with a HMI screen with as initial load and a listener. When the sreen is active, the listener is also active. When I enter the screen, the load should only be executed once. To do so I'm working with buttons that set the bit Initial_load_refresh.

In the main now the direct contact with bit Initial_load_refresh is active and call function Initial_load is called. At the end of my Initial_load function I reset the bit Initial_load_refresh. 

 

The problem is that not every element that should be loaded by the function Initial_load is loaded. When i click three times on the pages everything is loaded. My own solution is to add a timer at the end of the function Initial_load which ends after a second, then resetting the Initial_load_refresh bit. 

 

This works, but does anyone know a better solution then putting at every initial_load function a timer?

Posted

I have found the problem. I was loading pages at the same time. I guess it is very important to start each function with a direct contact and check if everything else is offline except for a listener. 

 

Now I load only the initial page and when resetting the refresh at the end of the page it works without a timer. After the refresh the pages is activated and thereby also the listener.  

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
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.