From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Output Data to Custom Report

Hello again,

 

I'm trying to figure out how to take data that I received from a state machine and output the data into the following example. The "Point" column with the percentages will be the only constant. Everything else needs to change with the corresponding values. I'm getting data like this:

 

Set Pressure Low

Write Data

Set Pressure 20%

Write Data

 

and so on from 0-100%-0 incrementing/decrementing by 20%. What would be the best way to go about making this identical report, or something very similar? I don't want to have to buy additional add-ins for LabVIEW to accomplish this.

 

Thanks all!

 

report.jpg

0 Kudos
Message 1 of 9
(2,632 Views)

If I have to purchase an add-in to accomplish something similar, I will have to.

 

Thanks

0 Kudos
Message 2 of 9
(2,625 Views)

Hello buikgn!

 

There are several options to consider:

 

a) Use ActiveX with Excel:   http://www.ni.com/white-paper/3520/en

b) Try out the Report Generation Toolkit (free 30 day trial) : http://www.ni.com/white-paper/3178/en

c) Use the Write to Spreadsheet.vi and Export the Graph to Excel

d )Use the Write Text File VI(a tab delimited text file can be read in Excel) in (Programming>>File I/O) 

 

I would go over all of them to see which one you may find more suitable. Good luck.

 

Andres G
Applications Engineer
National Instruments
Message 3 of 9
(2,614 Views)

Thanks AndresG

0 Kudos
Message 4 of 9
(2,605 Views)

In order to write the test data which includes the pressure that was set at each increment as well as the multimeter reading, what would be the best way to pass the data to a "Write Report" state? I was thinking about storing test data in a cluster until all states have finished and then write all the data at once, but I'm not sure if this would be a good idea or how exactly it can be done. I've never used clusters before.

 

Thanks everyone

0 Kudos
Message 5 of 9
(2,595 Views)

Hi buickgn,

 

How much data are you thinking about writing?  If it is a large amount of data, we recommend writing the data in chunks so that you don't overflow your memory.  Do you need to write it to a specific template in Excel or to another program in LabVIEW, or to just any spreadsheet?  What exactly are you planning on using the cluster for?

 

Thanks,

 

David B

National Instruments

Applications Engineer

0 Kudos
Message 6 of 9
(2,585 Views)

Hello dbell,

 

It's not much data. Each time a pressure is set and the multimeter is read, it will store the readings. This will happen less than 10 times. So, 10 readings for set pressure and 10 for multimeter readings. I was planning on writing the data to Excel or HTML using the Report Generation Toolkit.

 

I was told to use a cluster of arrays to store the readings until the end of the program, then all of the data will be written at once. Is there a better way to do this? If there isn't, I'm not sure how exactly to wire it. The data types of the pressure and multimeter readings are double integer.

 

Thanks

0 Kudos
Message 7 of 9
(2,583 Views)

Hi buickgn,

 

There are a lot of ways you can write data to excel, it's a pretty flexible format.  This example does it using a 2-D array of data.  All you would need to do is remove the "Read from Spreadsheet" VI and replace that with your data in a 2-D array format.

 

https://decibel.ni.com/content/docs/DOC-11074

 

Thanks,

 

David B

0 Kudos
Message 8 of 9
(2,568 Views)

Hi,

 

I agree the report generation toolkit works fine for many uses.  For example, you can put labels ( or bookmarks, etc...) in an Excel template and then pass specific data to the label.  This would make a header for the report ( or footer, etc...)

 

Then as mentioned, you can load 2D data as a table.

-------
Mark Ramsdale
-------
0 Kudos
Message 9 of 9
(2,562 Views)