I'm working on a LabVIEW programme at the moment where temperatures, pressures and flow rates are recorded whilst entropies, enthalpies, densities and specific heat capacities are interpolated and heat transfer rates and exergy transfer is calculated. That part of the code is all working fine, however when I try to save my data using the write to measurement file the heat transfer suddenly spikes. Its not that the data being saved is different then the data being calculated but the data being calculated is somehow effected by the act of saving the data to the file and I have no clue as to why. When I tried saving my file as a spreadsheet the change was 1000's of watts different yet when I tried saving just to a text file it was only a couple of hundred watts out. Any help would be greatly appreciated. Cheers.
Might want to post the portion of the VI where you do the calculations / saves.
That said, are you perhaps changing datatypes during the calculations? Going from double to single for instance (remember that you might be doing that without realizing it, look for coercion dots on subVIs and functions)? Also, are you using the same format specifiers when converting to text for the spreadsheet / text file save?
Those would be my first two things to examine.
So here's a copy of my subVI for calculations. Within it is a subVI for converting another interpolating subVI for determining entropies etc. so that the data types and units are the same as the ones with my main VI. I'm wondering if the problem is the way I'm transferring data from my results to the write to file as I was just taking a merged waveform signal and splitting it to save me having to hardwire every single temperature sensor. I appreciate the help guys.
So here's a copy of my subVI for calculations.
Can you attach the toplevel VI that contains (or omits) the file IO?
In the interpolation subVIs, don't you want to strip out the row and column headers from the Z arrays?
Ok, I'll definately do that then. I'm away from the test rig at the moment so I won't be able to know if any changes I implement will solve my problem but I'll keep you guys posted when I do some tests if that has helped things.
Apologies, I'm completely new to LabVIEW. Is top level VI the main VI? In the interpolation conversion subVI I believe I've indexed the elements so that the output in my main VI is just an element the density or entropy or whatever value is of interest.
You say you have problems when you are writing to a file, but none of the VIs you have attached show any file IO (pictures are hard to debug).
In the interpolation conversion subVI I believe I've indexed the elements so that the output in my main VI is just an element the density or entropy or whatever value is of interest.
If you leave the left and top column in the z array, you get incorrect interpolation if the input values are at the edge. You can use "array subset" to get the pure data array.
I am also not sure why you are carrying all these higher dimension arrays across subVI boundaries, if you are basically only operate on scalars.
In your "Energy...vi" you could eliminate all the case structures by just using the absolute value function. Where is your "average (subVI).vi"?