Showing results 1 to 2 of 2

Thread: Open screen if variable value is?

  1. #1
    Join Date
    01.02.2016
    Posts
    63

    Default Open screen if variable value is?

    Hi all.
    I have main navigation menu where I have few buttons (screen switch).
    But for some screens I should to open screen with subnavigation menu.
    How to remeber which of subnavigation screens was opened and open it again automatically when main screen was changed...

    Example:
    Navigation :
       1. Process
           a) Machine1
           b) Machine2
       2. Alarms
       3. Events

    So when I click on Process, then click on Machine2 -> screen Machine2 is opened (remember)
    Now goes to screen Alarms...
    When goes back, click to Process - automatically open screen Machine2???

    Best regards,
    MK



  2. #2
    Join Date
    13.02.2019
    Posts
    32

    Default Re: Open screen if variable value is?

    Hi,
    I can suggest you a way


    Create an internal variable Array dim 2 with Array[1]=0 intial value and Array[2]=0 intial value

    Create 2 script 
    1) WriteSetValue (Array[1] value 1) + WriteSetValue (Array[2] value 0) + OpenScreenMachineA
    2) WriteSetValue (Array[1] value 0) + WriteSetValue (Array[2] value 1) + OpenScreenMachineB


    For the navigation button "Process", create 1 button with visibilty only if Array[1] and 1 button overlap with visibility only if Array[2] = 1.
    Link the script function 1) to one button and script funtion 2) to other button.

    So if you press to "Process" button, if your latest screen is MachineA, the button will call again MachineA.
    Then if you call MachineB, the Process button will call again Machine B.


    Maybe it won't be entirely clear to you.... Try to think about it, my advice is a good place to start




Similar Threads

  1. Set value in variable diagnosis screen for single variable
    By cheskafausto in forum Engineering Studio & Service Engine (former zenon Editor & Runtime)
    Replies: 3
    Last Post: 2nd February 2021, 10:43
  2. screen resizes in editor after open and has to be closed and reopened
    By photomaddd in forum Engineering Studio & Service Engine (former zenon Editor & Runtime)
    Replies: 1
    Last Post: 19th May 2017, 16:24
  3. Open function on specific screen
    By softart2 in forum VSTA
    Replies: 2
    Last Post: 2nd June 2011, 04:23
  4. Zuweisung der Systemvariable last open screen
    By brenner in forum Engineering Studio & Service Engine (former zenon Editor & Runtime)
    Replies: 2
    Last Post: 27th October 2010, 08:46
  5. system variable "last open picture"
    By markclemens in forum Engineering Studio & Service Engine (former zenon Editor & Runtime)
    Replies: 0
    Last Post: 7th April 2008, 13:50

Posting Rules

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