04-02-2012 04:44 PM
Hi,I'm capturing the thermocouple response to rising temperature step, can anyone explain how to fit an appropriate model response to the captured data.basically what I did is write the captured data by using "write to a file" then after that read from the file and try to fit a model response using curve fit function but it doesn't work as expected.
04-02-2012 04:56 PM
Since we don't know what you expect or what you actually get, we cannot know what you are doing wrong.
What fitting model are you using?
Can you attach your code and some sample data?
04-03-2012 02:28 PM
Hi alten bach,
Find the attached VI, basically what I did is, captured thermocouple data with the help of AD595 thermocouple amplifier & NI-6008 12 bit I/O card, I wrote the captured data in a lvm file, after that I read the captured data and try to do a non linear model fitting with curve fit.The problem with my VI is it captures the data and writing in a file properly, once after N samples captured the program automatically stops running it didn't read the data, I want to read the data from the stored file automatically after N samples captured.
04-03-2012 03:48 PM - edited 04-04-2012 02:31 AM
So why do you call your question "curve fit" if the problem is with file IO?
Looking at your program for 2 seconds, it is clear that you have a dataflow problem. LabVIEW does not execute left to right, the execution order is determined by data dependencies. The right part of your code does not depend on any other code and thus will execute immediately, and in parallel to the code on the left.
The simple solution is to create a data dependency. For example you could wire from the "error out" of the write function to the "error in" of the read function. Now reading cannot start until the writing has completed.
This is all very basic LabVIEW knowledge. I would recommend some tutorials before proceeding.
Why are you converting your dynamic data just to coerce it back to dynamic data a nanosecond later?
Why are you reading from the file at all, you could just fit the data directly by branching the wire.
You only need to fit if you actually read the data. Instead of the "enable" terminal, use a case structure contianing the entire fitting code.
04-04-2012 05:07 PM
Thanks for your suggestion alten bach, it works now.