Announcement

Collapse
No announcement yet.

Cmore screen cleanup 'before' changing screens.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts


  • Cmore screen cleanup 'before' changing screens.

    I do a lot of screen changing (mostly PLC Goto and Current screen register manipulation.)
    Lately, I have been wondering how to make the screen cleanup 'before' changing the screen.
    As it happens now, the screen changes. And then a screen refresh causes the hmi to reload all tag values from any/all plc's/devices.
    If any 'old' messages are on the screen, the refresh/rerender cycle purges/cleans then from view.

    What I am after is how to do this before leaving the 'current' screen so that the screen will not contain 'known, stale' information.

    Example.
    On the current project, I have allocated the left side of the screen as a large menu.
    Touching one of the menu buttons will cause some 'messaging' to be displayed so that the operator/tech will know what options are available and what appropriate actions may/should be selected. This all works well.
    When the screen changes, the oper/tech does whatever is needed and then returns to the main "Menu" screen.
    -- This is where I am concerned.
    It takes at least one screen refresh/rerender cycle before the old 'messaging' is erased/reconstructed using the new/valid conditions/states.

    The question that I have been leading to is: Could we use an intermediate screen change (GOTOSCRN) tag that will (later) be copied to the REAL screen change tag so that some of this cleanup can be performed 'before' the cmore changes screens. Has anyone done similar procedure?

    Idea: use two tags HMI_GOTOSCRN_INTERMEDIATE and HMI_GOTOSCRN.
    Use the 'intermediate' tag in plc to allow the menu handler code to cause the status/messaging tags to be cleared, then, after a couple hundred( configurable) milliseconds, copy the intermediate tag to the HMI_GOTOSCRN tag so that the cmore will see the screen change request and perform the screen change.

    -During the time between when the INTERMEDIATE screen tag has changed but has not been copied to the HMI_GOTOSCRN tag, the cmore will have time to refresh/rerender the messaging of the new values.



    Thoughts/considerations/gotchas?
    Last edited by kewakl; 05-22-2019, 08:32 AM.


  • #2
    Is there any way for the PLC to know that the Cmore has performed a refresh? I guess with Cmore acting as Master only it wouldn't really be possible.

    Unless, if the event manager could set a bit in the PLC once a refresh has occurred then you could know that it was "safe" to change screens after you do your cleanup and before you set the goto screen.

    Think similar to a handshake type arrangement. The HMI keeps writing a bit high and the PLC keeps turning it off. Then when the PLC sees the high bit again could it assume that the HMI has done its refresh?

    Comment



    • #3
      Originally posted by mashva View Post
      Is there any way for the PLC to know that the Cmore has performed a refresh? I guess with Cmore acting as Master only it wouldn't really be possible.

      Unless, if the event manager could set a bit in the PLC once a refresh has occurred then you could know that it was "safe" to change screens after you do your cleanup and before you set the goto screen.

      Think similar to a handshake type arrangement. The HMI keeps writing a bit high and the PLC keeps turning it off. Then when the PLC sees the high bit again could it assume that the HMI has done its refresh?
      It is technically be possible to do that.
      In PLC have a clocking bit. In HMI, use the PLC's clocking bit as trigger to event. IN the event, copy the value of the clocking bit back to another PLC bit tag.
      The PLC could use the two bit's states to determine that the HMI refresh has occurred.

      Comment



      • #4
        I was thinking maybe something like this:
        Code:
        .          CLEANUP_COMPLETE                                    HMI_HANDSHAKE
        .--------------[     ]---------------------------------------------( S )
        .
        .           HMI_HANDSHAKE                                      HMI_REFRESHED
        .--------------[ ͞|_ ]---------------------------------------------( S )
        .
        .           HMI_REFRESHED
        .--------------[     ]------------------|͞͞͞͞͞͞͞͞͞͞͞͞͞͞͞͞͞͞͞͞͞͞͞͞͞͞͞͞͞͞͞͞͞͞͞͞͞͞͞͞͞͞͞͞|
        .                                       | CPD                                        |
        .                                       |           S                         D      |
        .                                       | HMI_GOTOSCRN_INTERMEDIATE     HMI_GOTOSCRN |
        .                                       | 0                             HMI_REFRESHED|
        .                                       |____________________________________________|
        In this example, CLEANUP_COMPLETE would be something that you turn on when HMI_GOTOSCRN_INTERMEDIATE != HMI_GOTOSCRN and you have subsequently reset/cleared the messages that you need to.


        Also, HMI_HANDSHAKE would cause the Cmore event manager to reset HMI_HANDSHAKE.
        Last edited by mashva; 05-22-2019, 10:33 AM.

        Comment

        Working...
        X