LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Empty Excel-Sheet wenn running mi VI newer LabVIEW-Version

Hello,

 

I want to open my VI in a newer LabVIEW-Version than it was written and saved. On the frontpanel I can see my data and the graphs of the data, but when I wan to open the data in Excel nothing appears. I do not know if the problem has to do wit the update to a newer LabVIEW-Version. The VI was written in 6.0 and I wan tto open it in 8.5!

Can somebody help me? I´ve attached the VI and one of the SubVI in which i estimate the problem.

 

Thanks, Tristan

Download All
0 Kudos
Message 1 of 7
(3,055 Views)

It's possible that an upgrade would change behavior, but based on the code I'm seeing I would doubt it. What does the output text file actually look like?

 

As for the code:

 

First off, you are not writing an Excel workbook. You are writing a TEXT file which you can open in Excel.

 

Second, you should be using the Write to Spreadsheet File VI. This will still write a TEXT file, but it's easier to use. I don't know what your "Datumsformat_umformen" VI is doing, but it appears to simply convert a DBL array to a string array. The Write to Spreadsheet File VI can do that. Thus, if it's doing what I think it's doing you can eliminate it, and simply wire in the array that you want to write to file.

 

Third, why use a string control with a local variable? Simply make it a string indicator, and wire directly to it. 

0 Kudos
Message 2 of 7
(3,042 Views)

Thank you for your help!

The problem seemed to be in the Sub-VI Schreiben. I eliminated it and used the VI "Write to Spreadsheet File" instead. Now I have an output file with all the data I wanted. Before, my output file was empty!

The "Datumsformat_umformen" VI converted a value (seconds since 01.01.1904) in a date and time. Now my problem is, that when eliminating the "Schreiben" VI in which the "Datumsformat_umformen" VI was integrated, the values that stand next to my data are not converted in to a date and time anymore. Do you now how I can convert a value into a date and time?

0 Kudos
Message 3 of 7
(3,016 Views)

You can use the Format Into String function to create any kind of timeformat string you want. I'm assuming that when you say "the values that stand next to my data" you are referring to another column that is time data? So is one column a column of values and another column is a column of time data? In that case you would need to split out the columns/rows so they can be formatted separately. For example:

 

0 Kudos
Message 4 of 7
(3,009 Views)

Thank you again for your help! It workes, I can convert my values in to a date and time.

Now I have two last questions:

1. I have not just one column with data, but sixteen. I want to have the date an time next to every one of the columns with different data. How can I manage to create those 32 different columns. With the exmaple I just get two columns, the first  one with my date and time and the second one with data.

2. I would like to put a title above every different type of data e.g. pressure, number of revoltuions, temperature, etc. Do you have an idea, how to do this?

 

Thank you, regards

 

Tristan

0 Kudos
Message 5 of 7
(2,982 Views)

tristang wrote:

Thank you again for your help! It workes, I can convert my values in to a date and time.

Now I have two last questions:

1. I have not just one column with data, but sixteen. I want to have the date an time next to every one of the columns with different data. How can I manage to create those 32 different columns. With the exmaple I just get two columns, the first  one with my date and time and the second one with data.


The example was just that - an example. You can create as many columns as you want by increasing the size of the Build Array to insert the time columns. Why would you need more than one datetime column anyway?

 


2. I would like to put a title above every different type of data e.g. pressure, number of revoltuions, temperature, etc. Do you have an idea, how to do this?

You can call the Write to Spreadsheet File at the beginning of the program to write out your header. Just wire a 1D array of strings to the VI's 1D array input. When writing out your data, be sure to wire a True constant to the VI's "append" input.

 

0 Kudos
Message 6 of 7
(2,967 Views)

Hello, I managed to modify my VI, so that I get my data arranged just like I wanted.

However I have one more question. I do not know why LabVIEW adds one empty line after a determinated number of lines. Another thing i do not understand is that the data for the last seconds of my measurement get substituted with data from somewhere in between my measurement! I attached you one document, so you can see what I mean and also my VI.

Download All
0 Kudos
Message 7 of 7
(2,900 Views)