05-15-2024 02:34 PM
Hello, I'm currently utilizing a PXI-6123 to read 3 analog inputs. My analog task is configured for finite samples at a 500kHz sampling frequency with 360 samples. Once I've captured these samples, I aim to store them in an .xlsx file. While the reading process functions correctly and the measurements align with expectations, I encounter difficulties when attempting to save them in an .xlsx format. There are no error messages, nor does the program generate the desired file. Interestingly, I've observed that the Write To Measurement File operation operates without any problem in a new VI without any DAQmx functionalities. Despite numerous attempts, including bypassing the express VI and delving into lower-level approaches, I've been unable to resolve this issue. Is there anyone available to provide assistance?
Solved! Go to Solution.
05-15-2024 04:03 PM
What happens if you use "Write Delimited Spreadsheet", which will write a .csv file that Excel should be able to read. It will be a "pure text file", but you could easily add (text) header information, import it into Excel, and let Excel turn it into a .xlsx, if that's the format you ultimately want. [I must confess I've never used "Write to Measurement File" -- I either go directly to the Report Generation Toolkit if I really want Excel, or use the Delimited Spreadsheet method].
Bob Schor
05-15-2024 04:28 PM
I have previously attempted the method you suggested, but the outcome remains unchanged—no file is generated using the specified VI. However, when I integrate the logging code into a new VI, it functions correctly. The type of file used for data logging is of minimal concern to me, as I have experimented with various formats. Although I am not acquainted with the Report Generation Toolkit, I plan to explore this option further upon my return to the lab tomorrow.
05-15-2024 06:46 PM
Or you can use the built-in feature of NI-DAQmx to save the data to TDMS file. You can refer to DAQmx Examples for reference. You can open TDMS file using Excel or export it to XLSX.
05-16-2024 12:47 PM
We resolved the problem. It turned out that we were attempting to log the data onto this computer while running the VI under our PXI system. I wasn't aware that the PXI had its own operating system and storage, which is where the data was being written to.
05-16-2024 12:48 PM
Thanks for the help and suggestions though.