data acquisition using FIFO

Hi,

I am trying to acquired data of undefined length using FIFO and store it in a text file whenever I stopped the acquisition.
I wrote the routine here after. Acquisition works but I do not manage to save the data in a text file.
Any hint on how doing this?

Thanks
eric

below is the routine I wrote.

macro testFIFO()
NewFIFO MyFIFO
NewFIFOChan/S MyFIFO, chan1, 0,1,0,10,"V"
CtrlFIFO MyFIFO, deltaT=0.1
Variable MyFIFORefnum
Open MyFIFORefnum
CtrlFIFO MyFIFO, file=MyFIFORefnum

NewPanel/N=ReadPressure /W=(1020, 0, 1670, 450)

Chart MyChart, fifo=MyFIFO, disable=0, chans={0}, size={400,400}
Chart MyChart, lineMode(0)=0, gain(0)=1, uMode=3
CtrlFIFO MyFIFO,start
DAQmx_Scan/DEV="dev4" FIFO="MyFIFO; 1;"
end

macro stopFIFO()
fDAQmx_ScanStop("dev4")
CtrlFIFO MyFIFO, stop

//KillFIFO myFIFO
//make/n=132 test
//FIFO2Wave MyFIFO chan1 test
end
First, don't kill the FIFO until after you have extracted the data using FIFO2Wave. Then your code will extract the data to a wave, and to save it in a text file you need to then call Save with appropriate options.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
Thanks John for your answer.
The point is that I would like to avoid having to convert FIFO into wave. The lines in comments at the end of my routine were just to test this issue.
I would like to record data of undetermine length and store them in a file simultaneously so that whenever I stop the acquisition or when the computer crashes, the data are saved.
The command SaveData does not work with FIFO, so I am kind of stuck.
I put the following command to connect the FIFO to a disk file
Variable MyFIFORefnum
Open MyFIFORefnum
CtrlFIFO MyFIFO, file=MyFIFORefnum

but nothing is save, or at least nothing readable;

Any idea?
Thanks
eric
The only way to deal with the data within Igor is to extract it into a wave. The format of the data on disk is pretty simple- if you are trying to save the data in a format that can be opened in some other software, you might be able to write some code that would do that without involving Igor. But these days, with Igor64 you can handle very large waves, so that might still be the easiest option.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com