LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

synchronously driven events

Hi,
i am new to using labview, and i need help regarding using events.
i have a vi. for saving the data i gotten from an instrument into a file, and another vi for displaying the data from the file into a xy graph. i want them to operate synchronously, as in when one string is written into the file, the graph from another vi will display that string, until the whole array of strings has been saved completely.The reason i dont directly connect the display graph to the strings, as the graph will either plot one point at a time or plot the whole graph after it has collected all the points, after the run has finished..
Could someone help me? attached is my events-driven vi. Thanks.
0 Kudos
Message 1 of 4
(2,704 Views)
Hmm...

I'd love to help you, but I'm rather confused, and your code hasn't cleared anything up for me.

First you refer to writting strings to a file, then you talk about plotting points on a graph... I don't really know what's going on...

I'm positive what you're trying to do is relatively straightforward, and I imagine could be accomplished with a queue if not a notifier.

If you could provide more details, I'd love to help
0 Kudos
Message 2 of 4
(2,704 Views)
Hi Victrick,
thanks for willing to help me.
I am using labivew 7.0 to create a ramp voltage and reading both the increasing voltage and corresponding current for an experiment with PS 325 and a resistor.
My experiment requires me to set the voltage of PS 325 to increase at regular and measure the current at various times of the experiment. Later, i will combine these two data to create a I-V graph.

Now, i have set the increasing voltage, and i am concentrating on getting the strings of voltage data both written into a file and plotted into a graph (V against i). However, when i connect my X-Y graph to the strings, it will only plot a point at a time, not line. If i connect my graph to the spreadsheet string to array, i will only get my graph after a
ll the strings have been written into an array, after the whole run have finished.
However, i want it to be like:
As a string is written into the file, the graph will start plotting. Eventually, as the whole array is written, the whole graph will also finish plotting.

I tried connecting using waveform chart and waveform graph directly to the spreadsheet to array, and is able to give me a continuosly plotting graph, chart, but it will not be plotting accurately at times, as in, it will fluctuate from a positive value to a negative value of the same magnitude, or zero, or even not plotting what the Power supply's screen is showing. Using X-Y graph seems to give me no such problem, except that it will not plot continuously and also it will not clear itself automatically, despite its settings (clear on every call).

So, i thought maybe notifier may help, as in, synchronizing both the writing a string data into the file, and plotting of this string data into the X_Y graph one at a t
ime, not after collecting all the points.

Am i right in doing the above, or did i miss any point? Can using queue help me solve this? sorry for writing so long..

adeline
0 Kudos
Message 3 of 4
(2,704 Views)
Hi Adeline,

Hmm... sorry, I guess I misunderstood the initial post a bit... I don't think I should be leading you down the road of synchronization.

If I don't miss my guess, synchronization is completely unneccessary. Rather, I think you're just having problems getting the graphs to function the way you want them to.

I've attached a sample VI that allows you to continually add points to a list and display them in an X-Y graph. This may not be exactly what you're looking for, and this might not be the prettiest solution, but I think it's more on track for what you're looking for. I really don't think you should be thinking about synchronization, as it's a much more complicated topic that is probably VERY unnecessary in this case,
unless you are trying to coordinate multiple VIs that are acting as GUIs for the user.

Let me know what you think.
0 Kudos
Message 4 of 4
(2,704 Views)