05-04-2011 03:36 AM
Hi
Background
I am new to LabView, and teaching my self as I go. I am a grad student working on a larger project, vacuum chamber. What i have setup is a master/slave while loop, this aproximates how the larger code looks/functions. I need to pulling certain data, pressure or temp ect.., from one while loop and use a second to writing that to a file. The actual code has several slave loops and one master. It also has to write a time stamp to the file, to help line up data points. As the chamber will run many times over hours. As of right now it will only add a time stamp once at the very first iteration of the slave loop. As well I want all the data to be stored in one file and new "runs" appended to the file. So that between each "run" and at the very beginning there is a time stamp.
The problem
I would like the time stamp to be added every time that you turn the slave loop off/on, granted that it has already been turned on once and the master loop or the VI has not been stopped. Like i mentioned above, it will work the first time i turn in on. Then I turn it off let the master loop run a couple iterations. When i turn it back on it will log the data but does not place the time stamp between the last data point from the first "run" and the first data point from the second "run". Can someone point me in the right direction or show me an example of what i should do
the first VI is 8.5 version
the second is 10.0 version
05-05-2011 02:37 PM
Hey jaswri,
This is a good start on using the producer/consumer architecture. However, you are going to run into problems using so many local variables. Here are some good examples that should definitely help you on your way to developing your applications;
Application Design Patterns: Producer/Consumer
Producer Consumer MultiPlot Waveform Graph
Producer/Constumer (Events) With No Data Loss
Also, consider acquiring your data with the Waveform data type, which has a timestamp associated with each element of data. That second example should be particularly helpful, since it sound like almost exactly what you are trying to do. Hope that helps, and have a great Cinco de Mayo!