Showing results 1 to 4 of 4

Thread: control 2 variables in graphic/pushbuton

  1. #1
    Join Date
    28.11.2017
    Posts
    11

    Default control 2 variables in graphic/pushbuton

    hi i would like to know if it is posible in a  graphic/pushbuton to control to variable at the same time for example a BOOL value and an analog variablestate of the button will be only the BOOL variable of course


  2. #2
    Join Date
    08.12.2015
    Posts
    39

    Default Re: control 2 variables in graphic/pushbuton

    Quote Originally Posted by mos89 View Post
    hi i would like to know if it is posible in a  graphic/pushbuton to control to variable at the same time for example a BOOL value and an analog variablestate of the button will be only the BOOL variable of course

    Hello,

    Your need is to link several variables to the same push-button ?
    Unfortunately, this is not possible in the Straton/zenon-Logic Graphics, you have to add a small program to do it.

    Have a nice day!
    Anthony

  3. #3
    Join Date
    05.12.2018
    Posts
    1

    Default Re: control 2 variables in graphic/pushbuton

    Hello,

    Your need is to link several variables to the same push-button ?
    Unfortunately, this is not possible in the Straton/zenon-Logic Graphics, you have to add a small program to do it.

    Have a nice day!
    Anthony
    Hello Anthony,

    I've been searching for the solutions on GitHub and Stackoverflow in vain. How can I find a program to link 2 variables to the same push-button?

    Best,
    Terry

  4. #4
    Join Date
    23.10.2018
    Posts
    3

    Default Re: control 2 variables in graphic/pushbuton

    Quote Originally Posted by TerryLewis View Post
    Hello Anthony,

    I've been searching for the solutions on GitHub and Stackoverflow in vain. How can I find a program to link 2 variables to the same push-button?

    Best,

    Terry


    Hello Terry,

    What I was thinking about is a simple line of ST code.
    for example if you want to link MyVar_1 and MyVar_2 to the same push button, then what you can do is to link only MyVar_1, then create an ST program ("PushButtons" for example) and type:

        MyVar_2 := MyVar_1;

    This way, if you click on the button, the zenon Logic graphic will set MyVar_1 to TRUE and the ST program will copy this value into MyVar_2

    For the moment this is the only simplest workaround I see

    Best regard,
    Anthony

Similar Threads

  1. Integrate/Connect/Link HMI graphic with PLC instructions
    By afz2004 in forum straton / zenon Logic
    Replies: 1
    Last Post: 9th October 2018, 10:18
  2. Graphic Compile Error
    By Olesia in forum zenon Supervisor
    Replies: 1
    Last Post: 6th November 2017, 12:46
  3. How can one reset a graphic on a button
    By jyo in forum zenon Supervisor
    Replies: 2
    Last Post: 18th July 2014, 12:02
  4. Graphic Reports
    By mv-goncharov in forum zenon Energy Edition
    Replies: 1
    Last Post: 5th July 2013, 13:20
  5. WinCE graphic
    By tihomir in forum zenon Operator
    Replies: 8
    Last Post: 24th May 2013, 01:02

Posting Rules

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