12-14-2009 07:59 AM
Hi,
I have this problem... I am writing an 4x4 array witch comes from an intensity graph into a file. But when I write it, whichever method I use it comes out somehow unusable when I try to read it later.
Right now I managed do change it to a 1x16 array witch I later convert back to 4x4 to be shown again in the intensity graph.
The problem is that I have empty lines in between data that I want to remove to show correctly.
Maybe to be clear in my explanation I will post screenshots of the way I'm writing and the way I'm reading...
Can anyone help me?
Thanks!
Antonio
Solved! Go to Solution.
12-14-2009 09:30 AM
12-14-2009 09:57 AM
You're right... I am ploting so many things in xy graph (need the loops to generate the arrays) that I forgot that in this case it isn't necessary. As for the loop in the "read" vi, I need it so I can use the scrollbar to view all the "pictures", I think.
Thanks!
12-14-2009 12:38 PM
alpol wrote:As for the loop in the "read" vi, I need it so I can use the scrollbar to view all the "pictures", I think.
Can't say for sure since I don't know what you're trying to display on the front panel. When you label the array "4x4" are you implying that it contains, at most, 16 elements, or that you're only showing a moving window that's 4x4? Arrays have built-in scrollbars. Can you use those?
12-15-2009 05:01 AM
This is what I want with the scroll bar: As I scroll, I can see the status of 16 thermocouples in a wall at the time they were acquired, after the test was made.
So, to keep the program moving, I need the loop, right?
Thanks for your help!
Antonio
12-15-2009 07:32 AM
Typically, a main program can have a While Loop.
If you want to handle operator events while the program is executing and processing data (etc), you may want to consider an Event Structure.
I didn't read the entire post, but the original post in the thread shows 2 loops. Are those the ones you are referring to, or do you mean a loop that runs until the operator wants to exit the application?
R
12-15-2009 08:59 AM
12-15-2009 09:15 AM
Exactly smercurio_fc, my scrollbar is advancing through time to show previously acquired data. That's why I have she scroll bar linked to the timestamp array. So the scrollbar advances data of the thermocouples and time info. Kind of a movie, like you said.
12-15-2009 12:12 PM
Do you have an example of the data files that you are reading. The above screenshot has a comment to indicate that the timestamp information is being saved as a separate file. Not sure why you did it this way.
Depending on how you saved the data to file it may be easier to create an array of clusters where the cluster contains the timestamp for a set of data and the data for that time. Then you can simply use the built-in scrollbar without needing a special loop to scroll through the data.
12-15-2009 06:05 PM
The reason I am writing the timestamps into another file is because I am writing some other data into another file and since I am writing to file in a single loop I used the timestamp from that data. I take 1 point every minute from the thermocouples (48 total, divided by 3 walls),mass , %O2, %CO2,%CO, another 2 temperatures, Pressure in a chimney, and efficiency and Power (calculated online).
Here is the header that is written:
Date\sTime\tAmbT[ºC]\tFT[ºC]\tO2[%]\tCO2[%]\tCO[ppm]\tniu[%]\tP[kW]\tCOcontent[ppm]\tVCOn\tMass[kg]\tPressure[Pa]
The timestamp is written in first column like this:
15-12-2009 11:31:37
15-12-2009 11:31:38
15-12-2009 11:31:39
...
So since I acquire everything every minute in that loop I use that same time stamp from the system with "Get Date/Time In Seconds". I know I should take the timestamp from the dynamic data I receive from the DAQ, but every time I acquire data from the gas analyzer, labview freezes for a second or two and that was distorting my time in the charts. So I decided to plot everything with XY graphs all with the same timestamp. Maybe I would have a more accurate timekeeping with the timestamps from a wave form data from one of the DAQ's.
Anyway that is where the timestamps are coming from.
I write the thermocouple data into another file because if I want to open the first file in excel everything makes sense, there was no need to confuse things by writing another 48 columns of data from the thermocouples there.
After the tests I want to show the data in a new program with pretty much the same layout as the one I use to acquire everything. The only thing I have to show like a movie is the info in the intensity charts .
What I do is what you see in the example above... I take the thermocouple data and show it in the intensity graph and in a array and use the index to go through time and data, like a movie.