LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

xy graph problem of repeating same plots

Solved!
Go to solution

Hi there. I have this problem of graph plots in my XY Graph.

At first i thought it was just a line joining the first and last points. But it might also be because the graph is replotting my points again and again. I have a feeling that after my last point, the graph goes back to plot my first point thats why its all joined up in one loop.

 

Can someone advise me on this? I just want a line whereby the ends do not meet.

I have everythong ready except displaying on the graph nicely. Desperate! Thank you. 

0 Kudos
Message 1 of 11
(3,732 Views)

Hi sneakers,

 

I have a feeling that after my last point, the graph goes back to plot my first point thats why its all joined up in one loop.

Yes, it does.

Because you use uninitialized shift registers/feedback nodes!

 

What's the reason for the outer FOR loop, which iterates just once?

Why do you scan for the timestamp that complicatoed? Why not read a timestamp directly with ScanFromString?

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 11
(3,709 Views)

Thank you for your response GerW! 🙂 🙂

 

1. I put the outer for loop because I want to clear the graph first when I press run. This was my solution to my earlier problem when the graph would just extend and append when i stop and start again.

 

 

2. I am actually retrieving data from a database so the time is according to the user interface. Thats why i cant wire the time stamp directly?

 

 

Oops haha I had a feeling it was joine dup all in a loop. How do i make it such that the points wont be back to back? I just want to display the points according to the dates the user chose (which is in between First Date and Last Date).

 

0 Kudos
Message 3 of 11
(3,700 Views)

Hi Sneaker,

 

I just want to display the points according to the dates the user chose (which is in between First Date and Last Date).

Then you should filter just those points. And you should initialize any shift registers/feedback nodes you use in your VI…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 11
(3,691 Views)

idkidk.png

 

GerW,

Is this the feedback node you were talking about? Because i didnt use any shift registers. What do you mean by initialising my feedback nodes? Im afraid i dont understand. 

 

Ive tried putting  constant value (eg. 4) to the smaller for loop but it doesnt solve my problem of my data displaying in a loop. 

0 Kudos
Message 5 of 11
(3,656 Views)
Solution
Accepted by topic author redhotsneakers

Hi sneaker,

 

Is this the feedback node you were talking about?

Yes, those are the feedback nodes. The context help will also name them this way, when you hover the mouse over them!

 

What do you mean by initialising my feedback nodes? Im afraid i dont understand.

The LabVIEW help explains, how to initialize feedback nodes (and shift registers, which are basically the same). Did you read the help?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 11
(3,649 Views)

Hi GerdW,

 

According to the context help,

 

Feedback Node 

Stores data from one VI execution or loop iteration to the next.

 

 

I looked at the example and it says to initialise a feedback node, i have to wire smth into the intitialiser terminal from outside the loop. But then the whole stretch of wires become broken. 

 

idkidk.png

 

Is there no other way to stop the plots from plotting in a loop?

0 Kudos
Message 7 of 11
(3,633 Views)

Hi,

 

I'm sorry, but I cannot recognize, what you want to show with this downscaled image…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 11
(3,626 Views)

idkidk.png

 

 

Hi GerdW, 

 

I'm lost as to what i have to do now. 😞 

 

 

0 Kudos
Message 9 of 11
(3,601 Views)

Hi Sneakers,

 

But then the whole stretch of wires become broken. 

I don't see any broken wires in your image…

 

Is there no other way to stop the plots from plotting in a loop?

Create the plots using autoindexing output tunnels in your loop. Build the plots just once after the FOR loop finishes…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 11
(3,594 Views)