wasikhetmaar Posted July 21, 2015 Report Posted July 21, 2015 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?
wasikhetmaar Posted July 22, 2015 Author Report Posted July 22, 2015 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now