Jump to content

Timing when is a page loaded


wasikhetmaar

Recommended Posts

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?

Link to comment
Share on other sites

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.  

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...