From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY Graph

Hello everyone!

I have a problem with my xy graph: it is inside a while loop and each iteration i can see the point on the plot but there is not interpolation. At the end i can see only the last point and not all the curve. I used shift register to have a real time graph but it doesn't work properly. Someone can help me? Thanks

0 Kudos
Message 1 of 13
(2,342 Views)

Hello

If you have used the shift registers properly, you should'nt have any problem. Please attach the VI for more detail.

 

-Rahul

Hit KUDOS for Thanks 

0 Kudos
Message 2 of 13
(2,324 Views)

Can't see enough of your code to make a determination.  It doesn't look like you are using the shift register data or even updating it.  Or maybe there is more that you have not shown.  Attaching the actual VI would be the best method.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 13
(2,323 Views)

Please upload your code for the reasons given in my Sig. line...

 

But in general if you are goign to populate and X/Y chart a point at a time during your run instead of all at once at the end, you have to keep your own chart history (usually done using shift registers) between each point you plot. 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 13
(2,277 Views)

It is a university project, i can't attach my code. I will try to explain better my problem. Up to now i can see each iteration the point on the plot but i see only the last value, without the history. In the picture (blue boxes) on the left there are the shift registers, instead on the right there is the plot. What's the problem? 

0 Kudos
Message 5 of 13
(2,257 Views)

Hi Enrico,

 


@Enrico93 wrote:

In the picture (blue boxes) on the left there are the shift registers, instead on the right there is the plot. What's the problem? 


The problem is: you don't create any history. All you plot is the latest value…

(Which should be very obvious if you would use highlight execution!)

 

Btw. even when you can't attach your VI it realy would help to clean up the block diagram. What about AutoCleanup?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 13
(2,248 Views)

Well I can't put my finger on it without begin able to run your code but you are doing something wrong...

 

Look at my XY chart diagram...

 

XYCapture.PNG

 

I believe you are missing the shift register for your X-Axis history. As this example plots TWO lines but notice there are THREE shift registers for chart history

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 7 of 13
(2,245 Views)

It's hard to even read your code with the messy wiring and local variables but it looks like the build arrays are being fed by a subVI (called "2") and we can't open it to see what it's doing.  Are you getting the proper values on the two indicators?  Are the values changing?  Have you tried troubleshooting with probes or in Highlight Execution mode?

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 8 of 13
(2,242 Views)

And it works real time?

0 Kudos
Message 9 of 13
(2,237 Views)

@Enrico93 wrote:

And it works real time?


My chart? YES it works "real time" I put my charts inside an "Action Engine" so they are a sub-vi I can call whenever I need to add to or update the chart. The one shown plots solar harvest 24/7 and it updated every 10 seconds.

 

Here's the part of my code that has all my graphs...

GraphsCapture.PNG

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 10 of 13
(2,232 Views)