Jump to content

Labview to Excel


Recommended Posts

Hello,

I am designing a threshold detector with 10 inputs.

When the threshold is reached (and passed) there will be two data values.

1. The time it takes for each input to pass the threshold limit

2. The time starting from the threshold passing till the STOP button is pressed.

3. The total duration from the start of running till the STOP button is pressed.

The I want to export to Excel these times and make a column for each of the 10 inputs.

Also I need the vi to write to excel after the stop button is pressed.

How can I do all these?

Link to comment

If the requirement is not to specifically make a *.xls file, but rather just a file that Excel can read, the easiest way to do this is to make a Comma Separated Variable (*.csv) file from your data. Then you don't have to fool around with ActiveX or .Net or anything like that.

So, for example, your time file would end up looking something like

timeToThreshold1, timeToStop1, duration1

timeToThreshold2, timeToStop2, duration2

timeToThreshold3, timeToStop3, duration3

...

  • Like 1
Link to comment

If the requirement is not to specifically make a *.xls file, but rather just a file that Excel can read, the easiest way to do this is to make a Comma Separated Variable (*.csv) file from your data. Then you don't have to fool around with ActiveX or .Net or anything like that.

So, for example, your time file would end up looking something like

timeToThreshold1, timeToStop1, duration1

timeToThreshold2, timeToStop2, duration2

timeToThreshold3, timeToStop3, duration3

...

Thank you for the prompt reply!

How do I make the vi to write to excel after the stop button is pressed, ie after all the data is collected? It keeps asking me to save the data at the beginning.

Link to comment

How do I implement it to labview?

I think we've gotten to the point where you need to post some code of how you've tried to implement the suggestions Roderic and I have already made, and what's working and what's not working.

Link to comment

Indeed, there's different ways to do this. and I dont think this is the simpler way, but if it works then...

You seem to use an indicator as a control for the file path... or maybe I dont have the whole picture.

Your design is a bit weird to me.

Edited by Roderic
Link to comment

Your design is a bit weird to me.

The code almost looks deliberately wrong, which makes me wonder if it's a school assignment??? If so, while we're all glad to help people out here, we really shouldn't be doing your homework for you.

Link to comment

The code almost looks deliberately wrong, which makes me wonder if it's a school assignment??? If so, while we're all glad to help people out here, we really shouldn't be doing your homework for you.

Its work!

What you see is a patch work from different other vi/examples etc, and no it is not "deliberately wrong"!

Indeed, there's different ways to do this. and I dont think this is the simpler way, but if it works then...

You seem to use an indicator as a control for the file path... or maybe I dont have the whole picture.

Your design is a bit weird to me.

It is an indicator, the file path is generated via a path/tag code. I chopped it off as I thought it might be confusing

Edited by Ano Ano
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.