Showing results 1 to 10 of 13

Thread: Draw line dynamically?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    01.02.2016
    Posts
    55

    Default Draw line dynamically?

    Hi all.
    1. How to dynamically draw polyline on scada screen?
    We have 10 measuring points, which should be connected with lines. About every 5 minutes, scada get meas. value.
    2. Extended trend - how to clear trend on variable change. So, when variable value False, trend empty. When it goes to True, starts to drawing trend ...

    BR,
    Miloš

  2. #2
    Join Date
    01.02.2016
    Posts
    55

    Default Re: Draw line dynamically?

    Hi again,

    I realy need help here.

    I would like to display simple XY line graph . All axis should be fixed interval.
    X axis 0...100% - flow
    Y axis -3...3 - error


    Example:
    Every xx seconds system generates one point (X,Y) from 100% to 0%
    after 10sec 97% - 0,12
    after 10sec 65% - 0,11
    after 10sec 46% - 0,08
    etc.

    How to make this graph?
    It should be like an image attached...


    Attached Thumbnails Attached Thumbnails figure3.png  

  3. #3
    Join Date
    01.07.2008
    Location
    Salzburg, AT
    Posts
    1,038

    Default Re: Draw line dynamically?

    From which zenon driver you have variables with value X and Y? Do the values on X and Y variables have exactly the same time stamp?

    I propose you not to try draw the lines (draw is in Editor, in the Runtime - size and position dynamically), but to use Extended Trend - it is a dedicated screen type.

  4. #4
    Join Date
    01.02.2016
    Posts
    55

    Default Re: Draw line dynamically?

    Quote Originally Posted by ursulak View Post
    From which zenon driver you have variables with value X and Y? Do the values on X and Y variables have exactly the same time stamp?

    I propose you not to try draw the lines (draw is in Editor, in the Runtime - size and position dynamically), but to use Extended Trend - it is a dedicated screen type.

    Thanks for reply,
    It's internal variables calculated in zLogic.
    I tried with XY display...but there also some other questions...
    For every point we have X,Y pair (xvalue,yvalue).
    So after xx seconds we should to connect next points (like series).
    We need to draw limit lines before measuring starts, and after that system generates points from internal values like
    X1-ValueX[0], Y1-ValueY[0]
    X2-ValueX[1], Y2-ValueY[1]

    One option is to use WPF with windows chart control?

  5. #5
    Join Date
    01.07.2008
    Location
    Salzburg, AT
    Posts
    1,038

    Default Re: Draw line dynamically?

    Why not the Extended Trend?

    I'm still not understanding your use case, so it will be hard to give the best solution proposal.
    Last edited by ursulak : 6th September 2021 at 10:35

  6. #6
    Join Date
    01.07.2008
    Location
    Salzburg, AT
    Posts
    1,038

    Default Re: Draw line dynamically?

    If in Extended Trend: it will not draw XY for arrays variables. But it will draw for single variables when their value series are stored in Historian or HDD (variable properties - Harddisk data storage).
    Or if you configure Logic to deliver the array as a Block Array (variable properties - Additional settings - Block array size), so via register of 10(?) offsets in Logic MODBUS slave (to zenon MODRTU driver - single variable configured to be 10 items block array).

    To give you better description of Extended Trend solution I have to first well understand the use case.


    If not Extended Trend then you can (but this will be quite much work): draw in Editor a set of flat lines with the chained horizontal points and in the runtime then return from logic calculated there dynamical (so on additional variables) for each line: line size, position and rotation. See line properties - position - X/Y position dynamically; and size and rotation dynamically.

    If you like you can program a WPF.
    Last edited by ursulak : 6th September 2021 at 11:07

  7. #7
    Join Date
    01.02.2016
    Posts
    55

    Default Re: Draw line dynamically?

    Hi, thank's again for your efforts to solve this.

    See attach. That's how it should looks like.

    Red lines should be "printed" on graph before measuring starts.
    Then when measuring starts it always goes from greater flow (black line).
    So we have pairs (example):
    point 1 - (flow,error) - (100%, 0,12%)
    point2 - (65%, -0,08%)
    etc.

    Note: Grey line is not needed.

    I tried with ET, but I'm not sure how to get final results?

    I used new internal values IFLOW and IERR. Then in zLogic everytime I get measuring point from array
    X1-ValueX[0], Y1-ValueY[0]
    X2-ValueX[1], Y2-ValueY[1]

    i do this:
    IFLOW = ValueX[0]
    IERR = ValueY[0]

    This two variables are used in XY ET display...


    Attached Thumbnails Attached Thumbnails graph.jpg  

Similar Threads

  1. How to define register address dynamically?
    By kuki in forum Engineering Studio Logic & Logic Service (former zenon Logic Workbench & Runtime)
    Replies: 2
    Last Post: 16th November 2015, 12:01
  2. dynamically create Alarm Areas
    By mkerle in forum VSTA
    Replies: 1
    Last Post: 24th November 2011, 09:47
  3. How to draw mimics in zenon Editor
    By nahala in forum Engineering Studio & Service Engine (former zenon Editor & Runtime)
    Replies: 4
    Last Post: 27th April 2009, 08:31
  4. Trend Line
    By rloureiro in forum Engineering Studio & Service Engine (former zenon Editor & Runtime)
    Replies: 2
    Last Post: 16th December 2008, 10:52
  5. Dynamically changing alarm descriptions
    By mattsd in forum Engineering Studio & Service Engine (former zenon Editor & Runtime)
    Replies: 2
    Last Post: 9th November 2007, 10:44

Posting Rules

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