LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

write file measurement input data 'manipulated'

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.

0 Kudos
Message 1 of 12
(3,202 Views)

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.

Jon D
Certified LabVIEW Developer.
0 Kudos
Message 2 of 12
(3,181 Views)

We need to see some code. Maybe you have a race condition (e.g. local variable overuse) and the file operation changes the execution order of the calculations.

0 Kudos
Message 3 of 12
(3,172 Views)

It's kind of hard to help someone troubleshoot a VI when they haven't included it.

 

Attach the VI.

0 Kudos
Message 4 of 12
(3,165 Views)

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.

0 Kudos
Message 5 of 12
(3,151 Views)

As a first step, I would eliminate all the dynamic data. They are way too opaque to troubleshoot.

0 Kudos
Message 6 of 12
(3,147 Views)

@ct258 wrote:

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?

0 Kudos
Message 7 of 12
(3,141 Views)

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.

0 Kudos
Message 8 of 12
(3,132 Views)

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.

 

0 Kudos
Message 9 of 12
(3,129 Views)

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).

 


@ct258 wrote:

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"?

0 Kudos
Message 10 of 12
(3,111 Views)