LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Keep the data on XY Graph

Solved!
Go to solution

Thank you for your answer. I have just realized that fault now xp

 

Thanks a lot

0 Kudos
Message 11 of 15
(1,479 Views)

Hello Guys,

 

I am sorry to restart this discussion but I encounter an issue in my program. 

 

I explain my step:

1/ I am in my state machine and when I launch the program, I have no problem for the moment. 

2/ I push to button "Go to sinus" and  all is fine

3/ I change the number of "total loop" : 50 to 100 and I repush to button "Go to sinus"

4/ I push the button "clean graph" and I repush to button "Go to sinus"

 

AND NOW I have my PROBLEM ! 

In the graph, it plots 0 to 50 then 0 to 50 but I want to plot 0 to 100. 

 

Do you know why I have this issue?

 

Sincerely ,

 

Ngoc-Vinh Truong

 

 

0 Kudos
Message 12 of 15
(1,470 Views)

Hi Ngoc,

 

Do you know why I have this issue?

Yes.

 

Spoiler

 

You only clear two of your three shift registers/feedback nodes.
An error you easily can detect when debugging your own VI!

 

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 15
(1,465 Views)

My BAD !! 

 

I laugh about my problem. Indeed, when I see your answer, it seems like I am an idiot now .

Nevermind, thank you very much ! Have a good day ! 🙂

0 Kudos
Message 14 of 15
(1,460 Views)

I find it a lot easier to put X/Y graphs in a sub-vi and treat them as  an "Action Engine".

 

The XY graph sub-vi holds its own history internally and even saves its data and restores it to the chart if the program is stopped and restarted.

 

I attached an example of one of my graphs from a program that monitors a grid tie solar power system.

 

The Sub-vi takes in an array of measurements and a command (Initialize, clear, write, and restore), its output indicator will be updated whenever the vi is ran. 

 

Look how much neater my main block diagram is since the graph history shift registers are inside the sub vi's.

ggCapture.PNG

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 15 of 15
(1,452 Views)