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.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to write acquired data to txt file?

Hi guys,

I'm using SignalExpress and a multifunctional DAQ card to acquire analog signal from my chip. I try to save the acquired signal and get the actual analog value of the sampled points but can only get a HMS file. How to write the data to a txt file or a MatLab readable file so that I can process the data? Thanks in advance!!!

Best

Jerry
0 Kudos
Message 1 of 5
(5,229 Views)

Hello. There's a vi in LabView called "write to spreadsheet file" and another one called "write characters to file", either one may be of help for what you need. I suggest you first use an "open/create file" and wire it to one of the other two in case you want to create a new file. Place the functions on the block diagram and right click on the icon and select "help". I've always find the help quite useful.

cheers,

Ali

0 Kudos
Message 2 of 5
(5,206 Views)

Hi Jerry,

From my understanding, you are using Signal Express and an unspecified NI-DAQ card to acquire analog voltage signal from a chip. 
You would like to be able to save the data to a text file. 

Signal Express allows you to save analog signals to LVM files or ASCII files.  The LabVIEW Measurement (.lvm) format is a text-based file format for
one-dimensional data that you want to use with the Read LabVIEW Measurement File and Write LabVIEW Measurement File Express VIs. The .lvm
file is designed so it is easy to parse and easy to read when imported into a spreadsheet program, such as Microsoft Excel, or a text
editor, such as Notepad. AscII file is just a generic text file with file extension .txt.

In order to save signal as ASCII/LVM, add a step after your DAQmx acquire step.  Click "Add Step" and choose "Load/Save Signals">> "Analog
Signals">> "Save to ASCII/LVM".  As you can see in the pic below, you can change the file settings to your liking.
-click folder to select file path
-Make sure to select "Append to file" for continuous runs so that you don't generate multiple files for each run
-In "Export file type" you have a choice of .lvm or .txt.

I hope this helps. 



Message Edited by Ima U on 11-19-2007 11:18 AM

Message Edited by Ima U on 11-19-2007 11:22 AM
Regards,

Ima
Applications Engineer
National Instruments
LabVIEW Introduction Course - Six Hours
Getting Started with NI-DAQmx
0 Kudos
Message 3 of 5
(5,189 Views)
I am trying to do a similar thing with DAQ, however I hope wish to perform and FFT analysis on my analog signals (im using multiple channels) and then write that frequency and magnitude data to an ASCII. I relearning matlab and am wondering, if I use a waveform after the FFT, is does the x-axis automatically become frequency and the y-axis become Vrms, or do I have to change that somewhere? I have been messing with it for days and come to the conclusion that it automatially converts to frequency and Vrms, but am not seeing the data I want.

Any suggestions?

Grateful,
Jim
0 Kudos
Message 4 of 5
(5,043 Views)

Hi Jim,

As I understand the issue, you are using LabVIEW Signal Express to perform a Data Acquisition Step, a Power spectrum step, and lastly a Save to ASCII file step. You wanted to know what the units of the waveform axis are after the power spectrum step has been performed. Is my understanding of your question correct?

As can be seen in the attached screenshot, you can control the scaling of the Y-axis. What you are most likely interested in is selecting Spectrum type so that it is either units of Power or units of Magnitude displayed on the Y-axis, where Power is equal to Magnitude squared. The default setting is Power. You also specify Peak Conversion, though the default is RMS.

I hope this explanation helps. Happy Holidays, Mallori M.



Message Edited by mallorim on 12-21-2007 02:54 PM
Mallori M
National Instruments
Sr Group Manager, Education Services

ni.com/training
0 Kudos
Message 5 of 5
(5,026 Views)