Assignment
Add a save option to your temperature-monitoring VI. The user will have the option to save the acquired data into a spreadsheet file that will include not only the data itself (time, Celsius temperature, Fahrenheit temperature, Kelvin temperature) but also additional information including the user name, a date stamp, and a time stamp.
Download
Working version of VI (no block diagram access)
Textbook sections
Write to Spreadsheet (pp. 240-251)
Programming hints
Place a save switch and a box for the user name (from the controls palette: Text Controls » String Control) on the front panel. Then put the terminals for each on the block diagram inside the While loop. Also put the Get Date/Time String function [Programming » Timing » Get Date/Time String] inside the loop as well.
Place a Case structure outside the While loop and wire the Save switch to its selector terminal. (Questions: What would happen if the Save switch were outside the While loop? What if the Case structure were inside the While loop?) Wire the username, time stamp, date stamp, and data array as inputs to the Case structure. Then make use of the Write to Spreadsheet File subVI [Programming » File I/O » Write to Spreadsheet.vi] to write the data to a file that can be read by Excel. There are many ways to do this. See the picture of the spreadsheet below for one example.
Front panel (example)