LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Excel spreadsheet as input to PID Setpoint Profile VI

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?

0 Kudos
Message 1 of 27
(5,650 Views)

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

0 Kudos
Message 2 of 27
(5,629 Views)

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.

0 Kudos
Message 3 of 27
(5,584 Views)

Hi Perillo_U...,

can you show, what you have done so far. I´m not sure where you see the problem.

 

Mike

0 Kudos
Message 4 of 27
(5,571 Views)

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!

Download All
0 Kudos
Message 5 of 27
(5,567 Views)

Hi Perillo_U...,

that´s what i showed you already with my first picture. Smiley Wink

 

Mike

0 Kudos
Message 6 of 27
(5,551 Views)

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!

0 Kudos
Message 7 of 27
(5,538 Views)

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 (?)

0 Kudos
Message 8 of 27
(5,523 Views)

Hi Perillo_U...,

can you upload an example of your data file?

 

Mike

0 Kudos
Message 9 of 27
(5,513 Views)

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.

 

 

Message Edited by bmann2000 on 10-23-2008 09:04 AM
0 Kudos
Message 10 of 27
(5,507 Views)