Showing results 1 to 4 of 4

Thread: HTML Page Refresh

  1. #1
    Join Date
    26.10.2015
    Posts
    5

    Default HTML Page Refresh

    Currently I am using a HTML page and just implementing the browser to display our in-house message log to the HMI screen. It refreshed/reloads the page perfectly fine when we switch between cells due to URL changes. My issue is, that when we are on a page for any period of time, this log is now out of date and not current. I know there is a page function to refresh but I can't find a way to access this anywhere. So my question to the forums is, how do I refresh my browser element periodically (either timer or on an event occurring) so that switching pages isn't how it is updated.

    Thanks in advance.

  2. #2

    Default Re: HTML Page Refresh

    Hi midwestprogrammer,

    Thanks for your post and welcome to the forum

    Do I understand correctly, that you use a screen of the screen type "HTML" to display a web page with your internal log system?

    For this screen type you can add a control element "Refresh" that just works like a regular browser refresh. You can use the zenon functions "set focus to frame", "move focus" and "activate input on element with focus" in a zenon script that you call periodically to "hit" button for refresh.

    Alternatively, you could also implement a function that cyclically opens the HTML screen e.g. every 1 minute when there is no activity. Check out the system driver variable "Idle time [s]" that could be used as a trigger to activate the cyclic update mechanism.

    Best regards,
    Mark

  3. #3
    Join Date
    26.10.2015
    Posts
    5

    Default Re: HTML Page Refresh

    Do I understand correctly, that you use a screen of the screen type "HTML" to display a web page with your internal log system?
    Yup, that is exactly what I am after.

    For this screen type you can add a control element "Refresh" that just works like a regular browser refresh. You can use the zenon functions "set focus to frame", "move focus" and "activate input on element with focus" in a zenon script that you call periodically to "hit" button for refresh.

    When you say add a control element, I don't see that on the tool bar or in the Elements drop down menu. I understand the concept you suggested, just don't see where/how to implement it. This is my first project and it was a last minute change to Zenon at that.

    Appreciate the speedy response Mark!

    MW

  4. #4

    Default Re: HTML Page Refresh

    Hi MW,

    zenon is very flexible and powerful in its functionality however it may be slightly different than what you may be used to from other systems. Cyclic refreshes by enabling automated button presses of the refresh control element is possible and does not require any coding.

    It should be possible to add a "refresh" control element for screens of the type HTML via the control elements menu. If it is greyed out, it means that for this screen there already is a control element (e.g. button) for this control function.

    Click image for larger version

Name:	Screen Shot 11-02-15 at 08.51 AM.PNG
Views:	20
Size:	9.7 KB
ID:	1786

    Typically, you would create a separate frame for the HTML screen and use this frame at the HTML screen. Next you create a zenon function "set focus to frame" where you specify the frame used by the HTML screen.

    After this, you need to give the button in the HTML screen that links the refresh control function a designated name. Then you can create a function "move focus" and enter the name of the element with the refresh control function. Next create a zenon function "activate input on element with focus" that "presses" the button.

    Once these functions are working OK, you can combine these functions in a zenon script and create a script execute function to call the script.

    What's left is to call the script execute function cyclically. You can either construct a mechanism that only executes the script execute function when the HTML screen is open. But since you are using a separate frame for the HTML screen there is also no harm to call the script cyclically using the zenon time control function, even when the HTML screen is not opened.

    I hope these suggestions help you with your requirement.

    Best regards,
    Mark

Similar Threads

  1. Replies: 1
    Last Post: 11th September 2015, 08:46
  2. Refresh einer Sprachtabelle
    By perschke in forum VBA
    Replies: 1
    Last Post: 10th March 2014, 02:07
  3. Replies: 3
    Last Post: 1st May 2013, 21:31
  4. Home URL setting for HTML
    By whitetaru in forum zenon Supervisor
    Replies: 2
    Last Post: 6th July 2011, 10:17
  5. Archive refresh
    By bojan in forum zenon Supervisor
    Replies: 1
    Last Post: 3rd April 2011, 23:15

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •