LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

xy graph in real time plotting

Solved!
Go to solution

Hi,

 

I am creating a C-V-T measurement program using HP4284A lcr meter and Lakeshore 330 temperature controller via gpib. I am stepping the temperature and sweeping voltage. I need to have a simultaneous plot of CV and I am using an XY graph to display it. My problem is when the loop goes into the next iteration it steps back without clearing the graph for the new sweep. Can anyone please help me in finding how to clear the grap of old values each sweep

 

Thanks,

Dimuthu

0 Kudos
Message 1 of 7
(6,076 Views)
Solution
Accepted by topic author odimuthu

Hi odimuthu,

 

My problem is when the loop goes into the next iteration it steps back without clearing the graph for the new sweep.

Usually you would create another plot in the same graph for the next sweep!

 

When you really only want to plot data of the current sweep you need to delete the data stored in the shift registers (aka feedback nodes) when you start a new sweep!

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 7
(6,051 Views)

XY Graphs will only display what you sent to it last. So if you sent 10 points, it will show 10 points. If you want to show less, then you have to clear your shift registers or whatever data storage method you are using before adding new XY points.

 

XY Charts will display the last point you sent PLUS the history of points. If you want to clear the history you can send an empty array to history property using a property node.

0 Kudos
Message 3 of 7
(6,047 Views)

I'm guessing (from the picture of part of the Block Diagram you attached) that you are worried about the second while loop and graph, not the first.  Actually, it is much easier to fix the first, which uses Shift Registers instead of Feedback Loops (I always have trouble with Feedback Loops, but Shift Registers seems almost intuitive to me).

 

What governs when you want to restart a plot?  Is it "Do a new plot for every loop of the outer For Loop (fed by Number of Averages)?  Then simply wire an empty array to initialize the two Plot Array shift registers (which will start the plots over again).  If you want to do something similar in the first loop, which uses an Express VI (booooo), investigate what the Reset terminal does (my guess is that it "resets", or zeros, the plot).  You'll want this to be true once, so initialize a Shift Register (outside the loop) to True, and inside the loop (where it in the output side of the While) to False.

 

Bob Schor

0 Kudos
Message 4 of 7
(6,032 Views)

The initilizing of the graph at the shift register like you suggested clears the graph for new data. But I also want to keep the old plot in the graph (the problem with the last setting was it would start plotting from the first voltage and that would create a line between the first and last points). I want to keep the old plot without that line so I can see variation of curve with temperature. Is there any way to do that ? 

 

 

 

 

Thanks,

odimuthu

0 Kudos
Message 5 of 7
(5,986 Views)
Solution
Accepted by topic author odimuthu

Sure, you have just have to be careful about how you send the data to the graph. Make the data an array of a cluster of two 1D numeric arrays. Each iteration you will "build array" with the old data to keep all your traces intact. Then once you've completed your entire sweep, you will store that data in a shift register to be used for your next sweep.

 

Demo XY Graph.png

 

 

Message 6 of 7
(5,977 Views)

Hi,

 

I need some help again. For the temperature control part of my program, I need to check an specified no of poits to see if the temperature is constant within a tolerance right now it checks each pit and initiates the next step if it is within tolerance I need to have it check the specified no of points once it is within tolerance and then go to the next sequence. Does anyone have an Idea how to do that ?

 

Thanks,

odimuthu

0 Kudos
Message 7 of 7
(5,932 Views)