07-23-2007 10:26 AM
07-23-2007 11:57 AM
07-24-2007 02:12 AM
09-23-2008 07:18 AM
Hey GerdW,
I've followed the thread and this looks like something that will work with my system. I have voltage and temperature measurements lines going out, and I need the system to determine the SOC values from the V and T measurements. To achieve this, the system needs to look up the table and interpolate SOC values, and this depends on the cycle, either charging or discharging.
Please look at my excel file, under SOC calculation tab, for the complete calculation. On the next 2 tabs, I've prepared the values that can be used for each cycle with temperature on the top row, SOC in the most left-hand side column, and voltage in the rest.
I tried doing it in interpolate 2D array.vi but it didn't work because the vi accepts 2D lines, whereas my measurements are all in 1D. I also tried to combine it with read from spreadsheet.vi as I'm new to LabView and programming, I don't know how to put the data into table form like what Yoni did. Please look at the vi file that I've attached. I'm not sure if that was the correct (and easy) way to do that. Oh, the spreadsheets were 3 separate txt files from the last tab (I'm thinking to tackle the charging cycle first). Apparently there's a limit of 3 file attachments. Finally, I've attached the complete vi that I'm working with, it's pretty messy.
FYI, I'm using LV 8.2. Thank you.
Regards,
Ryana
09-24-2008 01:05 PM
Ryana,
Unfortunately, excel spreadsheets include a lot of header information, so the open spreadsheet vi is difficult to use with these types of files. Your best bet is to save your reference chart as a .txt (tab delimited) and then use the open spreadsheet vi to open the data that way.
As for the 'tables' you are referring to, I think you mean the array constants that GerdW was using. Using these would eliminate the need to open files through the vi, making it more portable. The quick and easy way to populate one of these would be to:
1) Save your data to a .txt (tab delimited) file
2) Create a simple vi just to read the .txt file and send the data to an array indicator(double)
3) Run the simple vi to populate the array indicator
4) Right click on this indicator-> Data Operations -> Copy Data
4) Put an Array Constant on the Block Diagram
5) Right click on the constant->Data Operations->Paste Data
You also don't need the false constant for transposition on the read spreadsheets since false is the default case.
10-21-2008 07:39 AM
Yeap.. just want to post that it's working fine.
Thanks!