10-16-2008 01:31 PM
Hello all,
I am using LabView 8.0 and would like to use an Excel spreadsheet as input to a PID setpoint profile.
This setpoint profile uses pairs of data, the first being time and the second being the process variable setpoint. From an example posted here I know how to read an Excell spreadsheet dataset using Activex but don't know how to modify it's structure to use as input to the PID VI. Also don't know if Activex is the better approach to reading a spreadsheet in this case.
Help anyone?
10-17-2008 01:31 AM
Hi Perillo_U,
if you need only the data from the first sheet, then you can use the "Read From Spreadsheet File.vi" to get your data. The attached picture shows how you convert it to a useful cluster.
Hope it helps.
Mike
10-21-2008 01:41 PM
Hello Mike, thanks for the help.
It didn't quite work the way I expected. It seems like it reads the whole spreadsheet content at once and after that I get a NaN as being my setpoint value. I tried several things but none worked.
10-21-2008 03:45 PM
Hi Perillo_U...,
can you show, what you have done so far. I´m not sure where you see the problem.
Mike
10-21-2008 04:43 PM
Here is what I've been trying. I need the spreadsheet contents (15x2) to be fed into the setpoint profile. Maybe if I knew how to transform an array format to another it would work.
Attached are 2 screenshots I took from what I am doing. Also, I noticed using .asv coma-delimited works.
Thanks!
10-22-2008 01:35 AM
Hi Perillo_U...,
that´s what i showed you already with my first picture. ![]()
Mike
10-22-2008 10:05 AM
Yeah, I'll try it again and let you know if it worked. I read an article in which they recommended saving the Excel file as .asv, so I'll try that too.
Thanks Mike!
10-22-2008 04:44 PM
Hi Mike,
It kinda worked. However, it reads all the spreadsheet content at once, not sequentialy, like the original data structure does. I am attaching a figure.
I have no idea why it works in one case but not the other, if both structures are the same (?)
10-22-2008 11:21 PM
Hi Perillo_U...,
can you upload an example of your data file?
Mike
10-23-2008 03:04 AM - edited 10-23-2008 03:04 AM
Have you considered using a platform independent file format. The Configuration File VIs provided in LabVIEW will allow you to define your controller constants using wordpad, it's easy and fast to impement and the user will not requires microsoft products to view or edit.
