01-26-2017 06:02 PM
Hi All,
Totally new to labview (about 3 weeks), Have learnt an awefull lot on this forum and web searches.
I am stummped at present. I want to store the calibrated data for pressure transducers into a lvm file and use this as a default file so I dont haveto recalibrate the transducers every time I open the vi. I have managed to save the file but the data presents in 4 columns and I only need the 2nd and 4th column. Can anyone please point me in the right direction
The last column should read the same as the last column in the lvm file 0-5v not the 0-10 column.
I need to fine tune as the file will be written to when in cal mode and read when the vi executable opens
Any help appriciated
Solved! Go to Solution.
01-26-2017 07:24 PM
Explore the Array palette.
Use Delete from Array. Or Index Array to get the two columns and Build Array to put those 2 columns back together in a new 2-D array.
01-30-2017 05:41 AM - edited 01-30-2017 05:43 AM
Thanks for the input. Finally understood how the array and dynamic data interacted and came up with this..works ok as a stand alone, just need to put it into my base vi
Cheers
01-31-2017 12:55 PM
Your code architecture in that screenshot does not make much sense.
If Cal Mode is True, that inner while loop is going to run continuously as fast as it can writing and rewriting data to the Measurement File.
I don't understand what is the relationship between Data and Data2.
And it is odd that the index and length for the Array Subset function are controls to be manipulated by the user of the VI.
01-31-2017 04:15 PM
Thanks for the reply,
I am totaly new to this labview, still trying to get my head around the way things work. I have changed the index and array length to constants and removed the loops from the write to file.
Data and Data2 were arrays I used to see if the program was working (didnt know about the probe capability), Once I understood the way things worked I modified as per below image.
The final code is below. Probably not the best way to do it and open to sugestions. The process takes the values of 6 pressure transducers (calibrated values) and writes them to a config lvm file when the calibrate bool is true. Cal bool is false when reading and logging actual values. The read code is activated only when then the vi is closed and reopened.
Appreciate the input you provided.
02-01-2017 11:01 AM
Get rid of the property nodes and just wire directly from where you are writing to it to where you are reading from it.
All the array manipuplation is very odd. Doing mulitiple array subsets, then going and doing a delete from array to get a single item (or are you removing a single item) seems like a lot of unnecessary manipulation. It seems like you should just be using Array Index. If so, you can do that with a single function since it is expandable to give multiple outputs.
02-01-2017 01:26 PM
Cheers for that, Will have to get my head around how the Array index works.
The data is read from the file as 24 colum array. need every 2nd column read to each data set, ie 0 and 2 to d1, 4 and 6 to d2 and so on.
Baby steps are a pain.
Thanks for the help