Showing results 1 to 5 of 5

Thread: Allocate 15 different variables with one internal variable

  1. #1

    Default Allocate 15 different variables with one internal variable

    Hello,

    I am trying to allocate 15 different variables with one internal variable. All variables are boolean. If one or more variables of 15 will get value True then internal variable's value also will be set to True. If one or maybe more of the 15 variables' values become False, the internal variable's value will be still True until all 15 values will be False, so then internal value will be also set to False.

    I don't know how to do that

    Thanks in advance.

  2. #2
    Join Date
    27.06.2011
    Posts
    96

    Default AW: Allocate 15 different variables with one internal variable

    Hello Dario,

    you could try to create a math variable that calculates the sum of you 15 bools. This valiable needs two limits: min 0 and max 15. At each of these limits you could link set value functions which set anoher variable to FALSE or TRUE respectively.

    Alex

     

     

     


  3. #3
    Join Date
    27.06.2011
    Posts
    96

    Default AW: Allocate 15 different variables with one internal variable

    hi,

    I think I suggested wrong limits. They should rather be min 0 and max 1.

    Alex

     

     

     


  4. #4

    Default Re: Allocate 15 different variables with one internal variable

    Hi Dario,

    Alex is right, one easy way to do this, is to use a variable of the Mathematics Driver, which is also an internal variable.

    Click image for larger version

Name:	ScreenShot031.png
Views:	21
Size:	75.9 KB
ID:	1020

    Or you could create a zenon logic project, set your boolean variables to "externally visible", add the "straton to zenon runtime" IO driver, and create a small zenon logic program.

    Click image for larger version

Name:	ScreenShot032.png
Views:	20
Size:	55.2 KB
ID:	1021

    best regards,
    Mark

  5. #5

    Default Re: Allocate 15 different variables with one internal variable

    Thank you Alex and Mark. Now it works

Similar Threads

  1. Writing Cell values from Reports to Internal Variables
    By shikra in forum zenon Energy Edition
    Replies: 3
    Last Post: 24th February 2013, 00:55
  2. Revision bit of Internal variable
    By ansab.tp in forum VBA
    Replies: 5
    Last Post: 16th April 2012, 01:26
  3. Replies: 0
    Last Post: 12th May 2010, 10:07
  4. Internal Variables
    By jamesleary in forum Engineering Studio & Service Engine (former zenon Editor & Runtime)
    Replies: 1
    Last Post: 13th November 2008, 14:36
  5. PLC Variables and Internal Variables
    By madphilly in forum Drivers
    Replies: 1
    Last Post: 4th June 2008, 06:59

Posting Rules

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