Skip to main content

CtrlFIFO

CtrlFIFO FIFOName, [deltaT=dt, note=noteStr, file=oRefNum, rfile=rRefNum, rdfile=rRefNum, doffset=dataOffset, dsize=dataSize, swap, size=s, start, stop, close, flush]

The CtrlFIFO operation controls various aspects of the named FIFO.

Parameters

closeCloses the FIFO's output or review file (if any).
deltaT=dtDocuments the data acquisition rate.
doffset=dataOffsetUsed only with rdfile. Offset to data. If not provided offset is zero.
dsize=dataSizeUsed only with rdfile. Size of data in bytes. If not provided, then data size is assumed to be the remainder of file. If this assumption is not valid then unexpected results may be observed.
flushNew data in FIFO is flushed to disk immediately.
file=oRefNumThe file reference number for the FIFO's output file. You obtain this reference number from the Open operation used to create the file.
note=noteStrStores the note string in the file header. It is limited to 255 bytes.
rfile=rRefNumThe file reference number for the FIFO's review file. You use a review file when you are using a FIFO to review existing data. You obtain the reference number from the Open/R operation used to open the file. File may be either unified header/data or a split format where the header contains the name of a file containing the raw data.
rdfile=rRefNumLike rfile but for review of raw data (use Open/R command). Channel data must match raw data in file. Offset from start of file to start of data can be provided using doffset given in same command. If data does not extend all the way to the end of the file, then the number of bytes of data can be provided using dsize in the same command.
size=sSets number of chunks in the FIFO. The default is 10000. A chunk of data consists of a single data point from each of the FIFO's channels.
startStarts the FIFO running by setting the time/date info fields in the FIFO header, writing the header to the output file and marking the FIFO as active.
stopStops the FIFO by flushing data to disk and marking the FIFO as inactive.
swapUsed only with rdfile. Indicates that the raw data file requires byte-swapping when it is read. This would be the case if you are running on a Mac, reading a binary file from a PC, or vice-versa.

Details

Once start has been issued, the FIFO can accept no further commands except stop.

The FIFO must be in the valid state for you to access its data (using a chart control or using the FIFO2Wave operation). When you create a FIFO, using NewFIFO, it is initially invalid. It becomes valid when you issue the start command via the CtrlFIFO operation. It remains valid until you change a FIFO parameter using CtrlFIFO.

See Also

FIFOs and Charts, Open