1 Attachment(s)
Re: Draw line dynamically?
Hi again,<br><br>I realy need help here.<br><br>I would like to display simple XY line graph . All axis should be fixed interval.<br>X axis 0...100% - flow<br>Y axis -3...3 - error<br><br><br>Example:<br>Every xx seconds system generates one point (X,Y) from 100% to 0%<br>after 10sec 97% - 0,12<br>after 10sec 65% - 0,11<br>after 10sec 46% - 0,08<br>etc.<br><br>How to make this graph?<br>It should be like an image attached...<br><br><br>
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?<br><br>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.
Re: Draw line dynamically?
Quote:
Originally Posted by
ursulak
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?<br><br>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.
<br>
<br>Thanks for reply,<br>It's internal variables calculated in zLogic.<br>I tried with XY display...but there also some other questions...<br>For every point we have X,Y pair (xvalue,yvalue).<br>So after xx seconds we should to connect next points (like series).<br>We need to draw limit lines before measuring starts, and after that system generates points from internal values like <br>X1-ValueX[0], Y1-ValueY[0]<br>X2-ValueX[1], Y2-ValueY[1]<br><br>One option is to use WPF with windows chart control?
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.
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.
1 Attachment(s)
Re: Draw line dynamically?
Hi, thank's again for your efforts to solve this.<br><br>See attach. That's how it should looks like.<br><br>Red lines should be "printed" on graph before measuring starts.<br>Then when measuring starts it always goes from greater flow (black line).<br>So we have pairs (example):<br>point 1 - (flow,error) - (100%, 0,12%)<br>point2 - (65%, -0,08%)<br>etc.<br><br>Note: Grey line is not needed.<br><br>I tried with ET, but I'm not sure how to get final results?<br><br>I used new internal values IFLOW and IERR. Then in zLogic everytime I get measuring point from array<br><span style="color: rgb(62, 62, 62);">X1-ValueX[0], Y1-ValueY[0]</span><br style="color: rgb(62, 62, 62);"><span style="color: rgb(62, 62, 62);">X2-ValueX[1], Y2-ValueY[1]<br><br>i do this:<br></span>IFLOW = <span style="color: rgb(62, 62, 62);">ValueX[0]<br></span>IERR = <span style="color: rgb(62, 62, 62);">ValueY[0]<br><br></span>This two variables are used in XY ET display...<br><br><br>
Re: Draw line dynamically?
Quote:
Originally Posted by
JakaBasej
Have you tried vector programing like R?
<br>
<br>Sorry, I didn't understand question?
Re: Draw line dynamically?
have the red lines fix position or dynamical? if dynamical - what (variables?) impact it?
Re: Draw line dynamically?
Quote:
Originally Posted by
ursulak
have the red lines fix position or dynamical? if dynamical - what (variables?) impact it?
<br>
Hi Ursula...<br>Red lines have 3 fixed posibilities.<br>If variable ErrorLimit = 2, then it looks like on image... (on 20% X axis, error limit (red line) goes from 2 to 1 - upper limit, and from -2 to -1 lower limit).<br>If Error limit = 1 then (on 10% X axis, error limit (red line) goes from 2 to 1 - upper limit, and from -2 to -1 lower limit)<br>If Error limit = 1.5 then (on 15% X axis, error limit (red line) goes from 2 to 1 - upper limit, and from -2 to -1 lower limit)<br>So the red line in sense of Y axis is always the same.<br><br>ET starter edition does not support XY display?